Skip to content

Commit

Permalink
added generated files with STJ support (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
jar-stripe committed Dec 5, 2024
1 parent 04f886d commit d6f4322
Show file tree
Hide file tree
Showing 2,781 changed files with 45,631 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Stripe.net/Entities/AccountLinks/AccountLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

/// <summary>
/// Account Links are the means by which a Connect platform grants a connected account
Expand All @@ -18,26 +21,40 @@ public class AccountLink : StripeEntity<AccountLink>, IHasObject
/// String representing the object's type. Objects of the same type share the same value.
/// </summary>
[JsonProperty("object")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("object")]
#endif
public string Object { get; set; }

/// <summary>
/// Time at which the object was created. Measured in seconds since the Unix epoch.
/// </summary>
[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;

/// <summary>
/// The timestamp at which this account link will expire.
/// </summary>
[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;

/// <summary>
/// The URL for the account link.
/// </summary>
[JsonProperty("url")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("url")]
#endif
public string Url { get; set; }
}
}
22 changes: 22 additions & 0 deletions src/Stripe.net/Entities/AccountSessions/AccountSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

/// <summary>
/// An AccountSession allows a Connect platform to grant access to a connected account in
Expand All @@ -23,12 +26,18 @@ public class AccountSession : StripeEntity<AccountSession>, IHasObject
/// String representing the object's type. Objects of the same type share the same value.
/// </summary>
[JsonProperty("object")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("object")]
#endif
public string Object { get; set; }

/// <summary>
/// The ID of the account the AccountSession was created for.
/// </summary>
[JsonProperty("account")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("account")]
#endif
public string Account { get; set; }

/// <summary>
Expand All @@ -45,23 +54,36 @@ public class AccountSession : StripeEntity<AccountSession>, IHasObject
/// handled.
/// </summary>
[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; }

/// <summary>
/// The timestamp at which this AccountSession will expire.
/// </summary>
[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;

/// <summary>
/// Has the value <c>true</c> if the object exists in live mode or the value <c>false</c> if
/// the object exists in test mode.
/// </summary>
[JsonProperty("livemode")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("livemode")]
#endif
public bool Livemode { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,76 @@
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class AccountSessionComponents : StripeEntity<AccountSessionComponents>
{
[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("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; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class AccountSessionComponentsAccountManagement : StripeEntity<AccountSessionComponentsAccountManagement>
{
/// <summary>
/// Whether the embedded component is enabled.
/// </summary>
[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; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<AccountSessionComponentsAccountManagementFeatures>
{
Expand All @@ -13,6 +16,9 @@ public class AccountSessionComponentsAccountManagementFeatures : StripeEntity<Ac
/// otherwise.
/// </summary>
[JsonProperty("disable_stripe_user_authentication")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("disable_stripe_user_authentication")]
#endif
public bool DisableStripeUserAuthentication { get; set; }

/// <summary>
Expand All @@ -23,6 +29,9 @@ public class AccountSessionComponentsAccountManagementFeatures : StripeEntity<Ac
/// The default value for this feature is <c>true</c>.
/// </summary>
[JsonProperty("external_account_collection")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("external_account_collection")]
#endif
public bool ExternalAccountCollection { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class AccountSessionComponentsAccountOnboarding : StripeEntity<AccountSessionComponentsAccountOnboarding>
{
/// <summary>
/// Whether the embedded component is enabled.
/// </summary>
[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; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<AccountSessionComponentsAccountOnboardingFeatures>
{
Expand All @@ -13,6 +16,9 @@ public class AccountSessionComponentsAccountOnboardingFeatures : StripeEntity<Ac
/// otherwise.
/// </summary>
[JsonProperty("disable_stripe_user_authentication")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("disable_stripe_user_authentication")]
#endif
public bool DisableStripeUserAuthentication { get; set; }

/// <summary>
Expand All @@ -23,6 +29,9 @@ public class AccountSessionComponentsAccountOnboardingFeatures : StripeEntity<Ac
/// The default value for this feature is <c>true</c>.
/// </summary>
[JsonProperty("external_account_collection")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("external_account_collection")]
#endif
public bool ExternalAccountCollection { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class AccountSessionComponentsBalances : StripeEntity<AccountSessionComponentsBalances>
{
/// <summary>
/// Whether the embedded component is enabled.
/// </summary>
[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; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<AccountSessionComponentsBalancesFeatures>
{
Expand All @@ -13,13 +16,19 @@ public class AccountSessionComponentsBalancesFeatures : StripeEntity<AccountSess
/// otherwise.
/// </summary>
[JsonProperty("disable_stripe_user_authentication")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("disable_stripe_user_authentication")]
#endif
public bool DisableStripeUserAuthentication { get; set; }

/// <summary>
/// Whether to allow payout schedule to be changed. Default <c>true</c> when Stripe owns
/// Loss Liability, default <c>false</c> otherwise.
/// </summary>
[JsonProperty("edit_payout_schedule")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("edit_payout_schedule")]
#endif
public bool EditPayoutSchedule { get; set; }

/// <summary>
Expand All @@ -30,20 +39,29 @@ public class AccountSessionComponentsBalancesFeatures : StripeEntity<AccountSess
/// The default value for this feature is <c>true</c>.
/// </summary>
[JsonProperty("external_account_collection")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("external_account_collection")]
#endif
public bool ExternalAccountCollection { get; set; }

/// <summary>
/// Whether to allow creation of instant payouts. Default <c>true</c> when Stripe owns Loss
/// Liability, default <c>false</c> otherwise.
/// </summary>
[JsonProperty("instant_payouts")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("instant_payouts")]
#endif
public bool InstantPayouts { get; set; }

/// <summary>
/// Whether to allow creation of standard payouts. Default <c>true</c> when Stripe owns Loss
/// Liability, default <c>false</c> otherwise.
/// </summary>
[JsonProperty("standard_payouts")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("standard_payouts")]
#endif
public bool StandardPayouts { get; set; }
}
}
Loading

0 comments on commit d6f4322

Please sign in to comment.