diff --git a/API_VERSION b/API_VERSION index 2ecdba01b5..9cf1974e02 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -d6534f3d076849c4f6df1414d4c477334e431ffd \ No newline at end of file +b7e21c0de7853df2dc73504a0ae4967897fd5c30 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e9d12ffff2..76d911f49f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2103 \ No newline at end of file +v2104 \ No newline at end of file diff --git a/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs b/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs index 709803f759..02fc876f9f 100644 --- a/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs +++ b/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs @@ -28,12 +28,21 @@ public class ApplicationFeeFeeSource : StripeEntity /// /// Type of object that created the application fee. - /// One of: charge, or payout. + /// One of: charge, payout, or transfer. /// [JsonProperty("type")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("type")] #endif public string Type { get; set; } + + /// + /// Transfer ID that created this application fee. + /// + [JsonProperty("transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer")] +#endif + public string Transfer { get; set; } } } diff --git a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs index b99409bb92..1304753162 100644 --- a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs +++ b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs @@ -64,7 +64,8 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas /// /// The balance that this transaction impacts. - /// One of: issuing, payments, or refund_and_dispute_prefunding. + /// One of: issuing, payments, refund_and_dispute_prefunding, or + /// transit. /// [JsonProperty("balance_type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Balances/Balance.cs b/src/Stripe.net/Entities/Balances/Balance.cs index d1d17d87f8..e257758558 100644 --- a/src/Stripe.net/Entities/Balances/Balance.cs +++ b/src/Stripe.net/Entities/Balances/Balance.cs @@ -93,5 +93,11 @@ public class Balance : StripeEntity, IHasObject [STJS.JsonPropertyName("refund_and_dispute_prefunding")] #endif public BalanceRefundAndDisputePrefunding RefundAndDisputePrefunding { get; set; } + + [JsonProperty("transit_balances_total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transit_balances_total")] +#endif + public BalanceTransitBalancesTotal TransitBalancesTotal { get; set; } } } diff --git a/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotal.cs b/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotal.cs new file mode 100644 index 0000000000..f531b0f724 --- /dev/null +++ b/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotal.cs @@ -0,0 +1,30 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class BalanceTransitBalancesTotal : StripeEntity + { + /// + /// Funds that are available for use. + /// + [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif + public List Available { get; set; } + + /// + /// Funds that are pending. + /// + [JsonProperty("pending")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending")] +#endif + public List Pending { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotalAvailable.cs b/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotalAvailable.cs new file mode 100644 index 0000000000..977ce4d005 --- /dev/null +++ b/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotalAvailable.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class BalanceTransitBalancesTotalAvailable : StripeEntity + { + /// + /// Balance amount. + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public long Amount { get; set; } + + /// + /// Three-letter ISO currency + /// code, in lowercase. Must be a supported + /// currency. + /// + [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 BalanceTransitBalancesTotalAvailableSourceTypes SourceTypes { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotalAvailableSourceTypes.cs b/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotalAvailableSourceTypes.cs new file mode 100644 index 0000000000..ad9a5ad9ff --- /dev/null +++ b/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotalAvailableSourceTypes.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class BalanceTransitBalancesTotalAvailableSourceTypes : StripeEntity + { + /// + /// Amount coming from legacy US ACH + /// payments. + /// + [JsonProperty("bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_account")] +#endif + public long BankAccount { get; set; } + + /// + /// Amount coming from most payment methods, including cards as well as non-legacy bank debits. + /// + [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif + public long Card { get; set; } + + /// + /// Amount coming from FPX, a Malaysian + /// payment method. + /// + [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif + public long Fpx { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotalPending.cs b/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotalPending.cs new file mode 100644 index 0000000000..e8bb7b9a6d --- /dev/null +++ b/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotalPending.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class BalanceTransitBalancesTotalPending : StripeEntity + { + /// + /// Balance amount. + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public long Amount { get; set; } + + /// + /// Three-letter ISO currency + /// code, in lowercase. Must be a supported + /// currency. + /// + [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 BalanceTransitBalancesTotalPendingSourceTypes SourceTypes { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotalPendingSourceTypes.cs b/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotalPendingSourceTypes.cs new file mode 100644 index 0000000000..26cb6782f8 --- /dev/null +++ b/src/Stripe.net/Entities/Balances/BalanceTransitBalancesTotalPendingSourceTypes.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class BalanceTransitBalancesTotalPendingSourceTypes : StripeEntity + { + /// + /// Amount coming from legacy US ACH + /// payments. + /// + [JsonProperty("bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_account")] +#endif + public long BankAccount { get; set; } + + /// + /// Amount coming from most payment methods, including cards as well as non-legacy bank debits. + /// + [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif + public long Card { get; set; } + + /// + /// Amount coming from FPX, a Malaysian + /// payment method. + /// + [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif + public long Fpx { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Billing/Analytics/MeterUsageRows/MeterUsageRow.cs b/src/Stripe.net/Entities/Billing/Analytics/MeterUsageRows/MeterUsageRow.cs index 406b173401..9e6ec368ac 100644 --- a/src/Stripe.net/Entities/Billing/Analytics/MeterUsageRows/MeterUsageRow.cs +++ b/src/Stripe.net/Entities/Billing/Analytics/MeterUsageRows/MeterUsageRow.cs @@ -70,6 +70,15 @@ public class MeterUsageRow : StripeEntity, IHasId, IHasObject #endif public DateTime StartsAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + /// + /// A set of key-value pairs representing the tenants of the meter usage. + /// + [JsonProperty("tenants")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tenants")] +#endif + public Dictionary Tenants { get; set; } + /// /// The aggregated meter usage value for the specified bucket. /// diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs index f01cc5b0d9..705025e5b6 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs @@ -46,6 +46,15 @@ public class PaymentIntent : StripeEntity, IHasId, IHasMetadata, #endif public string Object { get; set; } + /// + /// Allocated Funds configuration for this PaymentIntent. + /// + [JsonProperty("allocated_funds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allocated_funds")] +#endif + public PaymentIntentAllocatedFunds AllocatedFunds { get; set; } + /// /// Amount intended to be collected by this PaymentIntent. A positive integer representing /// how much to charge in the + { + /// + /// Allocated Funds configuration for this PaymentIntent. + /// + [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif + public bool? Enabled { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Transfers/Transfer.cs b/src/Stripe.net/Entities/Transfers/Transfer.cs index 7e8c081efc..89d146ec6c 100644 --- a/src/Stripe.net/Entities/Transfers/Transfer.cs +++ b/src/Stripe.net/Entities/Transfers/Transfer.cs @@ -65,6 +65,43 @@ public class Transfer : StripeEntity, IHasId, IHasMetadata, IHasObject #endif public long AmountReversed { get; set; } + #region Expandable ApplicationFee + + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public string ApplicationFeeId + { + get => this.InternalApplicationFee?.Id; + set => this.InternalApplicationFee = SetExpandableFieldId(value, this.InternalApplicationFee); + } + + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public ApplicationFee ApplicationFee + { + get => this.InternalApplicationFee?.ExpandedObject; + set => this.InternalApplicationFee = SetExpandableFieldObject(value, this.InternalApplicationFee); + } + + [JsonProperty("application_fee")] + [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif + internal ExpandableField InternalApplicationFee { get; set; } + #endregion + + [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif + public long? ApplicationFeeAmount { get; set; } + #region Expandable BalanceTransaction /// diff --git a/src/Stripe.net/Services/Billing/Analytics/MeterUsages/MeterUsageMeterOptions.cs b/src/Stripe.net/Services/Billing/Analytics/MeterUsages/MeterUsageMeterOptions.cs index 55120597de..54307b98f0 100644 --- a/src/Stripe.net/Services/Billing/Analytics/MeterUsages/MeterUsageMeterOptions.cs +++ b/src/Stripe.net/Services/Billing/Analytics/MeterUsages/MeterUsageMeterOptions.cs @@ -47,5 +47,15 @@ public class MeterUsageMeterOptions : INestedOptions [STJS.JsonPropertyName("tenant_filters")] #endif public Dictionary TenantFilters { get; set; } + + /// + /// List of high cardinality tenant dimension keys to group by. If specified, usage events + /// will be grouped by the given tenant dimension key's values. + /// + [JsonProperty("tenant_group_by_keys")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tenant_group_by_keys")] +#endif + public List TenantGroupByKeys { get; set; } } } diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionConfirmOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionConfirmOptions.cs index ea80c7b93d..0b4cc33c62 100644 --- a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionConfirmOptions.cs +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionConfirmOptions.cs @@ -16,5 +16,14 @@ public class RequestedSessionConfirmOptions : BaseOptions [STJS.JsonPropertyName("payment_method")] #endif public string PaymentMethod { get; set; } + + /// + /// Risk details/signals associated with the requested session. + /// + [JsonProperty("risk_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("risk_details")] +#endif + public RequestedSessionRiskDetailsOptions RiskDetails { get; set; } } } diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionCreateOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionCreateOptions.cs index 3dc4dfd574..cc9e93ef07 100644 --- a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionCreateOptions.cs +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionCreateOptions.cs @@ -72,15 +72,6 @@ public class RequestedSessionCreateOptions : BaseOptions, IHasMetadata #endif public RequestedSessionPaymentMethodDataOptions PaymentMethodData { get; set; } - /// - /// The risk details for this requested session. - /// - [JsonProperty("risk_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("risk_details")] -#endif - public RequestedSessionRiskDetailsOptions RiskDetails { get; set; } - /// /// The details of the seller. /// diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionRiskDetailsClientDeviceMetadataDetailsOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionRiskDetailsClientDeviceMetadataDetailsOptions.cs index 3a0ba03d67..f74f8f4029 100644 --- a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionRiskDetailsClientDeviceMetadataDetailsOptions.cs +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionRiskDetailsClientDeviceMetadataDetailsOptions.cs @@ -36,13 +36,13 @@ public class RequestedSessionRiskDetailsClientDeviceMetadataDetailsOptions : INe public string RemoteIp { get; set; } /// - /// The time on page in seconds. + /// The time on page in milliseconds. /// - [JsonProperty("time_on_page")] + [JsonProperty("time_on_page_ms")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("time_on_page")] + [STJS.JsonPropertyName("time_on_page_ms")] #endif - public long? TimeOnPage { get; set; } + public long? TimeOnPageMs { get; set; } /// /// The user agent of the client device. diff --git a/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs b/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs index efe96d2cf5..ed6e3e68e6 100644 --- a/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs +++ b/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs @@ -18,6 +18,12 @@ public class TransferCreateOptions : BaseOptions, IHasMetadata #endif public long? Amount { get; set; } + [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif + public long? ApplicationFeeAmount { get; set; } + /// /// Three-letter ISO code for /// currency in lowercase. Must be a