diff --git a/src/Stripe.net/Entities/AccountLinks/AccountLink.cs b/src/Stripe.net/Entities/AccountLinks/AccountLink.cs
index 8bacf57d3e..86581ad248 100644
--- a/src/Stripe.net/Entities/AccountLinks/AccountLink.cs
+++ b/src/Stripe.net/Entities/AccountLinks/AccountLink.cs
@@ -4,6 +4,9 @@ namespace Stripe
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// Account Links are the means by which a Connect platform grants a connected account
@@ -18,6 +21,9 @@ public class AccountLink : StripeEntity, IHasObject
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
@@ -25,6 +31,10 @@ public class AccountLink : StripeEntity, IHasObject
///
[JsonProperty("created")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("created")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
@@ -32,12 +42,19 @@ public class AccountLink : StripeEntity, IHasObject
///
[JsonProperty("expires_at")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("expires_at")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
/// The URL for the account link.
///
[JsonProperty("url")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("url")]
+#endif
public string Url { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSession.cs b/src/Stripe.net/Entities/AccountSessions/AccountSession.cs
index 0aee88d5df..6fdf220ecd 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSession.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSession.cs
@@ -4,6 +4,9 @@ namespace Stripe
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// An AccountSession allows a Connect platform to grant access to a connected account in
@@ -23,12 +26,18 @@ public class AccountSession : StripeEntity, IHasObject
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
/// The ID of the account the AccountSession was created for.
///
[JsonProperty("account")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("account")]
+#endif
public string Account { get; set; }
///
@@ -45,9 +54,15 @@ public class AccountSession : StripeEntity, IHasObject
/// handled.
///
[JsonProperty("client_secret")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("client_secret")]
+#endif
public string ClientSecret { get; set; }
[JsonProperty("components")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("components")]
+#endif
public AccountSessionComponents Components { get; set; }
///
@@ -55,6 +70,10 @@ public class AccountSession : StripeEntity, IHasObject
///
[JsonProperty("expires_at")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("expires_at")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
@@ -62,6 +81,9 @@ public class AccountSession : StripeEntity, IHasObject
/// the object exists in test mode.
///
[JsonProperty("livemode")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("livemode")]
+#endif
public bool Livemode { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponents.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponents.cs
index 695b61747f..8fac1b4eb2 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponents.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponents.cs
@@ -2,52 +2,100 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponents : StripeEntity
{
[JsonProperty("account_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("account_management")]
+#endif
public AccountSessionComponentsAccountManagement AccountManagement { get; set; }
[JsonProperty("account_onboarding")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("account_onboarding")]
+#endif
public AccountSessionComponentsAccountOnboarding AccountOnboarding { get; set; }
[JsonProperty("balances")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("balances")]
+#endif
public AccountSessionComponentsBalances Balances { get; set; }
[JsonProperty("documents")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("documents")]
+#endif
public AccountSessionComponentsDocuments Documents { get; set; }
[JsonProperty("financial_account")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("financial_account")]
+#endif
public AccountSessionComponentsFinancialAccount FinancialAccount { get; set; }
[JsonProperty("financial_account_transactions")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("financial_account_transactions")]
+#endif
public AccountSessionComponentsFinancialAccountTransactions FinancialAccountTransactions { get; set; }
[JsonProperty("issuing_card")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("issuing_card")]
+#endif
public AccountSessionComponentsIssuingCard IssuingCard { get; set; }
[JsonProperty("issuing_cards_list")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("issuing_cards_list")]
+#endif
public AccountSessionComponentsIssuingCardsList IssuingCardsList { get; set; }
[JsonProperty("notification_banner")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("notification_banner")]
+#endif
public AccountSessionComponentsNotificationBanner NotificationBanner { get; set; }
[JsonProperty("payment_details")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("payment_details")]
+#endif
public AccountSessionComponentsPaymentDetails PaymentDetails { get; set; }
[JsonProperty("payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("payments")]
+#endif
public AccountSessionComponentsPayments Payments { get; set; }
[JsonProperty("payouts")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("payouts")]
+#endif
public AccountSessionComponentsPayouts Payouts { get; set; }
[JsonProperty("payouts_list")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("payouts_list")]
+#endif
public AccountSessionComponentsPayoutsList PayoutsList { get; set; }
[JsonProperty("tax_registrations")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("tax_registrations")]
+#endif
public AccountSessionComponentsTaxRegistrations TaxRegistrations { get; set; }
[JsonProperty("tax_settings")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("tax_settings")]
+#endif
public AccountSessionComponentsTaxSettings TaxSettings { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagement.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagement.cs
index 6ff6b25dfa..83f1a231a5 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagement.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagement.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsAccountManagement : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsAccountManagement : StripeEntity
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsAccountManagementFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagementFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagementFeatures.cs
index e923118ac4..19cbdc80a4 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagementFeatures.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagementFeatures.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsAccountManagementFeatures : StripeEntity
{
@@ -13,6 +16,9 @@ public class AccountSessionComponentsAccountManagementFeatures : StripeEntitydisable_stripe_user_authentication defaults to false.
///
[JsonProperty("disable_stripe_user_authentication")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("disable_stripe_user_authentication")]
+#endif
public bool DisableStripeUserAuthentication { get; set; }
///
@@ -23,6 +29,9 @@ public class AccountSessionComponentsAccountManagementFeatures : StripeEntitytrue.
///
[JsonProperty("external_account_collection")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("external_account_collection")]
+#endif
public bool ExternalAccountCollection { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboarding.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboarding.cs
index e39c061b65..b71a604731 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboarding.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboarding.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsAccountOnboarding : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsAccountOnboarding : StripeEntity
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsAccountOnboardingFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboardingFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboardingFeatures.cs
index 30568b1165..815d29e638 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboardingFeatures.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboardingFeatures.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsAccountOnboardingFeatures : StripeEntity
{
@@ -13,6 +16,9 @@ public class AccountSessionComponentsAccountOnboardingFeatures : StripeEntitydisable_stripe_user_authentication defaults to false.
///
[JsonProperty("disable_stripe_user_authentication")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("disable_stripe_user_authentication")]
+#endif
public bool DisableStripeUserAuthentication { get; set; }
///
@@ -23,6 +29,9 @@ public class AccountSessionComponentsAccountOnboardingFeatures : StripeEntitytrue.
///
[JsonProperty("external_account_collection")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("external_account_collection")]
+#endif
public bool ExternalAccountCollection { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalances.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalances.cs
index f2a462fb2f..63aa8b6bb6 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalances.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalances.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsBalances : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsBalances : StripeEntity
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsBalancesFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalancesFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalancesFeatures.cs
index 7c2c0a93d5..82ccce0d3f 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalancesFeatures.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalancesFeatures.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsBalancesFeatures : StripeEntity
{
@@ -13,6 +16,9 @@ public class AccountSessionComponentsBalancesFeatures : StripeEntitydisable_stripe_user_authentication defaults to false.
///
[JsonProperty("disable_stripe_user_authentication")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("disable_stripe_user_authentication")]
+#endif
public bool DisableStripeUserAuthentication { get; set; }
///
@@ -20,6 +26,9 @@ public class AccountSessionComponentsBalancesFeatures : StripeEntityfalse otherwise.
///
[JsonProperty("edit_payout_schedule")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("edit_payout_schedule")]
+#endif
public bool EditPayoutSchedule { get; set; }
///
@@ -30,6 +39,9 @@ public class AccountSessionComponentsBalancesFeatures : StripeEntitytrue.
///
[JsonProperty("external_account_collection")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("external_account_collection")]
+#endif
public bool ExternalAccountCollection { get; set; }
///
@@ -37,6 +49,9 @@ public class AccountSessionComponentsBalancesFeatures : StripeEntityfalse otherwise.
///
[JsonProperty("instant_payouts")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("instant_payouts")]
+#endif
public bool InstantPayouts { get; set; }
///
@@ -44,6 +59,9 @@ public class AccountSessionComponentsBalancesFeatures : StripeEntityfalse otherwise.
///
[JsonProperty("standard_payouts")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("standard_payouts")]
+#endif
public bool StandardPayouts { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsDocuments.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsDocuments.cs
index b74a4292b3..7551ecf4bb 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsDocuments.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsDocuments.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsDocuments : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsDocuments : StripeEntity
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsDocumentsFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccount.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccount.cs
index b7b18c5d40..25ec7924fe 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccount.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccount.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsFinancialAccount : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsFinancialAccount : StripeEntity
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsFinancialAccountFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccountFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccountFeatures.cs
index a9bba4246b..c87f6b64fa 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccountFeatures.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccountFeatures.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsFinancialAccountFeatures : StripeEntity
{
@@ -13,24 +16,36 @@ public class AccountSessionComponentsFinancialAccountFeatures : StripeEntitydisable_stripe_user_authentication defaults to false.
///
[JsonProperty("disable_stripe_user_authentication")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("disable_stripe_user_authentication")]
+#endif
public bool DisableStripeUserAuthentication { get; set; }
///
/// Whether to allow external accounts to be linked for money transfer.
///
[JsonProperty("external_account_collection")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("external_account_collection")]
+#endif
public bool ExternalAccountCollection { get; set; }
///
/// Whether to allow sending money.
///
[JsonProperty("send_money")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("send_money")]
+#endif
public bool SendMoney { get; set; }
///
/// Whether to allow transferring balance.
///
[JsonProperty("transfer_balance")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("transfer_balance")]
+#endif
public bool TransferBalance { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccountTransactions.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccountTransactions.cs
index ad93c3e8d9..f042ed75c3 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccountTransactions.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccountTransactions.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsFinancialAccountTransactions : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsFinancialAccountTransactions : StripeEntity
/// Whether the embedded component is enabled.
///
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsFinancialAccountTransactionsFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccountTransactionsFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccountTransactionsFeatures.cs
index 9c72a34600..21367eb0a8 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccountTransactionsFeatures.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsFinancialAccountTransactionsFeatures.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsFinancialAccountTransactionsFeatures : StripeEntity
{
@@ -9,6 +12,9 @@ public class AccountSessionComponentsFinancialAccountTransactionsFeatures : Stri
/// Whether to allow card spend dispute management features.
///
[JsonProperty("card_spend_dispute_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("card_spend_dispute_management")]
+#endif
public bool CardSpendDisputeManagement { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCard.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCard.cs
index 62d84462c1..7ca02510f1 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCard.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCard.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsIssuingCard : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsIssuingCard : StripeEntity
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsIssuingCardFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCardFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCardFeatures.cs
index a7279a66d2..5a98444936 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCardFeatures.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCardFeatures.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsIssuingCardFeatures : StripeEntity
{
@@ -9,24 +12,36 @@ public class AccountSessionComponentsIssuingCardFeatures : StripeEntity
[JsonProperty("card_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("card_management")]
+#endif
public bool CardManagement { get; set; }
///
/// Whether to allow card spend dispute management features.
///
[JsonProperty("card_spend_dispute_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("card_spend_dispute_management")]
+#endif
public bool CardSpendDisputeManagement { get; set; }
///
/// Whether to allow cardholder management features.
///
[JsonProperty("cardholder_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("cardholder_management")]
+#endif
public bool CardholderManagement { get; set; }
///
/// Whether to allow spend control management features.
///
[JsonProperty("spend_control_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("spend_control_management")]
+#endif
public bool SpendControlManagement { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCardsList.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCardsList.cs
index 58f83e8e69..6eed2b5b93 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCardsList.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCardsList.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsIssuingCardsList : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsIssuingCardsList : StripeEntity
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsIssuingCardsListFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCardsListFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCardsListFeatures.cs
index 20110daeb9..450117a727 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCardsListFeatures.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsIssuingCardsListFeatures.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsIssuingCardsListFeatures : StripeEntity
{
@@ -9,18 +12,27 @@ public class AccountSessionComponentsIssuingCardsListFeatures : StripeEntity
[JsonProperty("card_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("card_management")]
+#endif
public bool CardManagement { get; set; }
///
/// Whether to allow card spend dispute management features.
///
[JsonProperty("card_spend_dispute_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("card_spend_dispute_management")]
+#endif
public bool CardSpendDisputeManagement { get; set; }
///
/// Whether to allow cardholder management features.
///
[JsonProperty("cardholder_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("cardholder_management")]
+#endif
public bool CardholderManagement { get; set; }
///
@@ -29,12 +41,18 @@ public class AccountSessionComponentsIssuingCardsListFeatures : StripeEntity
[JsonProperty("disable_stripe_user_authentication")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("disable_stripe_user_authentication")]
+#endif
public bool DisableStripeUserAuthentication { get; set; }
///
/// Whether to allow spend control management features.
///
[JsonProperty("spend_control_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("spend_control_management")]
+#endif
public bool SpendControlManagement { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBanner.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBanner.cs
index 8fb832ea2f..0962420f72 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBanner.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBanner.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsNotificationBanner : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsNotificationBanner : StripeEntity
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsNotificationBannerFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBannerFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBannerFeatures.cs
index 0a6d022478..28312b1232 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBannerFeatures.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBannerFeatures.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsNotificationBannerFeatures : StripeEntity
{
@@ -13,6 +16,9 @@ public class AccountSessionComponentsNotificationBannerFeatures : StripeEntitydisable_stripe_user_authentication defaults to false.
///
[JsonProperty("disable_stripe_user_authentication")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("disable_stripe_user_authentication")]
+#endif
public bool DisableStripeUserAuthentication { get; set; }
///
@@ -23,6 +29,9 @@ public class AccountSessionComponentsNotificationBannerFeatures : StripeEntitytrue.
///
[JsonProperty("external_account_collection")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("external_account_collection")]
+#endif
public bool ExternalAccountCollection { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetails.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetails.cs
index 277f17ecab..5219eb6f2a 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetails.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetails.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsPaymentDetails : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsPaymentDetails : StripeEntity
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsPaymentDetailsFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetailsFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetailsFeatures.cs
index 02e441b2ce..448cead3b6 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetailsFeatures.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetailsFeatures.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsPaymentDetailsFeatures : StripeEntity
{
@@ -10,6 +13,9 @@ public class AccountSessionComponentsPaymentDetailsFeatures : StripeEntity
[JsonProperty("capture_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("capture_payments")]
+#endif
public bool CapturePayments { get; set; }
///
@@ -17,6 +23,9 @@ public class AccountSessionComponentsPaymentDetailsFeatures : StripeEntityfalse by default.
///
[JsonProperty("destination_on_behalf_of_charge_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("destination_on_behalf_of_charge_management")]
+#endif
public bool DestinationOnBehalfOfChargeManagement { get; set; }
///
@@ -24,12 +33,18 @@ public class AccountSessionComponentsPaymentDetailsFeatures : StripeEntitytrue by default.
///
[JsonProperty("dispute_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("dispute_management")]
+#endif
public bool DisputeManagement { get; set; }
///
/// Whether to allow sending refunds. This is true by default.
///
[JsonProperty("refund_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("refund_management")]
+#endif
public bool RefundManagement { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayments.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayments.cs
index ba20cb3783..a0a831a97e 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayments.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayments.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsPayments : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsPayments : StripeEntity
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsPaymentsFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentsFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentsFeatures.cs
index 822ec1ca73..a8844c71af 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentsFeatures.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentsFeatures.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsPaymentsFeatures : StripeEntity
{
@@ -10,6 +13,9 @@ public class AccountSessionComponentsPaymentsFeatures : StripeEntity
[JsonProperty("capture_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("capture_payments")]
+#endif
public bool CapturePayments { get; set; }
///
@@ -17,6 +23,9 @@ public class AccountSessionComponentsPaymentsFeatures : StripeEntityfalse by default.
///
[JsonProperty("destination_on_behalf_of_charge_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("destination_on_behalf_of_charge_management")]
+#endif
public bool DestinationOnBehalfOfChargeManagement { get; set; }
///
@@ -24,12 +33,18 @@ public class AccountSessionComponentsPaymentsFeatures : StripeEntitytrue by default.
///
[JsonProperty("dispute_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("dispute_management")]
+#endif
public bool DisputeManagement { get; set; }
///
/// Whether to allow sending refunds. This is true by default.
///
[JsonProperty("refund_management")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("refund_management")]
+#endif
public bool RefundManagement { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayouts.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayouts.cs
index fc6e67a68e..1a11e88321 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayouts.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayouts.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsPayouts : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsPayouts : StripeEntity
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsPayoutsFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsFeatures.cs
index c03ac4ad83..9629dc3b82 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsFeatures.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsFeatures.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsPayoutsFeatures : StripeEntity
{
@@ -13,6 +16,9 @@ public class AccountSessionComponentsPayoutsFeatures : StripeEntitydisable_stripe_user_authentication defaults to false.
///
[JsonProperty("disable_stripe_user_authentication")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("disable_stripe_user_authentication")]
+#endif
public bool DisableStripeUserAuthentication { get; set; }
///
@@ -20,6 +26,9 @@ public class AccountSessionComponentsPayoutsFeatures : StripeEntityfalse otherwise.
///
[JsonProperty("edit_payout_schedule")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("edit_payout_schedule")]
+#endif
public bool EditPayoutSchedule { get; set; }
///
@@ -30,6 +39,9 @@ public class AccountSessionComponentsPayoutsFeatures : StripeEntitytrue.
///
[JsonProperty("external_account_collection")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("external_account_collection")]
+#endif
public bool ExternalAccountCollection { get; set; }
///
@@ -37,6 +49,9 @@ public class AccountSessionComponentsPayoutsFeatures : StripeEntityfalse otherwise.
///
[JsonProperty("instant_payouts")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("instant_payouts")]
+#endif
public bool InstantPayouts { get; set; }
///
@@ -44,6 +59,9 @@ public class AccountSessionComponentsPayoutsFeatures : StripeEntityfalse otherwise.
///
[JsonProperty("standard_payouts")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("standard_payouts")]
+#endif
public bool StandardPayouts { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsList.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsList.cs
index b8ea1bff94..0155d120ca 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsList.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsList.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsPayoutsList : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsPayoutsList : StripeEntity
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsPayoutsListFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxRegistrations.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxRegistrations.cs
index 8a389a9202..9707d853d4 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxRegistrations.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxRegistrations.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsTaxRegistrations : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsTaxRegistrations : StripeEntity
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsTaxRegistrationsFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxSettings.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxSettings.cs
index 8721703aea..7a9e5092d0 100644
--- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxSettings.cs
+++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxSettings.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSessionComponentsTaxSettings : StripeEntity
{
@@ -9,9 +12,15 @@ public class AccountSessionComponentsTaxSettings : StripeEntity
[JsonProperty("enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("enabled")]
+#endif
public bool Enabled { get; set; }
[JsonProperty("features")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("features")]
+#endif
public AccountSessionComponentsTaxSettingsFeatures Features { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/Account.cs b/src/Stripe.net/Entities/Accounts/Account.cs
index 231f358114..7bc283e15e 100644
--- a/src/Stripe.net/Entities/Accounts/Account.cs
+++ b/src/Stripe.net/Entities/Accounts/Account.cs
@@ -5,6 +5,9 @@ namespace Stripe
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// This is an object representing a Stripe account. You can retrieve it to see properties
@@ -30,18 +33,27 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject,
/// Unique identifier for the object.
///
[JsonProperty("id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("id")]
+#endif
public string Id { get; set; }
///
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
/// Business information about the account.
///
[JsonProperty("business_profile")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("business_profile")]
+#endif
public AccountBusinessProfile BusinessProfile { get; set; }
///
@@ -55,27 +67,45 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject,
/// non_profit.
///
[JsonProperty("business_type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("business_type")]
+#endif
public string BusinessType { get; set; }
[JsonProperty("capabilities")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("capabilities")]
+#endif
public AccountCapabilities Capabilities { get; set; }
///
/// Whether the account can process charges.
///
[JsonProperty("charges_enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("charges_enabled")]
+#endif
public bool ChargesEnabled { get; set; }
[JsonProperty("company")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("company")]
+#endif
public AccountCompany Company { get; set; }
[JsonProperty("controller")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("controller")]
+#endif
public AccountController Controller { get; set; }
///
/// The account's country.
///
[JsonProperty("country")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("country")]
+#endif
public string Country { get; set; }
///
@@ -83,6 +113,10 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject,
///
[JsonProperty("created")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("created")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
@@ -91,12 +125,19 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject,
/// account's country.
///
[JsonProperty("default_currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("default_currency")]
+#endif
public string DefaultCurrency { get; set; }
///
/// Whether this object is deleted or not.
///
[JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("deleted")]
+ [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)]
+#endif
public bool? Deleted { get; set; }
///
@@ -107,6 +148,9 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject,
/// account details.
///
[JsonProperty("details_submitted")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("details_submitted")]
+#endif
public bool DetailsSubmitted { get; set; }
///
@@ -114,6 +158,9 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject,
/// Stripe doesn't market to this field without explicit approval from the platform.
///
[JsonProperty("email")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("email")]
+#endif
public string Email { get; set; }
///
@@ -122,15 +169,24 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject,
/// is true.
///
[JsonProperty("external_accounts")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("external_accounts")]
+#endif
public StripeList ExternalAccounts { get; set; }
[JsonProperty("future_requirements")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("future_requirements")]
+#endif
public AccountFutureRequirements FutureRequirements { get; set; }
///
/// The groups associated with the account.
///
[JsonProperty("groups")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("groups")]
+#endif
public AccountGroups Groups { get; set; }
///
@@ -149,6 +205,9 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject,
/// identity verification with the API.
///
[JsonProperty("individual")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("individual")]
+#endif
public Person Individual { get; set; }
///
@@ -157,24 +216,39 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject,
/// object in a structured format.
///
[JsonProperty("metadata")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("metadata")]
+#endif
public Dictionary Metadata { get; set; }
///
/// Whether the funds in this account can be paid out.
///
[JsonProperty("payouts_enabled")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("payouts_enabled")]
+#endif
public bool PayoutsEnabled { get; set; }
[JsonProperty("requirements")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("requirements")]
+#endif
public AccountRequirements Requirements { get; set; }
///
/// Options for customizing how the account functions within Stripe.
///
[JsonProperty("settings")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("settings")]
+#endif
public AccountSettings Settings { get; set; }
[JsonProperty("tos_acceptance")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("tos_acceptance")]
+#endif
public AccountTosAcceptance TosAcceptance { get; set; }
///
@@ -183,6 +257,9 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject,
/// One of: custom, express, none, or standard.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountBusinessProfile.cs b/src/Stripe.net/Entities/Accounts/AccountBusinessProfile.cs
index 327b22aca6..0fbbd3d6eb 100644
--- a/src/Stripe.net/Entities/Accounts/AccountBusinessProfile.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountBusinessProfile.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountBusinessProfile : StripeEntity
{
@@ -9,6 +12,9 @@ public class AccountBusinessProfile : StripeEntity
/// The applicant's gross annual revenue for its preceding fiscal year.
///
[JsonProperty("annual_revenue")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("annual_revenue")]
+#endif
public AccountBusinessProfileAnnualRevenue AnnualRevenue { get; set; }
///
@@ -16,6 +22,9 @@ public class AccountBusinessProfile : StripeEntity
/// the business.
///
[JsonProperty("estimated_worker_count")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("estimated_worker_count")]
+#endif
public long? EstimatedWorkerCount { get; set; }
///
@@ -24,15 +33,24 @@ public class AccountBusinessProfile : StripeEntity
/// provide.
///
[JsonProperty("mcc")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("mcc")]
+#endif
public string Mcc { get; set; }
[JsonProperty("monthly_estimated_revenue")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("monthly_estimated_revenue")]
+#endif
public AccountBusinessProfileMonthlyEstimatedRevenue MonthlyEstimatedRevenue { get; set; }
///
/// The customer-facing business name.
///
[JsonProperty("name")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("name")]
+#endif
public string Name { get; set; }
///
@@ -40,36 +58,54 @@ public class AccountBusinessProfile : StripeEntity
/// used by Stripe for risk and underwriting purposes.
///
[JsonProperty("product_description")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("product_description")]
+#endif
public string ProductDescription { get; set; }
///
/// A publicly available mailing address for sending support issues to.
///
[JsonProperty("support_address")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("support_address")]
+#endif
public Address SupportAddress { get; set; }
///
/// A publicly available email address for sending support issues to.
///
[JsonProperty("support_email")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("support_email")]
+#endif
public string SupportEmail { get; set; }
///
/// A publicly available phone number to call with support issues.
///
[JsonProperty("support_phone")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("support_phone")]
+#endif
public string SupportPhone { get; set; }
///
/// A publicly available website for handling support issues.
///
[JsonProperty("support_url")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("support_url")]
+#endif
public string SupportUrl { get; set; }
///
/// The business's publicly available website.
///
[JsonProperty("url")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("url")]
+#endif
public string Url { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountBusinessProfileAnnualRevenue.cs b/src/Stripe.net/Entities/Accounts/AccountBusinessProfileAnnualRevenue.cs
index 2662eae9ea..d3929e576b 100644
--- a/src/Stripe.net/Entities/Accounts/AccountBusinessProfileAnnualRevenue.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountBusinessProfileAnnualRevenue.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountBusinessProfileAnnualRevenue : StripeEntity
{
@@ -10,6 +13,9 @@ public class AccountBusinessProfileAnnualRevenue : StripeEntitysmallest currency unit.
///
[JsonProperty("amount")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("amount")]
+#endif
public long? Amount { get; set; }
///
@@ -18,6 +24,9 @@ public class AccountBusinessProfileAnnualRevenue : StripeEntity.
///
[JsonProperty("currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currency")]
+#endif
public string Currency { get; set; }
///
@@ -25,6 +34,9 @@ public class AccountBusinessProfileAnnualRevenue : StripeEntity
[JsonProperty("fiscal_year_end")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("fiscal_year_end")]
+#endif
public string FiscalYearEnd { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountBusinessProfileMonthlyEstimatedRevenue.cs b/src/Stripe.net/Entities/Accounts/AccountBusinessProfileMonthlyEstimatedRevenue.cs
index 4b69bd93f0..a8f7cb09bb 100644
--- a/src/Stripe.net/Entities/Accounts/AccountBusinessProfileMonthlyEstimatedRevenue.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountBusinessProfileMonthlyEstimatedRevenue.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountBusinessProfileMonthlyEstimatedRevenue : StripeEntity
{
@@ -10,6 +13,9 @@ public class AccountBusinessProfileMonthlyEstimatedRevenue : StripeEntitysmallest currency unit.
///
[JsonProperty("amount")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("amount")]
+#endif
public long Amount { get; set; }
///
@@ -18,6 +24,9 @@ public class AccountBusinessProfileMonthlyEstimatedRevenue : StripeEntity.
///
[JsonProperty("currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currency")]
+#endif
public string Currency { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs b/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs
index 879d11356c..e03fb53fc4 100644
--- a/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountCapabilities : StripeEntity
{
@@ -11,6 +14,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("acss_debit_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("acss_debit_payments")]
+#endif
public string AcssDebitPayments { get; set; }
///
@@ -19,6 +25,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("affirm_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("affirm_payments")]
+#endif
public string AffirmPayments { get; set; }
///
@@ -27,6 +36,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("afterpay_clearpay_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("afterpay_clearpay_payments")]
+#endif
public string AfterpayClearpayPayments { get; set; }
///
@@ -35,6 +47,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("alma_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("alma_payments")]
+#endif
public string AlmaPayments { get; set; }
///
@@ -43,6 +58,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("amazon_pay_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("amazon_pay_payments")]
+#endif
public string AmazonPayPayments { get; set; }
///
@@ -51,6 +69,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("au_becs_debit_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("au_becs_debit_payments")]
+#endif
public string AuBecsDebitPayments { get; set; }
///
@@ -59,6 +80,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("bacs_debit_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("bacs_debit_payments")]
+#endif
public string BacsDebitPayments { get; set; }
///
@@ -67,6 +91,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("bancontact_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("bancontact_payments")]
+#endif
public string BancontactPayments { get; set; }
///
@@ -75,6 +102,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("bank_transfer_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("bank_transfer_payments")]
+#endif
public string BankTransferPayments { get; set; }
///
@@ -83,6 +113,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("blik_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("blik_payments")]
+#endif
public string BlikPayments { get; set; }
///
@@ -91,6 +124,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("boleto_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("boleto_payments")]
+#endif
public string BoletoPayments { get; set; }
///
@@ -99,6 +135,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("card_issuing")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("card_issuing")]
+#endif
public string CardIssuing { get; set; }
///
@@ -107,6 +146,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("card_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("card_payments")]
+#endif
public string CardPayments { get; set; }
///
@@ -115,6 +157,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("cartes_bancaires_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("cartes_bancaires_payments")]
+#endif
public string CartesBancairesPayments { get; set; }
///
@@ -123,6 +168,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("cashapp_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("cashapp_payments")]
+#endif
public string CashappPayments { get; set; }
///
@@ -131,6 +179,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("eps_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("eps_payments")]
+#endif
public string EpsPayments { get; set; }
///
@@ -139,6 +190,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("fpx_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("fpx_payments")]
+#endif
public string FpxPayments { get; set; }
///
@@ -147,6 +201,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("gb_bank_transfer_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("gb_bank_transfer_payments")]
+#endif
public string GbBankTransferPayments { get; set; }
///
@@ -155,6 +212,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("giropay_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("giropay_payments")]
+#endif
public string GiropayPayments { get; set; }
///
@@ -163,6 +223,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("grabpay_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("grabpay_payments")]
+#endif
public string GrabpayPayments { get; set; }
///
@@ -171,6 +234,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("ideal_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("ideal_payments")]
+#endif
public string IdealPayments { get; set; }
///
@@ -179,6 +245,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("india_international_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("india_international_payments")]
+#endif
public string IndiaInternationalPayments { get; set; }
///
@@ -187,6 +256,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("jcb_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("jcb_payments")]
+#endif
public string JcbPayments { get; set; }
///
@@ -195,6 +267,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("jp_bank_transfer_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("jp_bank_transfer_payments")]
+#endif
public string JpBankTransferPayments { get; set; }
///
@@ -203,6 +278,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("kakao_pay_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("kakao_pay_payments")]
+#endif
public string KakaoPayPayments { get; set; }
///
@@ -211,6 +289,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("klarna_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("klarna_payments")]
+#endif
public string KlarnaPayments { get; set; }
///
@@ -219,6 +300,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("konbini_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("konbini_payments")]
+#endif
public string KonbiniPayments { get; set; }
///
@@ -227,6 +311,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("kr_card_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("kr_card_payments")]
+#endif
public string KrCardPayments { get; set; }
///
@@ -234,6 +321,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("legacy_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("legacy_payments")]
+#endif
public string LegacyPayments { get; set; }
///
@@ -242,6 +332,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("link_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("link_payments")]
+#endif
public string LinkPayments { get; set; }
///
@@ -250,6 +343,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("mobilepay_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("mobilepay_payments")]
+#endif
public string MobilepayPayments { get; set; }
///
@@ -258,6 +354,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("multibanco_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("multibanco_payments")]
+#endif
public string MultibancoPayments { get; set; }
///
@@ -266,6 +365,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("mx_bank_transfer_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("mx_bank_transfer_payments")]
+#endif
public string MxBankTransferPayments { get; set; }
///
@@ -274,6 +376,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("naver_pay_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("naver_pay_payments")]
+#endif
public string NaverPayPayments { get; set; }
///
@@ -282,6 +387,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("oxxo_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("oxxo_payments")]
+#endif
public string OxxoPayments { get; set; }
///
@@ -290,6 +398,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("p24_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("p24_payments")]
+#endif
public string P24Payments { get; set; }
///
@@ -298,6 +409,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("pay_by_bank_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("pay_by_bank_payments")]
+#endif
public string PayByBankPayments { get; set; }
///
@@ -306,6 +420,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("payco_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("payco_payments")]
+#endif
public string PaycoPayments { get; set; }
///
@@ -314,6 +431,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("paynow_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("paynow_payments")]
+#endif
public string PaynowPayments { get; set; }
///
@@ -322,6 +442,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("promptpay_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("promptpay_payments")]
+#endif
public string PromptpayPayments { get; set; }
///
@@ -330,6 +453,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("revolut_pay_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("revolut_pay_payments")]
+#endif
public string RevolutPayPayments { get; set; }
///
@@ -338,6 +464,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("samsung_pay_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("samsung_pay_payments")]
+#endif
public string SamsungPayPayments { get; set; }
///
@@ -346,6 +475,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("sepa_bank_transfer_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("sepa_bank_transfer_payments")]
+#endif
public string SepaBankTransferPayments { get; set; }
///
@@ -354,6 +486,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("sepa_debit_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("sepa_debit_payments")]
+#endif
public string SepaDebitPayments { get; set; }
///
@@ -362,6 +497,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("sofort_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("sofort_payments")]
+#endif
public string SofortPayments { get; set; }
///
@@ -370,6 +508,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("swish_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("swish_payments")]
+#endif
public string SwishPayments { get; set; }
///
@@ -377,6 +518,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("tax_reporting_us_1099_k")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("tax_reporting_us_1099_k")]
+#endif
public string TaxReportingUs1099K { get; set; }
///
@@ -384,6 +528,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("tax_reporting_us_1099_misc")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("tax_reporting_us_1099_misc")]
+#endif
public string TaxReportingUs1099Misc { get; set; }
///
@@ -392,6 +539,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("transfers")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("transfers")]
+#endif
public string Transfers { get; set; }
///
@@ -399,6 +549,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("treasury")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("treasury")]
+#endif
public string Treasury { get; set; }
///
@@ -407,6 +560,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("twint_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("twint_payments")]
+#endif
public string TwintPayments { get; set; }
///
@@ -415,6 +571,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("us_bank_account_ach_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("us_bank_account_ach_payments")]
+#endif
public string UsBankAccountAchPayments { get; set; }
///
@@ -423,6 +582,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("us_bank_transfer_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("us_bank_transfer_payments")]
+#endif
public string UsBankTransferPayments { get; set; }
///
@@ -431,6 +593,9 @@ public class AccountCapabilities : StripeEntity
/// One of: active, inactive, or pending.
///
[JsonProperty("zip_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("zip_payments")]
+#endif
public string ZipPayments { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountCompany.cs b/src/Stripe.net/Entities/Accounts/AccountCompany.cs
index 4b4ba2a5b6..ed9722d841 100644
--- a/src/Stripe.net/Entities/Accounts/AccountCompany.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountCompany.cs
@@ -2,22 +2,34 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountCompany : StripeEntity
{
[JsonProperty("address")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("address")]
+#endif
public Address Address { get; set; }
///
/// The Kana variation of the company's primary address (Japan only).
///
[JsonProperty("address_kana")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("address_kana")]
+#endif
public AddressJapan AddressKana { get; set; }
///
/// The Kanji variation of the company's primary address (Japan only).
///
[JsonProperty("address_kanji")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("address_kanji")]
+#endif
public AddressJapan AddressKanji { get; set; }
///
@@ -27,6 +39,9 @@ public class AccountCompany : StripeEntity
/// directors_provided parameter.
///
[JsonProperty("directors_provided")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("directors_provided")]
+#endif
public bool DirectorsProvided { get; set; }
///
@@ -34,6 +49,9 @@ public class AccountCompany : StripeEntity
/// current and correct.
///
[JsonProperty("directorship_declaration")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("directorship_declaration")]
+#endif
public AccountCompanyDirectorshipDeclaration DirectorshipDeclaration { get; set; }
///
@@ -44,6 +62,9 @@ public class AccountCompany : StripeEntity
/// executives were provided.
///
[JsonProperty("executives_provided")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("executives_provided")]
+#endif
public bool ExecutivesProvided { get; set; }
///
@@ -51,30 +72,45 @@ public class AccountCompany : StripeEntity
/// only).
///
[JsonProperty("export_license_id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("export_license_id")]
+#endif
public string ExportLicenseId { get; set; }
///
/// The purpose code to use for export transactions (India only).
///
[JsonProperty("export_purpose_code")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("export_purpose_code")]
+#endif
public string ExportPurposeCode { get; set; }
///
/// The company's legal name.
///
[JsonProperty("name")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("name")]
+#endif
public string Name { get; set; }
///
/// The Kana variation of the company's legal name (Japan only).
///
[JsonProperty("name_kana")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("name_kana")]
+#endif
public string NameKana { get; set; }
///
/// The Kanji variation of the company's legal name (Japan only).
///
[JsonProperty("name_kanji")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("name_kanji")]
+#endif
public string NameKanji { get; set; }
///
@@ -87,6 +123,9 @@ public class AccountCompany : StripeEntity
/// percent_ownership of each owner together).
///
[JsonProperty("owners_provided")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("owners_provided")]
+#endif
public bool OwnersProvided { get; set; }
///
@@ -94,6 +133,9 @@ public class AccountCompany : StripeEntity
/// both current and correct.
///
[JsonProperty("ownership_declaration")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("ownership_declaration")]
+#endif
public AccountCompanyOwnershipDeclaration OwnershipDeclaration { get; set; }
///
@@ -101,12 +143,18 @@ public class AccountCompany : StripeEntity
/// qualifies_as_financial_institution.
///
[JsonProperty("ownership_exemption_reason")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("ownership_exemption_reason")]
+#endif
public string OwnershipExemptionReason { get; set; }
///
/// The company's phone number (used for verification).
///
[JsonProperty("phone")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("phone")]
+#endif
public string Phone { get; set; }
///
@@ -125,12 +173,18 @@ public class AccountCompany : StripeEntity
/// unincorporated_partnership.
///
[JsonProperty("structure")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("structure")]
+#endif
public string Structure { get; set; }
///
/// Whether the company's business ID number was provided.
///
[JsonProperty("tax_id_provided")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("tax_id_provided")]
+#endif
public bool TaxIdProvided { get; set; }
///
@@ -138,18 +192,27 @@ public class AccountCompany : StripeEntity
/// only).
///
[JsonProperty("tax_id_registrar")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("tax_id_registrar")]
+#endif
public string TaxIdRegistrar { get; set; }
///
/// Whether the company's business VAT number was provided.
///
[JsonProperty("vat_id_provided")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("vat_id_provided")]
+#endif
public bool VatIdProvided { get; set; }
///
/// Information on the verification state of the company.
///
[JsonProperty("verification")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("verification")]
+#endif
public AccountCompanyVerification Verification { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountCompanyDirectorshipDeclaration.cs b/src/Stripe.net/Entities/Accounts/AccountCompanyDirectorshipDeclaration.cs
index 8eb816f5ce..3583f137e3 100644
--- a/src/Stripe.net/Entities/Accounts/AccountCompanyDirectorshipDeclaration.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountCompanyDirectorshipDeclaration.cs
@@ -4,6 +4,9 @@ namespace Stripe
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountCompanyDirectorshipDeclaration : StripeEntity
{
@@ -12,12 +15,19 @@ public class AccountCompanyDirectorshipDeclaration : StripeEntity
[JsonProperty("date")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("date")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime? Date { get; set; }
///
/// The IP address from which the directorship declaration attestation was made.
///
[JsonProperty("ip")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("ip")]
+#endif
public string Ip { get; set; }
///
@@ -25,6 +35,9 @@ public class AccountCompanyDirectorshipDeclaration : StripeEntity
[JsonProperty("user_agent")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("user_agent")]
+#endif
public string UserAgent { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountCompanyOwnershipDeclaration.cs b/src/Stripe.net/Entities/Accounts/AccountCompanyOwnershipDeclaration.cs
index 56abe7cf78..35febcdef9 100644
--- a/src/Stripe.net/Entities/Accounts/AccountCompanyOwnershipDeclaration.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountCompanyOwnershipDeclaration.cs
@@ -4,6 +4,9 @@ namespace Stripe
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountCompanyOwnershipDeclaration : StripeEntity
{
@@ -12,18 +15,28 @@ public class AccountCompanyOwnershipDeclaration : StripeEntity
[JsonProperty("date")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("date")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime? Date { get; set; }
///
/// The IP address from which the beneficial owner attestation was made.
///
[JsonProperty("ip")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("ip")]
+#endif
public string Ip { get; set; }
///
/// The user-agent string from the browser where the beneficial owner attestation was made.
///
[JsonProperty("user_agent")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("user_agent")]
+#endif
public string UserAgent { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountCompanyVerification.cs b/src/Stripe.net/Entities/Accounts/AccountCompanyVerification.cs
index e322ad0885..ad03c351e4 100644
--- a/src/Stripe.net/Entities/Accounts/AccountCompanyVerification.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountCompanyVerification.cs
@@ -2,10 +2,16 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountCompanyVerification : StripeEntity
{
[JsonProperty("document")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("document")]
+#endif
public AccountCompanyVerificationDocument Document { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountCompanyVerificationDocument.cs b/src/Stripe.net/Entities/Accounts/AccountCompanyVerificationDocument.cs
index e52c959c01..a86823f0e1 100644
--- a/src/Stripe.net/Entities/Accounts/AccountCompanyVerificationDocument.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountCompanyVerificationDocument.cs
@@ -3,7 +3,13 @@ namespace Stripe
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
+#if NET6_0_OR_GREATER
+ [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))]
+#endif
public class AccountCompanyVerificationDocument : StripeEntity
{
#region Expandable Back
@@ -15,6 +21,9 @@ public class AccountCompanyVerificationDocument : StripeEntityadditional_verification.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string BackId
{
get => this.InternalBack?.Id;
@@ -30,6 +39,9 @@ public string BackId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public File Back
{
get => this.InternalBack?.ExpandedObject;
@@ -38,6 +50,10 @@ public File Back
[JsonProperty("back")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("back")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalBack { get; set; }
#endregion
@@ -45,6 +61,9 @@ public File Back
/// A user-displayable string describing the verification state of this document.
///
[JsonProperty("details")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("details")]
+#endif
public string Details { get; set; }
///
@@ -57,6 +76,9 @@ public File Back
/// code specifying the verification state for this document.
///
[JsonProperty("details_code")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("details_code")]
+#endif
public string DetailsCode { get; set; }
#region Expandable Front
@@ -68,6 +90,9 @@ public File Back
/// value of additional_verification.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string FrontId
{
get => this.InternalFront?.Id;
@@ -83,6 +108,9 @@ public string FrontId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public File Front
{
get => this.InternalFront?.ExpandedObject;
@@ -91,6 +119,10 @@ public File Front
[JsonProperty("front")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("front")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalFront { get; set; }
#endregion
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountController.cs b/src/Stripe.net/Entities/Accounts/AccountController.cs
index b79260bbed..fe8273fb13 100644
--- a/src/Stripe.net/Entities/Accounts/AccountController.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountController.cs
@@ -2,10 +2,16 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountController : StripeEntity
{
[JsonProperty("fees")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("fees")]
+#endif
public AccountControllerFees Fees { get; set; }
///
@@ -15,9 +21,15 @@ public class AccountController : StripeEntity
/// controls. Otherwise, this field is null.
///
[JsonProperty("is_controller")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("is_controller")]
+#endif
public bool IsController { get; set; }
[JsonProperty("losses")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("losses")]
+#endif
public AccountControllerLosses Losses { get; set; }
///
@@ -26,9 +38,15 @@ public class AccountController : StripeEntity
/// One of: application, or stripe.
///
[JsonProperty("requirement_collection")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("requirement_collection")]
+#endif
public string RequirementCollection { get; set; }
[JsonProperty("stripe_dashboard")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("stripe_dashboard")]
+#endif
public AccountControllerStripeDashboard StripeDashboard { get; set; }
///
@@ -37,6 +55,9 @@ public class AccountController : StripeEntity
/// One of: account, or application.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountControllerFees.cs b/src/Stripe.net/Entities/Accounts/AccountControllerFees.cs
index d1500628d7..24175a75a9 100644
--- a/src/Stripe.net/Entities/Accounts/AccountControllerFees.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountControllerFees.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountControllerFees : StripeEntity
{
@@ -14,6 +17,9 @@ public class AccountControllerFees : StripeEntity
/// application_express.
///
[JsonProperty("payer")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("payer")]
+#endif
public string Payer { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountControllerLosses.cs b/src/Stripe.net/Entities/Accounts/AccountControllerLosses.cs
index 62259213ac..67b316b256 100644
--- a/src/Stripe.net/Entities/Accounts/AccountControllerLosses.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountControllerLosses.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountControllerLosses : StripeEntity
{
@@ -11,6 +14,9 @@ public class AccountControllerLosses : StripeEntity
/// One of: application, or stripe.
///
[JsonProperty("payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("payments")]
+#endif
public string Payments { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountControllerStripeDashboard.cs b/src/Stripe.net/Entities/Accounts/AccountControllerStripeDashboard.cs
index 72bc2e7380..052d49943a 100644
--- a/src/Stripe.net/Entities/Accounts/AccountControllerStripeDashboard.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountControllerStripeDashboard.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountControllerStripeDashboard : StripeEntity
{
@@ -11,6 +14,9 @@ public class AccountControllerStripeDashboard : StripeEntityexpress, full, or none.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountFutureRequirements.cs b/src/Stripe.net/Entities/Accounts/AccountFutureRequirements.cs
index 2be6abf5fa..e1b42b5480 100644
--- a/src/Stripe.net/Entities/Accounts/AccountFutureRequirements.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountFutureRequirements.cs
@@ -5,6 +5,9 @@ namespace Stripe
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountFutureRequirements : StripeEntity
{
@@ -13,6 +16,9 @@ public class AccountFutureRequirements : StripeEntity
/// fields instead.
///
[JsonProperty("alternatives")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("alternatives")]
+#endif
public List Alternatives { get; set; }
///
@@ -23,6 +29,10 @@ public class AccountFutureRequirements : StripeEntity
///
[JsonProperty("current_deadline")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("current_deadline")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime? CurrentDeadline { get; set; }
///
@@ -31,6 +41,9 @@ public class AccountFutureRequirements : StripeEntity
/// requirements hash.
///
[JsonProperty("currently_due")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currently_due")]
+#endif
public List CurrentlyDue { get; set; }
///
@@ -43,6 +56,9 @@ public class AccountFutureRequirements : StripeEntity
/// requirements.pending_verification, or under_review.
///
[JsonProperty("disabled_reason")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("disabled_reason")]
+#endif
public string DisabledReason { get; set; }
///
@@ -50,6 +66,9 @@ public class AccountFutureRequirements : StripeEntity
/// or verification failed.
///
[JsonProperty("errors")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("errors")]
+#endif
public List Errors { get; set; }
///
@@ -57,6 +76,9 @@ public class AccountFutureRequirements : StripeEntity
/// appear in currently_due as well.
///
[JsonProperty("eventually_due")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("eventually_due")]
+#endif
public List EventuallyDue { get; set; }
///
@@ -66,6 +88,9 @@ public class AccountFutureRequirements : StripeEntity
/// requirements.past_due.
///
[JsonProperty("past_due")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("past_due")]
+#endif
public List PastDue { get; set; }
///
@@ -77,6 +102,9 @@ public class AccountFutureRequirements : StripeEntity
/// pending.
///
[JsonProperty("pending_verification")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("pending_verification")]
+#endif
public List PendingVerification { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsAlternative.cs b/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsAlternative.cs
index 219510e264..0cafc95438 100644
--- a/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsAlternative.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsAlternative.cs
@@ -3,6 +3,9 @@ namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountFutureRequirementsAlternative : StripeEntity
{
@@ -10,6 +13,9 @@ public class AccountFutureRequirementsAlternative : StripeEntityoriginal_fields_due.
///
[JsonProperty("alternative_fields_due")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("alternative_fields_due")]
+#endif
public List AlternativeFieldsDue { get; set; }
///
@@ -17,6 +23,9 @@ public class AccountFutureRequirementsAlternative : StripeEntityalternative_fields_due.
///
[JsonProperty("original_fields_due")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("original_fields_due")]
+#endif
public List OriginalFieldsDue { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsError.cs b/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsError.cs
index dd8d1342f0..c5e8e112b8 100644
--- a/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsError.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsError.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountFutureRequirementsError : StripeEntity
{
@@ -69,6 +72,9 @@ public class AccountFutureRequirementsError : StripeEntityverification_supportability.
///
[JsonProperty("code")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("code")]
+#endif
public string Code { get; set; }
///
@@ -76,6 +82,9 @@ public class AccountFutureRequirementsError : StripeEntity
[JsonProperty("reason")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("reason")]
+#endif
public string Reason { get; set; }
///
@@ -83,6 +92,9 @@ public class AccountFutureRequirementsError : StripeEntity
[JsonProperty("requirement")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("requirement")]
+#endif
public string Requirement { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountGroups.cs b/src/Stripe.net/Entities/Accounts/AccountGroups.cs
index decfb24b42..5e4eb86f5b 100644
--- a/src/Stripe.net/Entities/Accounts/AccountGroups.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountGroups.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountGroups : StripeEntity
{
@@ -12,6 +15,9 @@ public class AccountGroups : StripeEntity
/// tool documentation for details.
///
[JsonProperty("payments_pricing")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("payments_pricing")]
+#endif
public string PaymentsPricing { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountRequirements.cs b/src/Stripe.net/Entities/Accounts/AccountRequirements.cs
index 3db1bd3e5c..f2a5291693 100644
--- a/src/Stripe.net/Entities/Accounts/AccountRequirements.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountRequirements.cs
@@ -5,6 +5,9 @@ namespace Stripe
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountRequirements : StripeEntity
{
@@ -13,6 +16,9 @@ public class AccountRequirements : StripeEntity
/// fields instead.
///
[JsonProperty("alternatives")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("alternatives")]
+#endif
public List Alternatives { get; set; }
///
@@ -22,6 +28,10 @@ public class AccountRequirements : StripeEntity
///
[JsonProperty("current_deadline")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("current_deadline")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime? CurrentDeadline { get; set; }
///
@@ -30,6 +40,9 @@ public class AccountRequirements : StripeEntity
/// is disabled.
///
[JsonProperty("currently_due")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currently_due")]
+#endif
public List CurrentlyDue { get; set; }
///
@@ -44,6 +57,9 @@ public class AccountRequirements : StripeEntity
/// requirements.pending_verification, or under_review.
///
[JsonProperty("disabled_reason")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("disabled_reason")]
+#endif
public string DisabledReason { get; set; }
///
@@ -51,6 +67,9 @@ public class AccountRequirements : StripeEntity
/// or verification failed.
///
[JsonProperty("errors")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("errors")]
+#endif
public List Errors { get; set; }
///
@@ -58,6 +77,9 @@ public class AccountRequirements : StripeEntity
/// appear in currently_due as well, and current_deadline becomes set.
///
[JsonProperty("eventually_due")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("eventually_due")]
+#endif
public List EventuallyDue { get; set; }
///
@@ -65,6 +87,9 @@ public class AccountRequirements : StripeEntity
/// collected to enable the account.
///
[JsonProperty("past_due")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("past_due")]
+#endif
public List PastDue { get; set; }
///
@@ -76,6 +101,9 @@ public class AccountRequirements : StripeEntity
/// verification is still pending.
///
[JsonProperty("pending_verification")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("pending_verification")]
+#endif
public List PendingVerification { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountRequirementsAlternative.cs b/src/Stripe.net/Entities/Accounts/AccountRequirementsAlternative.cs
index 67417940d9..1a342f531d 100644
--- a/src/Stripe.net/Entities/Accounts/AccountRequirementsAlternative.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountRequirementsAlternative.cs
@@ -3,6 +3,9 @@ namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountRequirementsAlternative : StripeEntity
{
@@ -10,6 +13,9 @@ public class AccountRequirementsAlternative : StripeEntityoriginal_fields_due.
///
[JsonProperty("alternative_fields_due")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("alternative_fields_due")]
+#endif
public List AlternativeFieldsDue { get; set; }
///
@@ -17,6 +23,9 @@ public class AccountRequirementsAlternative : StripeEntityalternative_fields_due.
///
[JsonProperty("original_fields_due")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("original_fields_due")]
+#endif
public List OriginalFieldsDue { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountRequirementsError.cs b/src/Stripe.net/Entities/Accounts/AccountRequirementsError.cs
index cc1a2e6ffe..9367a9426a 100644
--- a/src/Stripe.net/Entities/Accounts/AccountRequirementsError.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountRequirementsError.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountRequirementsError : StripeEntity
{
@@ -69,6 +72,9 @@ public class AccountRequirementsError : StripeEntity
/// verification_supportability.
///
[JsonProperty("code")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("code")]
+#endif
public string Code { get; set; }
///
@@ -76,6 +82,9 @@ public class AccountRequirementsError : StripeEntity
/// about the error.
///
[JsonProperty("reason")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("reason")]
+#endif
public string Reason { get; set; }
///
@@ -83,6 +92,9 @@ public class AccountRequirementsError : StripeEntity
/// be resolved.
///
[JsonProperty("requirement")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("requirement")]
+#endif
public string Requirement { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettings.cs b/src/Stripe.net/Entities/Accounts/AccountSettings.cs
index 64d82493ab..43b9443f38 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettings.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettings.cs
@@ -2,37 +2,70 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSettings : StripeEntity
{
[JsonProperty("bacs_debit_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("bacs_debit_payments")]
+#endif
public AccountSettingsBacsDebitPayments BacsDebitPayments { get; set; }
[JsonProperty("branding")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("branding")]
+#endif
public AccountSettingsBranding Branding { get; set; }
[JsonProperty("card_issuing")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("card_issuing")]
+#endif
public AccountSettingsCardIssuing CardIssuing { get; set; }
[JsonProperty("card_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("card_payments")]
+#endif
public AccountSettingsCardPayments CardPayments { get; set; }
[JsonProperty("dashboard")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("dashboard")]
+#endif
public AccountSettingsDashboard Dashboard { get; set; }
[JsonProperty("invoices")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("invoices")]
+#endif
public AccountSettingsInvoices Invoices { get; set; }
[JsonProperty("payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("payments")]
+#endif
public AccountSettingsPayments Payments { get; set; }
[JsonProperty("payouts")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("payouts")]
+#endif
public AccountSettingsPayouts Payouts { get; set; }
[JsonProperty("sepa_debit_payments")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("sepa_debit_payments")]
+#endif
public AccountSettingsSepaDebitPayments SepaDebitPayments { get; set; }
[JsonProperty("treasury")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("treasury")]
+#endif
public AccountSettingsTreasury Treasury { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsBacsDebitPayments.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsBacsDebitPayments.cs
index f2cd4c8147..f3eb0dce88 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettingsBacsDebitPayments.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettingsBacsDebitPayments.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSettingsBacsDebitPayments : StripeEntity
{
@@ -15,6 +18,9 @@ public class AccountSettingsBacsDebitPayments : StripeEntity
[JsonProperty("display_name")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("display_name")]
+#endif
public string DisplayName { get; set; }
///
@@ -23,6 +29,9 @@ public class AccountSettingsBacsDebitPayments : StripeEntity
[JsonProperty("service_user_number")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("service_user_number")]
+#endif
public string ServiceUserNumber { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsBranding.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsBranding.cs
index b4343a9246..89ac1de501 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettingsBranding.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettingsBranding.cs
@@ -3,7 +3,13 @@ namespace Stripe
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
+#if NET6_0_OR_GREATER
+ [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))]
+#endif
public class AccountSettingsBranding : StripeEntity
{
#region Expandable Icon
@@ -14,6 +20,9 @@ public class AccountSettingsBranding : StripeEntity
/// for the account. Must be square and at least 128px x 128px.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string IconId
{
get => this.InternalIcon?.Id;
@@ -28,6 +37,9 @@ public string IconId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public File Icon
{
get => this.InternalIcon?.ExpandedObject;
@@ -36,6 +48,10 @@ public File Icon
[JsonProperty("icon")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("icon")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalIcon { get; set; }
#endregion
@@ -48,6 +64,9 @@ public File Icon
/// account's name next to it if provided. Must be at least 128px x 128px.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string LogoId
{
get => this.InternalLogo?.Id;
@@ -63,6 +82,9 @@ public string LogoId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public File Logo
{
get => this.InternalLogo?.ExpandedObject;
@@ -71,6 +93,10 @@ public File Logo
[JsonProperty("logo")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("logo")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalLogo { get; set; }
#endregion
@@ -78,12 +104,18 @@ public File Logo
/// A CSS hex color value representing the primary branding color for this account.
///
[JsonProperty("primary_color")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("primary_color")]
+#endif
public string PrimaryColor { get; set; }
///
/// A CSS hex color value representing the secondary branding color for this account.
///
[JsonProperty("secondary_color")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("secondary_color")]
+#endif
public string SecondaryColor { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuing.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuing.cs
index 9710876a00..5e1629d04a 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuing.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuing.cs
@@ -2,10 +2,16 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSettingsCardIssuing : StripeEntity
{
[JsonProperty("tos_acceptance")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("tos_acceptance")]
+#endif
public AccountSettingsCardIssuingTosAcceptance TosAcceptance { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuingTosAcceptance.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuingTosAcceptance.cs
index 9f3581805d..d9f4661809 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuingTosAcceptance.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuingTosAcceptance.cs
@@ -4,6 +4,9 @@ namespace Stripe
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSettingsCardIssuingTosAcceptance : StripeEntity
{
@@ -13,12 +16,19 @@ public class AccountSettingsCardIssuingTosAcceptance : StripeEntity
[JsonProperty("date")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("date")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime? Date { get; set; }
///
/// The IP address from which the account representative accepted the service agreement.
///
[JsonProperty("ip")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("ip")]
+#endif
public string Ip { get; set; }
///
@@ -26,6 +36,9 @@ public class AccountSettingsCardIssuingTosAcceptance : StripeEntity
[JsonProperty("user_agent")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("user_agent")]
+#endif
public string UserAgent { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsCardPayments.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsCardPayments.cs
index 32a0fa2681..4c2fdd2f60 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettingsCardPayments.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettingsCardPayments.cs
@@ -2,10 +2,16 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSettingsCardPayments : StripeEntity
{
[JsonProperty("decline_on")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("decline_on")]
+#endif
public AccountSettingsDeclineOn DeclineOn { get; set; }
///
@@ -15,6 +21,9 @@ public class AccountSettingsCardPayments : StripeEntity
[JsonProperty("statement_descriptor_prefix")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("statement_descriptor_prefix")]
+#endif
public string StatementDescriptorPrefix { get; set; }
///
@@ -25,6 +34,9 @@ public class AccountSettingsCardPayments : StripeEntity
[JsonProperty("statement_descriptor_prefix_kana")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("statement_descriptor_prefix_kana")]
+#endif
public string StatementDescriptorPrefixKana { get; set; }
///
@@ -35,6 +47,9 @@ public class AccountSettingsCardPayments : StripeEntity
[JsonProperty("statement_descriptor_prefix_kanji")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("statement_descriptor_prefix_kanji")]
+#endif
public string StatementDescriptorPrefixKanji { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsDashboard.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsDashboard.cs
index 73da60b8d9..9f5b923011 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettingsDashboard.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettingsDashboard.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSettingsDashboard : StripeEntity
{
@@ -10,6 +13,9 @@ public class AccountSettingsDashboard : StripeEntity
/// between accounts.
///
[JsonProperty("display_name")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("display_name")]
+#endif
public string DisplayName { get; set; }
///
@@ -18,6 +24,9 @@ public class AccountSettingsDashboard : StripeEntity
/// Database.
///
[JsonProperty("timezone")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("timezone")]
+#endif
public string Timezone { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsDeclineOn.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsDeclineOn.cs
index 60476cef4b..067ead9e3f 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettingsDeclineOn.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettingsDeclineOn.cs
@@ -1,13 +1,22 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSettingsDeclineOn : StripeEntity
{
[JsonProperty("avs_failure")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("avs_failure")]
+#endif
public bool AvsFailure { get; set; }
[JsonProperty("cvc_failure")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("cvc_failure")]
+#endif
public bool CvcFailure { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsInvoices.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsInvoices.cs
index 3037466ea0..c67803874d 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettingsInvoices.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettingsInvoices.cs
@@ -5,7 +5,13 @@ namespace Stripe
using System.Linq;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
+#if NET6_0_OR_GREATER
+ [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))]
+#endif
public class AccountSettingsInvoices : StripeEntity
{
#region Expandable DefaultAccountTaxIds
@@ -16,6 +22,9 @@ public class AccountSettingsInvoices : StripeEntity
/// IDs get added when an invoice is finalized.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public List DefaultAccountTaxIdIds
{
get => this.InternalDefaultAccountTaxIds?.Select((x) => x.Id).ToList();
@@ -30,6 +39,9 @@ public List DefaultAccountTaxIdIds
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public List DefaultAccountTaxIds
{
get => this.InternalDefaultAccountTaxIds?.Select((x) => x.ExpandedObject).ToList();
@@ -37,6 +49,9 @@ public List DefaultAccountTaxIds
}
[JsonProperty("default_account_tax_ids", ItemConverterType = typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("default_account_tax_ids")]
+#endif
internal List> InternalDefaultAccountTaxIds { get; set; }
#endregion
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsPayments.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsPayments.cs
index efda8893f0..c8379c5e9e 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettingsPayments.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettingsPayments.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSettingsPayments : StripeEntity
{
@@ -10,6 +13,9 @@ public class AccountSettingsPayments : StripeEntity
/// field prefixes any dynamic statement_descriptor specified on the charge.
///
[JsonProperty("statement_descriptor")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("statement_descriptor")]
+#endif
public string StatementDescriptor { get; set; }
///
@@ -19,6 +25,9 @@ public class AccountSettingsPayments : StripeEntity
/// requirements.
///
[JsonProperty("statement_descriptor_kana")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("statement_descriptor_kana")]
+#endif
public string StatementDescriptorKana { get; set; }
///
@@ -28,6 +37,9 @@ public class AccountSettingsPayments : StripeEntity
/// requirements.
///
[JsonProperty("statement_descriptor_kanji")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("statement_descriptor_kanji")]
+#endif
public string StatementDescriptorKanji { get; set; }
///
@@ -37,6 +49,9 @@ public class AccountSettingsPayments : StripeEntity
/// requirements.
///
[JsonProperty("statement_descriptor_prefix_kana")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("statement_descriptor_prefix_kana")]
+#endif
public string StatementDescriptorPrefixKana { get; set; }
///
@@ -46,6 +61,9 @@ public class AccountSettingsPayments : StripeEntity
/// requirements.
///
[JsonProperty("statement_descriptor_prefix_kanji")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("statement_descriptor_prefix_kanji")]
+#endif
public string StatementDescriptorPrefixKanji { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsPayouts.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsPayouts.cs
index df4864c76c..7a136a1503 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettingsPayouts.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettingsPayouts.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSettingsPayouts : StripeEntity
{
@@ -13,9 +16,15 @@ public class AccountSettingsPayouts : StripeEntity
/// is application, which includes Custom accounts, otherwise true.
///
[JsonProperty("debit_negative_balances")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("debit_negative_balances")]
+#endif
public bool DebitNegativeBalances { get; set; }
[JsonProperty("schedule")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("schedule")]
+#endif
public AccountSettingsPayoutsSchedule Schedule { get; set; }
///
@@ -23,6 +32,9 @@ public class AccountSettingsPayouts : StripeEntity
/// defaults to the platform's bank descriptor as set in the Dashboard.
///
[JsonProperty("statement_descriptor")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("statement_descriptor")]
+#endif
public string StatementDescriptor { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsPayoutsSchedule.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsPayoutsSchedule.cs
index 903478c236..1161bb7c55 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettingsPayoutsSchedule.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettingsPayoutsSchedule.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSettingsPayoutsSchedule : StripeEntity
{
@@ -9,6 +12,9 @@ public class AccountSettingsPayoutsSchedule : StripeEntity
[JsonProperty("delay_days")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("delay_days")]
+#endif
public long DelayDays { get; set; }
///
@@ -16,6 +22,9 @@ public class AccountSettingsPayoutsSchedule : StripeEntitydaily, weekly, or monthly.
///
[JsonProperty("interval")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("interval")]
+#endif
public string Interval { get; set; }
///
@@ -24,6 +33,9 @@ public class AccountSettingsPayoutsSchedule : StripeEntity
[JsonProperty("monthly_anchor")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("monthly_anchor")]
+#endif
public long MonthlyAnchor { get; set; }
///
@@ -31,6 +43,9 @@ public class AccountSettingsPayoutsSchedule : StripeEntityinterval is weekly.
///
[JsonProperty("weekly_anchor")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("weekly_anchor")]
+#endif
public string WeeklyAnchor { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsSepaDebitPayments.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsSepaDebitPayments.cs
index f828800df0..080f30a9f6 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettingsSepaDebitPayments.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettingsSepaDebitPayments.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSettingsSepaDebitPayments : StripeEntity
{
@@ -9,6 +12,9 @@ public class AccountSettingsSepaDebitPayments : StripeEntity
[JsonProperty("creditor_id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("creditor_id")]
+#endif
public string CreditorId { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsTreasury.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsTreasury.cs
index 0b8b1193ba..0e9f8fe90a 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettingsTreasury.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettingsTreasury.cs
@@ -2,10 +2,16 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSettingsTreasury : StripeEntity
{
[JsonProperty("tos_acceptance")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("tos_acceptance")]
+#endif
public AccountSettingsTreasuryTosAcceptance TosAcceptance { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsTreasuryTosAcceptance.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsTreasuryTosAcceptance.cs
index b17cba9f54..9c5c1654aa 100644
--- a/src/Stripe.net/Entities/Accounts/AccountSettingsTreasuryTosAcceptance.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountSettingsTreasuryTosAcceptance.cs
@@ -4,6 +4,9 @@ namespace Stripe
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountSettingsTreasuryTosAcceptance : StripeEntity
{
@@ -13,12 +16,19 @@ public class AccountSettingsTreasuryTosAcceptance : StripeEntity
[JsonProperty("date")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("date")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime? Date { get; set; }
///
/// The IP address from which the account representative accepted the service agreement.
///
[JsonProperty("ip")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("ip")]
+#endif
public string Ip { get; set; }
///
@@ -26,6 +36,9 @@ public class AccountSettingsTreasuryTosAcceptance : StripeEntity
[JsonProperty("user_agent")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("user_agent")]
+#endif
public string UserAgent { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Accounts/AccountTosAcceptance.cs b/src/Stripe.net/Entities/Accounts/AccountTosAcceptance.cs
index d4fd7e9495..480091714a 100644
--- a/src/Stripe.net/Entities/Accounts/AccountTosAcceptance.cs
+++ b/src/Stripe.net/Entities/Accounts/AccountTosAcceptance.cs
@@ -4,6 +4,9 @@ namespace Stripe
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AccountTosAcceptance : StripeEntity
{
@@ -13,18 +16,28 @@ public class AccountTosAcceptance : StripeEntity
///
[JsonProperty("date")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("date")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime? Date { get; set; }
///
/// The IP address from which the account representative accepted their service agreement.
///
[JsonProperty("ip")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("ip")]
+#endif
public string Ip { get; set; }
///
/// The user's service agreement type.
///
[JsonProperty("service_agreement")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("service_agreement")]
+#endif
public string ServiceAgreement { get; set; }
///
@@ -32,6 +45,9 @@ public class AccountTosAcceptance : StripeEntity
/// service agreement.
///
[JsonProperty("user_agent")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("user_agent")]
+#endif
public string UserAgent { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/ApplePayDomains/ApplePayDomain.cs b/src/Stripe.net/Entities/ApplePayDomains/ApplePayDomain.cs
index 2261b97b7a..6dde6e4204 100644
--- a/src/Stripe.net/Entities/ApplePayDomains/ApplePayDomain.cs
+++ b/src/Stripe.net/Entities/ApplePayDomains/ApplePayDomain.cs
@@ -4,6 +4,9 @@ namespace Stripe
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class ApplePayDomain : StripeEntity, IHasId, IHasObject
{
@@ -11,12 +14,18 @@ public class ApplePayDomain : StripeEntity, IHasId, IHasObject
/// Unique identifier for the object.
///
[JsonProperty("id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("id")]
+#endif
public string Id { get; set; }
///
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
@@ -24,15 +33,26 @@ public class ApplePayDomain : StripeEntity, IHasId, IHasObject
///
[JsonProperty("created")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("created")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
/// Whether this object is deleted or not.
///
[JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("deleted")]
+ [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)]
+#endif
public bool? Deleted { get; set; }
[JsonProperty("domain_name")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("domain_name")]
+#endif
public string DomainName { get; set; }
///
@@ -40,6 +60,9 @@ public class ApplePayDomain : StripeEntity, IHasId, IHasObject
/// the object exists in test mode.
///
[JsonProperty("livemode")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("livemode")]
+#endif
public bool Livemode { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/ApplicationFeeRefunds/ApplicationFeeRefund.cs b/src/Stripe.net/Entities/ApplicationFeeRefunds/ApplicationFeeRefund.cs
index 83c622c089..f1665caa38 100644
--- a/src/Stripe.net/Entities/ApplicationFeeRefunds/ApplicationFeeRefund.cs
+++ b/src/Stripe.net/Entities/ApplicationFeeRefunds/ApplicationFeeRefund.cs
@@ -5,6 +5,9 @@ namespace Stripe
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// Application Fee Refund objects allow you to refund an application fee that has
@@ -15,24 +18,36 @@ namespace Stripe
/// href="https://stripe.com/docs/connect/destination-charges#refunding-app-fee">Refunding
/// application fees.
///
+#if NET6_0_OR_GREATER
+ [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))]
+#endif
public class ApplicationFeeRefund : StripeEntity, IHasId, IHasMetadata, IHasObject, IBalanceTransactionSource
{
///
/// Unique identifier for the object.
///
[JsonProperty("id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("id")]
+#endif
public string Id { get; set; }
///
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
/// Amount, in cents (or local equivalent).
///
[JsonProperty("amount")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("amount")]
+#endif
public long Amount { get; set; }
#region Expandable BalanceTransaction
@@ -42,6 +57,9 @@ public class ApplicationFeeRefund : StripeEntity, IHasId,
/// Balance transaction that describes the impact on your account balance.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string BalanceTransactionId
{
get => this.InternalBalanceTransaction?.Id;
@@ -55,6 +73,9 @@ public string BalanceTransactionId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public BalanceTransaction BalanceTransaction
{
get => this.InternalBalanceTransaction?.ExpandedObject;
@@ -63,6 +84,10 @@ public BalanceTransaction BalanceTransaction
[JsonProperty("balance_transaction")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("balance_transaction")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalBalanceTransaction { get; set; }
#endregion
@@ -71,6 +96,10 @@ public BalanceTransaction BalanceTransaction
///
[JsonProperty("created")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("created")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
@@ -79,6 +108,9 @@ public BalanceTransaction BalanceTransaction
/// currency.
///
[JsonProperty("currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currency")]
+#endif
public string Currency { get; set; }
#region Expandable Fee
@@ -88,6 +120,9 @@ public BalanceTransaction BalanceTransaction
/// ID of the application fee that was refunded.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string FeeId
{
get => this.InternalFee?.Id;
@@ -101,6 +136,9 @@ public string FeeId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public ApplicationFee Fee
{
get => this.InternalFee?.ExpandedObject;
@@ -109,6 +147,10 @@ public ApplicationFee Fee
[JsonProperty("fee")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("fee")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalFee { get; set; }
#endregion
@@ -118,6 +160,9 @@ public ApplicationFee Fee
/// object in a structured format.
///
[JsonProperty("metadata")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("metadata")]
+#endif
public Dictionary Metadata { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/ApplicationFees/ApplicationFee.cs b/src/Stripe.net/Entities/ApplicationFees/ApplicationFee.cs
index 065681896d..b70c237f0e 100644
--- a/src/Stripe.net/Entities/ApplicationFees/ApplicationFee.cs
+++ b/src/Stripe.net/Entities/ApplicationFees/ApplicationFee.cs
@@ -4,19 +4,31 @@ namespace Stripe
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
+#if NET6_0_OR_GREATER
+ [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))]
+#endif
public class ApplicationFee : StripeEntity, IHasId, IHasObject, IBalanceTransactionSource
{
///
/// Unique identifier for the object.
///
[JsonProperty("id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("id")]
+#endif
public string Id { get; set; }
///
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
#region Expandable Account
@@ -26,6 +38,9 @@ public class ApplicationFee : StripeEntity, IHasId, IHasObject,
/// ID of the Stripe account this fee was taken from.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string AccountId
{
get => this.InternalAccount?.Id;
@@ -39,6 +54,9 @@ public string AccountId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public Account Account
{
get => this.InternalAccount?.ExpandedObject;
@@ -47,6 +65,10 @@ public Account Account
[JsonProperty("account")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("account")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalAccount { get; set; }
#endregion
@@ -54,6 +76,9 @@ public Account Account
/// Amount earned, in cents (or local equivalent).
///
[JsonProperty("amount")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("amount")]
+#endif
public long Amount { get; set; }
///
@@ -61,6 +86,9 @@ public Account Account
/// the fee if a partial refund was issued).
///
[JsonProperty("amount_refunded")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("amount_refunded")]
+#endif
public long AmountRefunded { get; set; }
#region Expandable Application
@@ -70,6 +98,9 @@ public Account Account
/// ID of the Connect application that earned the fee.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string ApplicationId
{
get => this.InternalApplication?.Id;
@@ -83,6 +114,9 @@ public string ApplicationId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public Application Application
{
get => this.InternalApplication?.ExpandedObject;
@@ -91,6 +125,10 @@ public Application Application
[JsonProperty("application")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("application")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalApplication { get; set; }
#endregion
@@ -102,6 +140,9 @@ public Application Application
/// account balance (not including refunds).
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string BalanceTransactionId
{
get => this.InternalBalanceTransaction?.Id;
@@ -116,6 +157,9 @@ public string BalanceTransactionId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public BalanceTransaction BalanceTransaction
{
get => this.InternalBalanceTransaction?.ExpandedObject;
@@ -124,6 +168,10 @@ public BalanceTransaction BalanceTransaction
[JsonProperty("balance_transaction")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("balance_transaction")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalBalanceTransaction { get; set; }
#endregion
@@ -134,6 +182,9 @@ public BalanceTransaction BalanceTransaction
/// ID of the charge that the application fee was taken from.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string ChargeId
{
get => this.InternalCharge?.Id;
@@ -147,6 +198,9 @@ public string ChargeId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public Charge Charge
{
get => this.InternalCharge?.ExpandedObject;
@@ -155,6 +209,10 @@ public Charge Charge
[JsonProperty("charge")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("charge")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalCharge { get; set; }
#endregion
@@ -163,6 +221,10 @@ public Charge Charge
///
[JsonProperty("created")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("created")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
@@ -171,6 +233,9 @@ public Charge Charge
/// currency.
///
[JsonProperty("currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currency")]
+#endif
public string Currency { get; set; }
///
@@ -178,6 +243,9 @@ public Charge Charge
/// fee was created from.
///
[JsonProperty("fee_source")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("fee_source")]
+#endif
public ApplicationFeeFeeSource FeeSource { get; set; }
///
@@ -185,6 +253,9 @@ public Charge Charge
/// the object exists in test mode.
///
[JsonProperty("livemode")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("livemode")]
+#endif
public bool Livemode { get; set; }
#region Expandable OriginatingTransaction
@@ -195,6 +266,9 @@ public Charge Charge
/// charge using the destination parameter.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string OriginatingTransactionId
{
get => this.InternalOriginatingTransaction?.Id;
@@ -209,6 +283,9 @@ public string OriginatingTransactionId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public Charge OriginatingTransaction
{
get => this.InternalOriginatingTransaction?.ExpandedObject;
@@ -217,6 +294,10 @@ public Charge OriginatingTransaction
[JsonProperty("originating_transaction")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("originating_transaction")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalOriginatingTransaction { get; set; }
#endregion
@@ -225,12 +306,18 @@ public Charge OriginatingTransaction
/// attribute will still be false.
///
[JsonProperty("refunded")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("refunded")]
+#endif
public bool Refunded { get; set; }
///
/// A list of refunds that have been applied to the fee.
///
[JsonProperty("refunds")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("refunds")]
+#endif
public StripeList Refunds { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs b/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs
index 8f246b2dfd..3234bc6ccd 100644
--- a/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs
+++ b/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class ApplicationFeeFeeSource : StripeEntity
{
@@ -9,12 +12,18 @@ public class ApplicationFeeFeeSource : StripeEntity
/// Charge ID that created this application fee.
///
[JsonProperty("charge")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("charge")]
+#endif
public string Charge { get; set; }
///
/// Payout ID that created this application fee.
///
[JsonProperty("payout")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("payout")]
+#endif
public string Payout { get; set; }
///
@@ -22,6 +31,9 @@ public class ApplicationFeeFeeSource : StripeEntity
/// One of: charge, or payout.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Applications/Application.cs b/src/Stripe.net/Entities/Applications/Application.cs
index f525c48c6f..fa99bcc73e 100644
--- a/src/Stripe.net/Entities/Applications/Application.cs
+++ b/src/Stripe.net/Entities/Applications/Application.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class Application : StripeEntity, IHasId, IHasObject
{
@@ -9,24 +12,37 @@ public class Application : StripeEntity, IHasId, IHasObject
/// Unique identifier for the object.
///
[JsonProperty("id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("id")]
+#endif
public string Id { get; set; }
///
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
/// Whether this object is deleted or not.
///
[JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("deleted")]
+ [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)]
+#endif
public bool? Deleted { get; set; }
///
/// The name of the application.
///
[JsonProperty("name")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("name")]
+#endif
public string Name { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Apps/Secrets/Secret.cs b/src/Stripe.net/Entities/Apps/Secrets/Secret.cs
index bc93ce8b5c..a9120c282b 100644
--- a/src/Stripe.net/Entities/Apps/Secrets/Secret.cs
+++ b/src/Stripe.net/Entities/Apps/Secrets/Secret.cs
@@ -4,6 +4,9 @@ namespace Stripe.Apps
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// Secret Store is an API that allows Stripe Apps developers to securely persist secrets
@@ -30,12 +33,18 @@ public class Secret : StripeEntity, IHasId, IHasObject
/// Unique identifier for the object.
///
[JsonProperty("id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("id")]
+#endif
public string Id { get; set; }
///
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
@@ -43,12 +52,19 @@ public class Secret : StripeEntity, IHasId, IHasObject
///
[JsonProperty("created")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("created")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
/// If true, indicates that this secret has been deleted.
///
[JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("deleted")]
+#endif
public bool Deleted { get; set; }
///
@@ -56,6 +72,10 @@ public class Secret : StripeEntity, IHasId, IHasObject
///
[JsonProperty("expires_at")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("expires_at")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime? ExpiresAt { get; set; }
///
@@ -63,21 +83,33 @@ public class Secret : StripeEntity, IHasId, IHasObject
/// the object exists in test mode.
///
[JsonProperty("livemode")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("livemode")]
+#endif
public bool Livemode { get; set; }
///
/// A name for the secret that's unique within the scope.
///
[JsonProperty("name")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("name")]
+#endif
public string Name { get; set; }
///
/// The plaintext secret value to be stored.
///
[JsonProperty("payload")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("payload")]
+#endif
public string Payload { get; set; }
[JsonProperty("scope")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("scope")]
+#endif
public SecretScope Scope { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Apps/Secrets/SecretScope.cs b/src/Stripe.net/Entities/Apps/Secrets/SecretScope.cs
index 9343fe46e8..fc8fa5b3ea 100644
--- a/src/Stripe.net/Entities/Apps/Secrets/SecretScope.cs
+++ b/src/Stripe.net/Entities/Apps/Secrets/SecretScope.cs
@@ -2,6 +2,9 @@
namespace Stripe.Apps
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class SecretScope : StripeEntity
{
@@ -10,12 +13,18 @@ public class SecretScope : StripeEntity
/// One of: account, or user.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
///
/// The user ID, if type is set to "user".
///
[JsonProperty("user")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("user")]
+#endif
public string User { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Balance/BalanceAmount.cs b/src/Stripe.net/Entities/Balance/BalanceAmount.cs
index 35f9af34af..d69ddf4493 100644
--- a/src/Stripe.net/Entities/Balance/BalanceAmount.cs
+++ b/src/Stripe.net/Entities/Balance/BalanceAmount.cs
@@ -2,16 +2,28 @@ namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class BalanceAmount : StripeEntity
{
[JsonProperty("amount")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("amount")]
+#endif
public long Amount { get; set; }
[JsonProperty("currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currency")]
+#endif
public string Currency { get; set; }
[JsonProperty("source_types")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("source_types")]
+#endif
public Dictionary SourceTypes { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs
index 2db2f0bb53..314ce98fda 100644
--- a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs
+++ b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs
@@ -5,6 +5,9 @@ namespace Stripe
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// Balance transactions represent funds moving through your Stripe account. Stripe creates
@@ -14,18 +17,27 @@ namespace Stripe
/// href="https://stripe.com/docs/reports/balance-transaction-types">Balance transaction
/// types.
///
+#if NET6_0_OR_GREATER
+ [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))]
+#endif
public class BalanceTransaction : StripeEntity, IHasId, IHasObject
{
///
/// Unique identifier for the object.
///
[JsonProperty("id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("id")]
+#endif
public string Id { get; set; }
///
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
@@ -34,6 +46,9 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas
/// another party.
///
[JsonProperty("amount")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("amount")]
+#endif
public long Amount { get; set; }
///
@@ -41,6 +56,10 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas
///
[JsonProperty("available_on")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("available_on")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime AvailableOn { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
@@ -48,6 +67,10 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas
///
[JsonProperty("created")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("created")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
@@ -56,12 +79,18 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas
/// currency.
///
[JsonProperty("currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currency")]
+#endif
public string Currency { get; set; }
///
/// An arbitrary string attached to the object. Often useful for displaying to users.
///
[JsonProperty("description")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("description")]
+#endif
public string Description { get; set; }
///
@@ -74,6 +103,9 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas
/// and the exchange_rate is 1.234.
///
[JsonProperty("exchange_rate")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("exchange_rate")]
+#endif
public decimal? ExchangeRate { get; set; }
///
@@ -81,12 +113,18 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas
/// positive integer when assessed.
///
[JsonProperty("fee")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("fee")]
+#endif
public long Fee { get; set; }
///
/// Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
///
[JsonProperty("fee_details")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("fee_details")]
+#endif
public List FeeDetails { get; set; }
///
@@ -96,6 +134,9 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas
/// - fee.
///
[JsonProperty("net")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("net")]
+#endif
public long Net { get; set; }
///
@@ -104,6 +145,9 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas
/// help you understand balance transactions from an accounting perspective.
///
[JsonProperty("reporting_category")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("reporting_category")]
+#endif
public string ReportingCategory { get; set; }
#region Expandable Source
@@ -113,6 +157,9 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas
/// This transaction relates to the Stripe object.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string SourceId
{
get => this.InternalSource?.Id;
@@ -126,6 +173,9 @@ public string SourceId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public IBalanceTransactionSource Source
{
get => this.InternalSource?.ExpandedObject;
@@ -134,6 +184,10 @@ public IBalanceTransactionSource Source
[JsonProperty("source")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("source")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalSource { get; set; }
#endregion
@@ -142,6 +196,9 @@ public IBalanceTransactionSource Source
/// available or pending.
///
[JsonProperty("status")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("status")]
+#endif
public string Status { get; set; }
///
@@ -180,6 +237,9 @@ public IBalanceTransactionSource Source
/// or transfer_refund.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransactionFeeDetail.cs b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransactionFeeDetail.cs
index a6251f8a1a..65a604fc13 100644
--- a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransactionFeeDetail.cs
+++ b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransactionFeeDetail.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class BalanceTransactionFeeDetail : StripeEntity
{
@@ -9,12 +12,18 @@ public class BalanceTransactionFeeDetail : StripeEntity
[JsonProperty("amount")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("amount")]
+#endif
public long Amount { get; set; }
///
/// ID of the Connect application that earned the fee.
///
[JsonProperty("application")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("application")]
+#endif
public string Application { get; set; }
///
@@ -23,12 +32,18 @@ public class BalanceTransactionFeeDetail : StripeEntity.
///
[JsonProperty("currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currency")]
+#endif
public string Currency { get; set; }
///
/// An arbitrary string attached to the object. Often useful for displaying to users.
///
[JsonProperty("description")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("description")]
+#endif
public string Description { get; set; }
///
@@ -36,6 +51,9 @@ public class BalanceTransactionFeeDetail : StripeEntitystripe_fee or tax.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Balances/Balance.cs b/src/Stripe.net/Entities/Balances/Balance.cs
index 8eef1b78bc..00d97fdb2e 100644
--- a/src/Stripe.net/Entities/Balances/Balance.cs
+++ b/src/Stripe.net/Entities/Balances/Balance.cs
@@ -3,6 +3,9 @@ namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// This is an object representing your Stripe balance. You can retrieve it to see the
@@ -24,6 +27,9 @@ public class Balance : StripeEntity, IHasObject
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
@@ -33,6 +39,9 @@ public class Balance : StripeEntity, IHasObject
/// balance for each currency and payment type in the source_types property.
///
[JsonProperty("available")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("available")]
+#endif
public List Available { get; set; }
///
@@ -42,15 +51,24 @@ public class Balance : StripeEntity, IHasObject
/// balance for each currency and payment type in the source_types property.
///
[JsonProperty("connect_reserved")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("connect_reserved")]
+#endif
public List ConnectReserved { get; set; }
///
/// Funds that you can pay out using Instant Payouts.
///
[JsonProperty("instant_available")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("instant_available")]
+#endif
public List InstantAvailable { get; set; }
[JsonProperty("issuing")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("issuing")]
+#endif
public BalanceIssuing Issuing { get; set; }
///
@@ -58,6 +76,9 @@ public class Balance : StripeEntity, IHasObject
/// the object exists in test mode.
///
[JsonProperty("livemode")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("livemode")]
+#endif
public bool Livemode { get; set; }
///
@@ -65,6 +86,9 @@ public class Balance : StripeEntity, IHasObject
/// each currency and each payment type in the source_types property.
///
[JsonProperty("pending")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("pending")]
+#endif
public List Pending { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Balances/BalanceInstantAvailable.cs b/src/Stripe.net/Entities/Balances/BalanceInstantAvailable.cs
index c04ad1cf5a..06665afa66 100644
--- a/src/Stripe.net/Entities/Balances/BalanceInstantAvailable.cs
+++ b/src/Stripe.net/Entities/Balances/BalanceInstantAvailable.cs
@@ -3,6 +3,9 @@ namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class BalanceInstantAvailable : StripeEntity
{
@@ -10,6 +13,9 @@ public class BalanceInstantAvailable : StripeEntity
/// Balance amount.
///
[JsonProperty("amount")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("amount")]
+#endif
public long Amount { get; set; }
///
@@ -18,15 +24,24 @@ public class BalanceInstantAvailable : StripeEntity
/// currency.
///
[JsonProperty("currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currency")]
+#endif
public string Currency { get; set; }
///
/// Breakdown of balance by destination.
///
[JsonProperty("net_available")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("net_available")]
+#endif
public List NetAvailable { get; set; }
[JsonProperty("source_types")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("source_types")]
+#endif
public BalanceInstantAvailableSourceTypes SourceTypes { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailable.cs b/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailable.cs
index 37674075c8..c3f293570e 100644
--- a/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailable.cs
+++ b/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailable.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class BalanceInstantAvailableNetAvailable : StripeEntity
{
@@ -9,15 +12,24 @@ public class BalanceInstantAvailableNetAvailable : StripeEntity
[JsonProperty("amount")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("amount")]
+#endif
public long Amount { get; set; }
///
/// ID of the external account for this net balance (not expandable).
///
[JsonProperty("destination")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("destination")]
+#endif
public string Destination { get; set; }
[JsonProperty("source_types")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("source_types")]
+#endif
public BalanceInstantAvailableNetAvailableSourceTypes SourceTypes { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailableSourceTypes.cs b/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailableSourceTypes.cs
index e0c53b7d05..7ed5262d7a 100644
--- a/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailableSourceTypes.cs
+++ b/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailableSourceTypes.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class BalanceInstantAvailableNetAvailableSourceTypes : StripeEntity
{
@@ -10,6 +13,9 @@ public class BalanceInstantAvailableNetAvailableSourceTypes : StripeEntity.
///
[JsonProperty("bank_account")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("bank_account")]
+#endif
public long BankAccount { get; set; }
///
@@ -17,6 +23,9 @@ public class BalanceInstantAvailableNetAvailableSourceTypes : StripeEntitynon-legacy bank debits.
///
[JsonProperty("card")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("card")]
+#endif
public long Card { get; set; }
///
@@ -24,6 +33,9 @@ public class BalanceInstantAvailableNetAvailableSourceTypes : StripeEntity
[JsonProperty("fpx")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("fpx")]
+#endif
public long Fpx { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Balances/BalanceInstantAvailableSourceTypes.cs b/src/Stripe.net/Entities/Balances/BalanceInstantAvailableSourceTypes.cs
index 84da3de041..a203081065 100644
--- a/src/Stripe.net/Entities/Balances/BalanceInstantAvailableSourceTypes.cs
+++ b/src/Stripe.net/Entities/Balances/BalanceInstantAvailableSourceTypes.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class BalanceInstantAvailableSourceTypes : StripeEntity
{
@@ -10,6 +13,9 @@ public class BalanceInstantAvailableSourceTypes : StripeEntity.
///
[JsonProperty("bank_account")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("bank_account")]
+#endif
public long BankAccount { get; set; }
///
@@ -17,6 +23,9 @@ public class BalanceInstantAvailableSourceTypes : StripeEntitynon-legacy bank debits.
///
[JsonProperty("card")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("card")]
+#endif
public long Card { get; set; }
///
@@ -24,6 +33,9 @@ public class BalanceInstantAvailableSourceTypes : StripeEntity
[JsonProperty("fpx")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("fpx")]
+#endif
public long Fpx { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Balances/BalanceIssuing.cs b/src/Stripe.net/Entities/Balances/BalanceIssuing.cs
index 2a7c2413cf..e278fbf8f1 100644
--- a/src/Stripe.net/Entities/Balances/BalanceIssuing.cs
+++ b/src/Stripe.net/Entities/Balances/BalanceIssuing.cs
@@ -3,6 +3,9 @@ namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class BalanceIssuing : StripeEntity
{
@@ -10,6 +13,9 @@ public class BalanceIssuing : StripeEntity
/// Funds that are available for use.
///
[JsonProperty("available")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("available")]
+#endif
public List Available { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/BankAccounts/BankAccount.cs b/src/Stripe.net/Entities/BankAccounts/BankAccount.cs
index 03c0d4e687..d8a215d97f 100644
--- a/src/Stripe.net/Entities/BankAccounts/BankAccount.cs
+++ b/src/Stripe.net/Entities/BankAccounts/BankAccount.cs
@@ -4,6 +4,9 @@ namespace Stripe
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// These bank accounts are payment methods on Customer objects.
@@ -15,18 +18,27 @@ namespace Stripe
/// Related guide: Bank debits
/// and transfers.
///
+#if NET6_0_OR_GREATER
+ [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))]
+#endif
public class BankAccount : StripeEntity, IHasId, IHasMetadata, IHasObject, IExternalAccount, IPaymentSource
{
///
/// Unique identifier for the object.
///
[JsonProperty("id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("id")]
+#endif
public string Id { get; set; }
///
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
#region Expandable Account
@@ -36,6 +48,9 @@ public class BankAccount : StripeEntity, IHasId, IHasMetadata, IHas
/// The ID of the account that the bank account is associated with.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string AccountId
{
get => this.InternalAccount?.Id;
@@ -49,6 +64,9 @@ public string AccountId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public Account Account
{
get => this.InternalAccount?.ExpandedObject;
@@ -57,6 +75,10 @@ public Account Account
[JsonProperty("account")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("account")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalAccount { get; set; }
#endregion
@@ -64,6 +86,9 @@ public Account Account
/// The name of the person or business that owns the bank account.
///
[JsonProperty("account_holder_name")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("account_holder_name")]
+#endif
public string AccountHolderName { get; set; }
///
@@ -71,6 +96,9 @@ public Account Account
/// company.
///
[JsonProperty("account_holder_type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("account_holder_type")]
+#endif
public string AccountHolderType { get; set; }
///
@@ -78,6 +106,9 @@ public Account Account
/// countries. In Japan, this can only be futsu or toza.
///
[JsonProperty("account_type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("account_type")]
+#endif
public string AccountType { get; set; }
///
@@ -86,18 +117,27 @@ public Account Account
/// One of: instant, or standard.
///
[JsonProperty("available_payout_methods")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("available_payout_methods")]
+#endif
public List AvailablePayoutMethods { get; set; }
///
/// Name of the bank associated with the routing number (e.g., WELLS FARGO).
///
[JsonProperty("bank_name")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("bank_name")]
+#endif
public string BankName { get; set; }
///
/// Two-letter ISO code representing the country the bank account is located in.
///
[JsonProperty("country")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("country")]
+#endif
public string Country { get; set; }
///
@@ -105,6 +145,9 @@ public Account Account
/// paid out to the bank account.
///
[JsonProperty("currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currency")]
+#endif
public string Currency { get; set; }
#region Expandable Customer
@@ -114,6 +157,9 @@ public Account Account
/// The ID of the customer that the bank account is associated with.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string CustomerId
{
get => this.InternalCustomer?.Id;
@@ -127,6 +173,9 @@ public string CustomerId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public Customer Customer
{
get => this.InternalCustomer?.ExpandedObject;
@@ -135,6 +184,10 @@ public Customer Customer
[JsonProperty("customer")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("customer")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalCustomer { get; set; }
#endregion
@@ -142,12 +195,19 @@ public Customer Customer
/// Whether this bank account is the default external account for its currency.
///
[JsonProperty("default_for_currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("default_for_currency")]
+#endif
public bool? DefaultForCurrency { get; set; }
///
/// Whether this object is deleted or not.
///
[JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("deleted")]
+ [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)]
+#endif
public bool? Deleted { get; set; }
///
@@ -155,6 +215,9 @@ public Customer Customer
/// whether two bank accounts are the same.
///
[JsonProperty("fingerprint")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("fingerprint")]
+#endif
public string Fingerprint { get; set; }
///
@@ -164,12 +227,18 @@ public Customer Customer
/// and by when.
///
[JsonProperty("future_requirements")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("future_requirements")]
+#endif
public BankAccountFutureRequirements FutureRequirements { get; set; }
///
/// The last four digits of the bank account number.
///
[JsonProperty("last4")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("last4")]
+#endif
public string Last4 { get; set; }
///
@@ -178,6 +247,9 @@ public Customer Customer
/// object in a structured format.
///
[JsonProperty("metadata")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("metadata")]
+#endif
public Dictionary Metadata { get; set; }
///
@@ -185,12 +257,18 @@ public Customer Customer
/// needs to be collected.
///
[JsonProperty("requirements")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("requirements")]
+#endif
public BankAccountRequirements Requirements { get; set; }
///
/// The routing transit number for the bank account.
///
[JsonProperty("routing_number")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("routing_number")]
+#endif
public string RoutingNumber { get; set; }
///
@@ -216,6 +294,9 @@ public Customer Customer
/// payouts. This means the other statuses don't apply.
///
[JsonProperty("status")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("status")]
+#endif
public string Status { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirements.cs b/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirements.cs
index 999f6e04c3..38eae8556d 100644
--- a/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirements.cs
+++ b/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirements.cs
@@ -3,6 +3,9 @@ namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class BankAccountFutureRequirements : StripeEntity
{
@@ -12,6 +15,9 @@ public class BankAccountFutureRequirements : StripeEntity
[JsonProperty("currently_due")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currently_due")]
+#endif
public List CurrentlyDue { get; set; }
///
@@ -19,6 +25,9 @@ public class BankAccountFutureRequirements : StripeEntity
[JsonProperty("errors")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("errors")]
+#endif
public List Errors { get; set; }
///
@@ -26,6 +35,9 @@ public class BankAccountFutureRequirements : StripeEntity
[JsonProperty("past_due")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("past_due")]
+#endif
public List PastDue { get; set; }
///
@@ -37,6 +49,9 @@ public class BankAccountFutureRequirements : StripeEntity
[JsonProperty("pending_verification")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("pending_verification")]
+#endif
public List PendingVerification { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirementsError.cs b/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirementsError.cs
index 687e218961..233075bd4f 100644
--- a/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirementsError.cs
+++ b/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirementsError.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class BankAccountFutureRequirementsError : StripeEntity
{
@@ -69,6 +72,9 @@ public class BankAccountFutureRequirementsError : StripeEntityverification_supportability.
///
[JsonProperty("code")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("code")]
+#endif
public string Code { get; set; }
///
@@ -76,6 +82,9 @@ public class BankAccountFutureRequirementsError : StripeEntity
[JsonProperty("reason")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("reason")]
+#endif
public string Reason { get; set; }
///
@@ -83,6 +92,9 @@ public class BankAccountFutureRequirementsError : StripeEntity
[JsonProperty("requirement")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("requirement")]
+#endif
public string Requirement { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/BankAccounts/BankAccountRequirements.cs b/src/Stripe.net/Entities/BankAccounts/BankAccountRequirements.cs
index 47384f5687..4399b335fa 100644
--- a/src/Stripe.net/Entities/BankAccounts/BankAccountRequirements.cs
+++ b/src/Stripe.net/Entities/BankAccounts/BankAccountRequirements.cs
@@ -3,6 +3,9 @@ namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class BankAccountRequirements : StripeEntity
{
@@ -12,6 +15,9 @@ public class BankAccountRequirements : StripeEntity
/// account is disabled.
///
[JsonProperty("currently_due")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currently_due")]
+#endif
public List CurrentlyDue { get; set; }
///
@@ -19,6 +25,9 @@ public class BankAccountRequirements : StripeEntity
/// or verification failed.
///
[JsonProperty("errors")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("errors")]
+#endif
public List Errors { get; set; }
///
@@ -26,6 +35,9 @@ public class BankAccountRequirements : StripeEntity
/// collected to enable the external account.
///
[JsonProperty("past_due")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("past_due")]
+#endif
public List PastDue { get; set; }
///
@@ -37,6 +49,9 @@ public class BankAccountRequirements : StripeEntity
/// verification is still pending.
///
[JsonProperty("pending_verification")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("pending_verification")]
+#endif
public List PendingVerification { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/BankAccounts/BankAccountRequirementsError.cs b/src/Stripe.net/Entities/BankAccounts/BankAccountRequirementsError.cs
index 309cd0ba65..a51381f28f 100644
--- a/src/Stripe.net/Entities/BankAccounts/BankAccountRequirementsError.cs
+++ b/src/Stripe.net/Entities/BankAccounts/BankAccountRequirementsError.cs
@@ -2,6 +2,9 @@
namespace Stripe
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class BankAccountRequirementsError : StripeEntity
{
@@ -69,6 +72,9 @@ public class BankAccountRequirementsError : StripeEntityverification_supportability.
///
[JsonProperty("code")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("code")]
+#endif
public string Code { get; set; }
///
@@ -76,6 +82,9 @@ public class BankAccountRequirementsError : StripeEntity
[JsonProperty("reason")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("reason")]
+#endif
public string Reason { get; set; }
///
@@ -83,6 +92,9 @@ public class BankAccountRequirementsError : StripeEntity
[JsonProperty("requirement")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("requirement")]
+#endif
public string Requirement { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/AlertTriggereds/AlertTriggered.cs b/src/Stripe.net/Entities/Billing/AlertTriggereds/AlertTriggered.cs
index a9b8c5ad93..7ff0b6e94f 100644
--- a/src/Stripe.net/Entities/Billing/AlertTriggereds/AlertTriggered.cs
+++ b/src/Stripe.net/Entities/Billing/AlertTriggereds/AlertTriggered.cs
@@ -4,6 +4,9 @@ namespace Stripe.Billing
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class AlertTriggered : StripeEntity, IHasObject
{
@@ -11,6 +14,9 @@ public class AlertTriggered : StripeEntity, IHasObject
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
@@ -19,6 +25,9 @@ public class AlertTriggered : StripeEntity, IHasObject
/// certain user made 100 API requests.
///
[JsonProperty("alert")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("alert")]
+#endif
public Alert Alert { get; set; }
///
@@ -26,12 +35,19 @@ public class AlertTriggered : StripeEntity, IHasObject
///
[JsonProperty("created")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("created")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
/// ID of customer for which the alert triggered.
///
[JsonProperty("customer")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("customer")]
+#endif
public string Customer { get; set; }
///
@@ -39,12 +55,18 @@ public class AlertTriggered : StripeEntity, IHasObject
/// the object exists in test mode.
///
[JsonProperty("livemode")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("livemode")]
+#endif
public bool Livemode { get; set; }
///
/// The value triggering the alert.
///
[JsonProperty("value")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("value")]
+#endif
public long Value { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/Alerts/Alert.cs b/src/Stripe.net/Entities/Billing/Alerts/Alert.cs
index 3213e8dd00..79dfe66d02 100644
--- a/src/Stripe.net/Entities/Billing/Alerts/Alert.cs
+++ b/src/Stripe.net/Entities/Billing/Alerts/Alert.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// A billing alert is a resource that notifies you when a certain usage threshold on a
@@ -14,18 +17,27 @@ public class Alert : StripeEntity, IHasId, IHasObject
/// Unique identifier for the object.
///
[JsonProperty("id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("id")]
+#endif
public string Id { get; set; }
///
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
/// Defines the type of the alert.
///
[JsonProperty("alert_type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("alert_type")]
+#endif
public string AlertType { get; set; }
///
@@ -33,6 +45,9 @@ public class Alert : StripeEntity, IHasId, IHasObject
/// the object exists in test mode.
///
[JsonProperty("livemode")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("livemode")]
+#endif
public bool Livemode { get; set; }
///
@@ -40,12 +55,18 @@ public class Alert : StripeEntity, IHasId, IHasObject
/// One of: active, archived, or inactive.
///
[JsonProperty("status")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("status")]
+#endif
public string Status { get; set; }
///
/// Title of the alert.
///
[JsonProperty("title")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("title")]
+#endif
public string Title { get; set; }
///
@@ -53,6 +74,9 @@ public class Alert : StripeEntity, IHasId, IHasObject
/// href="https://stripe.com/docs/api/billing/meter">Billing Meter.
///
[JsonProperty("usage_threshold")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("usage_threshold")]
+#endif
public AlertUsageThreshold UsageThreshold { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThreshold.cs b/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThreshold.cs
index 46f6ba9d80..9096360f48 100644
--- a/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThreshold.cs
+++ b/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThreshold.cs
@@ -4,7 +4,13 @@ namespace Stripe.Billing
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
+#if NET6_0_OR_GREATER
+ [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))]
+#endif
public class AlertUsageThreshold : StripeEntity
{
///
@@ -12,12 +18,18 @@ public class AlertUsageThreshold : StripeEntity
/// filter at this time.
///
[JsonProperty("filters")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("filters")]
+#endif
public List Filters { get; set; }
///
/// The value at which this alert will trigger.
///
[JsonProperty("gte")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("gte")]
+#endif
public long Gte { get; set; }
#region Expandable Meter
@@ -28,6 +40,9 @@ public class AlertUsageThreshold : StripeEntity
/// monitored.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string MeterId
{
get => this.InternalMeter?.Id;
@@ -42,6 +57,9 @@ public string MeterId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public Meter Meter
{
get => this.InternalMeter?.ExpandedObject;
@@ -50,6 +68,10 @@ public Meter Meter
[JsonProperty("meter")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("meter")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalMeter { get; set; }
#endregion
@@ -57,6 +79,9 @@ public Meter Meter
/// Defines how the alert will behave.
///
[JsonProperty("recurrence")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("recurrence")]
+#endif
public string Recurrence { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThresholdFilter.cs b/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThresholdFilter.cs
index 32ddff964b..9128ddd109 100644
--- a/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThresholdFilter.cs
+++ b/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThresholdFilter.cs
@@ -3,7 +3,13 @@ namespace Stripe.Billing
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
+#if NET6_0_OR_GREATER
+ [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))]
+#endif
public class AlertUsageThresholdFilter : StripeEntity
{
#region Expandable Customer
@@ -13,6 +19,9 @@ public class AlertUsageThresholdFilter : StripeEntity
/// Limit the scope of the alert to this customer ID.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string CustomerId
{
get => this.InternalCustomer?.Id;
@@ -26,6 +35,9 @@ public string CustomerId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public Customer Customer
{
get => this.InternalCustomer?.ExpandedObject;
@@ -34,10 +46,17 @@ public Customer Customer
[JsonProperty("customer")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("customer")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalCustomer { get; set; }
#endregion
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummary.cs b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummary.cs
index 7974c02bdc..b9a636aba1 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummary.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummary.cs
@@ -4,16 +4,25 @@ namespace Stripe.Billing
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// Indicates the billing credit balance for billing credits granted to a customer.
///
+#if NET6_0_OR_GREATER
+ [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))]
+#endif
public class CreditBalanceSummary : StripeEntity, IHasObject
{
///
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
@@ -21,6 +30,9 @@ public class CreditBalanceSummary : StripeEntity, IHasObje
/// credit grants in a single currency, then this will have a single balance entry.
///
[JsonProperty("balances")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("balances")]
+#endif
public List Balances { get; set; }
#region Expandable Customer
@@ -30,6 +42,9 @@ public class CreditBalanceSummary : StripeEntity, IHasObje
/// The customer the balance is for.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string CustomerId
{
get => this.InternalCustomer?.Id;
@@ -43,6 +58,9 @@ public string CustomerId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public Customer Customer
{
get => this.InternalCustomer?.ExpandedObject;
@@ -51,6 +69,10 @@ public Customer Customer
[JsonProperty("customer")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("customer")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalCustomer { get; set; }
#endregion
@@ -59,6 +81,9 @@ public Customer Customer
/// the object exists in test mode.
///
[JsonProperty("livemode")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("livemode")]
+#endif
public bool Livemode { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalance.cs b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalance.cs
index dcad4f1789..0439c3e8a8 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalance.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalance.cs
@@ -2,13 +2,22 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditBalanceSummaryBalance : StripeEntity
{
[JsonProperty("available_balance")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("available_balance")]
+#endif
public CreditBalanceSummaryBalanceAvailableBalance AvailableBalance { get; set; }
[JsonProperty("ledger_balance")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("ledger_balance")]
+#endif
public CreditBalanceSummaryBalanceLedgerBalance LedgerBalance { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalance.cs b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalance.cs
index 6250acfeef..7f0f649cae 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalance.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalance.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditBalanceSummaryBalanceAvailableBalance : StripeEntity
{
@@ -9,12 +12,18 @@ public class CreditBalanceSummaryBalanceAvailableBalance : StripeEntity
[JsonProperty("monetary")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("monetary")]
+#endif
public CreditBalanceSummaryBalanceAvailableBalanceMonetary Monetary { get; set; }
///
/// The type of this amount. We currently only support monetary billing credits.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalanceMonetary.cs b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalanceMonetary.cs
index af529f85d7..16a895e44b 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalanceMonetary.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalanceMonetary.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditBalanceSummaryBalanceAvailableBalanceMonetary : StripeEntity
{
@@ -11,12 +14,18 @@ public class CreditBalanceSummaryBalanceAvailableBalanceMonetary : StripeEntity<
/// currency.
///
[JsonProperty("currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currency")]
+#endif
public string Currency { get; set; }
///
/// A positive integer representing the amount.
///
[JsonProperty("value")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("value")]
+#endif
public long Value { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalance.cs b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalance.cs
index 1f26b3e703..43f7cc4251 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalance.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalance.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditBalanceSummaryBalanceLedgerBalance : StripeEntity
{
@@ -9,12 +12,18 @@ public class CreditBalanceSummaryBalanceLedgerBalance : StripeEntity
[JsonProperty("monetary")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("monetary")]
+#endif
public CreditBalanceSummaryBalanceLedgerBalanceMonetary Monetary { get; set; }
///
/// The type of this amount. We currently only support monetary billing credits.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalanceMonetary.cs b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalanceMonetary.cs
index 8d3698a52e..5ef1c3319e 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalanceMonetary.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalanceMonetary.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditBalanceSummaryBalanceLedgerBalanceMonetary : StripeEntity
{
@@ -11,12 +14,18 @@ public class CreditBalanceSummaryBalanceLedgerBalanceMonetary : StripeEntity.
///
[JsonProperty("currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currency")]
+#endif
public string Currency { get; set; }
///
/// A positive integer representing the amount.
///
[JsonProperty("value")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("value")]
+#endif
public long Value { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransaction.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransaction.cs
index 68fd6bc1fe..ff02b09ee3 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransaction.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransaction.cs
@@ -4,23 +4,35 @@ namespace Stripe.Billing
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// A credit balance transaction is a resource representing a transaction (either a credit
/// or a debit) against an existing credit grant.
///
+#if NET6_0_OR_GREATER
+ [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))]
+#endif
public class CreditBalanceTransaction : StripeEntity, IHasId, IHasObject
{
///
/// Unique identifier for the object.
///
[JsonProperty("id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("id")]
+#endif
public string Id { get; set; }
///
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
@@ -28,6 +40,10 @@ public class CreditBalanceTransaction : StripeEntity,
///
[JsonProperty("created")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("created")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
@@ -35,6 +51,9 @@ public class CreditBalanceTransaction : StripeEntity,
/// credit.
///
[JsonProperty("credit")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("credit")]
+#endif
public CreditBalanceTransactionCredit Credit { get; set; }
#region Expandable CreditGrant
@@ -44,6 +63,9 @@ public class CreditBalanceTransaction : StripeEntity,
/// The credit grant associated with this credit balance transaction.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string CreditGrantId
{
get => this.InternalCreditGrant?.Id;
@@ -57,6 +79,9 @@ public string CreditGrantId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public CreditGrant CreditGrant
{
get => this.InternalCreditGrant?.ExpandedObject;
@@ -65,6 +90,10 @@ public CreditGrant CreditGrant
[JsonProperty("credit_grant")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("credit_grant")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalCreditGrant { get; set; }
#endregion
@@ -72,6 +101,9 @@ public CreditGrant CreditGrant
/// Debit details for this credit balance transaction. Only present if type is debit.
///
[JsonProperty("debit")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("debit")]
+#endif
public CreditBalanceTransactionDebit Debit { get; set; }
///
@@ -79,6 +111,10 @@ public CreditGrant CreditGrant
///
[JsonProperty("effective_at")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("effective_at")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime EffectiveAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
@@ -86,6 +122,9 @@ public CreditGrant CreditGrant
/// the object exists in test mode.
///
[JsonProperty("livemode")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("livemode")]
+#endif
public bool Livemode { get; set; }
#region Expandable TestClock
@@ -95,6 +134,9 @@ public CreditGrant CreditGrant
/// ID of the test clock this credit balance transaction belongs to.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string TestClockId
{
get => this.InternalTestClock?.Id;
@@ -108,6 +150,9 @@ public string TestClockId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public TestHelpers.TestClock TestClock
{
get => this.InternalTestClock?.ExpandedObject;
@@ -116,6 +161,10 @@ public TestHelpers.TestClock TestClock
[JsonProperty("test_clock")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("test_clock")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalTestClock { get; set; }
#endregion
@@ -124,6 +173,9 @@ public TestHelpers.TestClock TestClock
/// One of: credit, or debit.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCredit.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCredit.cs
index 4aa56aa94f..8cb3929e07 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCredit.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCredit.cs
@@ -2,10 +2,16 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditBalanceTransactionCredit : StripeEntity
{
[JsonProperty("amount")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("amount")]
+#endif
public CreditBalanceTransactionCreditAmount Amount { get; set; }
///
@@ -13,6 +19,9 @@ public class CreditBalanceTransactionCredit : StripeEntitytype is credits_application_invoice_voided.
///
[JsonProperty("credits_application_invoice_voided")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("credits_application_invoice_voided")]
+#endif
public CreditBalanceTransactionCreditCreditsApplicationInvoiceVoided CreditsApplicationInvoiceVoided { get; set; }
///
@@ -20,6 +29,9 @@ public class CreditBalanceTransactionCredit : StripeEntitycredits_application_invoice_voided, or credits_granted.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmount.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmount.cs
index bee09c36b2..536890028b 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmount.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmount.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditBalanceTransactionCreditAmount : StripeEntity
{
@@ -9,12 +12,18 @@ public class CreditBalanceTransactionCreditAmount : StripeEntity
[JsonProperty("monetary")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("monetary")]
+#endif
public CreditBalanceTransactionCreditAmountMonetary Monetary { get; set; }
///
/// The type of this amount. We currently only support monetary billing credits.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmountMonetary.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmountMonetary.cs
index d9e4e74dd3..0b11ac350a 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmountMonetary.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmountMonetary.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditBalanceTransactionCreditAmountMonetary : StripeEntity
{
@@ -11,12 +14,18 @@ public class CreditBalanceTransactionCreditAmountMonetary : StripeEntity.
///
[JsonProperty("currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currency")]
+#endif
public string Currency { get; set; }
///
/// A positive integer representing the amount.
///
[JsonProperty("value")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("value")]
+#endif
public long Value { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditCreditsApplicationInvoiceVoided.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditCreditsApplicationInvoiceVoided.cs
index a0c327124a..76adae0128 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditCreditsApplicationInvoiceVoided.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditCreditsApplicationInvoiceVoided.cs
@@ -3,7 +3,13 @@ namespace Stripe.Billing
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
+#if NET6_0_OR_GREATER
+ [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))]
+#endif
public class CreditBalanceTransactionCreditCreditsApplicationInvoiceVoided : StripeEntity
{
#region Expandable Invoice
@@ -13,6 +19,9 @@ public class CreditBalanceTransactionCreditCreditsApplicationInvoiceVoided : Str
/// The invoice to which the reinstated billing credits were originally applied.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string InvoiceId
{
get => this.InternalInvoice?.Id;
@@ -26,6 +35,9 @@ public string InvoiceId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public Invoice Invoice
{
get => this.InternalInvoice?.ExpandedObject;
@@ -34,6 +46,10 @@ public Invoice Invoice
[JsonProperty("invoice")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("invoice")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalInvoice { get; set; }
#endregion
@@ -41,6 +57,9 @@ public Invoice Invoice
/// The invoice line item to which the reinstated billing credits were originally applied.
///
[JsonProperty("invoice_line_item")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("invoice_line_item")]
+#endif
public string InvoiceLineItem { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebit.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebit.cs
index 61d2167103..4af677b20d 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebit.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebit.cs
@@ -2,10 +2,16 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditBalanceTransactionDebit : StripeEntity
{
[JsonProperty("amount")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("amount")]
+#endif
public CreditBalanceTransactionDebitAmount Amount { get; set; }
///
@@ -13,6 +19,9 @@ public class CreditBalanceTransactionDebit : StripeEntitytype is credits_applied.
///
[JsonProperty("credits_applied")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("credits_applied")]
+#endif
public CreditBalanceTransactionDebitCreditsApplied CreditsApplied { get; set; }
///
@@ -20,6 +29,9 @@ public class CreditBalanceTransactionDebit : StripeEntitycredits_applied, credits_expired, or credits_voided.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmount.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmount.cs
index 781147480d..65f3c3a886 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmount.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmount.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditBalanceTransactionDebitAmount : StripeEntity
{
@@ -9,12 +12,18 @@ public class CreditBalanceTransactionDebitAmount : StripeEntity
[JsonProperty("monetary")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("monetary")]
+#endif
public CreditBalanceTransactionDebitAmountMonetary Monetary { get; set; }
///
/// The type of this amount. We currently only support monetary billing credits.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmountMonetary.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmountMonetary.cs
index 3cefd89802..26f99ded9d 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmountMonetary.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmountMonetary.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditBalanceTransactionDebitAmountMonetary : StripeEntity
{
@@ -11,12 +14,18 @@ public class CreditBalanceTransactionDebitAmountMonetary : StripeEntity.
///
[JsonProperty("currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currency")]
+#endif
public string Currency { get; set; }
///
/// A positive integer representing the amount.
///
[JsonProperty("value")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("value")]
+#endif
public long Value { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitCreditsApplied.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitCreditsApplied.cs
index 1e6fa25a5e..16ae884912 100644
--- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitCreditsApplied.cs
+++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitCreditsApplied.cs
@@ -3,7 +3,13 @@ namespace Stripe.Billing
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
+#if NET6_0_OR_GREATER
+ [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))]
+#endif
public class CreditBalanceTransactionDebitCreditsApplied : StripeEntity
{
#region Expandable Invoice
@@ -13,6 +19,9 @@ public class CreditBalanceTransactionDebitCreditsApplied : StripeEntity
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string InvoiceId
{
get => this.InternalInvoice?.Id;
@@ -26,6 +35,9 @@ public string InvoiceId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public Invoice Invoice
{
get => this.InternalInvoice?.ExpandedObject;
@@ -34,6 +46,10 @@ public Invoice Invoice
[JsonProperty("invoice")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("invoice")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalInvoice { get; set; }
#endregion
@@ -41,6 +57,9 @@ public Invoice Invoice
/// The invoice line item to which the billing credits were applied.
///
[JsonProperty("invoice_line_item")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("invoice_line_item")]
+#endif
public string InvoiceLineItem { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrant.cs b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrant.cs
index ff4500875f..1b95837bad 100644
--- a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrant.cs
+++ b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrant.cs
@@ -5,6 +5,9 @@ namespace Stripe.Billing
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// A credit grant is an API resource that documents the allocation of some billing credits
@@ -14,24 +17,39 @@ namespace Stripe.Billing
/// href="https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits">Billing
/// credits.
///
+#if NET6_0_OR_GREATER
+ [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))]
+#endif
public class CreditGrant : StripeEntity, IHasId, IHasMetadata, IHasObject
{
///
/// Unique identifier for the object.
///
[JsonProperty("id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("id")]
+#endif
public string Id { get; set; }
///
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
[JsonProperty("amount")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("amount")]
+#endif
public CreditGrantAmount Amount { get; set; }
[JsonProperty("applicability_config")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("applicability_config")]
+#endif
public CreditGrantApplicabilityConfig ApplicabilityConfig { get; set; }
///
@@ -40,6 +58,9 @@ public class CreditGrant : StripeEntity, IHasId, IHasMetadata, IHas
/// One of: paid, or promotional.
///
[JsonProperty("category")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("category")]
+#endif
public string Category { get; set; }
///
@@ -47,6 +68,10 @@ public class CreditGrant : StripeEntity, IHasId, IHasMetadata, IHas
///
[JsonProperty("created")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("created")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
#region Expandable Customer
@@ -56,6 +81,9 @@ public class CreditGrant : StripeEntity, IHasId, IHasMetadata, IHas
/// ID of the customer receiving the billing credits.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string CustomerId
{
get => this.InternalCustomer?.Id;
@@ -69,6 +97,9 @@ public string CustomerId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public Customer Customer
{
get => this.InternalCustomer?.ExpandedObject;
@@ -77,6 +108,10 @@ public Customer Customer
[JsonProperty("customer")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("customer")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalCustomer { get; set; }
#endregion
@@ -85,6 +120,10 @@ public Customer Customer
///
[JsonProperty("effective_at")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("effective_at")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime? EffectiveAt { get; set; }
///
@@ -93,6 +132,10 @@ public Customer Customer
///
[JsonProperty("expires_at")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("expires_at")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime? ExpiresAt { get; set; }
///
@@ -100,6 +143,9 @@ public Customer Customer
/// the object exists in test mode.
///
[JsonProperty("livemode")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("livemode")]
+#endif
public bool Livemode { get; set; }
///
@@ -108,12 +154,18 @@ public Customer Customer
/// object in a structured format.
///
[JsonProperty("metadata")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("metadata")]
+#endif
public Dictionary Metadata { get; set; }
///
/// A descriptive name shown in dashboard.
///
[JsonProperty("name")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("name")]
+#endif
public string Name { get; set; }
///
@@ -121,6 +173,9 @@ public Customer Customer
/// 100.
///
[JsonProperty("priority")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("priority")]
+#endif
public long? Priority { get; set; }
#region Expandable TestClock
@@ -130,6 +185,9 @@ public Customer Customer
/// ID of the test clock this credit grant belongs to.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public string TestClockId
{
get => this.InternalTestClock?.Id;
@@ -143,6 +201,9 @@ public string TestClockId
/// For more information, see the expand documentation.
///
[JsonIgnore]
+#if NET6_0_OR_GREATER
+ [STJS.JsonIgnore]
+#endif
public TestHelpers.TestClock TestClock
{
get => this.InternalTestClock?.ExpandedObject;
@@ -151,6 +212,10 @@ public TestHelpers.TestClock TestClock
[JsonProperty("test_clock")]
[JsonConverter(typeof(ExpandableFieldConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("test_clock")]
+ [STJS.JsonConverter(typeof(STJExpandableFieldConverter))]
+#endif
internal ExpandableField InternalTestClock { get; set; }
#endregion
@@ -159,6 +224,10 @@ public TestHelpers.TestClock TestClock
///
[JsonProperty("updated")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("updated")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Updated { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
@@ -167,6 +236,10 @@ public TestHelpers.TestClock TestClock
///
[JsonProperty("voided_at")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("voided_at")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime? VoidedAt { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmount.cs b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmount.cs
index beedffd047..ec1a9110b1 100644
--- a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmount.cs
+++ b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmount.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditGrantAmount : StripeEntity
{
@@ -9,12 +12,18 @@ public class CreditGrantAmount : StripeEntity
/// The monetary amount.
///
[JsonProperty("monetary")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("monetary")]
+#endif
public CreditGrantAmountMonetary Monetary { get; set; }
///
/// The type of this amount. We currently only support monetary billing credits.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmountMonetary.cs b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmountMonetary.cs
index 256410e7ba..6e9afe0883 100644
--- a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmountMonetary.cs
+++ b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmountMonetary.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditGrantAmountMonetary : StripeEntity
{
@@ -11,12 +14,18 @@ public class CreditGrantAmountMonetary : StripeEntity
/// currency.
///
[JsonProperty("currency")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("currency")]
+#endif
public string Currency { get; set; }
///
/// A positive integer representing the amount.
///
[JsonProperty("value")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("value")]
+#endif
public long Value { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfig.cs b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfig.cs
index 1f68d4e058..8c9a809ca6 100644
--- a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfig.cs
+++ b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfig.cs
@@ -2,10 +2,16 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditGrantApplicabilityConfig : StripeEntity
{
[JsonProperty("scope")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("scope")]
+#endif
public CreditGrantApplicabilityConfigScope Scope { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScope.cs b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScope.cs
index 3cb2fd07d3..61fcbf3e60 100644
--- a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScope.cs
+++ b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScope.cs
@@ -3,6 +3,9 @@ namespace Stripe.Billing
{
using System.Collections.Generic;
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditGrantApplicabilityConfigScope : StripeEntity
{
@@ -12,6 +15,9 @@ public class CreditGrantApplicabilityConfigScope : StripeEntityBilling Meter attached to them.
///
[JsonProperty("price_type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("price_type")]
+#endif
public string PriceType { get; set; }
///
@@ -20,6 +26,9 @@ public class CreditGrantApplicabilityConfigScope : StripeEntityBilling Meter attached to them.
///
[JsonProperty("prices")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("prices")]
+#endif
public List Prices { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScopePrice.cs b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScopePrice.cs
index d41b5b77cb..3620b111e4 100644
--- a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScopePrice.cs
+++ b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScopePrice.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class CreditGrantApplicabilityConfigScopePrice : StripeEntity, IHasId
{
@@ -9,6 +12,9 @@ public class CreditGrantApplicabilityConfigScopePrice : StripeEntity
[JsonProperty("id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("id")]
+#endif
public string Id { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustment.cs b/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustment.cs
index 3fc47f2830..83c81ab004 100644
--- a/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustment.cs
+++ b/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustment.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// A billing meter event adjustment is a resource that allows you to cancel a meter event.
@@ -14,18 +17,27 @@ public class MeterEventAdjustment : StripeEntity, IHasObje
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
/// Specifies which event to cancel.
///
[JsonProperty("cancel")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("cancel")]
+#endif
public MeterEventAdjustmentCancel Cancel { get; set; }
///
/// The name of the meter event. Corresponds with the event_name field on a meter.
///
[JsonProperty("event_name")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("event_name")]
+#endif
public string EventName { get; set; }
///
@@ -33,6 +45,9 @@ public class MeterEventAdjustment : StripeEntity, IHasObje
/// the object exists in test mode.
///
[JsonProperty("livemode")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("livemode")]
+#endif
public bool Livemode { get; set; }
///
@@ -40,6 +55,9 @@ public class MeterEventAdjustment : StripeEntity, IHasObje
/// One of: complete, or pending.
///
[JsonProperty("status")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("status")]
+#endif
public string Status { get; set; }
///
@@ -47,6 +65,9 @@ public class MeterEventAdjustment : StripeEntity, IHasObje
/// period cancellation is not supported yet.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs b/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs
index fb9af0ca83..e971f43cdd 100644
--- a/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs
+++ b/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class MeterEventAdjustmentCancel : StripeEntity
{
@@ -9,6 +12,9 @@ public class MeterEventAdjustmentCancel : StripeEntity
[JsonProperty("identifier")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("identifier")]
+#endif
public string Identifier { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/MeterEventSummaries/MeterEventSummary.cs b/src/Stripe.net/Entities/Billing/MeterEventSummaries/MeterEventSummary.cs
index 754483419a..13d0b818a5 100644
--- a/src/Stripe.net/Entities/Billing/MeterEventSummaries/MeterEventSummary.cs
+++ b/src/Stripe.net/Entities/Billing/MeterEventSummaries/MeterEventSummary.cs
@@ -4,6 +4,9 @@ namespace Stripe.Billing
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// A billing meter event summary represents an aggregated view of a customer's billing
@@ -19,12 +22,18 @@ public class MeterEventSummary : StripeEntity, IHasId, IHasOb
/// Unique identifier for the object.
///
[JsonProperty("id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("id")]
+#endif
public string Id { get; set; }
///
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
@@ -33,6 +42,9 @@ public class MeterEventSummary : StripeEntity, IHasId, IHasOb
/// default_aggregation.
///
[JsonProperty("aggregated_value")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("aggregated_value")]
+#endif
public decimal AggregatedValue { get; set; }
///
@@ -41,6 +53,10 @@ public class MeterEventSummary : StripeEntity, IHasId, IHasOb
///
[JsonProperty("end_time")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("end_time")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime EndTime { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
@@ -48,12 +64,18 @@ public class MeterEventSummary : StripeEntity, IHasId, IHasOb
/// the object exists in test mode.
///
[JsonProperty("livemode")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("livemode")]
+#endif
public bool Livemode { get; set; }
///
/// The meter associated with this event summary.
///
[JsonProperty("meter")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("meter")]
+#endif
public string Meter { get; set; }
///
@@ -62,6 +84,10 @@ public class MeterEventSummary : StripeEntity, IHasId, IHasOb
///
[JsonProperty("start_time")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("start_time")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime StartTime { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
}
}
diff --git a/src/Stripe.net/Entities/Billing/MeterEvents/MeterEvent.cs b/src/Stripe.net/Entities/Billing/MeterEvents/MeterEvent.cs
index 1674224f23..b4ea7a80dd 100644
--- a/src/Stripe.net/Entities/Billing/MeterEvents/MeterEvent.cs
+++ b/src/Stripe.net/Entities/Billing/MeterEvents/MeterEvent.cs
@@ -5,6 +5,9 @@ namespace Stripe.Billing
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// Meter events represent actions that customers take in your system. You can use meter
@@ -18,6 +21,9 @@ public class MeterEvent : StripeEntity, IHasObject
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
@@ -25,18 +31,28 @@ public class MeterEvent : StripeEntity, IHasObject
///
[JsonProperty("created")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("created")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
///
/// The name of the meter event. Corresponds with the event_name field on a meter.
///
[JsonProperty("event_name")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("event_name")]
+#endif
public string EventName { get; set; }
///
/// A unique identifier for the event.
///
[JsonProperty("identifier")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("identifier")]
+#endif
public string Identifier { get; set; }
///
@@ -44,6 +60,9 @@ public class MeterEvent : StripeEntity, IHasObject
/// the object exists in test mode.
///
[JsonProperty("livemode")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("livemode")]
+#endif
public bool Livemode { get; set; }
///
@@ -54,6 +73,9 @@ public class MeterEvent : StripeEntity, IHasObject
/// href="https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides">payload.
///
[JsonProperty("payload")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("payload")]
+#endif
public Dictionary Payload { get; set; }
///
@@ -62,6 +84,10 @@ public class MeterEvent : StripeEntity, IHasObject
///
[JsonProperty("timestamp")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("timestamp")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Timestamp { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
}
}
diff --git a/src/Stripe.net/Entities/Billing/Meters/Meter.cs b/src/Stripe.net/Entities/Billing/Meters/Meter.cs
index b7423b7a39..8d640b5319 100644
--- a/src/Stripe.net/Entities/Billing/Meters/Meter.cs
+++ b/src/Stripe.net/Entities/Billing/Meters/Meter.cs
@@ -4,6 +4,9 @@ namespace Stripe.Billing
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
///
/// Meters specify how to aggregate meter events over a billing period. Meter events
@@ -19,12 +22,18 @@ public class Meter : StripeEntity, IHasId, IHasObject
/// Unique identifier for the object.
///
[JsonProperty("id")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("id")]
+#endif
public string Id { get; set; }
///
/// String representing the object's type. Objects of the same type share the same value.
///
[JsonProperty("object")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("object")]
+#endif
public string Object { get; set; }
///
@@ -32,18 +41,31 @@ public class Meter : StripeEntity, IHasId, IHasObject
///
[JsonProperty("created")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("created")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
[JsonProperty("customer_mapping")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("customer_mapping")]
+#endif
public MeterCustomerMapping CustomerMapping { get; set; }
[JsonProperty("default_aggregation")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("default_aggregation")]
+#endif
public MeterDefaultAggregation DefaultAggregation { get; set; }
///
/// The meter's name.
///
[JsonProperty("display_name")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("display_name")]
+#endif
public string DisplayName { get; set; }
///
@@ -51,6 +73,9 @@ public class Meter : StripeEntity, IHasId, IHasObject
/// field on meter events.
///
[JsonProperty("event_name")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("event_name")]
+#endif
public string EventName { get; set; }
///
@@ -58,6 +83,9 @@ public class Meter : StripeEntity, IHasId, IHasObject
/// One of: day, or hour.
///
[JsonProperty("event_time_window")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("event_time_window")]
+#endif
public string EventTimeWindow { get; set; }
///
@@ -65,6 +93,9 @@ public class Meter : StripeEntity, IHasId, IHasObject
/// the object exists in test mode.
///
[JsonProperty("livemode")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("livemode")]
+#endif
public bool Livemode { get; set; }
///
@@ -72,9 +103,15 @@ public class Meter : StripeEntity, IHasId, IHasObject
/// One of: active, or inactive.
///
[JsonProperty("status")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("status")]
+#endif
public string Status { get; set; }
[JsonProperty("status_transitions")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("status_transitions")]
+#endif
public MeterStatusTransitions StatusTransitions { get; set; }
///
@@ -82,9 +119,16 @@ public class Meter : StripeEntity, IHasId, IHasObject
///
[JsonProperty("updated")]
[JsonConverter(typeof(UnixDateTimeConverter))]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("updated")]
+ [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
+#endif
public DateTime Updated { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
[JsonProperty("value_settings")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("value_settings")]
+#endif
public MeterValueSettings ValueSettings { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/Meters/MeterCustomerMapping.cs b/src/Stripe.net/Entities/Billing/Meters/MeterCustomerMapping.cs
index 511407d1b1..2cccbd1fbc 100644
--- a/src/Stripe.net/Entities/Billing/Meters/MeterCustomerMapping.cs
+++ b/src/Stripe.net/Entities/Billing/Meters/MeterCustomerMapping.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class MeterCustomerMapping : StripeEntity
{
@@ -9,12 +12,18 @@ public class MeterCustomerMapping : StripeEntity
/// The key in the meter event payload to use for mapping the event to a customer.
///
[JsonProperty("event_payload_key")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("event_payload_key")]
+#endif
public string EventPayloadKey { get; set; }
///
/// The method for mapping a meter event to a customer.
///
[JsonProperty("type")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("type")]
+#endif
public string Type { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/Meters/MeterDefaultAggregation.cs b/src/Stripe.net/Entities/Billing/Meters/MeterDefaultAggregation.cs
index 23d47f2fef..7c16418e78 100644
--- a/src/Stripe.net/Entities/Billing/Meters/MeterDefaultAggregation.cs
+++ b/src/Stripe.net/Entities/Billing/Meters/MeterDefaultAggregation.cs
@@ -2,6 +2,9 @@
namespace Stripe.Billing
{
using Newtonsoft.Json;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class MeterDefaultAggregation : StripeEntity
{
@@ -10,6 +13,9 @@ public class MeterDefaultAggregation : StripeEntity
/// One of: count, or sum.
///
[JsonProperty("formula")]
+#if NET6_0_OR_GREATER
+ [STJS.JsonPropertyName("formula")]
+#endif
public string Formula { get; set; }
}
}
diff --git a/src/Stripe.net/Entities/Billing/Meters/MeterStatusTransitions.cs b/src/Stripe.net/Entities/Billing/Meters/MeterStatusTransitions.cs
index 2321104f84..96e097367c 100644
--- a/src/Stripe.net/Entities/Billing/Meters/MeterStatusTransitions.cs
+++ b/src/Stripe.net/Entities/Billing/Meters/MeterStatusTransitions.cs
@@ -4,6 +4,9 @@ namespace Stripe.Billing
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
+#if NET6_0_OR_GREATER
+ using STJS = System.Text.Json.Serialization;
+#endif
public class MeterStatusTransitions : StripeEntity
{
@@ -12,6 +15,10 @@ public class MeterStatusTransitions : StripeEntity