diff --git a/API_VERSION b/API_VERSION index e48768f4a0..6721666057 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -3602014a6583f6c0fbfdde3c575839ac7d0b4e9c \ No newline at end of file +0822236fb875490aa7ccc7b66dbb52f8965ee062 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b18a87c3de..2e97438c32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,58 @@ * Add support for event notifications `V2PaymentsSettlementAllocationIntentCanceledEvent`, `V2PaymentsSettlementAllocationIntentCreatedEvent`, `V2PaymentsSettlementAllocationIntentErroredEvent`, `V2PaymentsSettlementAllocationIntentFundsNotReceivedEvent`, `V2PaymentsSettlementAllocationIntentMatchedEvent`, `V2PaymentsSettlementAllocationIntentSettledEvent`, and `V2PaymentsSettlementAllocationIntentSubmittedEvent` with related object `V2.Payments.SettlementAllocationIntent` * Add support for event notifications `V2PaymentsSettlementAllocationIntentSplitCanceledEvent`, `V2PaymentsSettlementAllocationIntentSplitCreatedEvent`, and `V2PaymentsSettlementAllocationIntentSplitSettledEvent` with related object `V2.Payments.SettlementAllocationIntentSplit` +## 50.1.0 - 2025-12-16 +This release changes the pinned API version to `2025-12-15.clover`. + +* [#3271](https://github.com/stripe/stripe-dotnet/pull/3271) Update generated code + * Add support for new resources `V2.Core.AccountLink`, `V2.Core.AccountPersonToken`, `V2.Core.AccountPerson`, `V2.Core.AccountToken`, and `V2.Core.Account` + * Add support for `Create` and `Get` methods on resources `V2.Core.AccountPersonToken` and `V2.Core.AccountToken` + * Add support for `Create` method on resource `V2.Core.AccountLink` + * Add support for `Close`, `Create`, `Get`, `List`, and `Update` methods on resource `V2.Core.Account` + * Add support for `Create`, `Delete`, `Get`, `List`, and `Update` methods on resource `V2.Core.AccountPerson` + * Add support for `CustomerAccount` on `Billing.CreditBalanceSummaryGetOptions`, `Billing.CreditBalanceSummary`, `Billing.CreditBalanceTransactionListOptions`, `Billing.CreditGrantCreateOptions`, `Billing.CreditGrantListOptions`, `Billing.CreditGrant`, `BillingPortal.SessionCreateOptions`, `BillingPortal.Session`, `CashBalance`, `Checkout.SessionCreateOptions`, `Checkout.SessionListOptions`, `Checkout.Session`, `ConfirmationToken.PaymentMethodPreview`, `CreditNoteListOptions`, `CreditNote`, `CustomerBalanceTransaction`, `CustomerCashBalanceTransaction`, `CustomerSessionCreateOptions`, `CustomerSession`, `Customer`, `Discount`, `FinancialConnections.Account.AccountHolder`, `FinancialConnections.Session.AccountHolder`, `FinancialConnectionsAccountAccountHolderOptions`, `FinancialConnectionsSessionAccountHolderOptions`, `InvoiceCreateOptions`, `InvoiceCreatePreviewOptions`, `InvoiceItemCreateOptions`, `InvoiceItemListOptions`, `InvoiceItem`, `InvoiceListOptions`, `Invoice`, `PaymentIntentCreateOptions`, `PaymentIntentListOptions`, `PaymentIntentUpdateOptions`, `PaymentIntent`, `PaymentMethodAttachOptions`, `PaymentMethodListOptions`, `PaymentMethod`, `PromotionCodeCreateOptions`, `PromotionCodeListOptions`, `PromotionCode`, `QuoteCreateOptions`, `QuoteListOptions`, `QuoteUpdateOptions`, `Quote`, `SetupAttempt`, `SetupIntentCreateOptions`, `SetupIntentListOptions`, `SetupIntentUpdateOptions`, `SetupIntent`, `SubscriptionCreateOptions`, `SubscriptionListOptions`, `SubscriptionScheduleCreateOptions`, `SubscriptionScheduleListOptions`, `SubscriptionSchedule`, `Subscription`, `TaxId.Owner`, `TaxIdOwnerOptions`, and `TaxId` + * Add support for `Metadata` on `CheckoutSessionLineItemOptions` and `LineItem` + * Add support for `PaytoPayments` on `Account.Capabilities` and `AccountCapabilitiesOptions` + * Add support for `Signer` on `AccountDocumentsProofOfRegistrationOptions` and `AccountDocumentsProofOfUltimateBeneficialOwnershipOptions` + * Add support for `BillingCycleAnchor` on `BillingPortal.Configuration.Features.SubscriptionUpdate` and `BillingPortalConfigurationFeaturesSubscriptionUpdateOptions` + * Add support for `Payto` on `Charge.PaymentMethodDetails`, `Checkout.Session.PaymentMethodOptions`, `CheckoutSessionPaymentMethodOptionsOptions`, `ConfirmationToken.PaymentMethodPreview`, `ConfirmationTokenPaymentMethodDataOptions`, `Invoice.PaymentSettings.PaymentMethodOptions`, `InvoicePaymentSettingsPaymentMethodOptionsOptions`, `Mandate.PaymentMethodDetails`, `PaymentAttemptRecord.PaymentMethodDetails`, `PaymentIntent.PaymentMethodOptions`, `PaymentIntentPaymentMethodDataOptions`, `PaymentIntentPaymentMethodOptionsOptions`, `PaymentMethodConfigurationCreateOptions`, `PaymentMethodConfigurationUpdateOptions`, `PaymentMethodConfiguration`, `PaymentMethodCreateOptions`, `PaymentMethodUpdateOptions`, `PaymentMethod`, `PaymentRecord.PaymentMethodDetails`, `SetupAttempt.PaymentMethodDetails`, `SetupIntent.PaymentMethodOptions`, `SetupIntentPaymentMethodDataOptions`, `SetupIntentPaymentMethodOptionsOptions`, `Subscription.PaymentSettings.PaymentMethodOptions`, and `SubscriptionPaymentSettingsPaymentMethodOptionsOptions` + * Add support for `ExpectedDebitDate` on `Charge.PaymentMethodDetails.AcssDebit`, `Charge.PaymentMethodDetails.AuBecsDebit`, `Charge.PaymentMethodDetails.BacsDebit`, `Charge.PaymentMethodDetails.NzBankAccount`, `Charge.PaymentMethodDetails.SepaDebit`, `Charge.PaymentMethodDetails.UsBankAccount`, `PaymentAttemptRecord.PaymentMethodDetails.AcssDebit`, `PaymentAttemptRecord.PaymentMethodDetails.AuBecsDebit`, `PaymentAttemptRecord.PaymentMethodDetails.BacsDebit`, `PaymentAttemptRecord.PaymentMethodDetails.NzBankAccount`, `PaymentAttemptRecord.PaymentMethodDetails.SepaDebit`, `PaymentAttemptRecord.PaymentMethodDetails.UsBankAccount`, `PaymentRecord.PaymentMethodDetails.AcssDebit`, `PaymentRecord.PaymentMethodDetails.AuBecsDebit`, `PaymentRecord.PaymentMethodDetails.BacsDebit`, `PaymentRecord.PaymentMethodDetails.NzBankAccount`, `PaymentRecord.PaymentMethodDetails.SepaDebit`, and `PaymentRecord.PaymentMethodDetails.UsBankAccount` + * Add support for `LineItems` on `Checkout.SessionUpdateOptions` + * Add support for `Invoice` on `CustomerCustomerBalanceTransactionListOptions` + * Add support for `RelatedCustomerAccount` on `Identity.VerificationSessionCreateOptions`, `Identity.VerificationSessionListOptions`, and `Identity.VerificationSession` + * Add support for `Subtotal` on `InvoiceLineItem` + * Add support for `AuthorizationCode`, `Description`, `Iin`, `Installments`, `Issuer`, `NetworkAdviceCode`, `NetworkDeclineCode`, and `StoredCredentialUsage` on `PaymentAttemptRecord.PaymentMethodDetails.Card` and `PaymentRecord.PaymentMethodDetails.Card` + * Add support for `AllowRedisplay` on `PaymentMethodListOptions` + * Add support for `ReportedBy` on `PaymentRecord` + * Add support for `Changes` on `V2.Core.Event` +* [#3270](https://github.com/stripe/stripe-dotnet/pull/3270) Make `EventUtility.ComputeSignature` public + +## 50.1.0-beta.1 - 2025-11-18 +This release changes the pinned API version to `2025-11-17.preview`. + +* [#3241](https://github.com/stripe/stripe-dotnet/pull/3241) Update generated code for beta + * Add support for new resources `V2.Core.AccountPersonToken` and `V2.Core.AccountToken` + * Remove support for resource `V2.Payments.OffSessionPayment` + * Add support for `Create` and `Get` methods on resources `V2.Core.AccountPersonToken` and `V2.Core.AccountToken` + * Remove support for `Cancel`, `Capture`, `Create`, `Get`, and `List` methods on resource `V2.Payments.OffSessionPayment` + * Add support for `SpecifiedCommercialTransactionsActUrl` on `Account.BusinessProfile` and `AccountBusinessProfileOptions` + * Add support for `PaypayPayments` on `Account.Settings` and `AccountSettingsOptions` + * Change type of `BillingAnalyticsMeterUsageMeterOptions.DimensionFilters` from `string` to `array(string)` + * Change type of `BillingAnalyticsMeterUsageMeterOptions.TenantFilters` from `string` to `array(string)` + * Add support for `CarRentalData`, `FlightData`, and `LodgingData` on `ChargePaymentDetailsOptions` and `PaymentIntentPaymentDetailsOptions` + * Add support for `SupplementaryPurchaseData` on `OrderPaymentSettingsPaymentMethodOptionsKlarnaOptions` and `PaymentIntentPaymentMethodOptionsKlarnaOptions` + * Add support for `AllowRedisplay` and `CustomerAccount` on `PaymentMethodListOptions` + * Add support for `FutureRequirements` on `V2.Core.Account` + * Add support for `KonbiniPayments` and `ScriptStatementDescriptor` on `V2.Core.Account.Configuration.Merchant` and `V2CoreAccountConfigurationMerchantOptions` + * Add support for `Eur` on `V2.Core.Account.Configuration.Storer.Capabilities.HoldsCurrencies` and `V2CoreAccountConfigurationStorerCapabilitiesHoldsCurrenciesOptions` + * Add support for `RequirementsCollector` on `V2.Core.Account.Defaults.Responsibilities` + * Remove support for `Collector` on `V2.Core.Account.Requirements` + * Add support for `Changes` on `V2.Core.Event` + * Add support for `AccountToken` on `V2.Core.AccountCreateOptions` and `V2.Core.AccountUpdateOptions` + * Add support for `PersonToken` on `V2.Core.AccountPersonCreateOptions` and `V2.Core.AccountPersonUpdateOptions` + * Add support for thin event `V2CoreHealthEventGenerationFailureResolvedEvent` + * Remove support for thin events `V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent`, `V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent`, `V2PaymentsOffSessionPaymentCanceledEvent`, `V2PaymentsOffSessionPaymentCreatedEvent`, `V2PaymentsOffSessionPaymentFailedEvent`, `V2PaymentsOffSessionPaymentRequiresCaptureEvent`, and `V2PaymentsOffSessionPaymentSucceededEvent` with related object `V2.Payments.OffSessionPayment` + ## 50.1.0-alpha.4 - 2025-12-04 * [#3272](https://github.com/stripe/stripe-dotnet/pull/3272) Update generated code for private-preview * Add support for `CheckScanning` on `AccountSession.Components` @@ -176,32 +228,6 @@ This release changes the pinned API version to `2025-11-17.preview`. * Add support for `MbWay` and `Twint` on `Refund.DestinationDetails` * Add support for snapshot events `FinancialConnectionsAccountAccountNumbersUpdated` and `FinancialConnectionsAccountUpcomingAccountNumberExpiry` with resource `FinancialConnections.Account` -## 50.1.0-beta.1 - 2025-11-18 -This release changes the pinned API version to `2025-11-17.preview`. - -* [#3241](https://github.com/stripe/stripe-dotnet/pull/3241) Update generated code for beta - * Add support for new resources `V2.Core.AccountPersonToken` and `V2.Core.AccountToken` - * Remove support for resource `V2.Payments.OffSessionPayment` - * Add support for `Create` and `Get` methods on resources `V2.Core.AccountPersonToken` and `V2.Core.AccountToken` - * Remove support for `Cancel`, `Capture`, `Create`, `Get`, and `List` methods on resource `V2.Payments.OffSessionPayment` - * Add support for `SpecifiedCommercialTransactionsActUrl` on `Account.BusinessProfile` and `AccountBusinessProfileOptions` - * Add support for `PaypayPayments` on `Account.Settings` and `AccountSettingsOptions` - * Change type of `BillingAnalyticsMeterUsageMeterOptions.DimensionFilters` from `string` to `array(string)` - * Change type of `BillingAnalyticsMeterUsageMeterOptions.TenantFilters` from `string` to `array(string)` - * Add support for `CarRentalData`, `FlightData`, and `LodgingData` on `ChargePaymentDetailsOptions` and `PaymentIntentPaymentDetailsOptions` - * Add support for `SupplementaryPurchaseData` on `OrderPaymentSettingsPaymentMethodOptionsKlarnaOptions` and `PaymentIntentPaymentMethodOptionsKlarnaOptions` - * Add support for `AllowRedisplay` and `CustomerAccount` on `PaymentMethodListOptions` - * Add support for `FutureRequirements` on `V2.Core.Account` - * Add support for `KonbiniPayments` and `ScriptStatementDescriptor` on `V2.Core.Account.Configuration.Merchant` and `V2CoreAccountConfigurationMerchantOptions` - * Add support for `Eur` on `V2.Core.Account.Configuration.Storer.Capabilities.HoldsCurrencies` and `V2CoreAccountConfigurationStorerCapabilitiesHoldsCurrenciesOptions` - * Add support for `RequirementsCollector` on `V2.Core.Account.Defaults.Responsibilities` - * Remove support for `Collector` on `V2.Core.Account.Requirements` - * Add support for `Changes` on `V2.Core.Event` - * Add support for `AccountToken` on `V2.Core.AccountCreateOptions` and `V2.Core.AccountUpdateOptions` - * Add support for `PersonToken` on `V2.Core.AccountPersonCreateOptions` and `V2.Core.AccountPersonUpdateOptions` - * Add support for thin event `V2CoreHealthEventGenerationFailureResolvedEvent` - * Remove support for thin events `V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent`, `V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent`, `V2PaymentsOffSessionPaymentCanceledEvent`, `V2PaymentsOffSessionPaymentCreatedEvent`, `V2PaymentsOffSessionPaymentFailedEvent`, `V2PaymentsOffSessionPaymentRequiresCaptureEvent`, and `V2PaymentsOffSessionPaymentSucceededEvent` with related object `V2.Payments.OffSessionPayment` - ## 50.0.0 - 2025-11-18 This release changes the pinned API version to `2025-11-17.clover`. diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 4e4ca8e5b7..6a50c81b8f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2141 \ No newline at end of file +v2148 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Invoices/InvoiceParentScheduleDetails.cs b/src/Stripe.net/Entities/Invoices/InvoiceParentScheduleDetails.cs index 0396cf5831..a896fc5df3 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceParentScheduleDetails.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceParentScheduleDetails.cs @@ -2,10 +2,14 @@ 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 InvoiceParentScheduleDetails : StripeEntity { /// @@ -16,5 +20,46 @@ public class InvoiceParentScheduleDetails : StripeEntity + /// (ID of the Subscription) + /// The subscription associated with this schedule. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public string SubscriptionId + { + get => this.InternalSubscription?.Id; + set => this.InternalSubscription = SetExpandableFieldId(value, this.InternalSubscription); + } + + /// + /// (Expanded) + /// The subscription associated with this schedule. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public Subscription Subscription + { + get => this.InternalSubscription?.ExpandedObject; + set => this.InternalSubscription = SetExpandableFieldObject(value, this.InternalSubscription); + } + + [JsonProperty("subscription")] + [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif + internal ExpandableField InternalSubscription { get; set; } + #endregion } } diff --git a/src/Stripe.net/Entities/QuoteLines/QuoteLine.cs b/src/Stripe.net/Entities/QuoteLines/QuoteLine.cs index 446071a4c4..67062ff08c 100644 --- a/src/Stripe.net/Entities/QuoteLines/QuoteLine.cs +++ b/src/Stripe.net/Entities/QuoteLines/QuoteLine.cs @@ -78,12 +78,7 @@ public class QuoteLine : StripeEntity, IHasId, IHasObject public QuoteLineCancelSubscriptionSchedule CancelSubscriptionSchedule { get; set; } /// - /// Configures how the subscription schedule handles billing for phase transitions. Possible - /// values are phase_start (default) or billing_period_start. - /// phase_start bills based on the current state of the subscription, ignoring - /// changes scheduled in future phases. billing_period_start bills predictively for - /// upcoming phase transitions within the current billing cycle, including pricing changes - /// and service period adjustments that will occur before the next invoice. + /// Configures how the subscription schedule handles billing for phase transitions. /// One of: billing_period_start, or line_start. /// [JsonProperty("effective_at")] diff --git a/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoiceParentScheduleDetails.cs b/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoiceParentScheduleDetails.cs index 05123512b3..92cae4049c 100644 --- a/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoiceParentScheduleDetails.cs +++ b/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoiceParentScheduleDetails.cs @@ -2,10 +2,14 @@ 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 QuotePreviewInvoiceParentScheduleDetails : StripeEntity { /// @@ -16,5 +20,46 @@ public class QuotePreviewInvoiceParentScheduleDetails : StripeEntity + /// (ID of the Subscription) + /// The subscription associated with this schedule. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public string SubscriptionId + { + get => this.InternalSubscription?.Id; + set => this.InternalSubscription = SetExpandableFieldId(value, this.InternalSubscription); + } + + /// + /// (Expanded) + /// The subscription associated with this schedule. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public Subscription Subscription + { + get => this.InternalSubscription?.ExpandedObject; + set => this.InternalSubscription = SetExpandableFieldObject(value, this.InternalSubscription); + } + + [JsonProperty("subscription")] + [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif + internal ExpandableField InternalSubscription { get; set; } + #endregion } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteSubscriptionData.cs b/src/Stripe.net/Entities/Quotes/QuoteSubscriptionData.cs index 0f78240b8e..5660407110 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteSubscriptionData.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteSubscriptionData.cs @@ -157,13 +157,9 @@ public Subscription FromSubscription public Dictionary Metadata { get; set; } /// - /// Configures how the quote handles billing for line transitions. Possible values are - /// line_start (default) or billing_period_start. line_start bills - /// based on the current state of the line, ignoring changes scheduled for future lines. - /// billing_period_start bills predictively for upcoming line transitions within the - /// current billing cycle, including pricing changes and service period adjustments that - /// will occur before the next invoice. - /// One of: billing_period_start, or line_start. + /// Configures how the subscription schedule handles billing for phase transitions when the + /// quote is accepted. + /// One of: billing_period_start, or phase_start. /// [JsonProperty("phase_effective_at")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Quotes/QuoteSubscriptionDataOverride.cs b/src/Stripe.net/Entities/Quotes/QuoteSubscriptionDataOverride.cs index 420bf0cb71..d5c87d7964 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteSubscriptionDataOverride.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteSubscriptionDataOverride.cs @@ -80,13 +80,9 @@ public class QuoteSubscriptionDataOverride : StripeEntity - /// Configures how the quote handles billing for line transitions. Possible values are - /// line_start (default) or billing_period_start. line_start bills - /// based on the current state of the line, ignoring changes scheduled for future lines. - /// billing_period_start bills predictively for upcoming line transitions within the - /// current billing cycle, including pricing changes and service period adjustments that - /// will occur before the next invoice. - /// One of: billing_period_start, or line_start. + /// Configures how the subscription schedule handles billing for phase transitions when the + /// quote is accepted. + /// One of: billing_period_start, or phase_start. /// [JsonProperty("phase_effective_at")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItem.cs b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItem.cs index f1b26cdc9f..b7257dee2a 100644 --- a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItem.cs +++ b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItem.cs @@ -70,6 +70,20 @@ public class CalculationLineItem : StripeEntity, IHasId, IH #endif public Dictionary Metadata { get; set; } + /// + /// A tax location for a line item that acts as a performance location. This indicates that + /// the line item might be taxed at the place where it is being performed at. This is + /// helpful for events or other services being performed at non-customer addresses like + /// venues or offices. This can be left empty for tax codes that do not require a tax + /// location. For tax codes where the location requirement is "optional", this would + /// override the customer address in most use cases. + /// + [JsonProperty("performance_location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("performance_location")] +#endif + public string PerformanceLocation { get; set; } + /// /// The ID of an existing Product. /// diff --git a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdown.cs b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdown.cs index 53dab0f147..24dac4a0d5 100644 --- a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdown.cs +++ b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdown.cs @@ -27,7 +27,7 @@ public class CalculationLineItemTaxBreakdown : StripeEntity /// Indicates whether the jurisdiction was determined by the origin (merchant's address) or /// destination (customer's address). - /// One of: destination, or origin. + /// One of: destination, origin, or performance. /// [JsonProperty("sourcing")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdownTaxRateDetails.cs b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdownTaxRateDetails.cs index fbb1a256cf..af784a817d 100644 --- a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdownTaxRateDetails.cs +++ b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdownTaxRateDetails.cs @@ -29,10 +29,12 @@ public class CalculationLineItemTaxBreakdownTaxRateDetails : StripeEntity /// The tax type, such as vat or sales_tax. - /// One of: amusement_tax, communications_tax, gst, hst, - /// igst, jct, lease_tax, pst, qst, - /// retail_delivery_fee, rst, sales_tax, service_tax, or - /// vat. + /// One of: admissions_tax, amusement_tax, attendance_tax, + /// communications_tax, entertainment_tax, gross_receipts_tax, + /// gst, hospitality_tax, hst, igst, jct, + /// lease_tax, luxury_tax, pst, qst, resort_tax, + /// retail_delivery_fee, rst, sales_tax, service_tax, + /// tourism_tax, or vat. /// [JsonProperty("tax_type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdown.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdown.cs index fed0f64e64..18169f664a 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdown.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdown.cs @@ -27,7 +27,7 @@ public class CalculationShippingCostTaxBreakdown : StripeEntity /// Indicates whether the jurisdiction was determined by the origin (merchant's address) or /// destination (customer's address). - /// One of: destination, or origin. + /// One of: destination, origin, or performance. /// [JsonProperty("sourcing")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdownTaxRateDetails.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdownTaxRateDetails.cs index d769b181f8..fc9de1c80c 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdownTaxRateDetails.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdownTaxRateDetails.cs @@ -29,10 +29,12 @@ public class CalculationShippingCostTaxBreakdownTaxRateDetails : StripeEntity /// The tax type, such as vat or sales_tax. - /// One of: amusement_tax, communications_tax, gst, hst, - /// igst, jct, lease_tax, pst, qst, - /// retail_delivery_fee, rst, sales_tax, service_tax, or - /// vat. + /// One of: admissions_tax, amusement_tax, attendance_tax, + /// communications_tax, entertainment_tax, gross_receipts_tax, + /// gst, hospitality_tax, hst, igst, jct, + /// lease_tax, luxury_tax, pst, qst, resort_tax, + /// retail_delivery_fee, rst, sales_tax, service_tax, + /// tourism_tax, or vat. /// [JsonProperty("tax_type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs index c80e92e7b9..896a515661 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs @@ -63,10 +63,12 @@ public class CalculationTaxBreakdownTaxRateDetails : StripeEntity /// The tax type, such as vat or sales_tax. - /// One of: amusement_tax, communications_tax, gst, hst, - /// igst, jct, lease_tax, pst, qst, - /// retail_delivery_fee, rst, sales_tax, service_tax, or - /// vat. + /// One of: admissions_tax, amusement_tax, attendance_tax, + /// communications_tax, entertainment_tax, gross_receipts_tax, + /// gst, hospitality_tax, hst, igst, jct, + /// lease_tax, luxury_tax, pst, qst, resort_tax, + /// retail_delivery_fee, rst, sales_tax, service_tax, + /// tourism_tax, or vat. /// [JsonProperty("tax_type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Tax/Locations/Location.cs b/src/Stripe.net/Entities/Tax/Locations/Location.cs new file mode 100644 index 0000000000..4cf3e161c2 --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Locations/Location.cs @@ -0,0 +1,59 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Tax locations represent venues for services, tickets, or other product types. + /// + public class Location : 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; } + + [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif + public Address Address { get; set; } + + /// + /// A descriptive text providing additional context about the tax location. This can include + /// information about the venue, types of events held, services available, or any relevant + /// details for better identification (e.g., "A spacious auditorium suitable for large + /// concerts and events."). + /// + [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif + public string Description { get; set; } + + /// + /// The type of tax location to be defined. Currently the only option is performance. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUs.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUs.cs index e85b1aa71e..86f30e5561 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUs.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUs.cs @@ -38,14 +38,64 @@ public class RegistrationCountryOptionsUs : StripeEntity /// Type of registration in the US. - /// One of: local_amusement_tax, local_lease_tax, - /// state_communications_tax, state_retail_delivery_fee, or - /// state_sales_tax. + /// One of: admissions_tax, attendance_tax, entertainment_tax, + /// gross_receipts_tax, hospitality_tax, local_amusement_tax, + /// local_lease_tax, luxury_tax, resort_tax, + /// state_communications_tax, state_retail_delivery_fee, + /// state_sales_tax, or tourism_tax. /// [JsonProperty("type")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("type")] #endif public string Type { get; set; } + + [JsonProperty("admissions_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("admissions_tax")] +#endif + public RegistrationCountryOptionsUsAdmissionsTax AdmissionsTax { get; set; } + + [JsonProperty("attendance_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("attendance_tax")] +#endif + public RegistrationCountryOptionsUsAttendanceTax AttendanceTax { get; set; } + + [JsonProperty("entertainment_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("entertainment_tax")] +#endif + public RegistrationCountryOptionsUsEntertainmentTax EntertainmentTax { get; set; } + + [JsonProperty("gross_receipts_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gross_receipts_tax")] +#endif + public RegistrationCountryOptionsUsGrossReceiptsTax GrossReceiptsTax { get; set; } + + [JsonProperty("hospitality_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hospitality_tax")] +#endif + public RegistrationCountryOptionsUsHospitalityTax HospitalityTax { get; set; } + + [JsonProperty("luxury_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("luxury_tax")] +#endif + public RegistrationCountryOptionsUsLuxuryTax LuxuryTax { get; set; } + + [JsonProperty("resort_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resort_tax")] +#endif + public RegistrationCountryOptionsUsResortTax ResortTax { get; set; } + + [JsonProperty("tourism_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tourism_tax")] +#endif + public RegistrationCountryOptionsUsTourismTax TourismTax { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsAdmissionsTax.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsAdmissionsTax.cs new file mode 100644 index 0000000000..dc51a6740f --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsAdmissionsTax.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsUsAdmissionsTax : StripeEntity + { + /// + /// A jurisdiction + /// code representing the local jurisdiction. + /// + [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif + public string Jurisdiction { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsAttendanceTax.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsAttendanceTax.cs new file mode 100644 index 0000000000..bc19e6a127 --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsAttendanceTax.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsUsAttendanceTax : StripeEntity + { + /// + /// A jurisdiction + /// code representing the local jurisdiction. + /// + [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif + public string Jurisdiction { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsEntertainmentTax.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsEntertainmentTax.cs new file mode 100644 index 0000000000..83d33038ea --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsEntertainmentTax.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsUsEntertainmentTax : StripeEntity + { + /// + /// A jurisdiction + /// code representing the local jurisdiction. + /// + [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif + public string Jurisdiction { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsGrossReceiptsTax.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsGrossReceiptsTax.cs new file mode 100644 index 0000000000..65d8f008e2 --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsGrossReceiptsTax.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsUsGrossReceiptsTax : StripeEntity + { + /// + /// A jurisdiction + /// code representing the local jurisdiction. + /// + [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif + public string Jurisdiction { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsHospitalityTax.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsHospitalityTax.cs new file mode 100644 index 0000000000..31bbe7b7c3 --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsHospitalityTax.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsUsHospitalityTax : StripeEntity + { + /// + /// A jurisdiction + /// code representing the local jurisdiction. + /// + [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif + public string Jurisdiction { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsLuxuryTax.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsLuxuryTax.cs new file mode 100644 index 0000000000..d6b6eb1e1d --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsLuxuryTax.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsUsLuxuryTax : StripeEntity + { + /// + /// A jurisdiction + /// code representing the local jurisdiction. + /// + [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif + public string Jurisdiction { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsResortTax.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsResortTax.cs new file mode 100644 index 0000000000..6bf73d1e49 --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsResortTax.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsUsResortTax : StripeEntity + { + /// + /// A jurisdiction + /// code representing the local jurisdiction. + /// + [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif + public string Jurisdiction { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsTourismTax.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsTourismTax.cs new file mode 100644 index 0000000000..94876f9044 --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsTourismTax.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsUsTourismTax : StripeEntity + { + /// + /// A jurisdiction + /// code representing the local jurisdiction. + /// + [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif + public string Jurisdiction { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdown.cs b/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdown.cs index 785bb52ed0..5deac8a0b8 100644 --- a/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdown.cs +++ b/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdown.cs @@ -27,7 +27,7 @@ public class TransactionShippingCostTaxBreakdown : StripeEntity /// Indicates whether the jurisdiction was determined by the origin (merchant's address) or /// destination (customer's address). - /// One of: destination, or origin. + /// One of: destination, origin, or performance. /// [JsonProperty("sourcing")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdownTaxRateDetails.cs b/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdownTaxRateDetails.cs index afc4a3e94d..37872cbf3c 100644 --- a/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdownTaxRateDetails.cs +++ b/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdownTaxRateDetails.cs @@ -29,10 +29,12 @@ public class TransactionShippingCostTaxBreakdownTaxRateDetails : StripeEntity /// The tax type, such as vat or sales_tax. - /// One of: amusement_tax, communications_tax, gst, hst, - /// igst, jct, lease_tax, pst, qst, - /// retail_delivery_fee, rst, sales_tax, service_tax, or - /// vat. + /// One of: admissions_tax, amusement_tax, attendance_tax, + /// communications_tax, entertainment_tax, gross_receipts_tax, + /// gst, hospitality_tax, hst, igst, jct, + /// lease_tax, luxury_tax, pst, qst, resort_tax, + /// retail_delivery_fee, rst, sales_tax, service_tax, + /// tourism_tax, or vat. /// [JsonProperty("tax_type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/TaxCodes/TaxCode.cs b/src/Stripe.net/Entities/TaxCodes/TaxCode.cs index d8162a015e..b05b236045 100644 --- a/src/Stripe.net/Entities/TaxCodes/TaxCode.cs +++ b/src/Stripe.net/Entities/TaxCodes/TaxCode.cs @@ -47,5 +47,17 @@ public class TaxCode : StripeEntity, IHasId, IHasObject [STJS.JsonPropertyName("name")] #endif public string Name { get; set; } + + /// + /// An object that describes more information about the tax location required for this tax + /// code. Some tax + /// codes require a tax location of type performance to calculate tax correctly. + /// + [JsonProperty("requirements")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirements")] +#endif + public TaxCodeRequirements Requirements { get; set; } } } diff --git a/src/Stripe.net/Entities/TaxCodes/TaxCodeRequirements.cs b/src/Stripe.net/Entities/TaxCodes/TaxCodeRequirements.cs new file mode 100644 index 0000000000..aa653150e7 --- /dev/null +++ b/src/Stripe.net/Entities/TaxCodes/TaxCodeRequirements.cs @@ -0,0 +1,22 @@ +// 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 TaxCodeRequirements : StripeEntity + { + /// + /// Describes whether a performance location is required for a successful tax calculation + /// with a tax code. + /// One of: optional, or required. + /// + [JsonProperty("performance_location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("performance_location")] +#endif + public string PerformanceLocation { get; set; } + } +} diff --git a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs index 442f1a60b7..769d4e3f31 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs @@ -192,6 +192,7 @@ public static class StripeTypeRegistry { "tax.calculation", typeof(Tax.Calculation) }, { "tax.calculation_line_item", typeof(Tax.CalculationLineItem) }, { "tax.form", typeof(Tax.Form) }, + { "tax.location", typeof(Tax.Location) }, { "tax.registration", typeof(Tax.Registration) }, { "tax.settings", typeof(Tax.Settings) }, { "tax.transaction", typeof(Tax.Transaction) }, diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataProductDataTaxDetailsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataProductDataTaxDetailsOptions.cs index faf33a216c..d20c1aec39 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataProductDataTaxDetailsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataProductDataTaxDetailsOptions.cs @@ -8,6 +8,17 @@ namespace Stripe.Checkout public class SessionLineItemPriceDataProductDataTaxDetailsOptions : INestedOptions { + /// + /// A tax location ID. Depending on the tax + /// code, this is required, optional, or not supported. + /// + [JsonProperty("performance_location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("performance_location")] +#endif + public string PerformanceLocation { get; set; } + /// /// A tax code ID. /// diff --git a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataProductDataTaxDetailsOptions.cs b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataProductDataTaxDetailsOptions.cs index 1f941bab4e..bff980ca4e 100644 --- a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataProductDataTaxDetailsOptions.cs +++ b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataProductDataTaxDetailsOptions.cs @@ -8,6 +8,17 @@ namespace Stripe public class InvoiceLineItemPriceDataProductDataTaxDetailsOptions : INestedOptions { + /// + /// A tax location ID. Depending on the tax + /// code, this is required, optional, or not supported. + /// + [JsonProperty("performance_location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("performance_location")] +#endif + public string PerformanceLocation { get; set; } + /// /// A tax code ID. /// diff --git a/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataProductDataTaxDetailsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataProductDataTaxDetailsOptions.cs index 76b93a7101..8f53f106b5 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataProductDataTaxDetailsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataProductDataTaxDetailsOptions.cs @@ -8,6 +8,17 @@ namespace Stripe public class InvoiceLinePriceDataProductDataTaxDetailsOptions : INestedOptions { + /// + /// A tax location ID. Depending on the tax + /// code, this is required, optional, or not supported. + /// + [JsonProperty("performance_location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("performance_location")] +#endif + public string PerformanceLocation { get; set; } + /// /// A tax code ID. /// diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsAmendmentOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsAmendmentOptions.cs index ad4b99144e..c5e248125a 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsAmendmentOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsAmendmentOptions.cs @@ -65,12 +65,7 @@ public class InvoiceScheduleDetailsAmendmentOptions : INestedOptions public List DiscountActions { get; set; } /// - /// Configures how the subscription schedule handles billing for phase transitions. Possible - /// values are phase_start (default) or billing_period_start. - /// phase_start bills based on the current state of the subscription, ignoring - /// changes scheduled in future phases. billing_period_start bills predictively for - /// upcoming phase transitions within the current billing cycle, including pricing changes - /// and service period adjustments that will occur before the next invoice. + /// Configures how the subscription schedule handles billing for phase transitions. /// One of: amendment_start, or billing_period_start. /// [JsonProperty("effective_at")] diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs index 26bfa0df8c..49e8317d00 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs @@ -150,12 +150,7 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata public InvoiceScheduleDetailsPhaseDurationOptions Duration { get; set; } /// - /// Configures how the subscription schedule handles billing for phase transitions. Possible - /// values are phase_start (default) or billing_period_start. - /// phase_start bills based on the current state of the subscription, ignoring - /// changes scheduled in future phases. billing_period_start bills predictively for - /// upcoming phase transitions within the current billing cycle, including pricing changes - /// and service period adjustments that will occur before the next invoice. + /// Configures how the subscription schedule handles billing for phase transitions. /// One of: billing_period_start, or phase_start. /// [JsonProperty("effective_at")] diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkLineItemPriceDataProductDataTaxDetailsOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkLineItemPriceDataProductDataTaxDetailsOptions.cs index 2e9c56cda5..431752ca8a 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkLineItemPriceDataProductDataTaxDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkLineItemPriceDataProductDataTaxDetailsOptions.cs @@ -8,6 +8,17 @@ namespace Stripe public class PaymentLinkLineItemPriceDataProductDataTaxDetailsOptions : INestedOptions { + /// + /// A tax location ID. Depending on the tax + /// code, this is required, optional, or not supported. + /// + [JsonProperty("performance_location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("performance_location")] +#endif + public string PerformanceLocation { get; set; } + /// /// A tax code ID. /// diff --git a/src/Stripe.net/Services/Plans/PlanProductOptions.cs b/src/Stripe.net/Services/Plans/PlanProductOptions.cs index 61034129d2..3a2529150f 100644 --- a/src/Stripe.net/Services/Plans/PlanProductOptions.cs +++ b/src/Stripe.net/Services/Plans/PlanProductOptions.cs @@ -82,5 +82,16 @@ public class PlanProductOptions : INestedOptions, IHasId, IHasMetadata [STJS.JsonPropertyName("unit_label")] #endif public string UnitLabel { get; set; } + + /// + /// Tax details for this product, including the tax code and an optional performance + /// location. + /// + [JsonProperty("tax_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_details")] +#endif + public PlanProductTaxDetailsOptions TaxDetails { get; set; } } } diff --git a/src/Stripe.net/Services/Plans/PlanProductTaxDetailsOptions.cs b/src/Stripe.net/Services/Plans/PlanProductTaxDetailsOptions.cs new file mode 100644 index 0000000000..1fa2156a0a --- /dev/null +++ b/src/Stripe.net/Services/Plans/PlanProductTaxDetailsOptions.cs @@ -0,0 +1,31 @@ +// 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 PlanProductTaxDetailsOptions : INestedOptions + { + /// + /// A tax location ID. Depending on the tax + /// code, this is required, optional, or not supported. + /// + [JsonProperty("performance_location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("performance_location")] +#endif + public string PerformanceLocation { get; set; } + + /// + /// A tax code ID. + /// + [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif + public string TaxCode { get; set; } + } +} diff --git a/src/Stripe.net/Services/Prices/PriceProductDataOptions.cs b/src/Stripe.net/Services/Prices/PriceProductDataOptions.cs index 67b32b15a7..a1875ce08e 100644 --- a/src/Stripe.net/Services/Prices/PriceProductDataOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceProductDataOptions.cs @@ -82,5 +82,16 @@ public class PriceProductDataOptions : INestedOptions, IHasId, IHasMetadata [STJS.JsonPropertyName("unit_label")] #endif public string UnitLabel { get; set; } + + /// + /// Tax details for this product, including the tax code and an optional performance + /// location. + /// + [JsonProperty("tax_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_details")] +#endif + public PriceProductDataTaxDetailsOptions TaxDetails { get; set; } } } diff --git a/src/Stripe.net/Services/Prices/PriceProductDataTaxDetailsOptions.cs b/src/Stripe.net/Services/Prices/PriceProductDataTaxDetailsOptions.cs new file mode 100644 index 0000000000..65bf359470 --- /dev/null +++ b/src/Stripe.net/Services/Prices/PriceProductDataTaxDetailsOptions.cs @@ -0,0 +1,31 @@ +// 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 PriceProductDataTaxDetailsOptions : INestedOptions + { + /// + /// A tax location ID. Depending on the tax + /// code, this is required, optional, or not supported. + /// + [JsonProperty("performance_location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("performance_location")] +#endif + public string PerformanceLocation { get; set; } + + /// + /// A tax code ID. + /// + [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif + public string TaxCode { get; set; } + } +} diff --git a/src/Stripe.net/Services/Products/ProductTaxDetailsOptions.cs b/src/Stripe.net/Services/Products/ProductTaxDetailsOptions.cs index 2ff7c79093..3f98f85264 100644 --- a/src/Stripe.net/Services/Products/ProductTaxDetailsOptions.cs +++ b/src/Stripe.net/Services/Products/ProductTaxDetailsOptions.cs @@ -8,6 +8,17 @@ namespace Stripe public class ProductTaxDetailsOptions : INestedOptions { + /// + /// A tax location ID. Depending on the tax + /// code, this is required, optional, or not supported. + /// + [JsonProperty("performance_location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("performance_location")] +#endif + public string PerformanceLocation { get; set; } + /// /// A tax code ID. /// diff --git a/src/Stripe.net/Services/Quotes/QuoteLineOptions.cs b/src/Stripe.net/Services/Quotes/QuoteLineOptions.cs index 977d11400d..218796c2e4 100644 --- a/src/Stripe.net/Services/Quotes/QuoteLineOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteLineOptions.cs @@ -56,12 +56,7 @@ public class QuoteLineOptions : INestedOptions, IHasId public QuoteLineCancelSubscriptionScheduleOptions CancelSubscriptionSchedule { get; set; } /// - /// Configures how the subscription schedule handles billing for phase transitions. Possible - /// values are phase_start (default) or billing_period_start. - /// phase_start bills based on the current state of the subscription, ignoring - /// changes scheduled in future phases. billing_period_start bills predictively for - /// upcoming phase transitions within the current billing cycle, including pricing changes - /// and service period adjustments that will occur before the next invoice. + /// Configures how the quote handles billing for line transitions. /// One of: billing_period_start, or line_start. /// [JsonProperty("effective_at")] diff --git a/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs b/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs index 24c4b98f2c..e083987fac 100644 --- a/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs @@ -128,13 +128,8 @@ public class QuoteSubscriptionDataOptions : INestedOptions, IHasMetadata /// /// Configures how the subscription schedule handles billing for phase transitions when the - /// quote is accepted. Possible values are phase_start (default) or - /// billing_period_start. phase_start bills based on the current state of the - /// subscription, ignoring changes scheduled in future phases. billing_period_start - /// bills predictively for upcoming phase transitions within the current billing cycle, - /// including pricing changes and service period adjustments that will occur before the next - /// invoice. - /// One of: billing_period_start, or line_start. + /// quote is accepted. + /// One of: billing_period_start, or phase_start. /// [JsonProperty("phase_effective_at")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOverrideOptions.cs b/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOverrideOptions.cs index 65a0fc01bd..61f0fa042f 100644 --- a/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOverrideOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOverrideOptions.cs @@ -85,13 +85,8 @@ public class QuoteSubscriptionDataOverrideOptions : INestedOptions /// /// Configures how the subscription schedule handles billing for phase transitions when the - /// quote is accepted. Possible values are phase_start (default) or - /// billing_period_start. phase_start bills based on the current state of the - /// subscription, ignoring changes scheduled in future phases. billing_period_start - /// bills predictively for upcoming phase transitions within the current billing cycle, - /// including pricing changes and service period adjustments that will occur before the next - /// invoice. - /// One of: billing_period_start, or line_start. + /// quote is accepted. + /// One of: billing_period_start, or phase_start. /// [JsonProperty("phase_effective_at")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleAmendmentOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleAmendmentOptions.cs index 0d38741d0e..d1d40ff173 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleAmendmentOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleAmendmentOptions.cs @@ -65,12 +65,7 @@ public class SubscriptionScheduleAmendmentOptions : INestedOptions public List DiscountActions { get; set; } /// - /// Configures how the subscription schedule handles billing for phase transitions. Possible - /// values are phase_start (default) or billing_period_start. - /// phase_start bills based on the current state of the subscription, ignoring - /// changes scheduled in future phases. billing_period_start bills predictively for - /// upcoming phase transitions within the current billing cycle, including pricing changes - /// and service period adjustments that will occur before the next invoice. + /// Configures how the subscription schedule handles billing for phase transitions. /// One of: amendment_start, or billing_period_start. /// [JsonProperty("effective_at")] diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs index ca95cfa00d..e5dfcfbca9 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs @@ -111,12 +111,7 @@ public class SubscriptionScheduleDefaultSettingsOptions : INestedOptions public string OnBehalfOf { get; set; } /// - /// Configures how the subscription schedule handles billing for phase transitions. Possible - /// values are phase_start (default) or billing_period_start. - /// phase_start bills based on the current state of the subscription, ignoring - /// changes scheduled in future phases. billing_period_start bills predictively for - /// upcoming phase transitions within the current billing cycle, including pricing changes - /// and service period adjustments that will occur before the next invoice. + /// Configures how the subscription schedule handles billing for phase transitions. /// One of: billing_period_start, or phase_start. /// [JsonProperty("phase_effective_at")] diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs index 3a14c62ca7..eb64d3452b 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs @@ -150,12 +150,7 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata public SubscriptionSchedulePhaseDurationOptions Duration { get; set; } /// - /// Configures how the subscription schedule handles billing for phase transitions. Possible - /// values are phase_start (default) or billing_period_start. - /// phase_start bills based on the current state of the subscription, ignoring - /// changes scheduled in future phases. billing_period_start bills predictively for - /// upcoming phase transitions within the current billing cycle, including pricing changes - /// and service period adjustments that will occur before the next invoice. + /// Configures how the subscription schedule handles billing for phase transitions. /// One of: billing_period_start, or phase_start. /// [JsonProperty("effective_at")] diff --git a/src/Stripe.net/Services/Tax/Calculations/CalculationLineItemOptions.cs b/src/Stripe.net/Services/Tax/Calculations/CalculationLineItemOptions.cs index be647f65ac..dd4be9eaf3 100644 --- a/src/Stripe.net/Services/Tax/Calculations/CalculationLineItemOptions.cs +++ b/src/Stripe.net/Services/Tax/Calculations/CalculationLineItemOptions.cs @@ -85,5 +85,16 @@ public class CalculationLineItemOptions : INestedOptions, IHasMetadata [STJS.JsonPropertyName("tax_code")] #endif public string TaxCode { get; set; } + + /// + /// A tax location ID. Depending on the tax + /// code, this is required, optional, or not supported. + /// + [JsonProperty("performance_location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("performance_location")] +#endif + public string PerformanceLocation { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Locations/LocationCreateOptions.cs b/src/Stripe.net/Services/Tax/Locations/LocationCreateOptions.cs new file mode 100644 index 0000000000..90fc7f06d9 --- /dev/null +++ b/src/Stripe.net/Services/Tax/Locations/LocationCreateOptions.cs @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class LocationCreateOptions : BaseOptions + { + /// + /// The physical address of the tax location. + /// + [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif + public AddressOptions Address { get; set; } + + /// + /// Details to identify the tax location by its venue, types of events held, or available + /// services, such as "A spacious auditorium suitable for large concerts and events.". + /// + [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif + public string Description { get; set; } + + /// + /// The type of tax location. The only supported value is "performance". + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tax/Locations/LocationGetOptions.cs b/src/Stripe.net/Services/Tax/Locations/LocationGetOptions.cs new file mode 100644 index 0000000000..5870caf19e --- /dev/null +++ b/src/Stripe.net/Services/Tax/Locations/LocationGetOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + public class LocationGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Tax/Locations/LocationListOptions.cs b/src/Stripe.net/Services/Tax/Locations/LocationListOptions.cs new file mode 100644 index 0000000000..b0e64f48ae --- /dev/null +++ b/src/Stripe.net/Services/Tax/Locations/LocationListOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class LocationListOptions : ListOptions + { + /// + /// Type of the tax location. Currently the only option is performance. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tax/Locations/LocationService.cs b/src/Stripe.net/Services/Tax/Locations/LocationService.cs new file mode 100644 index 0000000000..63c45e2e59 --- /dev/null +++ b/src/Stripe.net/Services/Tax/Locations/LocationService.cs @@ -0,0 +1,134 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class LocationService : Service, + ICreatable, + IListable, + IRetrievable + { + public LocationService() + { + } + + internal LocationService(ApiRequestor requestor) + : base(requestor) + { + } + + public LocationService(IStripeClient client) + : base(client) + { + } + + /// + ///

