diff --git a/CHANGELOG.md b/CHANGELOG.md index 28d3f990aa..7e52641a18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## 47.1.0 - 2024-11-20 +* [#3025](https://github.com/stripe/stripe-dotnet/pull/3025) This release changes the pinned API version to `2024-11-20.acacia`. + * Add support for `Respond` test helper method on resource `Issuing.Authorization` + * Add support for `Authorizer` on `AccountRelationshipOptions` and `TokenPersonRelationshipOptions` + * Add support for `AdaptivePricing` on `Checkout.SessionCreateOptions` and `CheckoutSession` + * Add support for `MandateOptions` on `CheckoutSessionPaymentMethodOptionsBacsDebitOptions`, `CheckoutSessionPaymentMethodOptionsBacsDebit`, `CheckoutSessionPaymentMethodOptionsSepaDebitOptions`, and `CheckoutSessionPaymentMethodOptionsSepaDebit` + * Add support for `RequestExtendedAuthorization`, `RequestIncrementalAuthorization`, `RequestMulticapture`, and `RequestOvercapture` on `CheckoutSessionPaymentMethodOptionsCardOptions` and `CheckoutSessionPaymentMethodOptionsCard` + * Add support for `CaptureMethod` on `CheckoutSessionPaymentMethodOptionsKakaoPayOptions`, `CheckoutSessionPaymentMethodOptionsKrCardOptions`, `CheckoutSessionPaymentMethodOptionsNaverPayOptions`, `CheckoutSessionPaymentMethodOptionsPaycoOptions`, and `CheckoutSessionPaymentMethodOptionsSamsungPayOptions` + * Add support for `AccountHolderAddress`, `AccountHolderName`, `AccountType`, and `BankAddress` on `FundingInstructionsBankTransferFinancialAddressesAba`, `FundingInstructionsBankTransferFinancialAddressesSwift`, `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesAba`, and `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesSwift` + * Add support for `MerchantAmount` and `MerchantCurrency` on `Issuing.TestHelpersAuthorizationCreateOptions` + * Add support for `FraudChallenges` and `VerifiedByFraudChallenge` on `IssuingAuthorization` + * Add support for `SubmitType` on `PaymentLinkUpdateOptions` + * Add support for `TraceId` on `Payout` + * Add support for `NetworkDeclineCode` on `RefundDestinationDetailsBlik` and `RefundDestinationDetailsSwish` +* [#3021](https://github.com/stripe/stripe-dotnet/pull/3021) Fix URL encoding of id strings passed to service methods +* [#3026](https://github.com/stripe/stripe-dotnet/pull/3026) Fix V2 list options base class + * Remove `StartingAfter` and `EndingBefore` properties from `Stripe.V2.EventListOptions` and `Stripe.V2.EventDestinationListOptions`. These properties are not supported on V2 List APIs and would result in a HTTP 400 error if provided. + ## 47.1.0-beta.3 - 2024-11-14 * [#3027](https://github.com/stripe/stripe-dotnet/pull/3027) Update generated code for beta * Add support for `AccountHolderAddress` and `BankAddress` on `FundingInstructionsBankTransferFinancialAddressesIban`, `FundingInstructionsBankTransferFinancialAddressesSortCode`, `FundingInstructionsBankTransferFinancialAddressesSpei`, `FundingInstructionsBankTransferFinancialAddressesZengin`, `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesIban`, `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesSortCode`, `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesSpei`, and `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesZengin` @@ -34,7 +52,6 @@ * Add support for `Gopay`, `Qris`, and `Shopeepay` on `PaymentMethodConfigurationCreateOptions`, `PaymentMethodConfigurationUpdateOptions`, and `PaymentMethodConfiguration` * [#3011](https://github.com/stripe/stripe-dotnet/pull/3011) Do not allow setting API Version directly on StripeConfiguration * `StripeConfiguration.ApiVersion` is no longer settable. If you were using this to set the beta headers, use the helper method `StripeConfiguration.AddBetaVersion()` instead. - ## 47.0.0 - 2024-10-29 diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 20cbdd3048..0380667751 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1356 \ No newline at end of file +v1370 \ No newline at end of file diff --git a/src/Stripe.net/Constants/EventTypes.cs b/src/Stripe.net/Constants/EventTypes.cs index e9652b9954..8303a93ce6 100644 --- a/src/Stripe.net/Constants/EventTypes.cs +++ b/src/Stripe.net/Constants/EventTypes.cs @@ -586,6 +586,11 @@ public static class EventTypes /// public const string InvoiceOverdue = "invoice.overdue"; + /// + /// Occurs when an invoice transitions to paid with a non-zero amount_overpaid. + /// + public const string InvoiceOverpaid = "invoice.overpaid"; + /// /// Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid /// out-of-band. diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagementFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagementFeatures.cs index 5d1a954b53..c6038a5cde 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagementFeatures.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagementFeatures.cs @@ -7,10 +7,10 @@ public class AccountSessionComponentsAccountManagementFeatures : StripeEntity /// Disables Stripe user authentication for this embedded component. This feature can only - /// be false for accounts where you’re responsible for collecting updated information when - /// requirements are due or change, like custom accounts. The default value for this feature - /// is false when external_account_collection is enabled and true - /// otherwise. + /// be true for accounts where you’re responsible for collecting updated information + /// when requirements are due or change, like Custom accounts. The default value for this + /// feature is false when external_account_collection is enabled and + /// true otherwise. /// [JsonProperty("disable_stripe_user_authentication")] public bool DisableStripeUserAuthentication { get; set; } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboardingFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboardingFeatures.cs index c937b7d582..d0e23e34a0 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboardingFeatures.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboardingFeatures.cs @@ -7,10 +7,10 @@ public class AccountSessionComponentsAccountOnboardingFeatures : StripeEntity /// Disables Stripe user authentication for this embedded component. This feature can only - /// be false for accounts where you’re responsible for collecting updated information when - /// requirements are due or change, like custom accounts. The default value for this feature - /// is false when external_account_collection is enabled and true - /// otherwise. + /// be true for accounts where you’re responsible for collecting updated information + /// when requirements are due or change, like Custom accounts. The default value for this + /// feature is false when external_account_collection is enabled and + /// true otherwise. /// [JsonProperty("disable_stripe_user_authentication")] public bool DisableStripeUserAuthentication { get; set; } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalancesFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalancesFeatures.cs index cc0aab2487..7e06736219 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalancesFeatures.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalancesFeatures.cs @@ -7,10 +7,10 @@ public class AccountSessionComponentsBalancesFeatures : StripeEntity /// Disables Stripe user authentication for this embedded component. This feature can only - /// be false for accounts where you’re responsible for collecting updated information when - /// requirements are due or change, like custom accounts. The default value for this feature - /// is false when external_account_collection is enabled and true - /// otherwise. + /// be true for accounts where you’re responsible for collecting updated information + /// when requirements are due or change, like Custom accounts. The default value for this + /// feature is false when external_account_collection is enabled and + /// true otherwise. /// [JsonProperty("disable_stripe_user_authentication")] public bool DisableStripeUserAuthentication { get; set; } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBannerFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBannerFeatures.cs index 655f784ba8..0c9e469d20 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBannerFeatures.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBannerFeatures.cs @@ -7,10 +7,10 @@ public class AccountSessionComponentsNotificationBannerFeatures : StripeEntity /// Disables Stripe user authentication for this embedded component. This feature can only - /// be false for accounts where you’re responsible for collecting updated information when - /// requirements are due or change, like custom accounts. The default value for this feature - /// is false when external_account_collection is enabled and true - /// otherwise. + /// be true for accounts where you’re responsible for collecting updated information + /// when requirements are due or change, like Custom accounts. The default value for this + /// feature is false when external_account_collection is enabled and + /// true otherwise. /// [JsonProperty("disable_stripe_user_authentication")] public bool DisableStripeUserAuthentication { get; set; } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsFeatures.cs index 0285e8cd5a..b473297301 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsFeatures.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsFeatures.cs @@ -7,10 +7,10 @@ public class AccountSessionComponentsPayoutsFeatures : StripeEntity /// Disables Stripe user authentication for this embedded component. This feature can only - /// be false for accounts where you’re responsible for collecting updated information when - /// requirements are due or change, like custom accounts. The default value for this feature - /// is false when external_account_collection is enabled and true - /// otherwise. + /// be true for accounts where you’re responsible for collecting updated information + /// when requirements are due or change, like Custom accounts. The default value for this + /// feature is false when external_account_collection is enabled and + /// true otherwise. /// [JsonProperty("disable_stripe_user_authentication")] public bool DisableStripeUserAuthentication { get; set; } diff --git a/src/Stripe.net/Entities/Charges/ChargeOutcome.cs b/src/Stripe.net/Entities/Charges/ChargeOutcome.cs index 727bdfccd9..80b5b5cbaa 100644 --- a/src/Stripe.net/Entities/Charges/ChargeOutcome.cs +++ b/src/Stripe.net/Entities/Charges/ChargeOutcome.cs @@ -6,6 +6,20 @@ namespace Stripe public class ChargeOutcome : StripeEntity { + /// + /// For charges declined by the network, a 2 digit code which indicates the advice returned + /// by the network on how to proceed with an error. + /// + [JsonProperty("network_advice_code")] + public string NetworkAdviceCode { get; set; } + + /// + /// For charges declined by the network, a brand specific 2, 3, or 4 digit code which + /// indicates the reason the authorization failed. + /// + [JsonProperty("network_decline_code")] + public string NetworkDeclineCode { get; set; } + /// /// Possible values are approved_by_network, declined_by_network, /// not_sent_to_network, and reversed_after_approval. The value diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAmazonPay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAmazonPay.cs index 2d16f581bd..41cd52feb8 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAmazonPay.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAmazonPay.cs @@ -1,7 +1,11 @@ // File generated from our OpenAPI spec namespace Stripe { + using Newtonsoft.Json; + public class ChargePaymentMethodDetailsAmazonPay : StripeEntity { + [JsonProperty("funding")] + public ChargePaymentMethodDetailsAmazonPayFunding Funding { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAmazonPayFunding.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAmazonPayFunding.cs new file mode 100644 index 0000000000..2b54c00964 --- /dev/null +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAmazonPayFunding.cs @@ -0,0 +1,17 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + + public class ChargePaymentMethodDetailsAmazonPayFunding : StripeEntity + { + [JsonProperty("card")] + public ChargePaymentMethodDetailsAmazonPayFundingCard Card { get; set; } + + /// + /// funding type of the underlying payment method. + /// + [JsonProperty("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAmazonPayFundingCard.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAmazonPayFundingCard.cs new file mode 100644 index 0000000000..c5b6a9ca17 --- /dev/null +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAmazonPayFundingCard.cs @@ -0,0 +1,48 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + + public class ChargePaymentMethodDetailsAmazonPayFundingCard : StripeEntity + { + /// + /// Card brand. Can be amex, diners, discover, eftpos_au, + /// jcb, link, mastercard, unionpay, visa, or + /// unknown. + /// + [JsonProperty("brand")] + public string Brand { get; set; } + + /// + /// Two-letter ISO code representing the country of the card. You could use this attribute + /// to get a sense of the international breakdown of cards you've collected. + /// + [JsonProperty("country")] + public string Country { get; set; } + + /// + /// Two-digit number representing the card's expiration month. + /// + [JsonProperty("exp_month")] + public long? ExpMonth { get; set; } + + /// + /// Four-digit number representing the card's expiration year. + /// + [JsonProperty("exp_year")] + public long? ExpYear { get; set; } + + /// + /// Card funding type. Can be credit, debit, prepaid, or + /// unknown. + /// + [JsonProperty("funding")] + public string Funding { get; set; } + + /// + /// The last four digits of the card. + /// + [JsonProperty("last4")] + public string Last4 { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCard.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCard.cs index 96c572fd54..e28efdcff3 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCard.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCard.cs @@ -13,6 +13,12 @@ public class ChargePaymentMethodDetailsCard : StripeEntity + /// The latest amount intended to be authorized by this charge. + /// + [JsonProperty("amount_requested")] + public long? AmountRequested { get; set; } + /// /// Authorization code on the charge. /// @@ -158,6 +164,9 @@ public class ChargePaymentMethodDetailsCard : StripeEntity /// Populated if this transaction used 3D Secure authentication. /// diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPartialAuthorization.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPartialAuthorization.cs new file mode 100644 index 0000000000..ecc5dd80b2 --- /dev/null +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPartialAuthorization.cs @@ -0,0 +1,17 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + + public class ChargePaymentMethodDetailsCardPartialAuthorization : StripeEntity + { + /// + /// Indicates whether the transaction requested for partial authorization feature and the + /// authorization outcome. + /// One of: declined, fully_authorized, not_requested, or + /// partially_authorized. + /// + [JsonProperty("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsRevolutPay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsRevolutPay.cs index 037dd94070..8e705a5aec 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsRevolutPay.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsRevolutPay.cs @@ -1,7 +1,11 @@ // File generated from our OpenAPI spec namespace Stripe { + using Newtonsoft.Json; + public class ChargePaymentMethodDetailsRevolutPay : StripeEntity { + [JsonProperty("funding")] + public ChargePaymentMethodDetailsRevolutPayFunding Funding { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsRevolutPayFunding.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsRevolutPayFunding.cs new file mode 100644 index 0000000000..0b797ad880 --- /dev/null +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsRevolutPayFunding.cs @@ -0,0 +1,17 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + + public class ChargePaymentMethodDetailsRevolutPayFunding : StripeEntity + { + [JsonProperty("card")] + public ChargePaymentMethodDetailsRevolutPayFundingCard Card { get; set; } + + /// + /// funding type of the underlying payment method. + /// + [JsonProperty("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsRevolutPayFundingCard.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsRevolutPayFundingCard.cs new file mode 100644 index 0000000000..501482796d --- /dev/null +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsRevolutPayFundingCard.cs @@ -0,0 +1,48 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + + public class ChargePaymentMethodDetailsRevolutPayFundingCard : StripeEntity + { + /// + /// Card brand. Can be amex, diners, discover, eftpos_au, + /// jcb, link, mastercard, unionpay, visa, or + /// unknown. + /// + [JsonProperty("brand")] + public string Brand { get; set; } + + /// + /// Two-letter ISO code representing the country of the card. You could use this attribute + /// to get a sense of the international breakdown of cards you've collected. + /// + [JsonProperty("country")] + public string Country { get; set; } + + /// + /// Two-digit number representing the card's expiration month. + /// + [JsonProperty("exp_month")] + public long? ExpMonth { get; set; } + + /// + /// Four-digit number representing the card's expiration year. + /// + [JsonProperty("exp_year")] + public long? ExpYear { get; set; } + + /// + /// Card funding type. Can be credit, debit, prepaid, or + /// unknown. + /// + [JsonProperty("funding")] + public string Funding { get; set; } + + /// + /// The last four digits of the card. + /// + [JsonProperty("last4")] + public string Last4 { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPermissionsUpdate.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPermissionsUpdate.cs index 5f91a95912..d190092e1d 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPermissionsUpdate.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPermissionsUpdate.cs @@ -5,6 +5,21 @@ namespace Stripe.Checkout public class SessionPermissionsUpdate : StripeEntity { + /// + /// Determines which entity is allowed to update the line items. + /// + /// Default is client_only. Stripe Checkout client will automatically update the line + /// items. If set to server_only, only your server is allowed to update the line + /// items. + /// + /// When set to server_only, you must add the onLineItemsChange event handler when + /// initializing the Stripe Checkout client and manually update the line items from your + /// server using the Stripe API. + /// One of: client_only, or server_only. + /// + [JsonProperty("line_items")] + public string LineItems { get; set; } + /// /// Determines which entity is allowed to update the shipping details. /// diff --git a/src/Stripe.net/Entities/Events/Event.cs b/src/Stripe.net/Entities/Events/Event.cs index aeeeb60666..6cc08f8a35 100644 --- a/src/Stripe.net/Entities/Events/Event.cs +++ b/src/Stripe.net/Entities/Events/Event.cs @@ -164,12 +164,12 @@ public class Event : StripeEntity, IHasId, IHasObject /// identity.verification_session.requires_input, /// identity.verification_session.verified, invoice.created, /// invoice.deleted, invoice.finalization_failed, invoice.finalized, - /// invoice.marked_uncollectible, invoice.overdue, invoice.paid, - /// invoice.payment.overpaid, invoice.payment_action_required, - /// invoice.payment_attempt_required, invoice.payment_failed, - /// invoice.payment_succeeded, invoice.sent, invoice.upcoming, - /// invoice.updated, invoice.voided, invoice.will_be_due, - /// invoiceitem.created, invoiceitem.deleted, + /// invoice.marked_uncollectible, invoice.overdue, invoice.overpaid, + /// invoice.paid, invoice.payment.overpaid, + /// invoice.payment_action_required, invoice.payment_attempt_required, + /// invoice.payment_failed, invoice.payment_succeeded, invoice.sent, + /// invoice.upcoming, invoice.updated, invoice.voided, + /// invoice.will_be_due, invoiceitem.created, invoiceitem.deleted, /// issuing_authorization.created, issuing_authorization.request, /// issuing_authorization.updated, issuing_card.created, /// issuing_card.updated, issuing_cardholder.created, diff --git a/src/Stripe.net/Entities/LineItems/LineItem.cs b/src/Stripe.net/Entities/LineItems/LineItem.cs index ba33c3dd94..c600321d0d 100644 --- a/src/Stripe.net/Entities/LineItems/LineItem.cs +++ b/src/Stripe.net/Entities/LineItems/LineItem.cs @@ -8,7 +8,7 @@ namespace Stripe /// /// A line item. /// - public class LineItem : StripeEntity, IHasId, IHasObject + public class LineItem : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. @@ -22,6 +22,9 @@ public class LineItem : StripeEntity, IHasId, IHasObject [JsonProperty("object")] public string Object { get; set; } + [JsonProperty("adjustable_quantity")] + public LineItemAdjustableQuantity AdjustableQuantity { get; set; } + /// /// Total discount amount applied. If no discounts were applied, defaults to 0. /// @@ -73,6 +76,17 @@ public class LineItem : StripeEntity, IHasId, IHasObject [JsonProperty("discounts")] public List Discounts { get; set; } + [JsonProperty("display")] + public LineItemDisplay Display { get; set; } + + /// + /// Set of key-value pairs that you can + /// attach to an object. This can be useful for storing additional information about the + /// object in a structured format. + /// + [JsonProperty("metadata")] + public Dictionary Metadata { get; set; } + /// /// The price used to generate the line item. /// diff --git a/src/Stripe.net/Entities/LineItems/LineItemAdjustableQuantity.cs b/src/Stripe.net/Entities/LineItems/LineItemAdjustableQuantity.cs new file mode 100644 index 0000000000..584ab0c92b --- /dev/null +++ b/src/Stripe.net/Entities/LineItems/LineItemAdjustableQuantity.cs @@ -0,0 +1,17 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + + public class LineItemAdjustableQuantity : StripeEntity + { + [JsonProperty("enabled")] + public bool Enabled { get; set; } + + [JsonProperty("maximum")] + public long? Maximum { get; set; } + + [JsonProperty("minimum")] + public long? Minimum { get; set; } + } +} diff --git a/src/Stripe.net/Entities/LineItems/LineItemDisplay.cs b/src/Stripe.net/Entities/LineItems/LineItemDisplay.cs new file mode 100644 index 0000000000..5b6a62856b --- /dev/null +++ b/src/Stripe.net/Entities/LineItems/LineItemDisplay.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; + + public class LineItemDisplay : StripeEntity + { + [JsonProperty("description")] + public string Description { get; set; } + + [JsonProperty("images")] + public List Images { get; set; } + + [JsonProperty("name")] + public string Name { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCard.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCard.cs index 978f3a2f4d..9c255ff1b9 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCard.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCard.cs @@ -80,6 +80,13 @@ public class PaymentIntentPaymentMethodOptionsCard : StripeEntity + /// Request partial authorization on this PaymentIntent. + /// One of: if_available, or never. + /// + [JsonProperty("request_partial_authorization")] + public string RequestPartialAuthorization { get; set; } + /// /// We strongly recommend that you rely on our SCA Engine to automatically prompt your /// customers for authentication based on risk level and /// Disables Stripe user authentication for this embedded component. This feature can only - /// be false for accounts where you’re responsible for collecting updated information when - /// requirements are due or change, like custom accounts. The default value for this feature - /// is false when external_account_collection is enabled and true - /// otherwise. + /// be true for accounts where you’re responsible for collecting updated information + /// when requirements are due or change, like Custom accounts. The default value for this + /// feature is false when external_account_collection is enabled and + /// true otherwise. /// [JsonProperty("disable_stripe_user_authentication")] public bool? DisableStripeUserAuthentication { get; set; } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountOnboardingFeaturesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountOnboardingFeaturesOptions.cs index f0ec01c832..d4366fd088 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountOnboardingFeaturesOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountOnboardingFeaturesOptions.cs @@ -7,10 +7,10 @@ public class AccountSessionComponentsAccountOnboardingFeaturesOptions : INestedO { /// /// Disables Stripe user authentication for this embedded component. This feature can only - /// be false for accounts where you’re responsible for collecting updated information when - /// requirements are due or change, like custom accounts. The default value for this feature - /// is false when external_account_collection is enabled and true - /// otherwise. + /// be true for accounts where you’re responsible for collecting updated information + /// when requirements are due or change, like Custom accounts. The default value for this + /// feature is false when external_account_collection is enabled and + /// true otherwise. /// [JsonProperty("disable_stripe_user_authentication")] public bool? DisableStripeUserAuthentication { get; set; } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsBalancesFeaturesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsBalancesFeaturesOptions.cs index f36d312acd..f8aa614802 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsBalancesFeaturesOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsBalancesFeaturesOptions.cs @@ -7,10 +7,10 @@ public class AccountSessionComponentsBalancesFeaturesOptions : INestedOptions { /// /// Disables Stripe user authentication for this embedded component. This feature can only - /// be false for accounts where you’re responsible for collecting updated information when - /// requirements are due or change, like custom accounts. The default value for this feature - /// is false when external_account_collection is enabled and true - /// otherwise. + /// be true for accounts where you’re responsible for collecting updated information + /// when requirements are due or change, like Custom accounts. The default value for this + /// feature is false when external_account_collection is enabled and + /// true otherwise. /// [JsonProperty("disable_stripe_user_authentication")] public bool? DisableStripeUserAuthentication { get; set; } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsFinancialAccountFeaturesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsFinancialAccountFeaturesOptions.cs index a3d9705c35..fd27c976df 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsFinancialAccountFeaturesOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsFinancialAccountFeaturesOptions.cs @@ -7,10 +7,10 @@ public class AccountSessionComponentsFinancialAccountFeaturesOptions : INestedOp { /// /// Disables Stripe user authentication for this embedded component. This feature can only - /// be false for accounts where you’re responsible for collecting updated information when - /// requirements are due or change, like custom accounts. The default value for this feature - /// is false when external_account_collection is enabled and true - /// otherwise. + /// be true for accounts where you’re responsible for collecting updated information + /// when requirements are due or change, like Custom accounts. The default value for this + /// feature is false when external_account_collection is enabled and + /// true otherwise. /// [JsonProperty("disable_stripe_user_authentication")] public bool? DisableStripeUserAuthentication { get; set; } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsNotificationBannerFeaturesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsNotificationBannerFeaturesOptions.cs index 8c71ecba66..5de881d382 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsNotificationBannerFeaturesOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsNotificationBannerFeaturesOptions.cs @@ -7,10 +7,10 @@ public class AccountSessionComponentsNotificationBannerFeaturesOptions : INested { /// /// Disables Stripe user authentication for this embedded component. This feature can only - /// be false for accounts where you’re responsible for collecting updated information when - /// requirements are due or change, like custom accounts. The default value for this feature - /// is false when external_account_collection is enabled and true - /// otherwise. + /// be true for accounts where you’re responsible for collecting updated information + /// when requirements are due or change, like Custom accounts. The default value for this + /// feature is false when external_account_collection is enabled and + /// true otherwise. /// [JsonProperty("disable_stripe_user_authentication")] public bool? DisableStripeUserAuthentication { get; set; } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsFeaturesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsFeaturesOptions.cs index 93521c2573..ebb666ed9e 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsFeaturesOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsFeaturesOptions.cs @@ -7,10 +7,10 @@ public class AccountSessionComponentsPayoutsFeaturesOptions : INestedOptions { /// /// Disables Stripe user authentication for this embedded component. This feature can only - /// be false for accounts where you’re responsible for collecting updated information when - /// requirements are due or change, like custom accounts. The default value for this feature - /// is false when external_account_collection is enabled and true - /// otherwise. + /// be true for accounts where you’re responsible for collecting updated information + /// when requirements are due or change, like Custom accounts. The default value for this + /// feature is false when external_account_collection is enabled and + /// true otherwise. /// [JsonProperty("disable_stripe_user_authentication")] public bool? DisableStripeUserAuthentication { get; set; } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionAutomaticTaxOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionAutomaticTaxOptions.cs index 5ce3974693..a69fafc391 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionAutomaticTaxOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionAutomaticTaxOptions.cs @@ -6,7 +6,11 @@ namespace Stripe.Checkout public class SessionAutomaticTaxOptions : INestedOptions { /// - /// Set to true to enable automatic taxes. + /// Set to true to calculate tax + /// automatically using the customer's location. + /// + /// Enabling this parameter causes Checkout to collect any billing address information + /// necessary for tax calculation. /// [JsonProperty("enabled")] public bool? Enabled { get; set; } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemAdjustableQuantityOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemAdjustableQuantityOptions.cs index 91ee753b30..a64cff6cf9 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemAdjustableQuantityOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemAdjustableQuantityOptions.cs @@ -6,7 +6,8 @@ namespace Stripe.Checkout public class SessionLineItemAdjustableQuantityOptions : INestedOptions { /// - /// Set to true if the quantity can be adjusted to any non-negative integer. + /// Set to true if the quantity can be adjusted to any positive integer. Setting to false + /// will remove any previously specified constraints on quantity. /// [JsonProperty("enabled")] public bool? Enabled { get; set; } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs index fc14c3f0aa..38119e1add 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs @@ -4,7 +4,7 @@ namespace Stripe.Checkout using System.Collections.Generic; using Newtonsoft.Json; - public class SessionLineItemOptions : INestedOptions + public class SessionLineItemOptions : INestedOptions, IHasMetadata, IHasId { /// /// When set, provides configuration for this item’s quantity to be adjusted by the customer @@ -21,6 +21,21 @@ public class SessionLineItemOptions : INestedOptions [JsonProperty("dynamic_tax_rates")] public List DynamicTaxRates { get; set; } + /// + /// ID of an existing line item. + /// + [JsonProperty("id")] + public string Id { get; set; } + + /// + /// Set of key-value pairs that you can + /// attach to an object. This can be useful for storing additional information about the + /// object in a structured format. Individual keys can be unset by posting an empty value to + /// them. All keys can be unset by posting an empty value to metadata. + /// + [JsonProperty("metadata")] + public Dictionary Metadata { get; set; } + /// /// The ID of the Price or Plan object. One of price or diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPermissionsUpdateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPermissionsUpdateOptions.cs index f9e79469f5..e4aa4c29c7 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPermissionsUpdateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPermissionsUpdateOptions.cs @@ -5,6 +5,21 @@ namespace Stripe.Checkout public class SessionPermissionsUpdateOptions : INestedOptions { + /// + /// Determines which entity is allowed to update the line items. + /// + /// Default is client_only. Stripe Checkout client will automatically update the line + /// items. If set to server_only, only your server is allowed to update the line + /// items. + /// + /// When set to server_only, you must add the onLineItemsChange event handler when + /// initializing the Stripe Checkout client and manually update the line items from your + /// server using the Stripe API. + /// One of: client_only, or server_only. + /// + [JsonProperty("line_items")] + public string LineItems { get; set; } + /// /// Determines which entity is allowed to update the shipping details. /// diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs index fb089fe613..e51302c174 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs @@ -12,6 +12,26 @@ public class SessionUpdateOptions : BaseOptions, IHasMetadata [JsonProperty("collected_information")] public SessionCollectedInformationOptions CollectedInformation { get; set; } + /// + /// A list of items the customer is purchasing. + /// + /// When updating line items, the entire array of line items must be retransmitted. + /// + /// To retain an existing line item, specify its id. + /// + /// To update an existing line item, specify its id along with the new values of the + /// fields to be updated. + /// + /// To add a new line item, specify a price and quantity. Recurring prices are + /// not supported yet. + /// + /// To remove an existing line item, omit the line item's ID from the retransmitted array. + /// + /// To reorder a line item, specify it at the desired position in the retransmitted array. + /// + [JsonProperty("line_items")] + public List LineItems { get; set; } + /// /// Set of key-value pairs that you can /// attach to an object. This can be useful for storing additional information about the diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs index 75242c5c64..5efb90ad46 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs @@ -26,7 +26,7 @@ public class InvoicePaymentSettingsOptions : INestedOptions /// the invoice’s default payment method, the subscription’s default payment method, the /// customer’s default payment method, and your invoice template - /// settings. + /// settings. Should not be specified with payment_method_configuration. /// One of: ach_credit_transfer, ach_debit, acss_debit, /// amazon_pay, au_becs_debit, bacs_debit, bancontact, /// boleto, card, cashapp, custom, customer_balance, diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs index c77b972f32..c920fd03fb 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs @@ -45,6 +45,12 @@ public class PaymentIntentIncrementAuthorizationOptions : BaseOptions, IHasMetad [JsonProperty("metadata")] public Dictionary Metadata { get; set; } + /// + /// Payment method-specific configuration for this PaymentIntent. + /// + [JsonProperty("payment_method_options")] + public PaymentIntentPaymentMethodOptionsOptions PaymentMethodOptions { get; set; } + /// /// Text that appears on the customer's statement as the statement descriptor for a non-card /// or card charge. This value overrides the account's default statement descriptor. For diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs index 83e12558c7..0625e82432 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs @@ -103,6 +103,13 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions [JsonProperty("request_overcapture")] public string RequestOvercapture { get; set; } + /// + /// Request partial authorization on this PaymentIntent. + /// One of: if_available, or never. + /// + [JsonProperty("request_partial_authorization")] + public string RequestPartialAuthorization { get; set; } + /// /// We strongly recommend that you rely on our SCA Engine to automatically prompt your /// customers for authentication based on risk level and - /// If true, tax will be calculated automatically using the customer's location. + /// Set to true to calculate tax + /// automatically using the customer's location. + /// + /// Enabling this parameter causes the payment link to collect any billing address + /// information necessary for tax calculation. /// [JsonProperty("enabled")] public bool? Enabled { get; set; } diff --git a/src/Stripe.net/Services/Terminal/Locations/LocationUpdateOptions.cs b/src/Stripe.net/Services/Terminal/Locations/LocationUpdateOptions.cs index a9cb7ba9b3..273fbb72e6 100644 --- a/src/Stripe.net/Services/Terminal/Locations/LocationUpdateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Locations/LocationUpdateOptions.cs @@ -7,9 +7,9 @@ namespace Stripe.Terminal public class LocationUpdateOptions : BaseOptions, IHasMetadata { /// - /// The full address of the location. If you're updating the address field, avoid - /// changing the country. If you need to modify the country field, create a - /// new Location object and re-register any existing readers to that location. + /// The full address of the location. You can't change the location's country. If you + /// need to modify the country field, create a new Location object and + /// re-register any existing readers to that location. /// [JsonProperty("address")] public AddressOptions Address { get; set; } diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs index 6951e159ad..8f10c6b095 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs @@ -116,12 +116,12 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// identity.verification_session.requires_input, /// identity.verification_session.verified, invoice.created, /// invoice.deleted, invoice.finalization_failed, invoice.finalized, - /// invoice.marked_uncollectible, invoice.overdue, invoice.paid, - /// invoice.payment.overpaid, invoice.payment_action_required, - /// invoice.payment_attempt_required, invoice.payment_failed, - /// invoice.payment_succeeded, invoice.sent, invoice.upcoming, - /// invoice.updated, invoice.voided, invoice.will_be_due, - /// invoiceitem.created, invoiceitem.deleted, + /// invoice.marked_uncollectible, invoice.overdue, invoice.overpaid, + /// invoice.paid, invoice.payment.overpaid, + /// invoice.payment_action_required, invoice.payment_attempt_required, + /// invoice.payment_failed, invoice.payment_succeeded, invoice.sent, + /// invoice.upcoming, invoice.updated, invoice.voided, + /// invoice.will_be_due, invoiceitem.created, invoiceitem.deleted, /// issuing_authorization.created, issuing_authorization.request, /// issuing_authorization.updated, issuing_card.created, /// issuing_card.updated, issuing_cardholder.created, diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs index c46fcf373c..02e8562e7a 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs @@ -81,12 +81,12 @@ public class WebhookEndpointUpdateOptions : BaseOptions, IHasMetadata /// identity.verification_session.requires_input, /// identity.verification_session.verified, invoice.created, /// invoice.deleted, invoice.finalization_failed, invoice.finalized, - /// invoice.marked_uncollectible, invoice.overdue, invoice.paid, - /// invoice.payment.overpaid, invoice.payment_action_required, - /// invoice.payment_attempt_required, invoice.payment_failed, - /// invoice.payment_succeeded, invoice.sent, invoice.upcoming, - /// invoice.updated, invoice.voided, invoice.will_be_due, - /// invoiceitem.created, invoiceitem.deleted, + /// invoice.marked_uncollectible, invoice.overdue, invoice.overpaid, + /// invoice.paid, invoice.payment.overpaid, + /// invoice.payment_action_required, invoice.payment_attempt_required, + /// invoice.payment_failed, invoice.payment_succeeded, invoice.sent, + /// invoice.upcoming, invoice.updated, invoice.voided, + /// invoice.will_be_due, invoiceitem.created, invoiceitem.deleted, /// issuing_authorization.created, issuing_authorization.request, /// issuing_authorization.updated, issuing_card.created, /// issuing_card.updated, issuing_cardholder.created,