diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index f5f04d71b0..8576feb6a9 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -2feaeea9e3c2b01dd5b7e4092d8364af4bf1e740 \ No newline at end of file +9e950cbf7b5a814a98f27d1a94b72cd6f1df2078 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 466b261db4..8110841c8f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2190 \ No newline at end of file +v2202 \ No newline at end of file diff --git a/README.md b/README.md index 4666e9314c..df0d13dca8 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ [![Build Status](https://github.com/stripe/stripe-dotnet/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-dotnet/actions?query=branch%3Amaster) [![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-dotnet/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-dotnet?branch=master) +> [!TIP] +> Want to chat live with Stripe engineers? Join us on our [Discord server](https://stripe.com/go/discord/dotnet). + The official [Stripe][stripe] .NET library, supporting .NET Standard 2.0+, .NET Core 5+, and .NET Framework 4.6.2+. ## Installation diff --git a/src/Stripe.net/Entities/Checkout/Sessions/Session.cs b/src/Stripe.net/Entities/Checkout/Sessions/Session.cs index df974d53f4..b380a2c333 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/Session.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/Session.cs @@ -96,6 +96,22 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject #endif public long? AmountTotal { get; set; } + /// + /// Determines whether the customer's attempt to pay must be manually approved. + /// + /// Default is auto, when the customer's attempt to pay is approved automatically + /// with no action required on your server. + /// + /// When set to manual, you must approve the customer's attempt to pay by calling approve from your server. + /// One of: auto, or manual. + /// + [JsonProperty("approval_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("approval_method")] +#endif + public string ApprovalMethod { get; set; } + [JsonProperty("automatic_tax")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("automatic_tax")] @@ -220,6 +236,16 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject #endif public SessionCurrencyConversion CurrencyConversion { get; set; } + /// + /// The customer's pending attempt to pay that requires your approval. Contains information + /// about the customer and their payment details. + /// + [JsonProperty("current_attempt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("current_attempt")] +#endif + public SessionCurrentAttempt CurrentAttempt { get; set; } + /// /// Collect additional information from your customer using custom fields. Up to 3 fields /// are supported. You can't set this parameter if ui_mode is custom. diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttempt.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttempt.cs new file mode 100644 index 0000000000..e4e653b748 --- /dev/null +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttempt.cs @@ -0,0 +1,66 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SessionCurrentAttempt : StripeEntity, IHasId + { + /// + /// The customer's billing information, if provided. + /// + [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif + public SessionCurrentAttemptBillingDetails BillingDetails { get; set; } + + /// + /// The customer's email. + /// + [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif + public string Email { get; set; } + + /// + /// The attempt ID you will pass to the Checkout + /// Session approve endpoint to approve the attempt. + /// + [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif + public string Id { get; set; } + + /// + /// Information about the payment method the customer is attempting to pay with. + /// + [JsonProperty("payment_method_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_details")] +#endif + public SessionCurrentAttemptPaymentMethodDetails PaymentMethodDetails { get; set; } + + /// + /// The customer's phone number. + /// + [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif + public string Phone { get; set; } + + /// + /// The customer's shipping information, if provided. + /// + [JsonProperty("shipping_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_details")] +#endif + public SessionCurrentAttemptShippingDetails ShippingDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptBillingDetails.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptBillingDetails.cs new file mode 100644 index 0000000000..ab435bb0de --- /dev/null +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptBillingDetails.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SessionCurrentAttemptBillingDetails : StripeEntity + { + [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif + public Address Address { get; set; } + + /// + /// Customer name. + /// + [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif + public string Name { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptPaymentMethodDetails.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptPaymentMethodDetails.cs new file mode 100644 index 0000000000..a4f98d24a7 --- /dev/null +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptPaymentMethodDetails.cs @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SessionCurrentAttemptPaymentMethodDetails : StripeEntity + { + /// + /// Indicates whether this payment method can be shown again to its customer in a checkout + /// flow. + /// One of: always, limited, or unspecified. + /// + [JsonProperty("allow_redisplay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redisplay")] +#endif + public string AllowRedisplay { get; set; } + + [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif + public SessionCurrentAttemptPaymentMethodDetailsCard Card { get; set; } + + /// + /// The type of payment method the customer is attempting to pay with. An additional hash is + /// included in the payment method details with a name matching this value. It contains + /// additional information specific to the payment method type. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptPaymentMethodDetailsCard.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptPaymentMethodDetailsCard.cs new file mode 100644 index 0000000000..d7d584b1cf --- /dev/null +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptPaymentMethodDetailsCard.cs @@ -0,0 +1,107 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SessionCurrentAttemptPaymentMethodDetailsCard : StripeEntity + { + /// + /// The brand of the card, accounting for customer's brand choice on dual-branded cards. + /// One of: accel, amex, carnet, cartes_bancaires, + /// conecs, diners, discover, eftpos_au, elo, + /// girocard, interac, jcb, link, maestro, + /// mastercard, nyce, pulse, rupay, star, + /// unionpay, unknown, or visa. + /// + [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif + 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")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif + public string Country { get; set; } + + /// + /// Two-digit number representing the card's expiration month. + /// + [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif + public long ExpMonth { get; set; } + + /// + /// Four-digit number representing the card's expiration year. + /// + [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif + public long ExpYear { get; set; } + + /// + /// Uniquely identifies this particular card number. You can use this attribute to check + /// whether two customers who’ve signed up with you are using the same card number, for + /// example. For payment methods that tokenize card information (Apple Pay, Google Pay), the + /// tokenized number might be provided instead of the underlying card number. + /// + /// As of May 1, 2021, card fingerprint in India for Connect changed to allow two + /// fingerprints for the same card---one for India and one for the rest of the world.. + /// + [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif + public string Fingerprint { get; set; } + + /// + /// Card funding type. Can be credit, debit, prepaid, or + /// unknown. + /// One of: credit, debit, prepaid, or unknown. + /// + [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif + public string Funding { get; set; } + + /// + /// Issuer identification number of the card. (For internal use only and not typically + /// available in standard API requests.). + /// + [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif + public string Iin { get; set; } + + /// + /// The last four digits of the card. + /// + [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif + public string Last4 { get; set; } + + /// + /// If this Card is part of a card wallet, this contains the details of the card wallet. + /// + [JsonProperty("wallet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet")] +#endif + public SessionCurrentAttemptPaymentMethodDetailsCardWallet Wallet { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptPaymentMethodDetailsCardWallet.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptPaymentMethodDetailsCardWallet.cs new file mode 100644 index 0000000000..e875f70fb1 --- /dev/null +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptPaymentMethodDetailsCardWallet.cs @@ -0,0 +1,24 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SessionCurrentAttemptPaymentMethodDetailsCardWallet : StripeEntity + { + /// + /// The type of the wallet, one of amex_express_checkout, apple_pay, + /// google_pay, masterpass, samsung_pay, visa_checkout, + /// meta_pay, or link. + /// One of: amex_express_checkout, apple_pay, google_pay, link, + /// masterpass, meta_pay, samsung_pay, or visa_checkout. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptShippingDetails.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptShippingDetails.cs new file mode 100644 index 0000000000..9e364f18f3 --- /dev/null +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptShippingDetails.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SessionCurrentAttemptShippingDetails : StripeEntity + { + [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif + public Address Address { get; set; } + + /// + /// Customer name. + /// + [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif + public string Name { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs index 544518dbd4..cdfd6bc3ef 100644 --- a/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs @@ -207,7 +207,7 @@ public List Discounts /// /// Array of field names that can't be modified. Attempting to update a frozen field returns /// an error. - /// One of: pricing, or quantity. + /// One of: discounts, pricing, or quantity. /// [JsonProperty("frozen_fields")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParent.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParent.cs index e59aa6748a..e13cf54b44 100644 --- a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParent.cs +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParent.cs @@ -8,15 +8,6 @@ namespace Stripe public class InvoiceItemParent : StripeEntity { - /// - /// Details about the license fee subscription that generated this invoice item. - /// - [JsonProperty("license_fee_subscription_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("license_fee_subscription_details")] -#endif - public InvoiceItemParentLicenseFeeSubscriptionDetails LicenseFeeSubscriptionDetails { get; set; } - /// /// Details about the rate card subscription that generated this invoice item. /// @@ -46,7 +37,7 @@ public class InvoiceItemParent : StripeEntity /// /// The type of parent that generated this invoice item. - /// One of: license_fee_subscription_details, rate_card_subscription_details, + /// One of: pricing_plan_subscription_details, rate_card_subscription_details, /// schedule_details, or subscription_details. /// [JsonProperty("type")] @@ -54,5 +45,14 @@ public class InvoiceItemParent : StripeEntity [STJS.JsonPropertyName("type")] #endif public string Type { get; set; } + + /// + /// Details about the pricing plan subscription that generated this invoice item. + /// + [JsonProperty("pricing_plan_subscription_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pricing_plan_subscription_details")] +#endif + public InvoiceItemParentPricingPlanSubscriptionDetails PricingPlanSubscriptionDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentLicenseFeeSubscriptionDetails.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentLicenseFeeSubscriptionDetails.cs deleted file mode 100644 index 255ee20761..0000000000 --- a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentLicenseFeeSubscriptionDetails.cs +++ /dev/null @@ -1,47 +0,0 @@ -// 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 InvoiceItemParentLicenseFeeSubscriptionDetails : StripeEntity - { - /// - /// The license fee subscription that generated this invoice item. - /// - [JsonProperty("license_fee_subscription")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("license_fee_subscription")] -#endif - public string LicenseFeeSubscription { get; set; } - - /// - /// The license fee version that generated this invoice item. - /// - [JsonProperty("license_fee_version")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("license_fee_version")] -#endif - public string LicenseFeeVersion { get; set; } - - /// - /// The pricing plan subscription that manages the license fee subscription. - /// - [JsonProperty("pricing_plan_subscription")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("pricing_plan_subscription")] -#endif - public string PricingPlanSubscription { get; set; } - - /// - /// The pricing plan version at the time this invoice item was generated. - /// - [JsonProperty("pricing_plan_version")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("pricing_plan_version")] -#endif - public string PricingPlanVersion { get; set; } - } -} diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentPricingPlanSubscriptionDetails.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentPricingPlanSubscriptionDetails.cs new file mode 100644 index 0000000000..a7bf43808d --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentPricingPlanSubscriptionDetails.cs @@ -0,0 +1,29 @@ +// 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 InvoiceItemParentPricingPlanSubscriptionDetails : StripeEntity + { + /// + /// The pricing plan subscription that manages this charge. + /// + [JsonProperty("pricing_plan_subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pricing_plan_subscription")] +#endif + public string PricingPlanSubscription { get; set; } + + /// + /// The pricing plan version at the time this charge was generated. + /// + [JsonProperty("pricing_plan_version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pricing_plan_version")] +#endif + public string PricingPlanVersion { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentRateCardSubscriptionDetails.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentRateCardSubscriptionDetails.cs index ef77108a2b..a4dce3dc15 100644 --- a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentRateCardSubscriptionDetails.cs +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentRateCardSubscriptionDetails.cs @@ -8,24 +8,6 @@ namespace Stripe public class InvoiceItemParentRateCardSubscriptionDetails : StripeEntity { - /// - /// The pricing plan subscription that manages the rate card subscription. - /// - [JsonProperty("pricing_plan_subscription")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("pricing_plan_subscription")] -#endif - public string PricingPlanSubscription { get; set; } - - /// - /// The pricing plan version at the time this invoice item was generated. - /// - [JsonProperty("pricing_plan_version")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("pricing_plan_version")] -#endif - public string PricingPlanVersion { get; set; } - /// /// The rate card subscription that generated this invoice item. /// diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParent.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParent.cs index df5a69f93e..d2375b2686 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParent.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParent.cs @@ -17,15 +17,6 @@ public class InvoiceLineItemParent : StripeEntity #endif public InvoiceLineItemParentInvoiceItemDetails InvoiceItemDetails { get; set; } - /// - /// Details about the license fee subscription that generated this line item. - /// - [JsonProperty("license_fee_subscription_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("license_fee_subscription_details")] -#endif - public InvoiceLineItemParentLicenseFeeSubscriptionDetails LicenseFeeSubscriptionDetails { get; set; } - /// /// Details about the rate card subscription that generated this line item. /// @@ -55,7 +46,7 @@ public class InvoiceLineItemParent : StripeEntity /// /// The type of parent that generated this line item. - /// One of: invoice_item_details, license_fee_subscription_details, + /// One of: invoice_item_details, pricing_plan_subscription_details, /// rate_card_subscription_details, schedule_details, or /// subscription_item_details. /// @@ -64,5 +55,14 @@ public class InvoiceLineItemParent : StripeEntity [STJS.JsonPropertyName("type")] #endif public string Type { get; set; } + + /// + /// Details about the pricing plan subscription that generated this line item. + /// + [JsonProperty("pricing_plan_subscription_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pricing_plan_subscription_details")] +#endif + public InvoiceLineItemParentPricingPlanSubscriptionDetails PricingPlanSubscriptionDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentLicenseFeeSubscriptionDetails.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentPricingPlanSubscriptionDetails.cs similarity index 50% rename from src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentLicenseFeeSubscriptionDetails.cs rename to src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentPricingPlanSubscriptionDetails.cs index ed85d0cfc6..f527823aaa 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentLicenseFeeSubscriptionDetails.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentPricingPlanSubscriptionDetails.cs @@ -6,7 +6,7 @@ namespace Stripe using STJS = System.Text.Json.Serialization; #endif - public class InvoiceLineItemParentLicenseFeeSubscriptionDetails : StripeEntity + public class InvoiceLineItemParentPricingPlanSubscriptionDetails : StripeEntity { /// /// The invoice item that generated this line item. @@ -18,25 +18,7 @@ public class InvoiceLineItemParentLicenseFeeSubscriptionDetails : StripeEntity - /// The license fee subscription that generated this line item. - /// - [JsonProperty("license_fee_subscription")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("license_fee_subscription")] -#endif - public string LicenseFeeSubscription { get; set; } - - /// - /// The license fee version at the time this line item was generated. - /// - [JsonProperty("license_fee_version")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("license_fee_version")] -#endif - public string LicenseFeeVersion { get; set; } - - /// - /// The pricing plan subscription that manages the license fee subscription. + /// The pricing plan subscription that manages this charge. /// [JsonProperty("pricing_plan_subscription")] #if NET6_0_OR_GREATER @@ -45,7 +27,7 @@ public class InvoiceLineItemParentLicenseFeeSubscriptionDetails : StripeEntity - /// The pricing plan version at the time this line item was generated. + /// The pricing plan version at the time this charge was generated. /// [JsonProperty("pricing_plan_version")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentRateCardSubscriptionDetails.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentRateCardSubscriptionDetails.cs index 246c429475..ea0f052bdc 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentRateCardSubscriptionDetails.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentRateCardSubscriptionDetails.cs @@ -17,24 +17,6 @@ public class InvoiceLineItemParentRateCardSubscriptionDetails : StripeEntity - /// The pricing plan subscription that manages the rate card subscription. - /// - [JsonProperty("pricing_plan_subscription")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("pricing_plan_subscription")] -#endif - public string PricingPlanSubscription { get; set; } - - /// - /// The pricing plan version at the time this line item was generated. - /// - [JsonProperty("pricing_plan_version")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("pricing_plan_version")] -#endif - public string PricingPlanVersion { get; set; } - /// /// The rate card subscription that generated this line item. /// diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs b/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs index b1d3086714..45ca69c422 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs @@ -339,6 +339,12 @@ public Token Token internal ExpandableField InternalToken { get; set; } #endregion + [JsonProperty("token_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token_details")] +#endif + public AuthorizationTokenDetails TokenDetails { get; set; } + /// /// List of transactions /// associated with this authorization. diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetails.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetails.cs new file mode 100644 index 0000000000..92b3ef31e2 --- /dev/null +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetails.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Issuing +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AuthorizationTokenDetails : StripeEntity + { + /// + /// The card associated with this token. + /// + [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif + public string Card { get; set; } + + /// + /// Time at which the object was created. Measured in seconds since the Unix epoch. + /// + [JsonProperty("created")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The hashed ID derived from the device ID from the card network associated with the + /// token. + /// + [JsonProperty("device_fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("device_fingerprint")] +#endif + public string DeviceFingerprint { get; set; } + + [JsonProperty("network_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_data")] +#endif + public AuthorizationTokenDetailsNetworkData NetworkData { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkData.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkData.cs new file mode 100644 index 0000000000..80fa1578dd --- /dev/null +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkData.cs @@ -0,0 +1,45 @@ +// File generated from our OpenAPI spec +namespace Stripe.Issuing +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AuthorizationTokenDetailsNetworkData : StripeEntity + { + [JsonProperty("device")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("device")] +#endif + public AuthorizationTokenDetailsNetworkDataDevice Device { get; set; } + + [JsonProperty("mastercard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mastercard")] +#endif + public AuthorizationTokenDetailsNetworkDataMastercard Mastercard { get; set; } + + /// + /// The card network for this token. + /// One of: mastercard, or visa. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + + [JsonProperty("visa")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("visa")] +#endif + public AuthorizationTokenDetailsNetworkDataVisa Visa { get; set; } + + [JsonProperty("wallet_provider")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet_provider")] +#endif + public AuthorizationTokenDetailsNetworkDataWalletProvider WalletProvider { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkDataDevice.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkDataDevice.cs new file mode 100644 index 0000000000..247adc693d --- /dev/null +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkDataDevice.cs @@ -0,0 +1,62 @@ +// File generated from our OpenAPI spec +namespace Stripe.Issuing +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AuthorizationTokenDetailsNetworkDataDevice : StripeEntity + { + /// + /// The IP address of the device at provisioning time. + /// + [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif + public string IpAddress { get; set; } + + /// + /// The ISO 639-1 language code of the device associated with the tokenization request. + /// One of: aa, ab, ae, af, ak, am, an, + /// ar, as, av, ay, az, ba, be, bg, + /// bi, bm, bn, bo, br, bs, ca, ce, + /// ch, co, cr, cs, cu, cv, cy, da, + /// de, dv, dz, ee, el, en, eo, es, + /// et, eu, fa, ff, fi, fj, fo, fr, + /// fy, ga, gd, gl, gn, gu, gv, ha, + /// he, hi, ho, hr, ht, hu, hy, hz, + /// ia, id, ie, ig, ii, ik, io, is, + /// it, iu, ja, jv, ka, kg, ki, kj, + /// kk, kl, km, kn, ko, kr, ks, ku, + /// kv, kw, ky, la, lb, lg, li, ln, + /// lo, lt, lu, lv, mg, mh, mi, mk, + /// ml, mn, mr, ms, mt, my, na, nb, + /// nd, ne, ng, nl, nn, no, nr, nv, + /// ny, oc, oj, om, or, os, pa, pi, + /// pl, ps, pt, qu, rm, rn, ro, ru, + /// rw, sa, sc, sd, se, sg, si, sk, + /// sl, sm, sn, so, sq, sr, ss, st, + /// su, sv, sw, ta, te, tg, th, ti, + /// tk, tl, tn, to, tr, ts, tt, tw, + /// ty, ug, uk, ur, uz, ve, vi, vo, + /// wa, wo, xh, yi, yo, za, zh, or + /// zu. + /// + [JsonProperty("language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("language")] +#endif + public string Language { get; set; } + + /// + /// The phone number of the device used for tokenization. + /// + [JsonProperty("phone_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone_number")] +#endif + public string PhoneNumber { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkDataMastercard.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkDataMastercard.cs new file mode 100644 index 0000000000..472eee8a7c --- /dev/null +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkDataMastercard.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Issuing +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AuthorizationTokenDetailsNetworkDataMastercard : StripeEntity + { + /// + /// A unique reference ID from the network to represent the card account number. + /// + [JsonProperty("card_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_reference_id")] +#endif + public string CardReferenceId { get; set; } + + /// + /// The network-unique identifier for the token. + /// + [JsonProperty("token_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token_reference_id")] +#endif + public string TokenReferenceId { get; set; } + + /// + /// The ID of the entity requesting tokenization. + /// + [JsonProperty("token_requestor_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token_requestor_id")] +#endif + public string TokenRequestorId { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkDataVisa.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkDataVisa.cs new file mode 100644 index 0000000000..ecff49bcaa --- /dev/null +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkDataVisa.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Issuing +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AuthorizationTokenDetailsNetworkDataVisa : StripeEntity + { + /// + /// A unique reference ID from the network to represent the card account number. + /// + [JsonProperty("card_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_reference_id")] +#endif + public string CardReferenceId { get; set; } + + /// + /// The network-unique identifier for the token. + /// + [JsonProperty("token_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token_reference_id")] +#endif + public string TokenReferenceId { get; set; } + + /// + /// The ID of the entity requesting tokenization. + /// + [JsonProperty("token_requestor_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token_requestor_id")] +#endif + public string TokenRequestorId { get; set; } + + /// + /// Degree of risk associated with the token between 01 and 99, with higher + /// number indicating higher risk. A 00 value indicates the token was not scored by + /// Visa. + /// + [JsonProperty("token_risk_score")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token_risk_score")] +#endif + public string TokenRiskScore { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkDataWalletProvider.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkDataWalletProvider.cs new file mode 100644 index 0000000000..307f18a223 --- /dev/null +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTokenDetailsNetworkDataWalletProvider.cs @@ -0,0 +1,73 @@ +// File generated from our OpenAPI spec +namespace Stripe.Issuing +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AuthorizationTokenDetailsNetworkDataWalletProvider : StripeEntity + { + /// + /// An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher + /// score indicates more trustworthy. + /// + [JsonProperty("account_trust_score")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_trust_score")] +#endif + public long AccountTrustScore { get; set; } + + /// + /// The method used for tokenizing a card. + /// One of: app, manual, on_file, or other. + /// + [JsonProperty("card_number_source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_number_source")] +#endif + public string CardNumberSource { get; set; } + + /// + /// An evaluation on the trustworthiness of the device. A higher score indicates more + /// trustworthy. + /// + [JsonProperty("device_trust_score")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("device_trust_score")] +#endif + public long DeviceTrustScore { get; set; } + + /// + /// The reasons for suggested tokenization given by the card network. + /// One of: account_card_too_new, account_recently_changed, + /// account_too_new, account_too_new_since_launch, additional_device, + /// data_expired, defer_id_v_decision, device_recently_lost, + /// good_activity_history, has_suspended_tokens, high_risk, + /// inactive_account, long_account_tenure, low_account_score, + /// low_device_score, low_phone_number_score, network_service_error, + /// outside_home_territory, provisioning_cardholder_mismatch, + /// provisioning_device_and_cardholder_mismatch, provisioning_device_mismatch, + /// same_device_no_prior_authentication, + /// same_device_successful_prior_authentication, software_update, + /// suspicious_activity, too_many_different_cardholders, + /// too_many_recent_attempts, or too_many_recent_tokens. + /// + [JsonProperty("reason_codes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason_codes")] +#endif + public List ReasonCodes { get; set; } + + /// + /// The recommendation on responding to the tokenization request. + /// One of: approve, decline, or require_auth. + /// + [JsonProperty("suggested_decision")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("suggested_decision")] +#endif + public string SuggestedDecision { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Orchestration/PaymentAttempts/PaymentAttempt.cs b/src/Stripe.net/Entities/Orchestration/PaymentAttempts/PaymentAttempt.cs new file mode 100644 index 0000000000..fd488e8621 --- /dev/null +++ b/src/Stripe.net/Entities/Orchestration/PaymentAttempts/PaymentAttempt.cs @@ -0,0 +1,51 @@ +// File generated from our OpenAPI spec +namespace Stripe.Orchestration +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Represents orchestration information for a payment attempt record (e.g. return url). + /// + public class PaymentAttempt : 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; } + + /// + /// If the object exists in live mode, the value is true. If the object exists in + /// test mode, the value is false. + /// + [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif + public bool Livemode { get; set; } + + /// + /// If present, the return URL for this payment attempt. + /// + [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif + public string ReturnUrl { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluation.cs b/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluation.cs new file mode 100644 index 0000000000..5290759d5e --- /dev/null +++ b/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluation.cs @@ -0,0 +1,92 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Customer Evaluation resource returned by the Radar Customer Evaluations API. + /// + public class CustomerEvaluation : 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; } + + /// + /// Time at which the object was created. Measured in seconds since the Unix epoch. + /// + [JsonProperty("created_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime CreatedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The ID of the Stripe customer the customer evaluation is associated with. + /// + [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif + public string Customer { get; set; } + + /// + /// The type of evaluation event. + /// + [JsonProperty("event_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_type")] +#endif + public string EventType { get; set; } + + /// + /// A list of events that have been reported on this customer evaluation. + /// + [JsonProperty("events")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("events")] +#endif + public List Events { get; set; } + + /// + /// If the object exists in live mode, the value is true. If the object exists in + /// test mode, the value is false. + /// + [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif + public bool Livemode { get; set; } + + /// + /// A hash of signal objects providing Radar's evaluation for the lifecycle event. + /// + [JsonProperty("signals")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("signals")] +#endif + public CustomerEvaluationSignals Signals { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationEvent.cs b/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationEvent.cs new file mode 100644 index 0000000000..a374c0d387 --- /dev/null +++ b/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationEvent.cs @@ -0,0 +1,51 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationEvent : StripeEntity + { + /// + /// Data about a failed login event. + /// + [JsonProperty("login_failed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("login_failed")] +#endif + public CustomerEvaluationEventLoginFailed LoginFailed { get; set; } + + /// + /// Time at which the event occurred. Measured in seconds since the Unix epoch. + /// + [JsonProperty("occurred_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("occurred_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime OccurredAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Data about a failed registration event. + /// + [JsonProperty("registration_failed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registration_failed")] +#endif + public CustomerEvaluationEventRegistrationFailed RegistrationFailed { get; set; } + + /// + /// The type of event that occurred. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationEventLoginFailed.cs b/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationEventLoginFailed.cs new file mode 100644 index 0000000000..0e236ad8ac --- /dev/null +++ b/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationEventLoginFailed.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationEventLoginFailed : StripeEntity + { + /// + /// The reason why this login failed. + /// + [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif + public string Reason { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationEventRegistrationFailed.cs b/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationEventRegistrationFailed.cs new file mode 100644 index 0000000000..4382a59180 --- /dev/null +++ b/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationEventRegistrationFailed.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationEventRegistrationFailed : StripeEntity + { + /// + /// The reason why this registration failed. + /// + [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif + public string Reason { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationSignals.cs b/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationSignals.cs new file mode 100644 index 0000000000..e8c05ae68c --- /dev/null +++ b/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationSignals.cs @@ -0,0 +1,23 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationSignals : StripeEntity + { + [JsonProperty("account_sharing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_sharing")] +#endif + public CustomerEvaluationSignalsAccountSharing AccountSharing { get; set; } + + [JsonProperty("multi_accounting")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multi_accounting")] +#endif + public CustomerEvaluationSignalsMultiAccounting MultiAccounting { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationSignalsAccountSharing.cs b/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationSignalsAccountSharing.cs new file mode 100644 index 0000000000..b4634ff69e --- /dev/null +++ b/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationSignalsAccountSharing.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationSignalsAccountSharing : StripeEntity + { + /// + /// Time at which the signal was evaluated. Measured in seconds since the Unix epoch. + /// + [JsonProperty("evaluated_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("evaluated_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime EvaluatedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The risk level for this signal. + /// + [JsonProperty("risk_level")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("risk_level")] +#endif + public string RiskLevel { get; set; } + + /// + /// Score for this signal (float between 0.0-100.0). + /// + [JsonProperty("score")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("score")] +#endif + public decimal Score { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationSignalsMultiAccounting.cs b/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationSignalsMultiAccounting.cs new file mode 100644 index 0000000000..12849dbc5e --- /dev/null +++ b/src/Stripe.net/Entities/Radar/CustomerEvaluations/CustomerEvaluationSignalsMultiAccounting.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationSignalsMultiAccounting : StripeEntity + { + /// + /// Time at which the signal was evaluated. Measured in seconds since the Unix epoch. + /// + [JsonProperty("evaluated_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("evaluated_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime EvaluatedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The risk level for this signal. + /// + [JsonProperty("risk_level")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("risk_level")] +#endif + public string RiskLevel { get; set; } + + /// + /// Score for this signal (float between 0.0-100.0). + /// + [JsonProperty("score")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("score")] +#endif + public decimal Score { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluation.cs b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluation.cs index f4c94f2677..a5d6a81d64 100644 --- a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluation.cs +++ b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluation.cs @@ -33,7 +33,7 @@ public class IssuingAuthorizationEvaluation : StripeEntity - /// Details about the authorization transaction. + /// Details about the authorization. /// [JsonProperty("authorization_details")] #if NET6_0_OR_GREATER @@ -70,7 +70,8 @@ public class IssuingAuthorizationEvaluation : StripeEntity - /// Details about the merchant where the authorization occurred. + /// Details about the seller (grocery store, e-commerce website, etc.) where the card + /// authorization happened. /// [JsonProperty("merchant_details")] #if NET6_0_OR_GREATER @@ -89,7 +90,7 @@ public class IssuingAuthorizationEvaluation : StripeEntity Metadata { get; set; } /// - /// Details about the card network processing. + /// Details about the authorization, such as identifiers, set by the card network. /// [JsonProperty("network_details")] #if NET6_0_OR_GREATER @@ -107,7 +108,7 @@ public class IssuingAuthorizationEvaluation : StripeEntity - /// Details about the token, if a tokenized payment method was used. + /// Details about the token, if a tokenized payment method was used for the authorization. /// [JsonProperty("token_details")] #if NET6_0_OR_GREATER @@ -116,7 +117,7 @@ public class IssuingAuthorizationEvaluation : StripeEntity - /// Details about verification checks performed. + /// Details about verification data for the authorization. /// [JsonProperty("verification_details")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationAuthorizationDetails.cs b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationAuthorizationDetails.cs index 90509bac51..a5769a619c 100644 --- a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationAuthorizationDetails.cs +++ b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationAuthorizationDetails.cs @@ -11,7 +11,8 @@ namespace Stripe.Radar public class IssuingAuthorizationEvaluationAuthorizationDetails : StripeEntity { /// - /// The authorization amount in the smallest currency unit. + /// The total amount of the authorization in the smallest currency unit. /// [JsonProperty("amount")] #if NET6_0_OR_GREATER @@ -20,7 +21,7 @@ public class IssuingAuthorizationEvaluationAuthorizationDetails : StripeEntity - /// The method used for authorization. + /// How the card details were provided. /// One of: chip, contactless, keyed_in, online, or /// swipe. /// @@ -31,7 +32,9 @@ public class IssuingAuthorizationEvaluationAuthorizationDetails : StripeEntity - /// Three-letter ISO currency code in lowercase. + /// Three-letter ISO currency + /// code, in lowercase. Must be a supported + /// currency. /// [JsonProperty("currency")] #if NET6_0_OR_GREATER @@ -40,7 +43,7 @@ public class IssuingAuthorizationEvaluationAuthorizationDetails : StripeEntity - /// The card entry mode. + /// Defines how the card's information was entered for the authorization. /// One of: contactless, contactless_magstripe, credential_on_file, /// integrated_circuit_card, magstripe, magstripe_no_cvv, /// manual, other, or unknown. @@ -52,7 +55,7 @@ public class IssuingAuthorizationEvaluationAuthorizationDetails : StripeEntity - /// The raw code for the card entry mode. + /// Raw code indicating the entry mode from the network message. /// [JsonProperty("entry_mode_raw_code")] #if NET6_0_OR_GREATER @@ -61,7 +64,7 @@ public class IssuingAuthorizationEvaluationAuthorizationDetails : StripeEntity - /// The time when the authorization was initiated. + /// The timestamp of the authorization initiated in seconds. /// [JsonProperty("initiated_at")] [JsonConverter(typeof(UnixDateTimeConverter))] @@ -72,7 +75,7 @@ public class IssuingAuthorizationEvaluationAuthorizationDetails : StripeEntity - /// The point of sale condition. + /// Defines how the card was read at the point of sale. /// One of: account_verification, card_not_present, card_present, /// e_commerce, key_entered_pos, missing, moto, other, /// pin_entered, or recurring. @@ -84,7 +87,7 @@ public class IssuingAuthorizationEvaluationAuthorizationDetails : StripeEntity - /// The raw code for the point of sale condition. + /// Raw code indicating the point of sale condition from the network message. /// [JsonProperty("point_of_sale_condition_raw_code")] #if NET6_0_OR_GREATER @@ -93,7 +96,8 @@ public class IssuingAuthorizationEvaluationAuthorizationDetails : StripeEntity - /// External reference for the authorization. + /// User's specified unique ID for this authorization attempt (e.g., RRN or internal + /// reference). /// [JsonProperty("reference")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardDetails.cs b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardDetails.cs index e4fae5c0d2..16458e2836 100644 --- a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardDetails.cs +++ b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardDetails.cs @@ -20,7 +20,7 @@ public class IssuingAuthorizationEvaluationCardDetails : StripeEntity - /// The country code associated with the card BIN. + /// The two-letter country code of the BIN issuer. /// [JsonProperty("bin_country")] #if NET6_0_OR_GREATER @@ -29,7 +29,7 @@ public class IssuingAuthorizationEvaluationCardDetails : StripeEntity - /// The type of card (physical or virtual). + /// The type of the card. /// One of: physical, or virtual. /// [JsonProperty("card_type")] @@ -39,7 +39,7 @@ public class IssuingAuthorizationEvaluationCardDetails : StripeEntity - /// The time when the card was created. + /// The timestamp when the card was created. /// [JsonProperty("created_at")] [JsonConverter(typeof(UnixDateTimeConverter))] @@ -59,7 +59,8 @@ public class IssuingAuthorizationEvaluationCardDetails : StripeEntity - /// External reference for the card. + /// User's specified unique ID of the card for this authorization attempt (e.g., RRN or + /// internal reference). /// [JsonProperty("reference")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardholderDetails.cs b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardholderDetails.cs index 4b1b3ae7b5..7b2ee197cf 100644 --- a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardholderDetails.cs +++ b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardholderDetails.cs @@ -11,7 +11,7 @@ namespace Stripe.Radar public class IssuingAuthorizationEvaluationCardholderDetails : StripeEntity { /// - /// The time when the cardholder was created. + /// The timestamp when the cardholder was created. /// [JsonProperty("created_at")] [JsonConverter(typeof(UnixDateTimeConverter))] @@ -22,7 +22,8 @@ public class IssuingAuthorizationEvaluationCardholderDetails : StripeEntity - /// External reference for the cardholder. + /// User's specified unique ID of the cardholder for this authorization attempt (e.g., RRN + /// or internal reference). /// [JsonProperty("reference")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationMerchantDetails.cs b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationMerchantDetails.cs index 58cd001fba..969531227d 100644 --- a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationMerchantDetails.cs +++ b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationMerchantDetails.cs @@ -9,7 +9,7 @@ namespace Stripe.Radar public class IssuingAuthorizationEvaluationMerchantDetails : StripeEntity { /// - /// The merchant category code (MCC). + /// The merchant category code for the seller's business. /// [JsonProperty("category_code")] #if NET6_0_OR_GREATER @@ -18,7 +18,7 @@ public class IssuingAuthorizationEvaluationMerchantDetails : StripeEntity - /// The merchant country code. + /// Country where the seller is located. /// [JsonProperty("country")] #if NET6_0_OR_GREATER @@ -27,7 +27,7 @@ public class IssuingAuthorizationEvaluationMerchantDetails : StripeEntity - /// The merchant name. + /// Name of the seller. /// [JsonProperty("name")] #if NET6_0_OR_GREATER @@ -36,7 +36,8 @@ public class IssuingAuthorizationEvaluationMerchantDetails : StripeEntity - /// The merchant identifier from the card network. + /// Identifier assigned to the seller by the card network. Different card networks may + /// assign different network_id fields to the same merchant. /// [JsonProperty("network_id")] #if NET6_0_OR_GREATER @@ -45,7 +46,7 @@ public class IssuingAuthorizationEvaluationMerchantDetails : StripeEntity - /// The terminal identifier. + /// An ID assigned by the seller to the location of the sale. /// [JsonProperty("terminal_id")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationNetworkDetails.cs b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationNetworkDetails.cs index c1eba564e3..6a4bcddb18 100644 --- a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationNetworkDetails.cs +++ b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationNetworkDetails.cs @@ -9,7 +9,8 @@ namespace Stripe.Radar public class IssuingAuthorizationEvaluationNetworkDetails : StripeEntity { /// - /// The acquiring institution identifier. + /// Identifier assigned to the acquirer by the card network. Sometimes this value is not + /// provided by the network; in this case, the value will be null. /// [JsonProperty("acquiring_institution_id")] #if NET6_0_OR_GREATER @@ -18,7 +19,7 @@ public class IssuingAuthorizationEvaluationNetworkDetails : StripeEntity - /// The card network that processed the authorization. + /// The card network over which Stripe received the authorization. /// One of: cirrus, interlink, maestro, mastercard, /// other, plus, or visa. /// diff --git a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationTokenDetails.cs b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationTokenDetails.cs index 918a2f2e6b..625ed9fccf 100644 --- a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationTokenDetails.cs +++ b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationTokenDetails.cs @@ -11,7 +11,7 @@ namespace Stripe.Radar public class IssuingAuthorizationEvaluationTokenDetails : StripeEntity { /// - /// The time when the token was created. + /// The timestamp when the network token was created. /// [JsonProperty("created_at")] [JsonConverter(typeof(UnixDateTimeConverter))] @@ -22,7 +22,8 @@ public class IssuingAuthorizationEvaluationTokenDetails : StripeEntity - /// External reference for the token. + /// User's specified unique ID of the card token for this authorization attempt (e.g., RRN + /// or internal reference). /// [JsonProperty("reference")] #if NET6_0_OR_GREATER @@ -31,7 +32,8 @@ public class IssuingAuthorizationEvaluationTokenDetails : StripeEntity - /// The wallet provider, if applicable. + /// The digital wallet used for this transaction. One of apple_pay, + /// google_pay, or samsung_pay. /// One of: apple_pay, google_pay, or samsung_pay. /// [JsonProperty("wallet")] diff --git a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationVerificationDetails.cs b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationVerificationDetails.cs index e0ea3603a7..d9285acd0d 100644 --- a/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationVerificationDetails.cs +++ b/src/Stripe.net/Entities/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationVerificationDetails.cs @@ -9,7 +9,7 @@ namespace Stripe.Radar public class IssuingAuthorizationEvaluationVerificationDetails : StripeEntity { /// - /// The result of the 3D Secure verification. + /// The outcome of the 3D Secure authentication request. /// One of: attempt_acknowledged, authenticated, exempted, /// failed, or required. /// diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUs.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUs.cs index fb71d41510..e5771000a8 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUs.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUs.cs @@ -87,9 +87,9 @@ public class RegistrationCountryOptionsUs : StripeEntity /// Type of registration in the US. /// 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, + /// gross_receipts_tax, home_rule_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")] @@ -97,5 +97,11 @@ public class RegistrationCountryOptionsUs : 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/V2/MoneyManagement/ReceivedDebits/ReceivedDebit.cs b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedDebits/ReceivedDebit.cs index 31c26684b3..6fa1d9adca 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedDebits/ReceivedDebit.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedDebits/ReceivedDebit.cs @@ -166,7 +166,7 @@ public class ReceivedDebit : StripeEntity, IHasId, IHasObject public ReceivedDebitStripeBalancePayment StripeBalancePayment { get; set; } /// - /// Open enum, the type of the received debit. + /// Open Enum. The type of the ReceivedDebit. /// One of: balance_transfer, bank_transfer, card_spend, /// external_debit, or stripe_balance_payment. /// diff --git a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs index ecdb887fa4..980c6925df 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs @@ -142,6 +142,7 @@ public static class StripeTypeRegistry { "login_link", typeof(LoginLink) }, { "mandate", typeof(Mandate) }, { "margin", typeof(Margin) }, + { "orchestration.payment_attempt", typeof(Orchestration.PaymentAttempt) }, { "order", typeof(Order) }, { "payment_attempt_record", typeof(PaymentAttemptRecord) }, { "payment_intent", typeof(PaymentIntent) }, @@ -177,6 +178,7 @@ public static class StripeTypeRegistry QuotePreviewSubscriptionSchedule) }, { "radar.account_evaluation", typeof(Radar.AccountEvaluation) }, + { "radar.customer_evaluation", typeof(Radar.CustomerEvaluation) }, { "radar.early_fraud_warning", typeof(Radar.EarlyFraudWarning) }, { "radar.issuing_authorization_evaluation", typeof( diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsCheckScanningFeaturesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsCheckScanningFeaturesOptions.cs index a369a1267d..569408dc72 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsCheckScanningFeaturesOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsCheckScanningFeaturesOptions.cs @@ -1,7 +1,17 @@ // 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 AccountSessionComponentsCheckScanningFeaturesOptions : INestedOptions { + [JsonProperty("create_us_paper_check_on_application")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("create_us_paper_check_on_application")] +#endif + public bool? CreateUsPaperCheckOnApplication { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsCheckScanningOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsCheckScanningOptions.cs index 34905a5bdf..291206cfad 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsCheckScanningOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsCheckScanningOptions.cs @@ -18,7 +18,7 @@ public class AccountSessionComponentsCheckScanningOptions : INestedOptions public bool? Enabled { get; set; } /// - /// An empty list, because this embedded component has no features. + /// The list of features enabled in the embedded component. /// [JsonProperty("features")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionApproveOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionApproveOptions.cs new file mode 100644 index 0000000000..56c81a055e --- /dev/null +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionApproveOptions.cs @@ -0,0 +1,52 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SessionApproveOptions : BaseOptions + { + /// + /// The ID of the customer's attempt to pay to approve. + /// + [JsonProperty("attempt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("attempt")] +#endif + public string Attempt { get; set; } + + /// + /// A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in + /// payment mode. + /// + [JsonProperty("payment_intent_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent_data")] +#endif + public SessionPaymentIntentDataOptions PaymentIntentData { get; set; } + + /// + /// The URL to redirect your customer back to after they authenticate or cancel their + /// payment on the payment method's app or site. This parameter is allowed and required if + /// and only if you did not set the return URL during Checkout Session creation or in + /// checkout.confirm() in Stripe.js. + /// + [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif + public string ReturnUrl { get; set; } + + /// + /// A subset of parameters to be passed to subscription creation for Checkout Sessions in + /// subscription mode. + /// + [JsonProperty("subscription_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_data")] +#endif + public SessionSubscriptionDataOptions SubscriptionData { get; set; } + } +} diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs index 10c63a4d2b..82e2b2ea74 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs @@ -40,6 +40,22 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata #endif public bool? AllowPromotionCodes { get; set; } + /// + /// Determines whether the customer's attempt to pay must be manually approved. + /// + /// Default is auto, when the customer's attempt to pay is approved automatically + /// with no action required on your server. + /// + /// When set to manual, you must approve the customer's attempt to pay by calling approve from your server. + /// One of: auto, or manual. + /// + [JsonProperty("approval_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("approval_method")] +#endif + public string ApprovalMethod { get; set; } + /// /// Settings for automatic tax lookup for this session and resulting payments, invoices, and /// subscriptions. diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionService.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionService.cs index 071fa295a9..f128585a4a 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionService.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionService.cs @@ -33,6 +33,24 @@ public SessionService(IStripeClient client) public virtual SessionLineItemService LineItems => this.lineItems ??= new SessionLineItemService( this.Requestor); + /// + ///

Approves a customer’s attempt to pay for a Checkout Session with + /// approval_method set to manual.

. + ///
+ public virtual Session Approve(string id, SessionApproveOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/checkout/sessions/{WebUtility.UrlEncode(id)}/approve", options, requestOptions); + } + + /// + ///

Approves a customer’s attempt to pay for a Checkout Session with + /// approval_method set to manual.

. + ///
+ public virtual Task ApproveAsync(string id, SessionApproveOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/checkout/sessions/{WebUtility.UrlEncode(id)}/approve", options, requestOptions, cancellationToken); + } + /// ///

Creates a Checkout Session object.

. ///
diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsOptions.cs index c751c24192..e19595f00c 100644 --- a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsOptions.cs +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsOptions.cs @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec namespace Stripe.DelegatedCheckout { + using System.Collections.Generic; using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; @@ -52,5 +53,14 @@ public class RequestedSessionFulfillmentDetailsOptions : INestedOptions [STJS.JsonPropertyName("selected_fulfillment_option")] #endif public RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOptions SelectedFulfillmentOption { get; set; } + + /// + /// The fulfillment option overrides for specific line items. + /// + [JsonProperty("selected_fulfillment_option_overrides")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("selected_fulfillment_option_overrides")] +#endif + public List SelectedFulfillmentOptionOverrides { get; set; } } } diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOverrideDigitalOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOverrideDigitalOptions.cs new file mode 100644 index 0000000000..4d8682702d --- /dev/null +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOverrideDigitalOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOverrideDigitalOptions : INestedOptions + { + /// + /// The digital option identifier. + /// + [JsonProperty("digital_option")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("digital_option")] +#endif + public string DigitalOption { get; set; } + } +} diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOverrideOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOverrideOptions.cs new file mode 100644 index 0000000000..5bdda04a77 --- /dev/null +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOverrideOptions.cs @@ -0,0 +1,48 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOverrideOptions : INestedOptions + { + /// + /// The digital fulfillment option. + /// + [JsonProperty("digital")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("digital")] +#endif + public RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOverrideDigitalOptions Digital { get; set; } + + /// + /// The line item keys that this fulfillment option override applies to. + /// + [JsonProperty("line_item_keys")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_item_keys")] +#endif + public List LineItemKeys { get; set; } + + /// + /// The shipping fulfillment option. + /// + [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif + public RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOverrideShippingOptions Shipping { get; set; } + + /// + /// The type of fulfillment option. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOverrideShippingOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOverrideShippingOptions.cs new file mode 100644 index 0000000000..b992fecdc9 --- /dev/null +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOverrideShippingOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOverrideShippingOptions : INestedOptions + { + /// + /// The shipping option identifier. + /// + [JsonProperty("shipping_option")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_option")] +#endif + public string ShippingOption { get; set; } + } +} diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShippingOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShippingOptions.cs index 7708cddd27..613fd61d89 100644 --- a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShippingOptions.cs +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShippingOptions.cs @@ -9,7 +9,7 @@ namespace Stripe.DelegatedCheckout public class RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShippingOptions : INestedOptions { /// - /// The shipping option identifer. + /// The shipping option identifier. /// [JsonProperty("shipping_option")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Orchestration/PaymentAttempts/PaymentAttemptGetOptions.cs b/src/Stripe.net/Services/Orchestration/PaymentAttempts/PaymentAttemptGetOptions.cs new file mode 100644 index 0000000000..e30424347c --- /dev/null +++ b/src/Stripe.net/Services/Orchestration/PaymentAttempts/PaymentAttemptGetOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe.Orchestration +{ + public class PaymentAttemptGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Orchestration/PaymentAttempts/PaymentAttemptService.cs b/src/Stripe.net/Services/Orchestration/PaymentAttempts/PaymentAttemptService.cs new file mode 100644 index 0000000000..09ffdcdc14 --- /dev/null +++ b/src/Stripe.net/Services/Orchestration/PaymentAttempts/PaymentAttemptService.cs @@ -0,0 +1,45 @@ +// File generated from our OpenAPI spec +namespace Stripe.Orchestration +{ + using System; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class PaymentAttemptService : Service, + IRetrievable + { + public PaymentAttemptService() + { + } + + internal PaymentAttemptService(ApiRequestor requestor) + : base(requestor) + { + } + + public PaymentAttemptService(IStripeClient client) + : base(client) + { + } + + /// + ///

Retrieves orchestration information for the given payment attempt record (e.g. return + /// url).

. + ///
+ public virtual PaymentAttempt Get(string id, PaymentAttemptGetOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v1/orchestration/payment_attempts/{WebUtility.UrlEncode(id)}", options, requestOptions); + } + + /// + ///

Retrieves orchestration information for the given payment attempt record (e.g. return + /// url).

. + ///
+ public virtual Task GetAsync(string id, PaymentAttemptGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v1/orchestration/payment_attempts/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/OrchestrationService.cs b/src/Stripe.net/Services/OrchestrationService.cs new file mode 100644 index 0000000000..1499db833a --- /dev/null +++ b/src/Stripe.net/Services/OrchestrationService.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using System.Threading; + using System.Threading.Tasks; + + public class OrchestrationService : Service + { + private Orchestration.PaymentAttemptService paymentAttempts; + + internal OrchestrationService(ApiRequestor requestor) + : base(requestor) + { + } + + internal OrchestrationService(IStripeClient client) + : base(client) + { + } + + public virtual Orchestration.PaymentAttemptService PaymentAttempts => this.paymentAttempts ??= new Orchestration.PaymentAttemptService( + this.Requestor); + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordAmountOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordAmountOptions.cs new file mode 100644 index 0000000000..3738b237ad --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordAmountOptions.cs @@ -0,0 +1,33 @@ +// 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 PaymentAttemptRecordAmountOptions : INestedOptions + { + /// + /// Three-letter ISO currency + /// code, in lowercase. Must be a supported + /// currency. + /// + [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif + public string Currency { get; set; } + + /// + /// A positive integer representing the amount in the currency's minor unit. For example, + /// 100 can represent 1 USD or 100 JPY. + /// + [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif + public long? Value { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordCustomerDetailsOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordCustomerDetailsOptions.cs new file mode 100644 index 0000000000..cc5ec20468 --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordCustomerDetailsOptions.cs @@ -0,0 +1,47 @@ +// 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 PaymentAttemptRecordCustomerDetailsOptions : INestedOptions + { + /// + /// The customer who made the payment. + /// + [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif + public string Customer { get; set; } + + /// + /// The customer's phone number. + /// + [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif + public string Email { get; set; } + + /// + /// The customer's name. + /// + [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif + public string Name { get; set; } + + /// + /// The customer's phone number. + /// + [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif + public string Phone { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordProcessorDetailsCustomOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordProcessorDetailsCustomOptions.cs new file mode 100644 index 0000000000..d2c84fa181 --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordProcessorDetailsCustomOptions.cs @@ -0,0 +1,20 @@ +// 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 PaymentAttemptRecordProcessorDetailsCustomOptions : INestedOptions + { + /// + /// A reference to the external refund. This field must be unique across all refunds. + /// + [JsonProperty("refund_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_reference")] +#endif + public string RefundReference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordProcessorDetailsOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordProcessorDetailsOptions.cs new file mode 100644 index 0000000000..54cf5bdb62 --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordProcessorDetailsOptions.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 PaymentAttemptRecordProcessorDetailsOptions : INestedOptions + { + /// + /// Information about the custom processor used to make this refund. + /// + [JsonProperty("custom")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom")] +#endif + public PaymentAttemptRecordProcessorDetailsCustomOptions Custom { get; set; } + + /// + /// The type of the processor details. An additional hash is included on processor_details + /// with a name matching this value. It contains additional information specific to the + /// processor. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordRefundedOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordRefundedOptions.cs new file mode 100644 index 0000000000..b1f0d92db1 --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordRefundedOptions.cs @@ -0,0 +1,24 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentAttemptRecordRefundedOptions : INestedOptions + { + /// + /// When the reported refund completed. Measured in seconds since the Unix epoch. + /// + [JsonProperty("refunded_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refunded_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? RefundedAt { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportAuthenticatedOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportAuthenticatedOptions.cs new file mode 100644 index 0000000000..55201f318f --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportAuthenticatedOptions.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentAttemptRecordReportAuthenticatedOptions : BaseOptions, IHasMetadata + { + /// + /// When the reported payment was authenticated. Measured in seconds since the Unix epoch. + /// + [JsonProperty("authenticated_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authenticated_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? AuthenticatedAt { 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")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportCanceledOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportCanceledOptions.cs new file mode 100644 index 0000000000..3795f53a91 --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportCanceledOptions.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentAttemptRecordReportCanceledOptions : BaseOptions, IHasMetadata + { + /// + /// When the reported payment was canceled. Measured in seconds since the Unix epoch. + /// + [JsonProperty("canceled_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? CanceledAt { 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")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportFailedOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportFailedOptions.cs new file mode 100644 index 0000000000..fe8584261a --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportFailedOptions.cs @@ -0,0 +1,50 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentAttemptRecordReportFailedOptions : BaseOptions, IHasMetadata + { + /// + /// When the reported payment failed. Measured in seconds since the Unix epoch. + /// + [JsonProperty("failed_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failed_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? FailedAt { get; set; } + + /// + /// The failure code for this payment attempt. Must be one of + /// payment_method_customer_decline or + /// payment_method_provider_unknown_outcome. + /// One of: payment_method_customer_decline, or + /// payment_method_provider_unknown_outcome. + /// + [JsonProperty("failure_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_code")] +#endif + public string FailureCode { 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")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportGuaranteedOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportGuaranteedOptions.cs new file mode 100644 index 0000000000..cecee33be9 --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportGuaranteedOptions.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentAttemptRecordReportGuaranteedOptions : BaseOptions, IHasMetadata + { + /// + /// When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + /// + [JsonProperty("guaranteed_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("guaranteed_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? GuaranteedAt { 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")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportInformationalOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportInformationalOptions.cs new file mode 100644 index 0000000000..e72918e510 --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportInformationalOptions.cs @@ -0,0 +1,51 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentAttemptRecordReportInformationalOptions : BaseOptions, IHasMetadata + { + /// + /// Customer information for this payment. + /// + [JsonProperty("customer_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_details")] +#endif + public PaymentAttemptRecordCustomerDetailsOptions CustomerDetails { get; set; } + + /// + /// An arbitrary string attached to the object. Often useful for displaying to users. + /// + [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif + public string Description { 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")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + + /// + /// Shipping information for this payment. + /// + [JsonProperty("shipping_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_details")] +#endif + public PaymentAttemptRecordShippingDetailsOptions ShippingDetails { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportRefundOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportRefundOptions.cs new file mode 100644 index 0000000000..2b8dc55336 --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportRefundOptions.cs @@ -0,0 +1,76 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentAttemptRecordReportRefundOptions : BaseOptions, IHasMetadata + { + /// + /// A positive integer in the smallest currency unit + /// representing how much of this payment to refund. Can refund only up to the remaining, + /// unrefunded amount of the payment. + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public PaymentAttemptRecordAmountOptions Amount { get; set; } + + /// + /// When the reported refund was initiated. Measured in seconds since the Unix epoch. + /// + [JsonProperty("initiated_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("initiated_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? InitiatedAt { 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")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + + /// + /// The outcome of the reported refund. + /// + [JsonProperty("outcome")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outcome")] +#endif + public string Outcome { get; set; } + + /// + /// Processor information for this refund. + /// + [JsonProperty("processor_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("processor_details")] +#endif + public PaymentAttemptRecordProcessorDetailsOptions ProcessorDetails { get; set; } + + /// + /// Information about the payment attempt refund. + /// + [JsonProperty("refunded")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refunded")] +#endif + public PaymentAttemptRecordRefundedOptions Refunded { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordService.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordService.cs index 09524ecd85..5cfa883ea7 100644 --- a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordService.cs +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordService.cs @@ -73,5 +73,101 @@ public virtual IAsyncEnumerable ListAutoPagingAsync(Paymen { return this.ListRequestAutoPagingAsync($"/v1/payment_attempt_records", options, requestOptions, cancellationToken); } + + /// + ///

Report that the specified Payment Attempt Record was authenticated.

. + ///
+ public virtual PaymentAttemptRecord ReportAuthenticated(string id, PaymentAttemptRecordReportAuthenticatedOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/payment_attempt_records/{WebUtility.UrlEncode(id)}/report_authenticated", options, requestOptions); + } + + /// + ///

Report that the specified Payment Attempt Record was authenticated.

. + ///
+ public virtual Task ReportAuthenticatedAsync(string id, PaymentAttemptRecordReportAuthenticatedOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/payment_attempt_records/{WebUtility.UrlEncode(id)}/report_authenticated", options, requestOptions, cancellationToken); + } + + /// + ///

Report that the specified Payment Attempt Record was canceled.

. + ///
+ public virtual PaymentAttemptRecord ReportCanceled(string id, PaymentAttemptRecordReportCanceledOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/payment_attempt_records/{WebUtility.UrlEncode(id)}/report_canceled", options, requestOptions); + } + + /// + ///

Report that the specified Payment Attempt Record was canceled.

. + ///
+ public virtual Task ReportCanceledAsync(string id, PaymentAttemptRecordReportCanceledOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/payment_attempt_records/{WebUtility.UrlEncode(id)}/report_canceled", options, requestOptions, cancellationToken); + } + + /// + ///

Report that the specified Payment Attempt Record failed.

. + ///
+ public virtual PaymentAttemptRecord ReportFailed(string id, PaymentAttemptRecordReportFailedOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/payment_attempt_records/{WebUtility.UrlEncode(id)}/report_failed", options, requestOptions); + } + + /// + ///

Report that the specified Payment Attempt Record failed.

. + ///
+ public virtual Task ReportFailedAsync(string id, PaymentAttemptRecordReportFailedOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/payment_attempt_records/{WebUtility.UrlEncode(id)}/report_failed", options, requestOptions, cancellationToken); + } + + /// + ///

Report that the specified Payment Attempt Record was guaranteed.

. + ///
+ public virtual PaymentAttemptRecord ReportGuaranteed(string id, PaymentAttemptRecordReportGuaranteedOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/payment_attempt_records/{WebUtility.UrlEncode(id)}/report_guaranteed", options, requestOptions); + } + + /// + ///

Report that the specified Payment Attempt Record was guaranteed.

. + ///
+ public virtual Task ReportGuaranteedAsync(string id, PaymentAttemptRecordReportGuaranteedOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/payment_attempt_records/{WebUtility.UrlEncode(id)}/report_guaranteed", options, requestOptions, cancellationToken); + } + + /// + ///

Report informational updates on the specified Payment Attempt Record.

. + ///
+ public virtual PaymentAttemptRecord ReportInformational(string id, PaymentAttemptRecordReportInformationalOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/payment_attempt_records/{WebUtility.UrlEncode(id)}/report_informational", options, requestOptions); + } + + /// + ///

Report informational updates on the specified Payment Attempt Record.

. + ///
+ public virtual Task ReportInformationalAsync(string id, PaymentAttemptRecordReportInformationalOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/payment_attempt_records/{WebUtility.UrlEncode(id)}/report_informational", options, requestOptions, cancellationToken); + } + + /// + ///

Report that the specified Payment Attempt Record was refunded.

. + ///
+ public virtual PaymentAttemptRecord ReportRefund(string id, PaymentAttemptRecordReportRefundOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/payment_attempt_records/{WebUtility.UrlEncode(id)}/report_refund", options, requestOptions); + } + + /// + ///

Report that the specified Payment Attempt Record was refunded.

. + ///
+ public virtual Task ReportRefundAsync(string id, PaymentAttemptRecordReportRefundOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/payment_attempt_records/{WebUtility.UrlEncode(id)}/report_refund", options, requestOptions, cancellationToken); + } } } diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordShippingDetailsOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordShippingDetailsOptions.cs new file mode 100644 index 0000000000..defc3e226e --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordShippingDetailsOptions.cs @@ -0,0 +1,38 @@ +// 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 PaymentAttemptRecordShippingDetailsOptions : INestedOptions + { + /// + /// The physical shipping address. + /// + [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif + public AddressOptions Address { get; set; } + + /// + /// The shipping recipient's name. + /// + [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif + public string Name { get; set; } + + /// + /// The shipping recipient's phone number. + /// + [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif + public string Phone { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordFailedOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordFailedOptions.cs index 1706149b61..172d146733 100644 --- a/src/Stripe.net/Services/PaymentRecords/PaymentRecordFailedOptions.cs +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordFailedOptions.cs @@ -20,5 +20,18 @@ public class PaymentRecordFailedOptions : INestedOptions [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] #endif public DateTime? FailedAt { get; set; } + + /// + /// The failure code for this payment attempt. Must be one of + /// payment_method_customer_decline or + /// payment_method_provider_unknown_outcome. + /// One of: payment_method_customer_decline, or + /// payment_method_provider_unknown_outcome. + /// + [JsonProperty("failure_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_code")] +#endif + public string FailureCode { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptFailedOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptFailedOptions.cs index 15728cb66d..4dac908f95 100644 --- a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptFailedOptions.cs +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptFailedOptions.cs @@ -22,6 +22,19 @@ public class PaymentRecordReportPaymentAttemptFailedOptions : BaseOptions, IHasM #endif public DateTime? FailedAt { get; set; } + /// + /// The failure code for this payment attempt. Must be one of + /// payment_method_customer_decline or + /// payment_method_provider_unknown_outcome. + /// One of: payment_method_customer_decline, or + /// payment_method_provider_unknown_outcome. + /// + [JsonProperty("failure_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_code")] +#endif + public string FailureCode { 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/Quotes/QuoteSubscriptionDataBillingScheduleBillFromOptions.cs b/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataBillingScheduleBillFromOptions.cs index ab09b55d2e..240291f213 100644 --- a/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataBillingScheduleBillFromOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataBillingScheduleBillFromOptions.cs @@ -32,7 +32,7 @@ public class QuoteSubscriptionDataBillingScheduleBillFromOptions : INestedOption /// /// The type of method to specify the bill_from time. - /// One of: line_starts_at, now, pause_collection_start, + /// One of: line_starts_at, pause_collection_start, /// quote_acceptance_date, or timestamp. /// [JsonProperty("type")] diff --git a/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOverrideBillingScheduleBillFromOptions.cs b/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOverrideBillingScheduleBillFromOptions.cs index 5a1f3e7617..83ec03903f 100644 --- a/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOverrideBillingScheduleBillFromOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOverrideBillingScheduleBillFromOptions.cs @@ -32,7 +32,7 @@ public class QuoteSubscriptionDataOverrideBillingScheduleBillFromOptions : INest /// /// The type of method to specify the bill_from time. - /// One of: line_starts_at, now, pause_collection_start, + /// One of: line_starts_at, pause_collection_start, /// quote_acceptance_date, or timestamp. /// [JsonProperty("type")] diff --git a/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationCreateOptions.cs b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationCreateOptions.cs new file mode 100644 index 0000000000..d676608473 --- /dev/null +++ b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationCreateOptions.cs @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationCreateOptions : BaseOptions + { + /// + /// Array of context entries for the evaluation. + /// + [JsonProperty("evaluation_context")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("evaluation_context")] +#endif + public List EvaluationContext { get; set; } + + /// + /// The type of evaluation event. + /// One of: login, or registration. + /// + [JsonProperty("event_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_type")] +#endif + public string EventType { get; set; } + } +} diff --git a/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationEvaluationContextClientDetailsOptions.cs b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationEvaluationContextClientDetailsOptions.cs new file mode 100644 index 0000000000..db1d4bdd56 --- /dev/null +++ b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationEvaluationContextClientDetailsOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationEvaluationContextClientDetailsOptions : INestedOptions + { + /// + /// ID for the Radar Session associated with the customer evaluation. + /// + [JsonProperty("radar_session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("radar_session")] +#endif + public string RadarSession { get; set; } + } +} diff --git a/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationEvaluationContextCustomerDetailsCustomerDataOptions.cs b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationEvaluationContextCustomerDetailsCustomerDataOptions.cs new file mode 100644 index 0000000000..ba16d79f83 --- /dev/null +++ b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationEvaluationContextCustomerDetailsCustomerDataOptions.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationEvaluationContextCustomerDetailsCustomerDataOptions : INestedOptions + { + /// + /// Customer email. + /// + [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif + public string Email { get; set; } + + /// + /// Customer name. + /// + [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif + public string Name { get; set; } + + /// + /// Customer phone. + /// + [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif + public string Phone { get; set; } + } +} diff --git a/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationEvaluationContextCustomerDetailsOptions.cs b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationEvaluationContextCustomerDetailsOptions.cs new file mode 100644 index 0000000000..18a037dad1 --- /dev/null +++ b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationEvaluationContextCustomerDetailsOptions.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationEvaluationContextCustomerDetailsOptions : INestedOptions + { + /// + /// Stripe customer ID. + /// + [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif + public string Customer { get; set; } + + /// + /// Customer data. + /// + [JsonProperty("customer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_data")] +#endif + public CustomerEvaluationEvaluationContextCustomerDetailsCustomerDataOptions CustomerData { get; set; } + } +} diff --git a/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationEvaluationContextOptions.cs b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationEvaluationContextOptions.cs new file mode 100644 index 0000000000..9c10ab4de2 --- /dev/null +++ b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationEvaluationContextOptions.cs @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationEvaluationContextOptions : INestedOptions + { + /// + /// Client details context. + /// + [JsonProperty("client_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_details")] +#endif + public CustomerEvaluationEvaluationContextClientDetailsOptions ClientDetails { get; set; } + + /// + /// Customer details context. + /// + [JsonProperty("customer_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_details")] +#endif + public CustomerEvaluationEvaluationContextCustomerDetailsOptions CustomerDetails { get; set; } + + /// + /// The type of context entry. + /// One of: client_details, or customer_details. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationLoginFailedOptions.cs b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationLoginFailedOptions.cs new file mode 100644 index 0000000000..695710bfdb --- /dev/null +++ b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationLoginFailedOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationLoginFailedOptions : INestedOptions + { + /// + /// The reason why this login failed. + /// One of: other, or suspected_account_sharing. + /// + [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif + public string Reason { get; set; } + } +} diff --git a/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationRegistrationFailedOptions.cs b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationRegistrationFailedOptions.cs new file mode 100644 index 0000000000..247177a390 --- /dev/null +++ b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationRegistrationFailedOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationRegistrationFailedOptions : INestedOptions + { + /// + /// The reason why this registration failed. + /// One of: other, or suspected_multi_accounting. + /// + [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif + public string Reason { get; set; } + } +} diff --git a/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationRegistrationSuccessOptions.cs b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationRegistrationSuccessOptions.cs new file mode 100644 index 0000000000..56e48f6481 --- /dev/null +++ b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationRegistrationSuccessOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationRegistrationSuccessOptions : INestedOptions + { + /// + /// Stripe customer ID to attach to an entity-less registration evaluation. + /// + [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif + public string Customer { get; set; } + } +} diff --git a/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationService.cs b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationService.cs new file mode 100644 index 0000000000..5f94cbd763 --- /dev/null +++ b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationService.cs @@ -0,0 +1,60 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using System; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class CustomerEvaluationService : Service, + ICreatable, + IUpdatable + { + public CustomerEvaluationService() + { + } + + internal CustomerEvaluationService(ApiRequestor requestor) + : base(requestor) + { + } + + public CustomerEvaluationService(IStripeClient client) + : base(client) + { + } + + /// + ///

Creates a new CustomerEvaluation object.

. + ///
+ public virtual CustomerEvaluation Create(CustomerEvaluationCreateOptions options, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/radar/customer_evaluations", options, requestOptions); + } + + /// + ///

Creates a new CustomerEvaluation object.

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

Reports an event on a CustomerEvaluation object.

. + ///
+ public virtual CustomerEvaluation Update(string id, CustomerEvaluationUpdateOptions options, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/radar/customer_evaluations/{WebUtility.UrlEncode(id)}/report", options, requestOptions); + } + + /// + ///

Reports an event on a CustomerEvaluation object.

. + ///
+ public virtual Task UpdateAsync(string id, CustomerEvaluationUpdateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/radar/customer_evaluations/{WebUtility.UrlEncode(id)}/report", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationUpdateOptions.cs b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationUpdateOptions.cs new file mode 100644 index 0000000000..553f53a79b --- /dev/null +++ b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationUpdateOptions.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CustomerEvaluationUpdateOptions : BaseOptions + { + /// + /// Event payload for login_failed. + /// + [JsonProperty("login_failed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("login_failed")] +#endif + public CustomerEvaluationLoginFailedOptions LoginFailed { get; set; } + + /// + /// Event payload for registration_failed. + /// + [JsonProperty("registration_failed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registration_failed")] +#endif + public CustomerEvaluationRegistrationFailedOptions RegistrationFailed { get; set; } + + /// + /// Event payload for registration_success. + /// + [JsonProperty("registration_success")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registration_success")] +#endif + public CustomerEvaluationRegistrationSuccessOptions RegistrationSuccess { get; set; } + + /// + /// The type of event to report. + /// One of: login_failed, login_success, registration_failed, or + /// registration_success. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationAuthorizationDetailsOptions.cs b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationAuthorizationDetailsOptions.cs index 4ee44e7c5f..f6e3dea4ea 100644 --- a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationAuthorizationDetailsOptions.cs +++ b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationAuthorizationDetailsOptions.cs @@ -11,7 +11,8 @@ namespace Stripe.Radar public class IssuingAuthorizationEvaluationAuthorizationDetailsOptions : INestedOptions { /// - /// The authorization amount in the smallest currency unit. + /// The total amount of the authorization in the smallest currency unit. /// [JsonProperty("amount")] #if NET6_0_OR_GREATER @@ -20,7 +21,7 @@ public class IssuingAuthorizationEvaluationAuthorizationDetailsOptions : INested public long? Amount { get; set; } /// - /// The method used for authorization. + /// How the card details were provided. /// One of: chip, contactless, keyed_in, online, or /// swipe. /// @@ -31,7 +32,9 @@ public class IssuingAuthorizationEvaluationAuthorizationDetailsOptions : INested public string AuthorizationMethod { get; set; } /// - /// Three-letter ISO currency code in lowercase. + /// Three-letter ISO currency + /// code, in lowercase. Must be a supported + /// currency. /// [JsonProperty("currency")] #if NET6_0_OR_GREATER @@ -40,7 +43,7 @@ public class IssuingAuthorizationEvaluationAuthorizationDetailsOptions : INested public string Currency { get; set; } /// - /// The card entry mode. + /// Defines how the card's information was entered for the authorization. /// One of: contactless, contactless_magstripe, credential_on_file, /// integrated_circuit_card, magstripe, magstripe_no_cvv, /// manual, other, or unknown. @@ -52,7 +55,7 @@ public class IssuingAuthorizationEvaluationAuthorizationDetailsOptions : INested public string EntryMode { get; set; } /// - /// The raw code for the card entry mode. + /// Raw code indicating the entry mode from the network message. /// [JsonProperty("entry_mode_raw_code")] #if NET6_0_OR_GREATER @@ -61,7 +64,7 @@ public class IssuingAuthorizationEvaluationAuthorizationDetailsOptions : INested public string EntryModeRawCode { get; set; } /// - /// The time when the authorization was initiated (Unix timestamp). + /// The timestamp of the authorization initiated in seconds. /// [JsonProperty("initiated_at")] [JsonConverter(typeof(UnixDateTimeConverter))] @@ -72,7 +75,7 @@ public class IssuingAuthorizationEvaluationAuthorizationDetailsOptions : INested public DateTime? InitiatedAt { get; set; } /// - /// The point of sale condition. + /// Defines how the card was read at the point of sale. /// One of: account_verification, card_not_present, card_present, /// e_commerce, key_entered_pos, missing, moto, other, /// pin_entered, or recurring. @@ -84,7 +87,7 @@ public class IssuingAuthorizationEvaluationAuthorizationDetailsOptions : INested public string PointOfSaleCondition { get; set; } /// - /// The raw code for the point of sale condition. + /// Raw code indicating the point of sale condition from the network message. /// [JsonProperty("point_of_sale_condition_raw_code")] #if NET6_0_OR_GREATER @@ -93,7 +96,8 @@ public class IssuingAuthorizationEvaluationAuthorizationDetailsOptions : INested public string PointOfSaleConditionRawCode { get; set; } /// - /// External reference for the authorization. + /// User's specified unique ID for this authorization attempt (e.g., RRN or internal + /// reference). /// [JsonProperty("reference")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardDetailsOptions.cs b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardDetailsOptions.cs index 147ff05e95..b77e47df67 100644 --- a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardDetailsOptions.cs +++ b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardDetailsOptions.cs @@ -11,7 +11,7 @@ namespace Stripe.Radar public class IssuingAuthorizationEvaluationCardDetailsOptions : INestedOptions { /// - /// Bank Identification Number (BIN) of the card. + /// The Bank Identification Number (BIN) of the card. /// [JsonProperty("bin")] #if NET6_0_OR_GREATER @@ -20,7 +20,7 @@ public class IssuingAuthorizationEvaluationCardDetailsOptions : INestedOptions public string Bin { get; set; } /// - /// Two-letter ISO country code of the card's issuing bank. + /// The two-letter country code of the BIN issuer. /// [JsonProperty("bin_country")] #if NET6_0_OR_GREATER @@ -29,7 +29,7 @@ public class IssuingAuthorizationEvaluationCardDetailsOptions : INestedOptions public string BinCountry { get; set; } /// - /// The type of card (physical or virtual). + /// The type of the card. /// One of: physical, or virtual. /// [JsonProperty("card_type")] @@ -39,7 +39,7 @@ public class IssuingAuthorizationEvaluationCardDetailsOptions : INestedOptions public string CardType { get; set; } /// - /// The time when the card was created (Unix timestamp). + /// The timestamp when the card was created. /// [JsonProperty("created_at")] [JsonConverter(typeof(UnixDateTimeConverter))] @@ -50,7 +50,7 @@ public class IssuingAuthorizationEvaluationCardDetailsOptions : INestedOptions public DateTime? CreatedAt { get; set; } /// - /// Last 4 digits of the card number. + /// The last 4 digits of the card number. /// [JsonProperty("last4")] #if NET6_0_OR_GREATER @@ -59,7 +59,8 @@ public class IssuingAuthorizationEvaluationCardDetailsOptions : INestedOptions public string Last4 { get; set; } /// - /// External reference for the card. + /// User's specified unique ID of the card for this authorization attempt (e.g., RRN or + /// internal reference). /// [JsonProperty("reference")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardholderDetailsOptions.cs b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardholderDetailsOptions.cs index 320b81a5cd..00611557df 100644 --- a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardholderDetailsOptions.cs +++ b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCardholderDetailsOptions.cs @@ -11,7 +11,7 @@ namespace Stripe.Radar public class IssuingAuthorizationEvaluationCardholderDetailsOptions : INestedOptions { /// - /// The time when the cardholder was created (Unix timestamp). + /// The timestamp when the cardholder was created. /// [JsonProperty("created_at")] [JsonConverter(typeof(UnixDateTimeConverter))] @@ -22,7 +22,8 @@ public class IssuingAuthorizationEvaluationCardholderDetailsOptions : INestedOpt public DateTime? CreatedAt { get; set; } /// - /// External reference for the cardholder. + /// User's specified unique ID of the cardholder for this authorization attempt (e.g., RRN + /// or internal reference). /// [JsonProperty("reference")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCreateOptions.cs b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCreateOptions.cs index e520707868..975fe90035 100644 --- a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCreateOptions.cs +++ b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationCreateOptions.cs @@ -37,7 +37,8 @@ public class IssuingAuthorizationEvaluationCreateOptions : BaseOptions, IHasMeta public IssuingAuthorizationEvaluationCardholderDetailsOptions CardholderDetails { get; set; } /// - /// Details about the merchant where the authorization occurred. + /// Details about the seller (grocery store, e-commerce website, etc.) where the card + /// authorization happened. /// [JsonProperty("merchant_details")] #if NET6_0_OR_GREATER @@ -58,7 +59,7 @@ public class IssuingAuthorizationEvaluationCreateOptions : BaseOptions, IHasMeta public Dictionary Metadata { get; set; } /// - /// Details about the card network processing. + /// Details about the authorization, such as identifiers, set by the card network. /// [JsonProperty("network_details")] #if NET6_0_OR_GREATER @@ -67,7 +68,7 @@ public class IssuingAuthorizationEvaluationCreateOptions : BaseOptions, IHasMeta public IssuingAuthorizationEvaluationNetworkDetailsOptions NetworkDetails { get; set; } /// - /// Details about the token, if a tokenized payment method was used. + /// Details about the token, if a tokenized payment method was used for the authorization. /// [JsonProperty("token_details")] #if NET6_0_OR_GREATER @@ -76,7 +77,7 @@ public class IssuingAuthorizationEvaluationCreateOptions : BaseOptions, IHasMeta public IssuingAuthorizationEvaluationTokenDetailsOptions TokenDetails { get; set; } /// - /// Details about verification checks performed. + /// Details about verification data for the authorization. /// [JsonProperty("verification_details")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationMerchantDetailsOptions.cs b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationMerchantDetailsOptions.cs index 471c99845e..340b05ff6c 100644 --- a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationMerchantDetailsOptions.cs +++ b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationMerchantDetailsOptions.cs @@ -9,7 +9,7 @@ namespace Stripe.Radar public class IssuingAuthorizationEvaluationMerchantDetailsOptions : INestedOptions { /// - /// Merchant Category Code (MCC). + /// The merchant category code for the seller's business. /// [JsonProperty("category_code")] #if NET6_0_OR_GREATER @@ -18,7 +18,7 @@ public class IssuingAuthorizationEvaluationMerchantDetailsOptions : INestedOptio public string CategoryCode { get; set; } /// - /// Two-letter ISO country code of the merchant. + /// Country where the seller is located. /// [JsonProperty("country")] #if NET6_0_OR_GREATER @@ -27,7 +27,7 @@ public class IssuingAuthorizationEvaluationMerchantDetailsOptions : INestedOptio public string Country { get; set; } /// - /// Name of the merchant. + /// Name of the seller. /// [JsonProperty("name")] #if NET6_0_OR_GREATER @@ -36,7 +36,8 @@ public class IssuingAuthorizationEvaluationMerchantDetailsOptions : INestedOptio public string Name { get; set; } /// - /// Network merchant identifier. + /// Identifier assigned to the seller by the card network. Different card networks may + /// assign different network_id fields to the same merchant. /// [JsonProperty("network_id")] #if NET6_0_OR_GREATER @@ -45,7 +46,7 @@ public class IssuingAuthorizationEvaluationMerchantDetailsOptions : INestedOptio public string NetworkId { get; set; } /// - /// Terminal identifier. + /// An ID assigned by the seller to the location of the sale. /// [JsonProperty("terminal_id")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationNetworkDetailsOptions.cs b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationNetworkDetailsOptions.cs index ecbf570fb1..7c1c8f00d1 100644 --- a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationNetworkDetailsOptions.cs +++ b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationNetworkDetailsOptions.cs @@ -9,7 +9,8 @@ namespace Stripe.Radar public class IssuingAuthorizationEvaluationNetworkDetailsOptions : INestedOptions { /// - /// The acquiring institution identifier. + /// Identifier assigned to the acquirer by the card network. Sometimes this value is not + /// provided by the network; in this case, the value will be null. /// [JsonProperty("acquiring_institution_id")] #if NET6_0_OR_GREATER @@ -18,7 +19,7 @@ public class IssuingAuthorizationEvaluationNetworkDetailsOptions : INestedOption public string AcquiringInstitutionId { get; set; } /// - /// The card network that routed the authorization. + /// The card network over which Stripe received the authorization. /// One of: cirrus, interlink, maestro, mastercard, /// other, plus, or visa. /// diff --git a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationTokenDetailsOptions.cs b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationTokenDetailsOptions.cs index dda936e446..94924582dd 100644 --- a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationTokenDetailsOptions.cs +++ b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationTokenDetailsOptions.cs @@ -11,7 +11,7 @@ namespace Stripe.Radar public class IssuingAuthorizationEvaluationTokenDetailsOptions : INestedOptions { /// - /// The time when the token was created (Unix timestamp). + /// The timestamp when the network token was created. /// [JsonProperty("created_at")] [JsonConverter(typeof(UnixDateTimeConverter))] @@ -22,7 +22,8 @@ public class IssuingAuthorizationEvaluationTokenDetailsOptions : INestedOptions public DateTime? CreatedAt { get; set; } /// - /// External reference for the token. + /// User's specified unique ID of the card token for this authorization attempt (e.g., RRN + /// or internal reference). /// [JsonProperty("reference")] #if NET6_0_OR_GREATER @@ -31,7 +32,8 @@ public class IssuingAuthorizationEvaluationTokenDetailsOptions : INestedOptions public string Reference { get; set; } /// - /// The wallet provider for the tokenized payment method. + /// The digital wallet used for this transaction. One of apple_pay, + /// google_pay, or samsung_pay. /// One of: apple_pay, google_pay, or samsung_pay. /// [JsonProperty("wallet")] diff --git a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationVerificationDetailsOptions.cs b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationVerificationDetailsOptions.cs index 276af993af..bddb0cce95 100644 --- a/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationVerificationDetailsOptions.cs +++ b/src/Stripe.net/Services/Radar/IssuingAuthorizationEvaluations/IssuingAuthorizationEvaluationVerificationDetailsOptions.cs @@ -9,7 +9,7 @@ namespace Stripe.Radar public class IssuingAuthorizationEvaluationVerificationDetailsOptions : INestedOptions { /// - /// The result of 3D Secure verification. + /// The outcome of the 3D Secure authentication request. /// One of: attempt_acknowledged, authenticated, exempted, /// failed, or required. /// diff --git a/src/Stripe.net/Services/RadarService.cs b/src/Stripe.net/Services/RadarService.cs index 594ab8db70..60becda277 100644 --- a/src/Stripe.net/Services/RadarService.cs +++ b/src/Stripe.net/Services/RadarService.cs @@ -8,6 +8,7 @@ namespace Stripe public class RadarService : Service { private Radar.AccountEvaluationService accountEvaluations; + private Radar.CustomerEvaluationService customerEvaluations; private Radar.EarlyFraudWarningService earlyFraudWarnings; private Radar.IssuingAuthorizationEvaluationService issuingAuthorizationEvaluations; private Radar.PaymentEvaluationService paymentEvaluations; @@ -27,6 +28,9 @@ internal RadarService(IStripeClient client) public virtual Radar.AccountEvaluationService AccountEvaluations => this.accountEvaluations ??= new Radar.AccountEvaluationService( this.Requestor); + public virtual Radar.CustomerEvaluationService CustomerEvaluations => this.customerEvaluations ??= new Radar.CustomerEvaluationService( + this.Requestor); + public virtual Radar.EarlyFraudWarningService EarlyFraudWarnings => this.earlyFraudWarnings ??= new Radar.EarlyFraudWarningService( this.Requestor); diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsHomeRuleTaxOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsHomeRuleTaxOptions.cs new file mode 100644 index 0000000000..cbb9700abd --- /dev/null +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsHomeRuleTaxOptions.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 RegistrationCountryOptionsUsHomeRuleTaxOptions : INestedOptions + { + /// + /// 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/Services/Tax/Registrations/RegistrationCountryOptionsUsOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsOptions.cs index 755a6543db..aa6399e121 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsOptions.cs @@ -48,9 +48,9 @@ public class RegistrationCountryOptionsUsOptions : INestedOptions /// /// Type of registration to be created in the US. /// 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, + /// gross_receipts_tax, home_rule_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")] @@ -58,5 +58,14 @@ public class RegistrationCountryOptionsUsOptions : INestedOptions [STJS.JsonPropertyName("type")] #endif public string Type { get; set; } + + /// + /// Options for the home rule tax registration. + /// + [JsonProperty("home_rule_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("home_rule_tax")] +#endif + public RegistrationCountryOptionsUsHomeRuleTaxOptions HomeRuleTax { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/SharedPayment/GrantedTokens/GrantedTokenUsageLimitsOptions.cs b/src/Stripe.net/Services/TestHelpers/SharedPayment/GrantedTokens/GrantedTokenUsageLimitsOptions.cs index ec5f4496a5..ee246da6a6 100644 --- a/src/Stripe.net/Services/TestHelpers/SharedPayment/GrantedTokens/GrantedTokenUsageLimitsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/SharedPayment/GrantedTokens/GrantedTokenUsageLimitsOptions.cs @@ -41,5 +41,16 @@ public class GrantedTokenUsageLimitsOptions : INestedOptions [STJS.JsonPropertyName("max_amount")] #endif public long? MaxAmount { get; set; } + + /// + /// The recurring interval at which the shared payment token's amount usage restrictions + /// reset. + /// One of: month, week, or year. + /// + [JsonProperty("recurring_interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring_interval")] +#endif + public string RecurringInterval { get; set; } } } diff --git a/src/Stripe.net/Services/V1Services.cs b/src/Stripe.net/Services/V1Services.cs index 085d472ba0..236d09a5fa 100644 --- a/src/Stripe.net/Services/V1Services.cs +++ b/src/Stripe.net/Services/V1Services.cs @@ -52,6 +52,7 @@ public class V1Services : Service private IssuingService issuing; private MandateService mandates; private MarginService margins; + private OrchestrationService orchestration; private OrderService orders; private PaymentAttemptRecordService paymentAttemptRecords; private PaymentIntentService paymentIntents; @@ -239,6 +240,9 @@ internal V1Services(IStripeClient client) public virtual MarginService Margins => this.margins ??= new MarginService( this.Requestor); + public virtual OrchestrationService Orchestration => this.orchestration ??= new OrchestrationService( + this.Requestor); + public virtual OrderService Orders => this.orders ??= new OrderService( this.Requestor);