Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
11 changes: 1 addition & 10 deletions src/Stripe.net/Entities/AccountLinks/AccountLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ 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 @@ -15,46 +13,39 @@ namespace Stripe
/// Related guide: <a
/// href="https://docs.stripe.com/connect/custom/hosted-onboarding">Connect Onboarding</a>.
/// </summary>
[STJS.JsonConverter(typeof(STJStripeEntityConverter))]
public class AccountLink : StripeEntity<AccountLink>, IHasObject
{
/// <summary>
/// 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; }
}
}
15 changes: 1 addition & 14 deletions src/Stripe.net/Entities/AccountSessions/AccountSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ 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 @@ -20,24 +18,21 @@ namespace Stripe
/// href="https://docs.stripe.com/connect/get-started-connect-embedded-components">Connect
/// embedded components</a>.
/// </summary>
[STJS.JsonConverter(typeof(STJStripeEntityConverter))]
public class AccountSession : StripeEntity<AccountSession>, IHasObject
{
/// <summary>
/// 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 @@ -54,36 +49,28 @@ 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,124 +2,86 @@
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using Stripe.Infrastructure;
using STJS = System.Text.Json.Serialization;
#endif

[STJS.JsonConverter(typeof(STJStripeEntityConverter))]
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("disputes_list")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("disputes_list")]
#endif
public AccountSessionComponentsDisputesList DisputesList { 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("instant_payouts_promotion")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("instant_payouts_promotion")]
#endif
public AccountSessionComponentsInstantPayoutsPromotion InstantPayoutsPromotion { 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("payment_disputes")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("payment_disputes")]
#endif
public AccountSessionComponentsPaymentDisputes PaymentDisputes { get; set; }

[JsonProperty("payments")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("payments")]
#endif
public AccountSessionComponentsPayments Payments { get; set; }

[JsonProperty("payout_details")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("payout_details")]
#endif
public AccountSessionComponentsPayoutDetails PayoutDetails { 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,25 +2,21 @@
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using Stripe.Infrastructure;
using STJS = System.Text.Json.Serialization;
#endif

[STJS.JsonConverter(typeof(STJStripeEntityConverter))]
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,10 +2,10 @@
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using Stripe.Infrastructure;
using STJS = System.Text.Json.Serialization;
#endif

[STJS.JsonConverter(typeof(STJStripeEntityConverter))]
public class AccountSessionComponentsAccountManagementFeatures : StripeEntity<AccountSessionComponentsAccountManagementFeatures>
{
/// <summary>
Expand All @@ -16,9 +16,7 @@ public class AccountSessionComponentsAccountManagementFeatures : StripeEntity<Ac
/// <c>true</c> and <c>disable_stripe_user_authentication</c> defaults to <c>false</c>.
/// </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 @@ -28,9 +26,7 @@ public class AccountSessionComponentsAccountManagementFeatures : StripeEntity<Ac
/// 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,25 +2,21 @@
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using Stripe.Infrastructure;
using STJS = System.Text.Json.Serialization;
#endif

[STJS.JsonConverter(typeof(STJStripeEntityConverter))]
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,10 +2,10 @@
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using Stripe.Infrastructure;
using STJS = System.Text.Json.Serialization;
#endif

[STJS.JsonConverter(typeof(STJStripeEntityConverter))]
public class AccountSessionComponentsAccountOnboardingFeatures : StripeEntity<AccountSessionComponentsAccountOnboardingFeatures>
{
/// <summary>
Expand All @@ -16,9 +16,7 @@ public class AccountSessionComponentsAccountOnboardingFeatures : StripeEntity<Ac
/// <c>true</c> and <c>disable_stripe_user_authentication</c> defaults to <c>false</c>.
/// </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 @@ -28,9 +26,7 @@ public class AccountSessionComponentsAccountOnboardingFeatures : StripeEntity<Ac
/// 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; }
}
}
Loading
Loading