Create a tax location to use in calculating taxes for a service, ticket, or other + /// type of product. The resulting object contains the id, address, name, description, and + /// current operational status of the tax location.

. + ///
+ public virtual Location Create(LocationCreateOptions options, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/tax/locations", options, requestOptions); + } + + /// + ///

Create a tax location to use in calculating taxes for a service, ticket, or other + /// type of product. The resulting object contains the id, address, name, description, and + /// current operational status of the tax location.

. + ///
+ public virtual Task CreateAsync(LocationCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/tax/locations", options, requestOptions, cancellationToken); + } + + /// + ///

Fetch the details of a specific tax location using its unique identifier. Use a tax + /// location to calculate taxes based on the location of the end product, such as a + /// performance, instead of the customer address. For more details, check the integration + /// guide.

. + ///
+ public virtual Location Get(string id, LocationGetOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v1/tax/locations/{WebUtility.UrlEncode(id)}", options, requestOptions); + } + + /// + ///

Fetch the details of a specific tax location using its unique identifier. Use a tax + /// location to calculate taxes based on the location of the end product, such as a + /// performance, instead of the customer address. For more details, check the integration + /// guide.

. + ///
+ public virtual Task GetAsync(string id, LocationGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v1/tax/locations/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + } + + /// + ///

Retrieve a list of all tax locations. Tax locations can represent the venues for + /// services, tickets, or other product types.

. + /// + ///

The response includes detailed information for each tax location, such as its + /// address, name, description, and current operational status.

. + /// + ///

You can paginate through the list by using the limit parameter to control the + /// number of results returned in each request.

. + ///
+ public virtual StripeList List(LocationListOptions options = null, RequestOptions requestOptions = null) + { + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v1/tax/locations", options, requestOptions); + } + + /// + ///

Retrieve a list of all tax locations. Tax locations can represent the venues for + /// services, tickets, or other product types.

. + /// + ///

The response includes detailed information for each tax location, such as its + /// address, name, description, and current operational status.

. + /// + ///

You can paginate through the list by using the limit parameter to control the + /// number of results returned in each request.

. + ///
+ public virtual Task> ListAsync(LocationListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v1/tax/locations", options, requestOptions, cancellationToken); + } + + /// + ///

Retrieve a list of all tax locations. Tax locations can represent the venues for + /// services, tickets, or other product types.

. + /// + ///

The response includes detailed information for each tax location, such as its + /// address, name, description, and current operational status.

. + /// + ///

You can paginate through the list by using the limit parameter to control the + /// number of results returned in each request.

. + ///
+ public virtual IEnumerable ListAutoPaging(LocationListOptions options = null, RequestOptions requestOptions = null) + { + return this.ListRequestAutoPaging($"/v1/tax/locations", options, requestOptions); + } + + /// + ///

Retrieve a list of all tax locations. Tax locations can represent the venues for + /// services, tickets, or other product types.

. + /// + ///

The response includes detailed information for each tax location, such as its + /// address, name, description, and current operational status.

. + /// + ///

You can paginate through the list by using the limit parameter to control the + /// number of results returned in each request.

. + ///
+ public virtual IAsyncEnumerable ListAutoPagingAsync(LocationListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.ListRequestAutoPagingAsync($"/v1/tax/locations", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsOptions.cs index 517b961123..755a6543db 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsOptions.cs @@ -47,9 +47,11 @@ public class RegistrationCountryOptionsUsOptions : INestedOptions /// /// Type of registration to be created in the US. - /// One of: local_amusement_tax, local_lease_tax, - /// state_communications_tax, state_retail_delivery_fee, or - /// state_sales_tax. + /// One of: admissions_tax, attendance_tax, entertainment_tax, + /// gross_receipts_tax, hospitality_tax, local_amusement_tax, + /// local_lease_tax, luxury_tax, resort_tax, + /// state_communications_tax, state_retail_delivery_fee, + /// state_sales_tax, or tourism_tax. /// [JsonProperty("type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/TaxService.cs b/src/Stripe.net/Services/TaxService.cs index 7bf81a8ae2..e086ea5a03 100644 --- a/src/Stripe.net/Services/TaxService.cs +++ b/src/Stripe.net/Services/TaxService.cs @@ -10,6 +10,7 @@ public class TaxService : Service private Tax.AssociationService associations; private Tax.CalculationService calculations; private Tax.FormService forms; + private Tax.LocationService locations; private Tax.RegistrationService registrations; private Tax.SettingsService settings; private Tax.TransactionService transactions; @@ -33,6 +34,9 @@ internal TaxService(IStripeClient client) public virtual Tax.FormService Forms => this.forms ??= new Tax.FormService( this.Requestor); + public virtual Tax.LocationService Locations => this.locations ??= new Tax.LocationService( + this.Requestor); + public virtual Tax.RegistrationService Registrations => this.registrations ??= new Tax.RegistrationService( this.Requestor); diff --git a/src/Stripe.net/Services/TestHelpers/SharedPayment/GrantedTokens/GrantedTokenUpdateOptions.cs b/src/Stripe.net/Services/TestHelpers/SharedPayment/GrantedTokens/GrantedTokenRevokeOptions.cs similarity index 63% rename from src/Stripe.net/Services/TestHelpers/SharedPayment/GrantedTokens/GrantedTokenUpdateOptions.cs rename to src/Stripe.net/Services/TestHelpers/SharedPayment/GrantedTokens/GrantedTokenRevokeOptions.cs index ba14fd600e..d98121d82b 100644 --- a/src/Stripe.net/Services/TestHelpers/SharedPayment/GrantedTokens/GrantedTokenUpdateOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/SharedPayment/GrantedTokens/GrantedTokenRevokeOptions.cs @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec namespace Stripe.TestHelpers.SharedPayment { - public class GrantedTokenUpdateOptions : BaseOptions + public class GrantedTokenRevokeOptions : BaseOptions { } } diff --git a/src/Stripe.net/Services/TestHelpers/SharedPayment/GrantedTokens/GrantedTokenService.cs b/src/Stripe.net/Services/TestHelpers/SharedPayment/GrantedTokens/GrantedTokenService.cs index 8b59f56ede..b3dc889ccb 100644 --- a/src/Stripe.net/Services/TestHelpers/SharedPayment/GrantedTokens/GrantedTokenService.cs +++ b/src/Stripe.net/Services/TestHelpers/SharedPayment/GrantedTokens/GrantedTokenService.cs @@ -49,7 +49,7 @@ public virtual Stripe.SharedPayment.GrantedToken Create(GrantedTokenCreateOption /// test mode and allows sellers to revoke SharedPaymentGrantedTokens for testing their /// integration

. /// - public virtual Stripe.SharedPayment.GrantedToken Update(string id, GrantedTokenUpdateOptions options, RequestOptions requestOptions = null) + public virtual Stripe.SharedPayment.GrantedToken Revoke(string id, GrantedTokenRevokeOptions options = null, RequestOptions requestOptions = null) { return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/test_helpers/shared_payment/granted_tokens/{WebUtility.UrlEncode(id)}/revoke", options, requestOptions); } @@ -59,7 +59,7 @@ public virtual Stripe.SharedPayment.GrantedToken Update(string id, GrantedTokenU /// test mode and allows sellers to revoke SharedPaymentGrantedTokens for testing their /// integration

. /// - public virtual Task UpdateAsync(string id, GrantedTokenUpdateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + public virtual Task RevokeAsync(string id, GrantedTokenRevokeOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/test_helpers/shared_payment/granted_tokens/{WebUtility.UrlEncode(id)}/revoke", options, requestOptions, cancellationToken); }