diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3fdaa4ab05..3108db19f2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1719 \ No newline at end of file +v1773 \ No newline at end of file diff --git a/src/Stripe.net/Constants/ApiVersion.cs b/src/Stripe.net/Constants/ApiVersion.cs index 61d1e3b660..d39a0f71a7 100644 --- a/src/Stripe.net/Constants/ApiVersion.cs +++ b/src/Stripe.net/Constants/ApiVersion.cs @@ -3,6 +3,6 @@ namespace Stripe { internal class ApiVersion { - public const string Current = "2025-04-30.preview"; + public const string Current = "2025-05-28.preview"; } } \ No newline at end of file diff --git a/src/Stripe.net/Constants/EventTypes.cs b/src/Stripe.net/Constants/EventTypes.cs index c88e85addc..ae9eee7f40 100644 --- a/src/Stripe.net/Constants/EventTypes.cs +++ b/src/Stripe.net/Constants/EventTypes.cs @@ -111,11 +111,6 @@ public static class EventTypes /// public const string BillingCreditGrantUpdated = "billing.credit_grant.updated"; - /// - /// Notifies of errors on a billing meter. - /// - public const string BillingMeterErrorReportTriggered = "billing.meter_error_report.triggered"; - /// /// Occurs when a meter is created. /// @@ -597,6 +592,11 @@ public static class EventTypes /// public const string IdentityVerificationSessionVerified = "identity.verification_session.verified"; + /// + /// Occurs when an InvoicePayment is successfully paid. + /// + public const string InvoicePaymentPaid = "invoice_payment.paid"; + /// /// Occurs whenever a new invoice is created. To learn how webhooks can be used with this /// event, and how they can affect it, see #endif public AccountSessionComponentsCapitalFinancingPromotion CapitalFinancingPromotion { get; set; } + [JsonProperty("disputes_list")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disputes_list")] +#endif + public AccountSessionComponentsDisputesList DisputesList { get; set; } + [JsonProperty("documents")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("documents")] @@ -86,6 +92,12 @@ public class AccountSessionComponents : StripeEntity #endif public AccountSessionComponentsPaymentDetails PaymentDetails { get; set; } + [JsonProperty("payment_disputes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_disputes")] +#endif + public AccountSessionComponentsPaymentDisputes PaymentDisputes { get; set; } + [JsonProperty("payments")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("payments")] diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsDisputesList.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsDisputesList.cs new file mode 100644 index 0000000000..eb05f93aa6 --- /dev/null +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsDisputesList.cs @@ -0,0 +1,26 @@ +// 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 AccountSessionComponentsDisputesList : StripeEntity + { + /// + /// Whether the embedded component is enabled. + /// + [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif + public bool Enabled { get; set; } + + [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif + public AccountSessionComponentsDisputesListFeatures Features { get; set; } + } +} diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsDisputesListFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsDisputesListFeatures.cs new file mode 100644 index 0000000000..9eab52a491 --- /dev/null +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsDisputesListFeatures.cs @@ -0,0 +1,50 @@ +// 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 AccountSessionComponentsDisputesListFeatures : StripeEntity + { + /// + /// Whether to allow capturing and cancelling payment intents. This is true by + /// default. + /// + [JsonProperty("capture_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_payments")] +#endif + public bool CapturePayments { get; set; } + + /// + /// Whether to allow connected accounts to manage destination charges that are created on + /// behalf of them. This is false by default. + /// + [JsonProperty("destination_on_behalf_of_charge_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_on_behalf_of_charge_management")] +#endif + public bool DestinationOnBehalfOfChargeManagement { get; set; } + + /// + /// Whether to allow responding to disputes, including submitting evidence and accepting + /// disputes. This is true by default. + /// + [JsonProperty("dispute_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dispute_management")] +#endif + public bool DisputeManagement { get; set; } + + /// + /// Whether to allow sending refunds. This is true by default. + /// + [JsonProperty("refund_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_management")] +#endif + public bool RefundManagement { get; set; } + } +} diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDisputes.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDisputes.cs new file mode 100644 index 0000000000..337bccbae2 --- /dev/null +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDisputes.cs @@ -0,0 +1,26 @@ +// 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 AccountSessionComponentsPaymentDisputes : StripeEntity + { + /// + /// Whether the embedded component is enabled. + /// + [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif + public bool Enabled { get; set; } + + [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif + public AccountSessionComponentsPaymentDisputesFeatures Features { get; set; } + } +} diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDisputesFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDisputesFeatures.cs new file mode 100644 index 0000000000..23e56115ef --- /dev/null +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDisputesFeatures.cs @@ -0,0 +1,40 @@ +// 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 AccountSessionComponentsPaymentDisputesFeatures : StripeEntity + { + /// + /// Whether to allow connected accounts to manage destination charges that are created on + /// behalf of them. This is false by default. + /// + [JsonProperty("destination_on_behalf_of_charge_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_on_behalf_of_charge_management")] +#endif + public bool DestinationOnBehalfOfChargeManagement { get; set; } + + /// + /// Whether to allow responding to disputes, including submitting evidence and accepting + /// disputes. This is true by default. + /// + [JsonProperty("dispute_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dispute_management")] +#endif + public bool DisputeManagement { get; set; } + + /// + /// Whether to allow sending refunds. This is true by default. + /// + [JsonProperty("refund_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_management")] +#endif + public bool RefundManagement { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs b/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs index 730ce4d626..8ee8fd41f7 100644 --- a/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs +++ b/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs @@ -533,6 +533,17 @@ public class AccountCapabilities : StripeEntity #endif public string PaytoPayments { get; set; } + /// + /// The status of the pix payments capability of the account, or whether the account can + /// directly process pix charges. + /// One of: active, inactive, or pending. + /// + [JsonProperty("pix_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix_payments")] +#endif + public string PixPayments { get; set; } + /// /// The status of the promptpay payments capability of the account, or whether the account /// can directly process promptpay charges. diff --git a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs index b8417a344a..b99409bb92 100644 --- a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs +++ b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs @@ -62,6 +62,16 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas #endif public DateTime AvailableOn { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + /// + /// The balance that this transaction impacts. + /// One of: issuing, payments, or refund_and_dispute_prefunding. + /// + [JsonProperty("balance_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_type")] +#endif + public string BalanceType { get; set; } + /// /// Time at which the object was created. Measured in seconds since the Unix epoch. /// diff --git a/src/Stripe.net/Entities/Balances/Balance.cs b/src/Stripe.net/Entities/Balances/Balance.cs index 00d97fdb2e..cf8d837827 100644 --- a/src/Stripe.net/Entities/Balances/Balance.cs +++ b/src/Stripe.net/Entities/Balances/Balance.cs @@ -90,5 +90,11 @@ public class Balance : StripeEntity, IHasObject [STJS.JsonPropertyName("pending")] #endif public List Pending { get; set; } + + [JsonProperty("refund_and_dispute_prefunding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_and_dispute_prefunding")] +#endif + public BalanceRefundAndDisputePrefunding RefundAndDisputePrefunding { get; set; } } } diff --git a/src/Stripe.net/Entities/Balances/BalanceRefundAndDisputePrefunding.cs b/src/Stripe.net/Entities/Balances/BalanceRefundAndDisputePrefunding.cs new file mode 100644 index 0000000000..9c2aa7cebd --- /dev/null +++ b/src/Stripe.net/Entities/Balances/BalanceRefundAndDisputePrefunding.cs @@ -0,0 +1,30 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class BalanceRefundAndDisputePrefunding : StripeEntity + { + /// + /// Funds that are available for use. + /// + [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif + public List Available { get; set; } + + /// + /// Funds that are pending. + /// + [JsonProperty("pending")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending")] +#endif + public List Pending { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Balances/BalanceRefundAndDisputePrefundingAvailable.cs b/src/Stripe.net/Entities/Balances/BalanceRefundAndDisputePrefundingAvailable.cs new file mode 100644 index 0000000000..09cea6e734 --- /dev/null +++ b/src/Stripe.net/Entities/Balances/BalanceRefundAndDisputePrefundingAvailable.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class BalanceRefundAndDisputePrefundingAvailable : StripeEntity + { + /// + /// Balance amount. + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public long Amount { get; set; } + + /// + /// Three-letter ISO currency + /// code, in lowercase. Must be a supported + /// currency. + /// + [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif + public string Currency { get; set; } + + [JsonProperty("source_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_types")] +#endif + public BalanceRefundAndDisputePrefundingAvailableSourceTypes SourceTypes { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Balances/BalanceRefundAndDisputePrefundingAvailableSourceTypes.cs b/src/Stripe.net/Entities/Balances/BalanceRefundAndDisputePrefundingAvailableSourceTypes.cs new file mode 100644 index 0000000000..6335e9e0d4 --- /dev/null +++ b/src/Stripe.net/Entities/Balances/BalanceRefundAndDisputePrefundingAvailableSourceTypes.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class BalanceRefundAndDisputePrefundingAvailableSourceTypes : StripeEntity + { + /// + /// Amount coming from legacy US ACH + /// payments. + /// + [JsonProperty("bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_account")] +#endif + public long BankAccount { get; set; } + + /// + /// Amount coming from most payment methods, including cards as well as non-legacy bank debits. + /// + [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif + public long Card { get; set; } + + /// + /// Amount coming from FPX, a Malaysian + /// payment method. + /// + [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif + public long Fpx { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Products/ProductProvisioningGiftCardFixedAmount.cs b/src/Stripe.net/Entities/Balances/BalanceRefundAndDisputePrefundingPending.cs similarity index 69% rename from src/Stripe.net/Entities/Products/ProductProvisioningGiftCardFixedAmount.cs rename to src/Stripe.net/Entities/Balances/BalanceRefundAndDisputePrefundingPending.cs index 689b212dca..cab6fad892 100644 --- a/src/Stripe.net/Entities/Products/ProductProvisioningGiftCardFixedAmount.cs +++ b/src/Stripe.net/Entities/Balances/BalanceRefundAndDisputePrefundingPending.cs @@ -6,10 +6,10 @@ namespace Stripe using STJS = System.Text.Json.Serialization; #endif - public class ProductProvisioningGiftCardFixedAmount : StripeEntity + public class BalanceRefundAndDisputePrefundingPending : StripeEntity { /// - /// The initial amount with which the provisioned gift card will be created. + /// Balance amount. /// [JsonProperty("amount")] #if NET6_0_OR_GREATER @@ -27,5 +27,11 @@ public class ProductProvisioningGiftCardFixedAmount : StripeEntity + { + /// + /// Amount coming from legacy US ACH + /// payments. + /// + [JsonProperty("bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_account")] +#endif + public long BankAccount { get; set; } + + /// + /// Amount coming from most payment methods, including cards as well as non-legacy bank debits. + /// + [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif + public long Card { get; set; } + + /// + /// Amount coming from FPX, a Malaysian + /// payment method. + /// + [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif + public long Fpx { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReport.cs b/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReport.cs deleted file mode 100644 index e481370e24..0000000000 --- a/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReport.cs +++ /dev/null @@ -1,77 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Billing -{ - using System; - using Newtonsoft.Json; - using Stripe.Infrastructure; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class MeterErrorReport : StripeEntity, IHasId, IHasObject - { - /// - /// Unique identifier for the object. - /// - [JsonProperty("id")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("id")] -#endif - public string Id { get; set; } - - /// - /// String representing the object's type. Objects of the same type share the same value. - /// - [JsonProperty("object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("object")] -#endif - public string Object { get; set; } - - [JsonProperty("reason")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("reason")] -#endif - public MeterErrorReportReason Reason { get; set; } - - /// - /// The related objects about the error. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - public MeterErrorReportRelatedObject RelatedObject { get; set; } - - /// - /// Summary of invalid events. - /// - [JsonProperty("summary")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("summary")] -#endif - public string Summary { get; set; } - - /// - /// Time when validation ended. Measured in seconds since the Unix epoch. - /// - [JsonProperty("validation_end")] - [JsonConverter(typeof(UnixDateTimeConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("validation_end")] - [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] -#endif - public DateTime ValidationEnd { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; - - /// - /// Time when validation started. Measured in seconds since the Unix epoch. - /// - [JsonProperty("validation_start")] - [JsonConverter(typeof(UnixDateTimeConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("validation_start")] - [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] -#endif - public DateTime ValidationStart { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; - } -} diff --git a/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportReason.cs b/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportReason.cs deleted file mode 100644 index 2d82185453..0000000000 --- a/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportReason.cs +++ /dev/null @@ -1,30 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Billing -{ - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class MeterErrorReportReason : StripeEntity - { - /// - /// The number of errors generated. - /// - [JsonProperty("error_count")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("error_count")] -#endif - public long ErrorCount { get; set; } - - /// - /// More information about errors. - /// - [JsonProperty("error_types")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("error_types")] -#endif - public List ErrorTypes { get; set; } - } -} diff --git a/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportReasonErrorType.cs b/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportReasonErrorType.cs deleted file mode 100644 index 093e3e901b..0000000000 --- a/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportReasonErrorType.cs +++ /dev/null @@ -1,18 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Billing -{ - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class MeterErrorReportReasonErrorType : StripeEntity - { - [JsonProperty("sample_errors")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("sample_errors")] -#endif - public List SampleErrors { get; set; } - } -} diff --git a/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportReasonErrorTypeSampleError.cs b/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportReasonErrorTypeSampleError.cs deleted file mode 100644 index 260657aab2..0000000000 --- a/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportReasonErrorTypeSampleError.cs +++ /dev/null @@ -1,26 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Billing -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class MeterErrorReportReasonErrorTypeSampleError : StripeEntity - { - [JsonProperty("api_request")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("api_request")] -#endif - public MeterErrorReportReasonErrorTypeSampleErrorApiRequest ApiRequest { get; set; } - - /// - /// message of the error. - /// - [JsonProperty("error_message")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("error_message")] -#endif - public string ErrorMessage { get; set; } - } -} diff --git a/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportRelatedObject.cs b/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportRelatedObject.cs deleted file mode 100644 index 331c12f409..0000000000 --- a/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportRelatedObject.cs +++ /dev/null @@ -1,38 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Billing -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class MeterErrorReportRelatedObject : StripeEntity, IHasId, IHasObject - { - /// - /// Unique identifier for the object. - /// - [JsonProperty("id")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("id")] -#endif - public string Id { get; set; } - - /// - /// The type of meter error related object. Should be 'meter'. - /// - [JsonProperty("object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("object")] -#endif - public string Object { get; set; } - - /// - /// The url of the meter object. - /// - [JsonProperty("url")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("url")] -#endif - public string Url { get; set; } - } -} diff --git a/src/Stripe.net/Entities/Capabilities/CapabilityRequirements.cs b/src/Stripe.net/Entities/Capabilities/CapabilityRequirements.cs index bc6d40266f..2c0b1eac5b 100644 --- a/src/Stripe.net/Entities/Capabilities/CapabilityRequirements.cs +++ b/src/Stripe.net/Entities/Capabilities/CapabilityRequirements.cs @@ -22,9 +22,11 @@ public class CapabilityRequirements : StripeEntity public List Alternatives { get; set; } /// - /// Date by which the fields in currently_due must be collected to keep the - /// capability enabled for the account. These fields may disable the capability sooner if - /// the next threshold is reached before they are collected. + /// The date by which all required account information must be both submitted and verified. + /// This includes fields listed in currently_due as well as those in + /// pending_verification. If any required information is missing or unverified by + /// this date, the account may be disabled. Note that current_deadline may change if + /// additional currently_due requirements are requested. /// [JsonProperty("current_deadline")] [JsonConverter(typeof(UnixDateTimeConverter))] diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAffirm.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAffirm.cs index e26fe02920..7e5bff8f9b 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAffirm.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAffirm.cs @@ -8,6 +8,26 @@ namespace Stripe public class ChargePaymentMethodDetailsAffirm : StripeEntity { + /// + /// ID of the location that + /// this transaction's reader is assigned to. + /// + [JsonProperty("location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("location")] +#endif + public string Location { get; set; } + + /// + /// ID of the reader this + /// transaction was made on. + /// + [JsonProperty("reader")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reader")] +#endif + public string Reader { get; set; } + /// /// The Affirm transaction ID associated with this payment. /// diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsWechatPay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsWechatPay.cs index efa2b505fb..e3a4f12053 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsWechatPay.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsWechatPay.cs @@ -18,6 +18,26 @@ public class ChargePaymentMethodDetailsWechatPay : StripeEntity + /// ID of the location that + /// this transaction's reader is assigned to. + /// + [JsonProperty("location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("location")] +#endif + public string Location { get; set; } + + /// + /// ID of the reader this + /// transaction was made on. + /// + [JsonProperty("reader")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reader")] +#endif + public string Reader { get; set; } + /// /// Transaction ID of this particular WeChat Pay transaction. /// diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsNaverPay.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsNaverPay.cs index 6ab99a48b0..2e3eced32c 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsNaverPay.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsNaverPay.cs @@ -16,5 +16,32 @@ public class SessionPaymentMethodOptionsNaverPay : StripeEntity + /// Indicates that you intend to make future payments with this PaymentIntent's payment + /// method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + /// the Customer after the PaymentIntent is confirmed and the customer completes any + /// required actions. If you don't provide a Customer, you can still attach the payment method to a + /// Customer after the transaction completes. + /// + /// If the payment method is card_present and isn't a digital wallet, Stripe creates + /// and attaches a generated_card + /// payment method representing the card to the Customer instead. + /// + /// When processing card payments, Stripe uses setup_future_usage to help you comply + /// with regional legislation and network rules, such as SCA. + /// One of: none, or off_session. + /// + [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif + public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/CreditNotes/CreditNote.cs b/src/Stripe.net/Entities/CreditNotes/CreditNote.cs index 52973bafa1..6b224e3b80 100644 --- a/src/Stripe.net/Entities/CreditNotes/CreditNote.cs +++ b/src/Stripe.net/Entities/CreditNotes/CreditNote.cs @@ -310,12 +310,20 @@ public Invoice Invoice #endif public string Pdf { get; set; } + /// + /// The amount of the credit note that was refunded to the customer, credited to the + /// customer's balance, credited outside of Stripe, or any combination thereof. + /// [JsonProperty("post_payment_amount")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("post_payment_amount")] #endif public long PostPaymentAmount { get; set; } + /// + /// The amount of the credit note by which the invoice's amount_remaining and + /// amount_due were reduced. + /// [JsonProperty("pre_payment_amount")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("pre_payment_amount")] @@ -426,7 +434,7 @@ public Invoice Invoice /// Type of this credit note, one of pre_payment or post_payment. A /// pre_payment credit note means it was issued when the invoice was open. A /// post_payment credit note means it was issued when the invoice was paid. - /// One of: post_payment, or pre_payment. + /// One of: mixed, post_payment, or pre_payment. /// [JsonProperty("type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Disputes/Dispute.cs b/src/Stripe.net/Entities/Disputes/Dispute.cs index 7d025a3db0..049d0001f2 100644 --- a/src/Stripe.net/Entities/Disputes/Dispute.cs +++ b/src/Stripe.net/Entities/Disputes/Dispute.cs @@ -235,7 +235,7 @@ public PaymentIntent PaymentIntent /// Reason given by cardholder for dispute. Possible values are bank_cannot_process, /// check_returned, credit_not_processed, customer_initiated, /// debit_not_authorized, duplicate, fraudulent, general, - /// incorrect_account_details, insufficient_funds, + /// incorrect_account_details, insufficient_funds, noncompliant, /// product_not_received, product_unacceptable, subscription_canceled, /// or unrecognized. Learn more about dispute reasons. diff --git a/src/Stripe.net/Entities/Events/Event.cs b/src/Stripe.net/Entities/Events/Event.cs index 323f867dd8..a31d531e20 100644 --- a/src/Stripe.net/Entities/Events/Event.cs +++ b/src/Stripe.net/Entities/Events/Event.cs @@ -81,6 +81,9 @@ public class Event : StripeEntity, IHasId, IHasObject #endif public string ApiVersion { get; set; } + /// + /// Authentication context needed to fetch the event or related object. + /// [JsonProperty("context")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("context")] @@ -154,7 +157,6 @@ public class Event : StripeEntity, IHasId, IHasObject /// application_fee.created, application_fee.refund.updated, /// application_fee.refunded, balance.available, /// balance_settings.updated, billing.alert.triggered, - /// billing.meter_error_report.triggered, /// billing_portal.configuration.created, /// billing_portal.configuration.updated, billing_portal.session.created, /// capability.updated, capital.financing_offer.accepted, @@ -213,14 +215,15 @@ public class Event : StripeEntity, IHasId, IHasObject /// invoice.payment_action_required, invoice.payment_attempt_required, /// invoice.payment_failed, invoice.payment_succeeded, invoice.sent, /// invoice.upcoming, invoice.updated, invoice.voided, - /// invoice.will_be_due, invoiceitem.created, invoiceitem.deleted, - /// issuing_authorization.created, issuing_authorization.request, - /// issuing_authorization.updated, issuing_card.created, - /// issuing_card.updated, issuing_cardholder.created, - /// issuing_cardholder.updated, issuing_dispute.closed, - /// issuing_dispute.created, issuing_dispute.funds_reinstated, - /// issuing_dispute.funds_rescinded, issuing_dispute.submitted, - /// issuing_dispute.updated, issuing_dispute_settlement_detail.created, + /// invoice.will_be_due, invoice_payment.paid, invoiceitem.created, + /// invoiceitem.deleted, issuing_authorization.created, + /// issuing_authorization.request, issuing_authorization.updated, + /// issuing_card.created, issuing_card.updated, + /// issuing_cardholder.created, issuing_cardholder.updated, + /// issuing_dispute.closed, issuing_dispute.created, + /// issuing_dispute.funds_reinstated, issuing_dispute.funds_rescinded, + /// issuing_dispute.submitted, issuing_dispute.updated, + /// issuing_dispute_settlement_detail.created, /// issuing_dispute_settlement_detail.updated, /// issuing_fraud_liability_debit.created, /// issuing_personalization_design.activated, diff --git a/src/Stripe.net/Entities/FinancialConnections/Accounts/Account.cs b/src/Stripe.net/Entities/FinancialConnections/Accounts/Account.cs index 23e529e7b1..516249c792 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Accounts/Account.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Accounts/Account.cs @@ -103,6 +103,49 @@ public class Account : StripeEntity, IHasId, IHasObject #endif public AccountInferredBalancesRefresh InferredBalancesRefresh { get; set; } + #region Expandable Institution + + /// + /// (ID of the Institution) + /// The ID of the Financial Connections Institution this account belongs to. Note that this + /// relationship may sometimes change in rare circumstances (e.g. institution mergers). + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public string InstitutionId + { + get => this.InternalInstitution?.Id; + set => this.InternalInstitution = SetExpandableFieldId(value, this.InternalInstitution); + } + + /// + /// (Expanded) + /// The ID of the Financial Connections Institution this account belongs to. Note that this + /// relationship may sometimes change in rare circumstances (e.g. institution mergers). + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public Institution Institution + { + get => this.InternalInstitution?.ExpandedObject; + set => this.InternalInstitution = SetExpandableFieldObject(value, this.InternalInstitution); + } + + [JsonProperty("institution")] + [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("institution")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif + internal ExpandableField InternalInstitution { get; set; } + #endregion + /// /// The name of the institution that holds this account. /// diff --git a/src/Stripe.net/Entities/FinancialConnections/Institutions/Institution.cs b/src/Stripe.net/Entities/FinancialConnections/Institutions/Institution.cs index 4d81135603..c528e6c07c 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Institutions/Institution.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Institutions/Institution.cs @@ -31,6 +31,15 @@ public class Institution : StripeEntity, IHasId, IHasObject #endif public string Object { get; set; } + /// + /// The list of countries supported by this institution, formatted as ISO country codes. + /// + [JsonProperty("countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("countries")] +#endif + public List Countries { get; set; } + [JsonProperty("features")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("features")] diff --git a/src/Stripe.net/Entities/GiftCards/Cards/Card.cs b/src/Stripe.net/Entities/GiftCards/Cards/Card.cs deleted file mode 100644 index b2839d9181..0000000000 --- a/src/Stripe.net/Entities/GiftCards/Cards/Card.cs +++ /dev/null @@ -1,123 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using System; - using System.Collections.Generic; - using Newtonsoft.Json; - using Stripe.Infrastructure; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// A gift card represents a single gift card owned by a customer, including the remaining - /// balance, gift card code, and whether or not it is active. - /// - public class Card : StripeEntity, IHasId, IHasMetadata, 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; } - - /// - /// Whether this gift card can be used or not. - /// - [JsonProperty("active")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("active")] -#endif - public bool Active { get; set; } - - /// - /// The amount of funds available for new transactions. - /// - [JsonProperty("amount_available")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount_available")] -#endif - public long AmountAvailable { get; set; } - - /// - /// The amount of funds marked as held. - /// - [JsonProperty("amount_held")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount_held")] -#endif - public long AmountHeld { get; set; } - - /// - /// Code used to redeem this gift card. - /// - [JsonProperty("code")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("code")] -#endif - public string Code { 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 related Stripe objects that created this gift card. - /// - [JsonProperty("created_by")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created_by")] -#endif - public CardCreatedBy CreatedBy { get; set; } - - /// - /// Three-letter ISO currency - /// code, in lowercase. Must be a supported - /// currency. - /// - [JsonProperty("currency")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("currency")] -#endif - public string Currency { get; set; } - - /// - /// Set of key-value pairs that you can - /// attach to an object. This can be useful for storing additional information about the - /// object in a structured format. - /// - [JsonProperty("metadata")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("metadata")] -#endif - public Dictionary Metadata { get; set; } - - /// - /// Transactions on this gift card. - /// - [JsonProperty("transactions")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("transactions")] -#endif - public StripeList Transactions { get; set; } - } -} diff --git a/src/Stripe.net/Entities/GiftCards/Cards/CardCreatedBy.cs b/src/Stripe.net/Entities/GiftCards/Cards/CardCreatedBy.cs deleted file mode 100644 index 3d0bf924f7..0000000000 --- a/src/Stripe.net/Entities/GiftCards/Cards/CardCreatedBy.cs +++ /dev/null @@ -1,39 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class CardCreatedBy : StripeEntity - { - [JsonProperty("checkout")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("checkout")] -#endif - public CardCreatedByCheckout Checkout { get; set; } - - [JsonProperty("order")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("order")] -#endif - public CardCreatedByOrder Order { get; set; } - - [JsonProperty("payment")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("payment")] -#endif - public CardCreatedByPayment Payment { get; set; } - - /// - /// The type of event that created this object. - /// One of: checkout, order, or payment. - /// - [JsonProperty("type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("type")] -#endif - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Entities/GiftCards/Cards/CardCreatedByCheckout.cs b/src/Stripe.net/Entities/GiftCards/Cards/CardCreatedByCheckout.cs deleted file mode 100644 index 02771ac1f0..0000000000 --- a/src/Stripe.net/Entities/GiftCards/Cards/CardCreatedByCheckout.cs +++ /dev/null @@ -1,29 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class CardCreatedByCheckout : StripeEntity - { - /// - /// The Stripe CheckoutSession that created this object. - /// - [JsonProperty("checkout_session")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("checkout_session")] -#endif - public string CheckoutSession { get; set; } - - /// - /// The Stripe CheckoutSession LineItem that created this object. - /// - [JsonProperty("line_item")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("line_item")] -#endif - public string LineItem { get; set; } - } -} diff --git a/src/Stripe.net/Entities/GiftCards/Cards/CardCreatedByOrder.cs b/src/Stripe.net/Entities/GiftCards/Cards/CardCreatedByOrder.cs deleted file mode 100644 index 7ca9ad09b3..0000000000 --- a/src/Stripe.net/Entities/GiftCards/Cards/CardCreatedByOrder.cs +++ /dev/null @@ -1,29 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class CardCreatedByOrder : StripeEntity - { - /// - /// The Stripe Order LineItem that created this object. - /// - [JsonProperty("line_item")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("line_item")] -#endif - public string LineItem { get; set; } - - /// - /// The Stripe Order that created this object. - /// - [JsonProperty("order")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("order")] -#endif - public string Order { get; set; } - } -} diff --git a/src/Stripe.net/Entities/GiftCards/Cards/CardCreatedByPayment.cs b/src/Stripe.net/Entities/GiftCards/Cards/CardCreatedByPayment.cs deleted file mode 100644 index a10b10ce89..0000000000 --- a/src/Stripe.net/Entities/GiftCards/Cards/CardCreatedByPayment.cs +++ /dev/null @@ -1,20 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class CardCreatedByPayment : StripeEntity - { - /// - /// The PaymentIntent that created this object. - /// - [JsonProperty("payment_intent")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("payment_intent")] -#endif - public string PaymentIntent { get; set; } - } -} diff --git a/src/Stripe.net/Entities/GiftCards/Transactions/Transaction.cs b/src/Stripe.net/Entities/GiftCards/Transactions/Transaction.cs deleted file mode 100644 index d132d071b1..0000000000 --- a/src/Stripe.net/Entities/GiftCards/Transactions/Transaction.cs +++ /dev/null @@ -1,143 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using System; - using System.Collections.Generic; - using Newtonsoft.Json; - using Stripe.Infrastructure; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// A gift card transaction represents a single transaction on a referenced gift card. A - /// transaction is in one of three states, confirmed, held or canceled. - /// A confirmed transaction is one that has added/deducted funds. A held - /// transaction has created a temporary hold on funds, which can then be cancelled or - /// confirmed. A held transaction can be confirmed into a confirmed - /// transaction, or canceled into a canceled transaction. A canceled - /// transaction has no effect on a gift card's balance. - /// - public class Transaction : StripeEntity, IHasId, IHasMetadata, 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; } - - /// - /// The amount of this transaction. A positive value indicates that funds were added to the - /// gift card. A negative value indicates that funds were removed from the gift card. - /// - [JsonProperty("amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount")] -#endif - public long? Amount { get; set; } - - /// - /// Time at which the transaction was confirmed. Measured in seconds since the Unix epoch. - /// - [JsonProperty("confirmed_at")] - [JsonConverter(typeof(UnixDateTimeConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("confirmed_at")] - [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] -#endif - public DateTime? ConfirmedAt { 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; } - - /// - /// The related Stripe objects that created this gift card transaction. - /// - [JsonProperty("created_by")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created_by")] -#endif - public TransactionCreatedBy CreatedBy { get; set; } - - /// - /// Three-letter ISO currency - /// code, in lowercase. Must be a supported - /// currency. - /// - [JsonProperty("currency")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("currency")] -#endif - public string Currency { get; set; } - - /// - /// 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; } - - /// - /// The gift card that this transaction occurred on. - /// - [JsonProperty("gift_card")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("gift_card")] -#endif - public string GiftCard { get; set; } - - /// - /// Set of key-value pairs that you can - /// attach to an object. This can be useful for storing additional information about the - /// object in a structured format. - /// - [JsonProperty("metadata")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("metadata")] -#endif - public Dictionary Metadata { get; set; } - - /// - /// Status of this transaction, one of held, confirmed, or canceled. - /// One of: canceled, confirmed, held, or invalid. - /// - [JsonProperty("status")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("status")] -#endif - public string Status { get; set; } - - /// - /// A string that identifies this transaction as part of a group. See the Connect - /// documentation for details. - /// - [JsonProperty("transfer_group")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("transfer_group")] -#endif - public string TransferGroup { get; set; } - } -} diff --git a/src/Stripe.net/Entities/GiftCards/Transactions/TransactionCreatedBy.cs b/src/Stripe.net/Entities/GiftCards/Transactions/TransactionCreatedBy.cs deleted file mode 100644 index dbdad57361..0000000000 --- a/src/Stripe.net/Entities/GiftCards/Transactions/TransactionCreatedBy.cs +++ /dev/null @@ -1,39 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class TransactionCreatedBy : StripeEntity - { - [JsonProperty("checkout")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("checkout")] -#endif - public TransactionCreatedByCheckout Checkout { get; set; } - - [JsonProperty("order")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("order")] -#endif - public TransactionCreatedByOrder Order { get; set; } - - [JsonProperty("payment")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("payment")] -#endif - public TransactionCreatedByPayment Payment { get; set; } - - /// - /// The type of event that created this object. - /// One of: checkout, order, or payment. - /// - [JsonProperty("type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("type")] -#endif - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Entities/GiftCards/Transactions/TransactionCreatedByCheckout.cs b/src/Stripe.net/Entities/GiftCards/Transactions/TransactionCreatedByCheckout.cs deleted file mode 100644 index 3bc6d41343..0000000000 --- a/src/Stripe.net/Entities/GiftCards/Transactions/TransactionCreatedByCheckout.cs +++ /dev/null @@ -1,29 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class TransactionCreatedByCheckout : StripeEntity - { - /// - /// The Stripe CheckoutSession that created this object. - /// - [JsonProperty("checkout_session")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("checkout_session")] -#endif - public string CheckoutSession { get; set; } - - /// - /// The Stripe CheckoutSession LineItem that created this object. - /// - [JsonProperty("line_item")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("line_item")] -#endif - public string LineItem { get; set; } - } -} diff --git a/src/Stripe.net/Entities/GiftCards/Transactions/TransactionCreatedByOrder.cs b/src/Stripe.net/Entities/GiftCards/Transactions/TransactionCreatedByOrder.cs deleted file mode 100644 index 1856c60d32..0000000000 --- a/src/Stripe.net/Entities/GiftCards/Transactions/TransactionCreatedByOrder.cs +++ /dev/null @@ -1,29 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class TransactionCreatedByOrder : StripeEntity - { - /// - /// The Stripe Order LineItem that created this object. - /// - [JsonProperty("line_item")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("line_item")] -#endif - public string LineItem { get; set; } - - /// - /// The Stripe Order that created this object. - /// - [JsonProperty("order")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("order")] -#endif - public string Order { get; set; } - } -} diff --git a/src/Stripe.net/Entities/GiftCards/Transactions/TransactionCreatedByPayment.cs b/src/Stripe.net/Entities/GiftCards/Transactions/TransactionCreatedByPayment.cs deleted file mode 100644 index 4c9c7e418f..0000000000 --- a/src/Stripe.net/Entities/GiftCards/Transactions/TransactionCreatedByPayment.cs +++ /dev/null @@ -1,20 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class TransactionCreatedByPayment : StripeEntity - { - /// - /// The PaymentIntent that created this object. - /// - [JsonProperty("payment_intent")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("payment_intent")] -#endif - public string PaymentIntent { get; set; } - } -} diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocument.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocument.cs index 70def1394a..9c63c2a6b9 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocument.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocument.cs @@ -100,6 +100,16 @@ public class VerificationReportDocument : StripeEntity + /// Sex of the person in the document. + /// One of: [redacted], female, male, or unknown. + /// + [JsonProperty("sex")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sex")] +#endif + public string Sex { get; set; } + /// /// Status of this document check. /// One of: unverified, or verified. @@ -119,5 +129,23 @@ public class VerificationReportDocument : StripeEntity + /// Place of birth as it appears in the document. + /// + [JsonProperty("unparsed_place_of_birth")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unparsed_place_of_birth")] +#endif + public string UnparsedPlaceOfBirth { get; set; } + + /// + /// Sex as it appears in the document. + /// + [JsonProperty("unparsed_sex")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unparsed_sex")] +#endif + public string UnparsedSex { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionVerifiedOutputs.cs b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionVerifiedOutputs.cs index 52bae6219c..4377e70d7c 100644 --- a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionVerifiedOutputs.cs +++ b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionVerifiedOutputs.cs @@ -80,5 +80,33 @@ public class VerificationSessionVerifiedOutputs : StripeEntity + /// The user's verified sex. + /// One of: [redacted], female, male, or unknown. + /// + [JsonProperty("sex")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sex")] +#endif + public string Sex { get; set; } + + /// + /// The user's verified place of birth as it appears in the document. + /// + [JsonProperty("unparsed_place_of_birth")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unparsed_place_of_birth")] +#endif + public string UnparsedPlaceOfBirth { get; set; } + + /// + /// The user's verified sex as it appears in the document. + /// + [JsonProperty("unparsed_sex")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unparsed_sex")] +#endif + public string UnparsedSex { get; set; } } } diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs index 4909dede73..c87daa3745 100644 --- a/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs @@ -309,7 +309,7 @@ public List Margins public Dictionary Metadata { get; set; } /// - /// The parent that generated this invoice. + /// The parent that generated this invoice item. /// [JsonProperty("parent")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItem.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItem.cs index 8cccea74fa..e5cdf4c48d 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItem.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItem.cs @@ -215,7 +215,7 @@ public List Margins public Dictionary Metadata { get; set; } /// - /// The parent that generated this invoice. + /// The parent that generated this line item. /// [JsonProperty("parent")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/InvoicePayments/InvoicePayment.cs b/src/Stripe.net/Entities/InvoicePayments/InvoicePayment.cs index d7a96912c2..8ff1f73267 100644 --- a/src/Stripe.net/Entities/InvoicePayments/InvoicePayment.cs +++ b/src/Stripe.net/Entities/InvoicePayments/InvoicePayment.cs @@ -9,7 +9,14 @@ namespace Stripe #endif /// - /// The invoice payment object. + /// Invoice Payments represent payments made against invoices. Invoice Payments can be + /// accessed in two ways: 1. By expanding the payments field on the Invoice resource. 2. By using the Invoice + /// Payment retrieve and list endpoints. + /// + /// Invoice Payments include the mapping between payment objects, such as Payment Intent, + /// and Invoices. This resource and its endpoints allows you to easily track if a payment is + /// associated with a specific invoice and monitor the allocation details of the payments. /// #if NET6_0_OR_GREATER [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] diff --git a/src/Stripe.net/Entities/InvoicePayments/InvoicePaymentPayment.cs b/src/Stripe.net/Entities/InvoicePayments/InvoicePaymentPayment.cs index 08a56b2b0a..51e078c47a 100644 --- a/src/Stripe.net/Entities/InvoicePayments/InvoicePaymentPayment.cs +++ b/src/Stripe.net/Entities/InvoicePayments/InvoicePaymentPayment.cs @@ -16,7 +16,10 @@ public class InvoicePaymentPayment : StripeEntity /// /// (ID of the Charge) - /// ID of the successful charge for this payment when type is charge. + /// ID of the successful charge for this payment when type is charge.Note: + /// charge is only surfaced if the charge object is not associated with a payment intent. If + /// the charge object does have a payment intent, the Invoice Payment surfaces the payment + /// intent instead. /// [JsonIgnore] #if NET6_0_OR_GREATER @@ -30,7 +33,10 @@ public string ChargeId /// /// (Expanded) - /// ID of the successful charge for this payment when type is charge. + /// ID of the successful charge for this payment when type is charge.Note: + /// charge is only surfaced if the charge object is not associated with a payment intent. If + /// the charge object does have a payment intent, the Invoice Payment surfaces the payment + /// intent instead. /// /// For more information, see the expand documentation. /// diff --git a/src/Stripe.net/Entities/Invoices/Invoice.cs b/src/Stripe.net/Entities/Invoices/Invoice.cs index 1e06cef3ff..702b556528 100644 --- a/src/Stripe.net/Entities/Invoices/Invoice.cs +++ b/src/Stripe.net/Entities/Invoices/Invoice.cs @@ -51,10 +51,9 @@ namespace Stripe public class Invoice : StripeEntity, IHasId, IHasMetadata, IHasObject { /// - /// Unique identifier for the object. This property is always present unless the invoice is - /// an upcoming invoice. See Retrieve an upcoming invoice - /// for more details. + /// Unique identifier for the object. For preview invoices created using the create preview endpoint, + /// this id will be prefixed with upcoming_in. /// [JsonProperty("id")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Orders/Order.cs b/src/Stripe.net/Entities/Orders/Order.cs index d8e66c17e1..9dc99715ab 100644 --- a/src/Stripe.net/Entities/Orders/Order.cs +++ b/src/Stripe.net/Entities/Orders/Order.cs @@ -40,12 +40,6 @@ public class Order : StripeEntity, IHasId, IHasMetadata, IHasObject #endif public string Object { get; set; } - [JsonProperty("amount_remaining")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount_remaining")] -#endif - public long AmountRemaining { get; set; } - /// /// Order cost before any discounts or taxes are applied. A positive integer representing /// the subtotal of the order in the - /// The credits applied to the Order. At most 10 credits can be applied to an Order. - /// - [JsonProperty("credits")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("credits")] -#endif - public List Credits { get; set; } - /// /// Three-letter ISO currency /// code, in lowercase. Must be a supported diff --git a/src/Stripe.net/Entities/Orders/OrderCredit.cs b/src/Stripe.net/Entities/Orders/OrderCredit.cs deleted file mode 100644 index 48424388d7..0000000000 --- a/src/Stripe.net/Entities/Orders/OrderCredit.cs +++ /dev/null @@ -1,48 +0,0 @@ -// 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 OrderCredit : StripeEntity - { - /// - /// The amount of this credit to apply to the order. - /// - [JsonProperty("amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount")] -#endif - public long Amount { get; set; } - - /// - /// Details for a gift card. - /// - [JsonProperty("gift_card")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("gift_card")] -#endif - public OrderCreditGiftCard GiftCard { get; set; } - - /// - /// Line items on this order that are ineligible for this credit. - /// - [JsonProperty("ineligible_line_items")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("ineligible_line_items")] -#endif - public List IneligibleLineItems { get; set; } - - /// - /// The type of credit to apply to the order, only gift_card currently supported. - /// - [JsonProperty("type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("type")] -#endif - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Entities/Orders/OrderCreditGiftCard.cs b/src/Stripe.net/Entities/Orders/OrderCreditGiftCard.cs deleted file mode 100644 index 576c3d1a34..0000000000 --- a/src/Stripe.net/Entities/Orders/OrderCreditGiftCard.cs +++ /dev/null @@ -1,20 +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 OrderCreditGiftCard : StripeEntity - { - /// - /// The token of the gift card applied to the order. - /// - [JsonProperty("card")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("card")] -#endif - public string Card { get; set; } - } -} diff --git a/src/Stripe.net/Entities/Orders/OrderTotalDetails.cs b/src/Stripe.net/Entities/Orders/OrderTotalDetails.cs index f485092ff6..5793cfe9dc 100644 --- a/src/Stripe.net/Entities/Orders/OrderTotalDetails.cs +++ b/src/Stripe.net/Entities/Orders/OrderTotalDetails.cs @@ -8,12 +8,6 @@ namespace Stripe public class OrderTotalDetails : StripeEntity { - [JsonProperty("amount_credit")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount_credit")] -#endif - public long AmountCredit { get; set; } - /// /// This is the sum of all the discounts. /// diff --git a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsAffirm.cs b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsAffirm.cs index cb02c095bb..92a2f41a54 100644 --- a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsAffirm.cs +++ b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsAffirm.cs @@ -8,6 +8,26 @@ namespace Stripe public class PaymentAttemptRecordPaymentMethodDetailsAffirm : StripeEntity { + /// + /// ID of the location that + /// this transaction's reader is assigned to. + /// + [JsonProperty("location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("location")] +#endif + public string Location { get; set; } + + /// + /// ID of the reader this + /// transaction was made on. + /// + [JsonProperty("reader")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reader")] +#endif + public string Reader { get; set; } + /// /// The Affirm transaction ID associated with this payment. /// diff --git a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsWechatPay.cs b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsWechatPay.cs index 585613664d..0ead641a86 100644 --- a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsWechatPay.cs +++ b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsWechatPay.cs @@ -18,6 +18,26 @@ public class PaymentAttemptRecordPaymentMethodDetailsWechatPay : StripeEntity + /// ID of the location that + /// this transaction's reader is assigned to. + /// + [JsonProperty("location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("location")] +#endif + public string Location { get; set; } + + /// + /// ID of the reader this + /// transaction was made on. + /// + [JsonProperty("reader")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reader")] +#endif + public string Reader { get; set; } + /// /// Transaction ID of this particular WeChat Pay transaction. /// diff --git a/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptions.cs b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptions.cs index 0c1ee02958..0016369092 100644 --- a/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptions.cs @@ -14,6 +14,12 @@ public class PaymentIntentAmountDetailsLineItemPaymentMethodOptions : StripeEnti #endif public PaymentIntentAmountDetailsLineItemPaymentMethodOptionsCard Card { get; set; } + [JsonProperty("card_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_present")] +#endif + public PaymentIntentAmountDetailsLineItemPaymentMethodOptionsCardPresent CardPresent { get; set; } + [JsonProperty("klarna")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("klarna")] diff --git a/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsCardPresent.cs b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsCardPresent.cs new file mode 100644 index 0000000000..75230f4a68 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsCardPresent.cs @@ -0,0 +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 PaymentIntentAmountDetailsLineItemPaymentMethodOptionsCardPresent : StripeEntity + { + [JsonProperty("commodity_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("commodity_code")] +#endif + public string CommodityCode { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs index 7fbefc74c0..860f92d3e2 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs @@ -141,12 +141,6 @@ public Application Application #endif public long? ApplicationFeeAmount { get; set; } - [JsonProperty("async_workflows")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("async_workflows")] -#endif - public PaymentIntentAsyncWorkflows AsyncWorkflows { get; set; } - /// /// Settings to configure compatible payment methods from the Stripe Dashboard. @@ -346,6 +340,12 @@ public Customer Customer #endif public string FxQuote { get; set; } + [JsonProperty("hooks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hooks")] +#endif + public PaymentIntentHooks Hooks { get; set; } + /// /// The payment error encountered in the previous PaymentIntent confirmation. It will be /// cleared if the PaymentIntent is later updated for any reason. diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAsyncWorkflows.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooks.cs similarity index 64% rename from src/Stripe.net/Entities/PaymentIntents/PaymentIntentAsyncWorkflows.cs rename to src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooks.cs index 5d5f4d6bc1..cae1e0a191 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAsyncWorkflows.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooks.cs @@ -6,12 +6,12 @@ namespace Stripe using STJS = System.Text.Json.Serialization; #endif - public class PaymentIntentAsyncWorkflows : StripeEntity + public class PaymentIntentHooks : StripeEntity { [JsonProperty("inputs")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("inputs")] #endif - public PaymentIntentAsyncWorkflowsInputs Inputs { get; set; } + public PaymentIntentHooksInputs Inputs { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAsyncWorkflowsInputs.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooksInputs.cs similarity index 61% rename from src/Stripe.net/Entities/PaymentIntents/PaymentIntentAsyncWorkflowsInputs.cs rename to src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooksInputs.cs index 1492b12bb0..be6b015d94 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAsyncWorkflowsInputs.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooksInputs.cs @@ -6,12 +6,12 @@ namespace Stripe using STJS = System.Text.Json.Serialization; #endif - public class PaymentIntentAsyncWorkflowsInputs : StripeEntity + public class PaymentIntentHooksInputs : StripeEntity { [JsonProperty("tax")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("tax")] #endif - public PaymentIntentAsyncWorkflowsInputsTax Tax { get; set; } + public PaymentIntentHooksInputsTax Tax { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAsyncWorkflowsInputsTax.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooksInputsTax.cs similarity index 81% rename from src/Stripe.net/Entities/PaymentIntents/PaymentIntentAsyncWorkflowsInputsTax.cs rename to src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooksInputsTax.cs index 1045b1c050..d955964187 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAsyncWorkflowsInputsTax.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooksInputsTax.cs @@ -6,7 +6,7 @@ namespace Stripe using STJS = System.Text.Json.Serialization; #endif - public class PaymentIntentAsyncWorkflowsInputsTax : StripeEntity + public class PaymentIntentHooksInputsTax : StripeEntity { /// /// The TaxCalculation id. diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs index 08e2825a31..a645089ed7 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs @@ -87,7 +87,8 @@ public class PaymentIntentNextAction : StripeEntity public PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode SwishHandleRedirectOrDisplayQrCode { get; set; } /// - /// Type of the next action to perform, one of redirect_to_url, + /// Type of the next action to perform. Refer to the other child attributes under + /// next_action for available values. Examples include: redirect_to_url, /// use_stripe_sdk, alipay_handle_redirect, oxxo_display_details, or /// verify_with_microdeposits. /// diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsCarRental.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsCarRental.cs index b85ddef475..6bb21f4d27 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsCarRental.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsCarRental.cs @@ -86,6 +86,12 @@ public class PaymentIntentPaymentDetailsCarRental : StripeEntity /// The details of the drivers associated with the trip. /// @@ -132,6 +138,15 @@ public class PaymentIntentPaymentDetailsCarRental : StripeEntity + /// Name of the pickup location. + /// + [JsonProperty("pickup_location_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pickup_location_name")] +#endif + public string PickupLocationName { get; set; } + /// /// Rental rate. /// @@ -178,6 +193,15 @@ public class PaymentIntentPaymentDetailsCarRental : StripeEntity + /// Name of the return location. + /// + [JsonProperty("return_location_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_location_name")] +#endif + public string ReturnLocationName { get; set; } + /// /// Indicates whether the goods or services are tax-exempt or tax is not collected. /// @@ -186,5 +210,14 @@ public class PaymentIntentPaymentDetailsCarRental : StripeEntity + /// The vehicle identification number of the car. + /// + [JsonProperty("vehicle_identification_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("vehicle_identification_number")] +#endif + public string VehicleIdentificationNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsCarRentalDistance.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsCarRentalDistance.cs new file mode 100644 index 0000000000..645e357da2 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsCarRentalDistance.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 PaymentIntentPaymentDetailsCarRentalDistance : StripeEntity + { + /// + /// Distance traveled. + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public long Amount { get; set; } + + /// + /// Unit of measurement for the distance traveled. One of miles or kilometers. + /// + [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif + public string Unit { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsCarRentalDriver.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsCarRentalDriver.cs index a1ca53e8d3..9e3fdd5566 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsCarRentalDriver.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsCarRentalDriver.cs @@ -8,6 +8,24 @@ namespace Stripe public class PaymentIntentPaymentDetailsCarRentalDriver : StripeEntity { + /// + /// Driver's identification number. + /// + [JsonProperty("driver_identification_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("driver_identification_number")] +#endif + public string DriverIdentificationNumber { get; set; } + + /// + /// Driver's tax number. + /// + [JsonProperty("driver_tax_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("driver_tax_number")] +#endif + public string DriverTaxNumber { get; set; } + /// /// Full name of the driver on the reservation. /// diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs index 624d815ac1..67563d5d0f 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs @@ -290,6 +290,12 @@ public class PaymentIntentPaymentMethodOptions : StripeEntity { + /// + /// Controls when the funds will be captured from the customer's account. + /// + [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif + public string CaptureMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispay.cs new file mode 100644 index 0000000000..aff06237a0 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispay.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 PaymentIntentPaymentMethodOptionsSatispay : StripeEntity + { + /// + /// Controls when the funds will be captured from the customer's account. + /// + [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif + public string CaptureMethod { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs index e4c7453525..d75f4fed7f 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs @@ -240,6 +240,12 @@ public class PaymentMethodConfiguration : StripeEntity + { + /// + /// Whether this payment method may be offered at checkout. True if + /// display_preference is on and the payment method's capability is active. + /// + [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif + public bool Available { get; set; } + + [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif + public PaymentMethodConfigurationKakaoPayDisplayPreference DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKakaoPayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKakaoPayDisplayPreference.cs new file mode 100644 index 0000000000..275a0c0415 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKakaoPayDisplayPreference.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentMethodConfigurationKakaoPayDisplayPreference : StripeEntity + { + /// + /// For child configs, whether or not the account's preference will be observed. If + /// false, the parent configuration's default is used. + /// + [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif + public bool? Overridable { get; set; } + + /// + /// The account's display preference. + /// One of: none, off, or on. + /// + [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif + public string Preference { get; set; } + + /// + /// The effective display preference value. + /// One of: off, or on. + /// + [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif + public string Value { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKrCard.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKrCard.cs new file mode 100644 index 0000000000..c45d0c1b99 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKrCard.cs @@ -0,0 +1,27 @@ +// 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 PaymentMethodConfigurationKrCard : StripeEntity + { + /// + /// Whether this payment method may be offered at checkout. True if + /// display_preference is on and the payment method's capability is active. + /// + [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif + public bool Available { get; set; } + + [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif + public PaymentMethodConfigurationKrCardDisplayPreference DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKrCardDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKrCardDisplayPreference.cs new file mode 100644 index 0000000000..dd98821651 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKrCardDisplayPreference.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentMethodConfigurationKrCardDisplayPreference : StripeEntity + { + /// + /// For child configs, whether or not the account's preference will be observed. If + /// false, the parent configuration's default is used. + /// + [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif + public bool? Overridable { get; set; } + + /// + /// The account's display preference. + /// One of: none, off, or on. + /// + [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif + public string Preference { get; set; } + + /// + /// The effective display preference value. + /// One of: off, or on. + /// + [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif + public string Value { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationNaverPay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationNaverPay.cs new file mode 100644 index 0000000000..aaaf0411e2 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationNaverPay.cs @@ -0,0 +1,27 @@ +// 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 PaymentMethodConfigurationNaverPay : StripeEntity + { + /// + /// Whether this payment method may be offered at checkout. True if + /// display_preference is on and the payment method's capability is active. + /// + [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif + public bool Available { get; set; } + + [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif + public PaymentMethodConfigurationNaverPayDisplayPreference DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationNaverPayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationNaverPayDisplayPreference.cs new file mode 100644 index 0000000000..6a8aed6e33 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationNaverPayDisplayPreference.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentMethodConfigurationNaverPayDisplayPreference : StripeEntity + { + /// + /// For child configs, whether or not the account's preference will be observed. If + /// false, the parent configuration's default is used. + /// + [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif + public bool? Overridable { get; set; } + + /// + /// The account's display preference. + /// One of: none, off, or on. + /// + [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif + public string Preference { get; set; } + + /// + /// The effective display preference value. + /// One of: off, or on. + /// + [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif + public string Value { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPayco.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPayco.cs new file mode 100644 index 0000000000..dda8698a07 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPayco.cs @@ -0,0 +1,27 @@ +// 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 PaymentMethodConfigurationPayco : StripeEntity + { + /// + /// Whether this payment method may be offered at checkout. True if + /// display_preference is on and the payment method's capability is active. + /// + [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif + public bool Available { get; set; } + + [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif + public PaymentMethodConfigurationPaycoDisplayPreference DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaycoDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaycoDisplayPreference.cs new file mode 100644 index 0000000000..7c462f69c5 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaycoDisplayPreference.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentMethodConfigurationPaycoDisplayPreference : StripeEntity + { + /// + /// For child configs, whether or not the account's preference will be observed. If + /// false, the parent configuration's default is used. + /// + [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif + public bool? Overridable { get; set; } + + /// + /// The account's display preference. + /// One of: none, off, or on. + /// + [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif + public string Preference { get; set; } + + /// + /// The effective display preference value. + /// One of: off, or on. + /// + [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif + public string Value { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSamsungPay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSamsungPay.cs new file mode 100644 index 0000000000..9c7d53b462 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSamsungPay.cs @@ -0,0 +1,27 @@ +// 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 PaymentMethodConfigurationSamsungPay : StripeEntity + { + /// + /// Whether this payment method may be offered at checkout. True if + /// display_preference is on and the payment method's capability is active. + /// + [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif + public bool Available { get; set; } + + [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif + public PaymentMethodConfigurationSamsungPayDisplayPreference DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSamsungPayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSamsungPayDisplayPreference.cs new file mode 100644 index 0000000000..df75865605 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSamsungPayDisplayPreference.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentMethodConfigurationSamsungPayDisplayPreference : StripeEntity + { + /// + /// For child configs, whether or not the account's preference will be observed. If + /// false, the parent configuration's default is used. + /// + [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif + public bool? Overridable { get; set; } + + /// + /// The account's display preference. + /// One of: none, off, or on. + /// + [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif + public string Preference { get; set; } + + /// + /// The effective display preference value. + /// One of: off, or on. + /// + [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif + public string Value { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsAffirm.cs b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsAffirm.cs index 0d6c0c2ca3..02deb6c3f6 100644 --- a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsAffirm.cs +++ b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsAffirm.cs @@ -8,6 +8,26 @@ namespace Stripe public class PaymentRecordPaymentMethodDetailsAffirm : StripeEntity { + /// + /// ID of the location that + /// this transaction's reader is assigned to. + /// + [JsonProperty("location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("location")] +#endif + public string Location { get; set; } + + /// + /// ID of the reader this + /// transaction was made on. + /// + [JsonProperty("reader")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reader")] +#endif + public string Reader { get; set; } + /// /// The Affirm transaction ID associated with this payment. /// diff --git a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsWechatPay.cs b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsWechatPay.cs index 2b54aab006..d8bb308e16 100644 --- a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsWechatPay.cs +++ b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsWechatPay.cs @@ -18,6 +18,26 @@ public class PaymentRecordPaymentMethodDetailsWechatPay : StripeEntity + /// ID of the location that + /// this transaction's reader is assigned to. + /// + [JsonProperty("location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("location")] +#endif + public string Location { get; set; } + + /// + /// ID of the reader this + /// transaction was made on. + /// + [JsonProperty("reader")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reader")] +#endif + public string Reader { get; set; } + /// /// Transaction ID of this particular WeChat Pay transaction. /// diff --git a/src/Stripe.net/Entities/Privacy/RedactionJobValidationErrors/RedactionJobValidationError.cs b/src/Stripe.net/Entities/Privacy/RedactionJobValidationErrors/RedactionJobValidationError.cs index d66aaf1057..fb78a2cfba 100644 --- a/src/Stripe.net/Entities/Privacy/RedactionJobValidationErrors/RedactionJobValidationError.cs +++ b/src/Stripe.net/Entities/Privacy/RedactionJobValidationErrors/RedactionJobValidationError.cs @@ -1,14 +1,14 @@ // File generated from our OpenAPI spec namespace Stripe.Privacy { - using System.Collections.Generic; using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif /// - /// Validation errors. + /// The Redaction Job validation error object contains information about errors that affect + /// the ability to redact a specific object in a redaction job. /// public class RedactionJobValidationError : StripeEntity, IHasId, IHasObject { @@ -30,18 +30,30 @@ public class RedactionJobValidationError : StripeEntity + /// A code indicating the reason for the error. + /// One of: invalid_cascading_source, invalid_file_purpose, + /// invalid_state, locked_by_other_job, or too_many_objects. + /// [JsonProperty("code")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("code")] #endif public string Code { get; set; } + /// + /// If the error is related to a specific object, this field includes the object's + /// identifier and object type. + /// [JsonProperty("erroring_object")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("erroring_object")] #endif - public Dictionary ErroringObject { get; set; } + public RedactionJobValidationErrorErroringObject ErroringObject { get; set; } + /// + /// A human-readable message providing more details about the error. + /// [JsonProperty("message")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("message")] diff --git a/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportReasonErrorTypeSampleErrorApiRequest.cs b/src/Stripe.net/Entities/Privacy/RedactionJobValidationErrors/RedactionJobValidationErrorErroringObject.cs similarity index 56% rename from src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportReasonErrorTypeSampleErrorApiRequest.cs rename to src/Stripe.net/Entities/Privacy/RedactionJobValidationErrors/RedactionJobValidationErrorErroringObject.cs index ef60d18cfe..062bb311d0 100644 --- a/src/Stripe.net/Entities/Billing/MeterErrorReports/MeterErrorReportReasonErrorTypeSampleErrorApiRequest.cs +++ b/src/Stripe.net/Entities/Privacy/RedactionJobValidationErrors/RedactionJobValidationErrorErroringObject.cs @@ -1,12 +1,12 @@ // File generated from our OpenAPI spec -namespace Stripe.Billing +namespace Stripe.Privacy { using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif - public class MeterErrorReportReasonErrorTypeSampleErrorApiRequest : StripeEntity, IHasId + public class RedactionJobValidationErrorErroringObject : StripeEntity, IHasId { /// /// Unique identifier for the object. @@ -18,12 +18,12 @@ public class MeterErrorReportReasonErrorTypeSampleErrorApiRequest : StripeEntity public string Id { get; set; } /// - /// idempotency_key of the request. + /// Erroring object type. /// - [JsonProperty("idempotency_key")] + [JsonProperty("object_type")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("idempotency_key")] + [STJS.JsonPropertyName("object_type")] #endif - public string IdempotencyKey { get; set; } + public string ObjectType { get; set; } } } diff --git a/src/Stripe.net/Entities/Privacy/RedactionJobs/RedactionJob.cs b/src/Stripe.net/Entities/Privacy/RedactionJobs/RedactionJob.cs index 388f5fc1a8..f7a1975fcc 100644 --- a/src/Stripe.net/Entities/Privacy/RedactionJobs/RedactionJob.cs +++ b/src/Stripe.net/Entities/Privacy/RedactionJobs/RedactionJob.cs @@ -9,8 +9,9 @@ namespace Stripe.Privacy #endif /// - /// Redaction Jobs store the status of a redaction request. They are created when a - /// redaction request is made and track the redaction validation and execution. + /// The Redaction Job object redacts Stripe objects. You can use it to coordinate the + /// removal of personal information from selected objects, making them permanently + /// inaccessible in the Stripe Dashboard and API. /// public class RedactionJob : StripeEntity, IHasId, IHasObject { @@ -44,7 +45,17 @@ public class RedactionJob : StripeEntity, IHasId, IHasObject public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// - /// The objects at the root level that are subject to redaction. + /// Has the value true if the object exists in live mode or the value false if + /// the object exists in test mode. + /// + [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif + public bool Livemode { get; set; } + + /// + /// The objects to redact in this job. /// [JsonProperty("objects")] #if NET6_0_OR_GREATER @@ -53,8 +64,9 @@ public class RedactionJob : StripeEntity, IHasId, IHasObject public RedactionJobObjects Objects { get; set; } /// - /// The status field represents the current state of the redaction job. It can take on any - /// of the following values: VALIDATING, READY, REDACTING, SUCCEEDED, CANCELED, FAILED. + /// The status of the job. + /// One of: canceled, canceling, created, failed, ready, + /// redacting, succeeded, or validating. /// [JsonProperty("status")] #if NET6_0_OR_GREATER @@ -63,10 +75,9 @@ public class RedactionJob : StripeEntity, IHasId, IHasObject public string Status { get; set; } /// - /// Default is "error". If "error", we will make sure all objects in the graph are - /// redactable in the 1st traversal, otherwise error. If "fix", where possible, we will - /// auto-fix any validation errors (e.g. by auto-transitioning objects to a terminal state, - /// etc.) in the 2nd traversal before redacting. + /// Validation behavior determines how a job validates objects for redaction eligibility. + /// Default is error. + /// One of: error, or fix. /// [JsonProperty("validation_behavior")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Privacy/RedactionJobs/RedactionJobObjects.cs b/src/Stripe.net/Entities/Privacy/RedactionJobs/RedactionJobObjects.cs index 4563f5c65a..113057939c 100644 --- a/src/Stripe.net/Entities/Privacy/RedactionJobs/RedactionJobObjects.cs +++ b/src/Stripe.net/Entities/Privacy/RedactionJobs/RedactionJobObjects.cs @@ -9,54 +9,81 @@ namespace Stripe.Privacy public class RedactionJobObjects : StripeEntity { + /// + /// Charge object identifiers usually starting with ch_. + /// [JsonProperty("charges")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("charges")] #endif public List Charges { get; set; } + /// + /// CheckoutSession object identifiers starting with cs_. + /// [JsonProperty("checkout_sessions")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("checkout_sessions")] #endif public List CheckoutSessions { get; set; } + /// + /// Customer object identifiers starting with cus_. + /// [JsonProperty("customers")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("customers")] #endif public List Customers { get; set; } + /// + /// Identity VerificationSessions object identifiers starting with vs_. + /// [JsonProperty("identity_verification_sessions")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("identity_verification_sessions")] #endif public List IdentityVerificationSessions { get; set; } + /// + /// Invoice object identifiers starting with in_. + /// [JsonProperty("invoices")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("invoices")] #endif public List Invoices { get; set; } + /// + /// Issuing Cardholder object identifiers starting with ich_. + /// [JsonProperty("issuing_cardholders")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("issuing_cardholders")] #endif public List IssuingCardholders { get; set; } + /// + /// PaymentIntent object identifiers starting with pi_. + /// [JsonProperty("payment_intents")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("payment_intents")] #endif public List PaymentIntents { get; set; } + /// + /// Fraud ValueListItem object identifiers starting with rsli_. + /// [JsonProperty("radar_value_list_items")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("radar_value_list_items")] #endif public List RadarValueListItems { get; set; } + /// + /// SetupIntent object identifiers starting with seti_. + /// [JsonProperty("setup_intents")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("setup_intents")] diff --git a/src/Stripe.net/Entities/Products/Product.cs b/src/Stripe.net/Entities/Products/Product.cs index c81f3ac6b9..44249cdc64 100644 --- a/src/Stripe.net/Entities/Products/Product.cs +++ b/src/Stripe.net/Entities/Products/Product.cs @@ -190,15 +190,6 @@ public Price DefaultPrice #endif public ProductPackageDimensions PackageDimensions { get; set; } - /// - /// Provisioning configuration for this product. - /// - [JsonProperty("provisioning")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("provisioning")] -#endif - public ProductProvisioning Provisioning { get; set; } - /// /// Whether this product is shipped (i.e., physical goods). /// diff --git a/src/Stripe.net/Entities/Products/ProductProvisioning.cs b/src/Stripe.net/Entities/Products/ProductProvisioning.cs deleted file mode 100644 index d89b100b84..0000000000 --- a/src/Stripe.net/Entities/Products/ProductProvisioning.cs +++ /dev/null @@ -1,26 +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 ProductProvisioning : StripeEntity - { - [JsonProperty("gift_card")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("gift_card")] -#endif - public ProductProvisioningGiftCard GiftCard { get; set; } - - /// - /// The type of provisioning, only gift_card currently supported. - /// - [JsonProperty("type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("type")] -#endif - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Entities/Products/ProductProvisioningGiftCard.cs b/src/Stripe.net/Entities/Products/ProductProvisioningGiftCard.cs deleted file mode 100644 index e9a7e98189..0000000000 --- a/src/Stripe.net/Entities/Products/ProductProvisioningGiftCard.cs +++ /dev/null @@ -1,27 +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 ProductProvisioningGiftCard : StripeEntity - { - [JsonProperty("fixed_amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("fixed_amount")] -#endif - public ProductProvisioningGiftCardFixedAmount FixedAmount { get; set; } - - /// - /// The specific type of gift_card provisioning, only fixed_amount currently - /// supported. - /// - [JsonProperty("type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("type")] -#endif - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoice.cs b/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoice.cs index acaecb67bc..070473b0c2 100644 --- a/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoice.cs +++ b/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoice.cs @@ -51,10 +51,9 @@ namespace Stripe public class QuotePreviewInvoice : StripeEntity, IHasId, IHasMetadata, IHasObject { /// - /// Unique identifier for the object. This property is always present unless the invoice is - /// an upcoming invoice. See Retrieve an upcoming invoice - /// for more details. + /// Unique identifier for the object. For preview invoices created using the create preview endpoint, + /// this id will be prefixed with upcoming_in. /// [JsonProperty("id")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleDefaultSettings.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleDefaultSettings.cs index 6301cbe376..a86020187e 100644 --- a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleDefaultSettings.cs +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleDefaultSettings.cs @@ -43,6 +43,16 @@ public class QuotePreviewSubscriptionScheduleDefaultSettings : StripeEntity + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public QuotePreviewSubscriptionScheduleDefaultSettingsBillingThresholds BillingThresholds { get; set; } + /// /// Either charge_automatically, or send_invoice. When charging automatically, /// Stripe will attempt to pay the underlying subscription at the end of each billing cycle diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleDefaultSettingsBillingThresholds.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleDefaultSettingsBillingThresholds.cs new file mode 100644 index 0000000000..5b7e615ca2 --- /dev/null +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleDefaultSettingsBillingThresholds.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 QuotePreviewSubscriptionScheduleDefaultSettingsBillingThresholds : StripeEntity + { + /// + /// Monetary threshold that triggers the subscription to create an invoice. + /// + [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif + public long? AmountGte { get; set; } + + /// + /// Indicates if the billing_cycle_anchor should be reset when a threshold is + /// reached. If true, billing_cycle_anchor will be updated to the date/time the + /// threshold was last reached; otherwise, the value will remain unchanged. This value may + /// not be true if the subscription contains items with plans that have + /// aggregate_usage=last_ever. + /// + [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif + public bool? ResetBillingCycleAnchor { get; set; } + } +} diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhase.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhase.cs index e6ea5688d4..2f063f9546 100644 --- a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhase.cs +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhase.cs @@ -55,6 +55,16 @@ public class QuotePreviewSubscriptionSchedulePhase : StripeEntity + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public QuotePreviewSubscriptionSchedulePhaseBillingThresholds BillingThresholds { get; set; } + /// /// Either charge_automatically, or send_invoice. When charging automatically, /// Stripe will attempt to pay the underlying subscription at the end of each billing cycle @@ -255,8 +265,8 @@ public Account OnBehalfOf public QuotePreviewSubscriptionSchedulePhasePauseCollection PauseCollection { get; set; } /// - /// If the subscription schedule will prorate when transitioning to this phase. Possible - /// values are create_prorations and none. + /// When transitioning phases, controls how prorations are handled (if any). Possible values + /// are create_prorations, none, and always_invoice. /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhaseBillingThresholds.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhaseBillingThresholds.cs new file mode 100644 index 0000000000..c9f1be9bc6 --- /dev/null +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhaseBillingThresholds.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 QuotePreviewSubscriptionSchedulePhaseBillingThresholds : StripeEntity + { + /// + /// Monetary threshold that triggers the subscription to create an invoice. + /// + [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif + public long? AmountGte { get; set; } + + /// + /// Indicates if the billing_cycle_anchor should be reset when a threshold is + /// reached. If true, billing_cycle_anchor will be updated to the date/time the + /// threshold was last reached; otherwise, the value will remain unchanged. This value may + /// not be true if the subscription contains items with plans that have + /// aggregate_usage=last_ever. + /// + [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif + public bool? ResetBillingCycleAnchor { get; set; } + } +} diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhaseItem.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhaseItem.cs index 0a53165888..6c0221ebfd 100644 --- a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhaseItem.cs +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhaseItem.cs @@ -13,6 +13,16 @@ namespace Stripe #endif public class QuotePreviewSubscriptionSchedulePhaseItem : StripeEntity, IHasMetadata { + /// + /// Define thresholds at which an invoice will be sent, and the related subscription + /// advanced to a new billing period. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public QuotePreviewSubscriptionSchedulePhaseItemBillingThresholds BillingThresholds { get; set; } + /// /// The discounts applied to the subscription item. Subscription item discounts are applied /// before subscription discounts. Use expand[]=discounts to expand each discount. diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhaseItemBillingThresholds.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhaseItemBillingThresholds.cs new file mode 100644 index 0000000000..90bd85e363 --- /dev/null +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhaseItemBillingThresholds.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 QuotePreviewSubscriptionSchedulePhaseItemBillingThresholds : StripeEntity + { + /// + /// Usage threshold that triggers the subscription to create an invoice. + /// + [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif + public long? UsageGte { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsPaypal.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsPaypal.cs index 9bde0a360e..185d2387b0 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsPaypal.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsPaypal.cs @@ -1,7 +1,21 @@ // 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 RefundDestinationDetailsPaypal : StripeEntity { + /// + /// For refunds declined by the network, a decline code provided by the network which + /// indicates the reason the refund failed. + /// + [JsonProperty("network_decline_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_decline_code")] +#endif + public string NetworkDeclineCode { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs index fc038a83c5..400b1efd26 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs @@ -21,7 +21,8 @@ public class SetupIntentNextAction : StripeEntity public SetupIntentNextActionRedirectToUrl RedirectToUrl { get; set; } /// - /// Type of the next action to perform, one of redirect_to_url, + /// Type of the next action to perform. Refer to the other child attributes under + /// next_action for available values. Examples include: redirect_to_url, /// use_stripe_sdk, alipay_handle_redirect, oxxo_display_details, or /// verify_with_microdeposits. /// diff --git a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs index 1c996ff0e8..ef59cd8d91 100644 --- a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs +++ b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs @@ -37,6 +37,16 @@ public class SubscriptionItem : StripeEntity, IHasId, IHasMeta #endif public string Object { get; set; } + /// + /// Define thresholds at which an invoice will be sent, and the related subscription + /// advanced to a new billing period. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public SubscriptionItemBillingThresholds BillingThresholds { get; set; } + /// /// Time at which the object was created. Measured in seconds since the Unix epoch. /// diff --git a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItemBillingThresholds.cs b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItemBillingThresholds.cs new file mode 100644 index 0000000000..6e5501e26b --- /dev/null +++ b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItemBillingThresholds.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 SubscriptionItemBillingThresholds : StripeEntity + { + /// + /// Usage threshold that triggers the subscription to create an invoice. + /// + [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif + public long? UsageGte { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettings.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettings.cs index 80163c265a..35459e069a 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettings.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettings.cs @@ -43,6 +43,16 @@ public class SubscriptionScheduleDefaultSettings : StripeEntity + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public SubscriptionScheduleDefaultSettingsBillingThresholds BillingThresholds { get; set; } + /// /// Either charge_automatically, or send_invoice. When charging automatically, /// Stripe will attempt to pay the underlying subscription at the end of each billing cycle diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholds.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholds.cs new file mode 100644 index 0000000000..c2f87dbce4 --- /dev/null +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholds.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 SubscriptionScheduleDefaultSettingsBillingThresholds : StripeEntity + { + /// + /// Monetary threshold that triggers the subscription to create an invoice. + /// + [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif + public long? AmountGte { get; set; } + + /// + /// Indicates if the billing_cycle_anchor should be reset when a threshold is + /// reached. If true, billing_cycle_anchor will be updated to the date/time the + /// threshold was last reached; otherwise, the value will remain unchanged. This value may + /// not be true if the subscription contains items with plans that have + /// aggregate_usage=last_ever. + /// + [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif + public bool? ResetBillingCycleAnchor { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhase.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhase.cs index cb26ef271c..ae847793b2 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhase.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhase.cs @@ -55,6 +55,16 @@ public class SubscriptionSchedulePhase : StripeEntity #endif public string BillingCycleAnchor { get; set; } + /// + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public SubscriptionSchedulePhaseBillingThresholds BillingThresholds { get; set; } + /// /// Either charge_automatically, or send_invoice. When charging automatically, /// Stripe will attempt to pay the underlying subscription at the end of each billing cycle @@ -255,8 +265,8 @@ public Account OnBehalfOf public SubscriptionSchedulePhasePauseCollection PauseCollection { get; set; } /// - /// If the subscription schedule will prorate when transitioning to this phase. Possible - /// values are create_prorations and none. + /// When transitioning phases, controls how prorations are handled (if any). Possible values + /// are create_prorations, none, and always_invoice. /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholds.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholds.cs new file mode 100644 index 0000000000..c55587d44e --- /dev/null +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholds.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 SubscriptionSchedulePhaseBillingThresholds : StripeEntity + { + /// + /// Monetary threshold that triggers the subscription to create an invoice. + /// + [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif + public long? AmountGte { get; set; } + + /// + /// Indicates if the billing_cycle_anchor should be reset when a threshold is + /// reached. If true, billing_cycle_anchor will be updated to the date/time the + /// threshold was last reached; otherwise, the value will remain unchanged. This value may + /// not be true if the subscription contains items with plans that have + /// aggregate_usage=last_ever. + /// + [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif + public bool? ResetBillingCycleAnchor { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItem.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItem.cs index df000d5679..2e6d113cba 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItem.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItem.cs @@ -13,6 +13,16 @@ namespace Stripe #endif public class SubscriptionSchedulePhaseItem : StripeEntity, IHasMetadata { + /// + /// Define thresholds at which an invoice will be sent, and the related subscription + /// advanced to a new billing period. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public SubscriptionSchedulePhaseItemBillingThresholds BillingThresholds { get; set; } + /// /// The discounts applied to the subscription item. Subscription item discounts are applied /// before subscription discounts. Use expand[]=discounts to expand each discount. diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholds.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholds.cs new file mode 100644 index 0000000000..8a25fdb981 --- /dev/null +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholds.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 SubscriptionSchedulePhaseItemBillingThresholds : StripeEntity + { + /// + /// Usage threshold that triggers the subscription to create an invoice. + /// + [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif + public long? UsageGte { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Subscriptions/Subscription.cs b/src/Stripe.net/Entities/Subscriptions/Subscription.cs index 8c8ddad4b3..b4f28b46cc 100644 --- a/src/Stripe.net/Entities/Subscriptions/Subscription.cs +++ b/src/Stripe.net/Entities/Subscriptions/Subscription.cs @@ -122,8 +122,7 @@ public Application Application public SubscriptionBillingCycleAnchorConfig BillingCycleAnchorConfig { get; set; } /// - /// Configure billing_mode in each subscription to opt in improved credit proration - /// behavior. + /// Controls how prorations and invoices for subscriptions are calculated and orchestrated. /// One of: classic, or flexible. /// [JsonProperty("billing_mode")] @@ -132,6 +131,25 @@ public Application Application #endif public string BillingMode { get; set; } + /// + /// Details about when the current billing_mode was updated. + /// + [JsonProperty("billing_mode_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_mode_details")] +#endif + public SubscriptionBillingModeDetails BillingModeDetails { get; set; } + + /// + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public SubscriptionBillingThresholds BillingThresholds { get; set; } + /// /// A date in the future at which the subscription will automatically get canceled. /// @@ -145,7 +163,8 @@ public Application Application /// /// Whether this subscription will (if status=active) or did (if - /// status=canceled) cancel at the end of the current billing period. + /// status=canceled) cancel at the end of the current billing period. This field will + /// be removed in a future API version. Please use cancel_at instead. /// [JsonProperty("cancel_at_period_end")] #if NET6_0_OR_GREATER @@ -869,7 +888,8 @@ public TestHelpers.TestClock TestClock public SubscriptionTrialSettings TrialSettings { get; set; } /// - /// If the subscription has a trial, the beginning of that trial. + /// If the subscription has a trial, the beginning of that trial. For subsequent trials, + /// this date remains as the start of the first ever trial on the subscription. /// [JsonProperty("trial_start")] [JsonConverter(typeof(UnixDateTimeConverter))] diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingModeDetails.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingModeDetails.cs new file mode 100644 index 0000000000..bb06311c67 --- /dev/null +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingModeDetails.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 SubscriptionBillingModeDetails : StripeEntity + { + /// + /// Details on when the current billing_mode was adopted. + /// + [JsonProperty("updated_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("updated_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime UpdatedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + } +} diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingThresholds.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingThresholds.cs new file mode 100644 index 0000000000..b243bff262 --- /dev/null +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingThresholds.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 SubscriptionBillingThresholds : StripeEntity + { + /// + /// Monetary threshold that triggers the subscription to create an invoice. + /// + [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif + public long? AmountGte { get; set; } + + /// + /// Indicates if the billing_cycle_anchor should be reset when a threshold is + /// reached. If true, billing_cycle_anchor will be updated to the date/time the + /// threshold was last reached; otherwise, the value will remain unchanged. This value may + /// not be true if the subscription contains items with plans that have + /// aggregate_usage=last_ever. + /// + [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif + public bool? ResetBillingCycleAnchor { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Associations/Association.cs b/src/Stripe.net/Entities/Tax/Associations/Association.cs index cd79daadb1..090e2f3767 100644 --- a/src/Stripe.net/Entities/Tax/Associations/Association.cs +++ b/src/Stripe.net/Entities/Tax/Associations/Association.cs @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec namespace Stripe.Tax { + using System.Collections.Generic; using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; @@ -51,19 +52,12 @@ public class Association : StripeEntity, IHasId, IHasObject public string PaymentIntent { get; set; } /// - /// Status of the Tax Association. - /// One of: committed, or errored. + /// Information about the tax transactions linked to this payment intent. /// - [JsonProperty("status")] + [JsonProperty("tax_transaction_attempts")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("status")] + [STJS.JsonPropertyName("tax_transaction_attempts")] #endif - public string Status { get; set; } - - [JsonProperty("status_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("status_details")] -#endif - public AssociationStatusDetails StatusDetails { get; set; } + public List TaxTransactionAttempts { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetails.cs b/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetails.cs deleted file mode 100644 index bdd683bd59..0000000000 --- a/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetails.cs +++ /dev/null @@ -1,23 +0,0 @@ -// 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 AssociationStatusDetails : StripeEntity - { - [JsonProperty("committed")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("committed")] -#endif - public AssociationStatusDetailsCommitted Committed { get; set; } - - [JsonProperty("errored")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("errored")] -#endif - public AssociationStatusDetailsErrored Errored { get; set; } - } -} diff --git a/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommitted.cs b/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommitted.cs deleted file mode 100644 index 6911913459..0000000000 --- a/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommitted.cs +++ /dev/null @@ -1,30 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Tax -{ - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class AssociationStatusDetailsCommitted : StripeEntity - { - /// - /// Attempts to create Tax Transaction reversals. - /// - [JsonProperty("reversals")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("reversals")] -#endif - public List Reversals { get; set; } - - /// - /// The Tax Transaction. - /// - [JsonProperty("transaction")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("transaction")] -#endif - public string Transaction { get; set; } - } -} diff --git a/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommittedReversal.cs b/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommittedReversal.cs deleted file mode 100644 index 296eca7e53..0000000000 --- a/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommittedReversal.cs +++ /dev/null @@ -1,27 +0,0 @@ -// 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 AssociationStatusDetailsCommittedReversal : StripeEntity - { - /// - /// Status of the attempted Tax Transaction reversal. - /// One of: committed, or errored. - /// - [JsonProperty("status")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("status")] -#endif - public string Status { get; set; } - - [JsonProperty("status_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("status_details")] -#endif - public AssociationStatusDetailsCommittedReversalStatusDetails StatusDetails { get; set; } - } -} diff --git a/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommittedReversalStatusDetails.cs b/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommittedReversalStatusDetails.cs deleted file mode 100644 index 88383b9644..0000000000 --- a/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommittedReversalStatusDetails.cs +++ /dev/null @@ -1,23 +0,0 @@ -// 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 AssociationStatusDetailsCommittedReversalStatusDetails : StripeEntity - { - [JsonProperty("committed")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("committed")] -#endif - public AssociationStatusDetailsCommittedReversalStatusDetailsCommitted Committed { get; set; } - - [JsonProperty("errored")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("errored")] -#endif - public AssociationStatusDetailsCommittedReversalStatusDetailsErrored Errored { get; set; } - } -} diff --git a/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommittedReversalStatusDetailsErrored.cs b/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommittedReversalStatusDetailsErrored.cs deleted file mode 100644 index 907348133e..0000000000 --- a/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommittedReversalStatusDetailsErrored.cs +++ /dev/null @@ -1,31 +0,0 @@ -// 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 AssociationStatusDetailsCommittedReversalStatusDetailsErrored : StripeEntity - { - /// - /// Details on why we could not commit the reversal Tax Transaction. - /// One of: original_transaction_voided, or unique_reference_violation. - /// - [JsonProperty("reason")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("reason")] -#endif - public string Reason { get; set; } - - /// - /// The Refund ID that should have - /// created a tax reversal. - /// - [JsonProperty("refund_id")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("refund_id")] -#endif - public string RefundId { get; set; } - } -} diff --git a/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttempt.cs b/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttempt.cs new file mode 100644 index 0000000000..25dbc2667a --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttempt.cs @@ -0,0 +1,41 @@ +// 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 AssociationTaxTransactionAttempt : StripeEntity + { + [JsonProperty("committed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("committed")] +#endif + public AssociationTaxTransactionAttemptCommitted Committed { get; set; } + + [JsonProperty("errored")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("errored")] +#endif + public AssociationTaxTransactionAttemptErrored Errored { get; set; } + + /// + /// The source of the tax transaction attempt. This is either a refund or a payment intent. + /// + [JsonProperty("source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] +#endif + public string Source { get; set; } + + /// + /// The status of the transaction attempt. This can be errored or committed. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommittedReversalStatusDetailsCommitted.cs b/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttemptCommitted.cs similarity index 75% rename from src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommittedReversalStatusDetailsCommitted.cs rename to src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttemptCommitted.cs index c0f10b90e3..93cbf366fd 100644 --- a/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsCommittedReversalStatusDetailsCommitted.cs +++ b/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttemptCommitted.cs @@ -6,7 +6,7 @@ namespace Stripe.Tax using STJS = System.Text.Json.Serialization; #endif - public class AssociationStatusDetailsCommittedReversalStatusDetailsCommitted : StripeEntity + public class AssociationTaxTransactionAttemptCommitted : StripeEntity { /// /// The Tax Transaction. diff --git a/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsErrored.cs b/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttemptErrored.cs similarity index 60% rename from src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsErrored.cs rename to src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttemptErrored.cs index 466d074568..906fe0cdea 100644 --- a/src/Stripe.net/Entities/Tax/Associations/AssociationStatusDetailsErrored.cs +++ b/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttemptErrored.cs @@ -6,12 +6,13 @@ namespace Stripe.Tax using STJS = System.Text.Json.Serialization; #endif - public class AssociationStatusDetailsErrored : StripeEntity + public class AssociationTaxTransactionAttemptErrored : StripeEntity { /// - /// Details on why we could not commit the Tax Transaction. + /// Details on why we couldn't commit the tax transaction. /// One of: another_payment_associated_with_calculation, calculation_expired, - /// currency_mismatch, or unique_reference_violation. + /// currency_mismatch, original_transaction_voided, or + /// unique_reference_violation. /// [JsonProperty("reason")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItem.cs b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItem.cs index 6da5717664..6af3810465 100644 --- a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItem.cs +++ b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItem.cs @@ -7,7 +7,7 @@ namespace Stripe.Tax using STJS = System.Text.Json.Serialization; #endif - public class CalculationLineItem : StripeEntity, IHasId, IHasObject + public class CalculationLineItem : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. @@ -59,6 +59,17 @@ public class CalculationLineItem : StripeEntity, IHasId, IH #endif public bool Livemode { get; set; } + /// + /// Set of key-value pairs that you can + /// attach to an object. This can be useful for storing additional information about the + /// object in a structured format. + /// + [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + /// /// The ID of an existing Product. /// diff --git a/src/Stripe.net/Entities/Terminal/Readers/Reader.cs b/src/Stripe.net/Entities/Terminal/Readers/Reader.cs index 098ca59fe5..1aa25c1675 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/Reader.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/Reader.cs @@ -67,12 +67,10 @@ public class Reader : StripeEntity, IHasId, IHasMetadata, IHasObject public string DeviceSwVersion { get; set; } /// - /// Type of reader, one of bbpos_wisepad3, stripe_m2, stripe_s700, - /// bbpos_chipper2x, bbpos_wisepos_e, verifone_P400, - /// simulated_wisepos_e, or mobile_phone_reader. + /// Device type of the reader. /// One of: bbpos_chipper2x, bbpos_wisepad3, bbpos_wisepos_e, - /// mobile_phone_reader, simulated_wisepos_e, stripe_m2, - /// stripe_s700, or verifone_P400. + /// mobile_phone_reader, simulated_stripe_s700, simulated_wisepos_e, + /// stripe_m2, stripe_s700, or verifone_P400. /// [JsonProperty("device_type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionConfirmPaymentIntent.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionConfirmPaymentIntent.cs index 513832ba4b..44caa2c4ad 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionConfirmPaymentIntent.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionConfirmPaymentIntent.cs @@ -21,6 +21,15 @@ public class ReaderActionConfirmPaymentIntent : StripeEntity + /// Represents a per-transaction override of a reader configuration. + /// + [JsonProperty("confirm_config")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirm_config")] +#endif + public ReaderActionConfirmPaymentIntentConfirmConfig ConfirmConfig { get; set; } + #region Expandable PaymentIntent /// diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionConfirmPaymentIntentConfirmConfig.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionConfirmPaymentIntentConfirmConfig.cs new file mode 100644 index 0000000000..515648dadf --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionConfirmPaymentIntentConfirmConfig.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class ReaderActionConfirmPaymentIntentConfirmConfig : StripeEntity + { + /// + /// If the customer does not abandon authenticating the payment, they will be redirected to + /// this specified URL after completion. + /// + [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/Terminal/Readers/ReaderActionProcessPaymentIntentProcessConfig.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntentProcessConfig.cs index db1fdd568e..17bb3a1c72 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntentProcessConfig.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntentProcessConfig.cs @@ -17,6 +17,16 @@ public class ReaderActionProcessPaymentIntentProcessConfig : StripeEntity + /// If the customer does not abandon authenticating the payment, they will be redirected to + /// this specified URL after completion. + /// + [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif + public string ReturnUrl { get; set; } + /// /// Override showing a tipping selection screen on this transaction. /// diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTax.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTax.cs index b873f1779b..53f9c6a965 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTax.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTax.cs @@ -30,9 +30,8 @@ public class AccountConfigurationCustomerAutomaticIndirectTax : StripeEntity - /// The customer’s location as identified by Stripe Tax - uses location_source. Will - /// only be rendered if the automatic_indirect_tax feature is requested and - /// active. + /// The customer’s identified tax location - uses location_source. Will only be + /// rendered if the automatic_indirect_tax feature is requested and active. /// [JsonProperty("location")] #if NET6_0_OR_GREATER @@ -41,7 +40,7 @@ public class AccountConfigurationCustomerAutomaticIndirectTax : StripeEntity - /// The data source used by Stripe Tax to identify the customer's location - defaults to + /// The data source used to identify the customer's tax location - defaults to /// 'identity_address'. Will only be used for automatic tax calculation on the customer's /// Invoices and Subscriptions. /// One of: identity_address, ip_address, or shipping_address. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTaxLocation.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTaxLocation.cs index 16576e68d0..ef937b0fb7 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTaxLocation.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTaxLocation.cs @@ -9,7 +9,7 @@ namespace Stripe.V2.Core public class AccountConfigurationCustomerAutomaticIndirectTaxLocation : StripeEntity { /// - /// The customer's country as identified by Stripe Tax. + /// The identified tax country of the customer. /// One of: ad, ae, af, ag, ai, al, am, /// ao, aq, ar, as, at, au, aw, ax, /// az, ba, bb, bd, be, bf, bg, bh, @@ -50,7 +50,7 @@ public class AccountConfigurationCustomerAutomaticIndirectTaxLocation : StripeEn public string Country { get; set; } /// - /// The customer's state, county, province, or region as identified by Stripe Tax. + /// The identified tax state, county, province, or region of the customer. /// [JsonProperty("state")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilities.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilities.cs index d3500d43de..8324f66def 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilities.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilities.cs @@ -369,7 +369,7 @@ public class AccountConfigurationMerchantCapabilities : StripeEntity - /// Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). + /// Capabilities that enable the merchant to manage their Stripe Balance (/v1/balance). /// [JsonProperty("stripe_balance")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCredit.cs b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCredit.cs index 4520b47caa..53b0eb8db0 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCredit.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCredit.cs @@ -61,16 +61,6 @@ public class ReceivedCredit : StripeEntity, IHasId, IHasObject #endif public ReceivedCreditBankTransfer BankTransfer { get; set; } - /// - /// This object stores details about the originating issuing card spend that resulted in the - /// ReceivedCredit. Present if type field value is card_spend. - /// - [JsonProperty("card_spend")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("card_spend")] -#endif - public ReceivedCreditCardSpend CardSpend { get; set; } - /// /// Time at which the ReceivedCredit was created. Represented as a RFC 3339 date & time /// UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. @@ -151,8 +141,7 @@ public class ReceivedCredit : StripeEntity, IHasId, IHasObject /// /// Open Enum. The type of flow that caused the ReceivedCredit. - /// One of: balance_transfer, bank_transfer, card_spend, or - /// external_credit. + /// One of: balance_transfer, bank_transfer, or external_credit. /// [JsonProperty("type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditCardSpend.cs b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditCardSpend.cs deleted file mode 100644 index 792c375969..0000000000 --- a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditCardSpend.cs +++ /dev/null @@ -1,38 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.MoneyManagement -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReceivedCreditCardSpend : StripeEntity - { - /// - /// The reference to the issuing card object. - /// - [JsonProperty("card_v1_id")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("card_v1_id")] -#endif - public string CardV1Id { get; set; } - - /// - /// Hash containing information about the Dispute that triggered this credit. - /// - [JsonProperty("dispute")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("dispute")] -#endif - public ReceivedCreditCardSpendDispute Dispute { get; set; } - - /// - /// Hash containing information about the Refund that triggered this credit. - /// - [JsonProperty("refund")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("refund")] -#endif - public ReceivedCreditCardSpendRefund Refund { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditCardSpendDispute.cs b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditCardSpendDispute.cs deleted file mode 100644 index 5a0223c725..0000000000 --- a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditCardSpendDispute.cs +++ /dev/null @@ -1,20 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.MoneyManagement -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReceivedCreditCardSpendDispute : StripeEntity - { - /// - /// The reference to the v1 issuing dispute ID. - /// - [JsonProperty("issuing_dispute_v1")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("issuing_dispute_v1")] -#endif - public string IssuingDisputeV1 { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditCardSpendRefund.cs b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditCardSpendRefund.cs deleted file mode 100644 index 67ce39d59f..0000000000 --- a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditCardSpendRefund.cs +++ /dev/null @@ -1,20 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.MoneyManagement -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReceivedCreditCardSpendRefund : StripeEntity - { - /// - /// The reference to the v1 issuing transaction ID. - /// - [JsonProperty("issuing_transaction_v1")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("issuing_transaction_v1")] -#endif - public string IssuingTransactionV1 { 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 7b43b9c6d7..74c5c80501 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedDebits/ReceivedDebit.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedDebits/ReceivedDebit.cs @@ -50,16 +50,6 @@ public class ReceivedDebit : StripeEntity, IHasId, IHasObject #endif public ReceivedDebitBankTransfer BankTransfer { get; set; } - /// - /// This object stores details about the issuing transactions that resulted in the - /// ReceivedDebit. Present if type field value is card_spend. - /// - [JsonProperty("card_spend")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("card_spend")] -#endif - public ReceivedDebitCardSpend CardSpend { get; set; } - /// /// The time at which the ReceivedDebit was created. Represented as a RFC 3339 date & /// time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. @@ -138,7 +128,7 @@ public class ReceivedDebit : StripeEntity, IHasId, IHasObject /// /// Open Enum. The type of the ReceivedDebit. - /// One of: bank_transfer, card_spend, or external_debit. + /// One of: bank_transfer, or external_debit. /// [JsonProperty("type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedDebits/ReceivedDebitCardSpend.cs b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedDebits/ReceivedDebitCardSpend.cs deleted file mode 100644 index 22248bb707..0000000000 --- a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedDebits/ReceivedDebitCardSpend.cs +++ /dev/null @@ -1,40 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.MoneyManagement -{ - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReceivedDebitCardSpend : StripeEntity - { - /// - /// The Issuing Authorization for this card_spend. Contains the reference id and the amount. - /// - [JsonProperty("authorization")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("authorization")] -#endif - public ReceivedDebitCardSpendAuthorization Authorization { get; set; } - - /// - /// The list of card spend transactions. These contain the transaction reference ID and the - /// amount. - /// - [JsonProperty("card_transactions")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("card_transactions")] -#endif - public List CardTransactions { get; set; } - - /// - /// The reference to the card object that resulted in the debit. - /// - [JsonProperty("card_v1_id")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("card_v1_id")] -#endif - public string CardV1Id { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedDebits/ReceivedDebitCardSpendAuthorization.cs b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedDebits/ReceivedDebitCardSpendAuthorization.cs deleted file mode 100644 index 1e5b7f10d3..0000000000 --- a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedDebits/ReceivedDebitCardSpendAuthorization.cs +++ /dev/null @@ -1,29 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.MoneyManagement -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReceivedDebitCardSpendAuthorization : StripeEntity - { - /// - /// Amount associated with this issuing authorization. - /// - [JsonProperty("amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount")] -#endif - public V2.Amount Amount { get; set; } - - /// - /// The reference to the v1 issuing authorization ID. - /// - [JsonProperty("issuing_authorization_v1")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("issuing_authorization_v1")] -#endif - public string IssuingAuthorizationV1 { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedDebits/ReceivedDebitCardSpendCardTransaction.cs b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedDebits/ReceivedDebitCardSpendCardTransaction.cs deleted file mode 100644 index 9e7d0cb2c4..0000000000 --- a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedDebits/ReceivedDebitCardSpendCardTransaction.cs +++ /dev/null @@ -1,29 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.MoneyManagement -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReceivedDebitCardSpendCardTransaction : StripeEntity - { - /// - /// Amount associated with this issuing transaction. - /// - [JsonProperty("amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount")] -#endif - public V2.Amount Amount { get; set; } - - /// - /// The reference to the v1 issuing transaction ID. - /// - [JsonProperty("issuing_transaction_v1")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("issuing_transaction_v1")] -#endif - public string IssuingTransactionV1 { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Payments/OffSessionPayments/OffSessionPayment.cs b/src/Stripe.net/Entities/V2/Payments/OffSessionPayments/OffSessionPayment.cs new file mode 100644 index 0000000000..755b1730b1 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Payments/OffSessionPayments/OffSessionPayment.cs @@ -0,0 +1,219 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Payments +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Off-session payment resource. + /// + public class OffSessionPayment : StripeEntity, IHasId, IHasMetadata, IHasObject + { + /// + /// ID of the OSP. + /// + [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 of + /// the object field. + /// + [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif + public string Object { get; set; } + + /// + /// The amount you requested to be collected on the OSP upon creation. + /// + [JsonProperty("amount_requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_requested")] +#endif + public V2.Amount AmountRequested { get; set; } + + /// + /// Number of authorization attempts. + /// + [JsonProperty("attempts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("attempts")] +#endif + public long Attempts { get; set; } + + /// + /// The frequency of the underlying payment that this OSP represents. + /// One of: recurring, or unscheduled. + /// + [JsonProperty("cadence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cadence")] +#endif + public string Cadence { get; set; } + + /// + /// ID of owning compartment. + /// + [JsonProperty("compartment_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("compartment_id")] +#endif + public string CompartmentId { get; set; } + + /// + /// Timestamp of creation. + /// + [JsonProperty("created")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] +#endif + public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Customer owning the supplied payment method. + /// + [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif + public string Customer { get; set; } + + /// + /// Reason why the OSP failed. + /// One of: rejected_by_partner, or retries_exhausted. + /// + [JsonProperty("failure_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_reason")] +#endif + public string FailureReason { get; set; } + + /// + /// Last error returned by the financial partner for a failed authorization. + /// + [JsonProperty("last_authorization_attempt_error")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_authorization_attempt_error")] +#endif + public string LastAuthorizationAttemptError { get; set; } + + /// + /// Payment attempt record for the latest attempt, if one exists. + /// + [JsonProperty("latest_payment_attempt_record")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("latest_payment_attempt_record")] +#endif + public string LatestPaymentAttemptRecord { get; set; } + + /// + /// True if the txn is livemode, false otherwise. + /// + [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif + public bool Livemode { get; set; } + + /// + /// Metadata you provided. + /// + [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + + /// + /// OBO, same as on the PI. + /// + [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif + public string OnBehalfOf { get; set; } + + /// + /// ID of payment method. + /// + [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif + public string PaymentMethod { get; set; } + + /// + /// Payment record associated with the OSP. consistent across attempts. + /// + [JsonProperty("payment_record")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_record")] +#endif + public string PaymentRecord { get; set; } + + /// + /// Details about the OSP retries. + /// + [JsonProperty("retry_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("retry_details")] +#endif + public OffSessionPaymentRetryDetails RetryDetails { get; set; } + + /// + /// Statement descriptor you provided. + /// + [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif + public string StatementDescriptor { get; set; } + + /// + /// Statement descriptor suffix you provided, similar to that on the PI. + /// + [JsonProperty("statement_descriptor_suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix")] +#endif + public string StatementDescriptorSuffix { get; set; } + + /// + /// Status of the OSP. + /// One of: canceled, failed, pending, pending_retry, + /// processing, requires_capture, or succeeded. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + + /// + /// Test clock to be used to advance the retry attempts. + /// + [JsonProperty("test_clock")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] +#endif + public string TestClock { get; set; } + + /// + /// Instructions for the transfer to be made with this OSP after successful money movement. + /// + [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif + public OffSessionPaymentTransferData TransferData { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Payments/OffSessionPayments/OffSessionPaymentRetryDetails.cs b/src/Stripe.net/Entities/V2/Payments/OffSessionPayments/OffSessionPaymentRetryDetails.cs new file mode 100644 index 0000000000..9c3a124ca8 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Payments/OffSessionPayments/OffSessionPaymentRetryDetails.cs @@ -0,0 +1,30 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Payments +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class OffSessionPaymentRetryDetails : StripeEntity + { + /// + /// Number of authorization attempts so far. + /// + [JsonProperty("attempts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("attempts")] +#endif + public long Attempts { get; set; } + + /// + /// How you want Stripe to retry the payment. + /// One of: none, or smart. + /// + [JsonProperty("retry_strategy")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("retry_strategy")] +#endif + public string RetryStrategy { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Payments/OffSessionPayments/OffSessionPaymentTransferData.cs b/src/Stripe.net/Entities/V2/Payments/OffSessionPayments/OffSessionPaymentTransferData.cs new file mode 100644 index 0000000000..22d0c2de6a --- /dev/null +++ b/src/Stripe.net/Entities/V2/Payments/OffSessionPayments/OffSessionPaymentTransferData.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Payments +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class OffSessionPaymentTransferData : StripeEntity + { + /// + /// Amount in minor units that you want to transfer. + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public long Amount { get; set; } + + /// + /// ID of the connected account where you want money to go. + /// + [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif + public string Destination { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountLinkCompletedEvent.cs b/src/Stripe.net/Events/V2CoreAccountLinkCompletedEvent.cs index 76a3f4ecec..c206d04410 100644 --- a/src/Stripe.net/Events/V2CoreAccountLinkCompletedEvent.cs +++ b/src/Stripe.net/Events/V2CoreAccountLinkCompletedEvent.cs @@ -8,7 +8,7 @@ namespace Stripe.Events #endif /// - /// The generated account link has been completed. + /// Occurs when the generated AccountLink is completed. /// public class V2CoreAccountLinkCompletedEvent : V2.Event { diff --git a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitFailedEvent.cs b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitFailedEvent.cs index e6120761f0..582a8346f0 100644 --- a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitFailedEvent.cs +++ b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitFailedEvent.cs @@ -8,7 +8,7 @@ namespace Stripe.Events #endif /// - /// An InboundTransfer failed. + /// Occurs when an InboundTransfer fails. /// public class V2MoneyManagementInboundTransferBankDebitFailedEvent : V2.Event { diff --git a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitProcessingEvent.cs b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitProcessingEvent.cs index 9207763f8d..7f963c35b5 100644 --- a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitProcessingEvent.cs +++ b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitProcessingEvent.cs @@ -8,7 +8,7 @@ namespace Stripe.Events #endif /// - /// An InboundTransfer is now processing. + /// Occurs when an InboundTransfer starts processing. /// public class V2MoneyManagementInboundTransferBankDebitProcessingEvent : V2.Event { diff --git a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitQueuedEvent.cs b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitQueuedEvent.cs index dc0386b248..6c755bffef 100644 --- a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitQueuedEvent.cs +++ b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitQueuedEvent.cs @@ -8,7 +8,7 @@ namespace Stripe.Events #endif /// - /// An InboundTransfer has been queued. + /// Occurs when an InboundTransfer is queued. /// public class V2MoneyManagementInboundTransferBankDebitQueuedEvent : V2.Event { diff --git a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitReturnedEvent.cs b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitReturnedEvent.cs index 7338b747f3..7ad3c08c8a 100644 --- a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitReturnedEvent.cs +++ b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitReturnedEvent.cs @@ -8,7 +8,7 @@ namespace Stripe.Events #endif /// - /// An InboundTransfer was returned. + /// Occurs when an InboundTransfer is returned. /// public class V2MoneyManagementInboundTransferBankDebitReturnedEvent : V2.Event { diff --git a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitSucceededEvent.cs b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitSucceededEvent.cs index 94b2852647..9dc0abe124 100644 --- a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitSucceededEvent.cs +++ b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitSucceededEvent.cs @@ -8,7 +8,7 @@ namespace Stripe.Events #endif /// - /// An InboundTransfer succeeded. + /// Occurs when an InboundTransfer succeeds. /// public class V2MoneyManagementInboundTransferBankDebitSucceededEvent : V2.Event { diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentCanceledEvent.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentCanceledEvent.cs index 3f8047b0bb..0be23ad936 100644 --- a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentCanceledEvent.cs +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentCanceledEvent.cs @@ -8,7 +8,7 @@ namespace Stripe.Events #endif /// - /// An OutboundPayment has transitioned into the canceled state. + /// Occurs when an OutboundPayment transitions into the canceled state. /// public class V2MoneyManagementOutboundPaymentCanceledEvent : V2.Event { diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentFailedEvent.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentFailedEvent.cs index a7ca001bb7..36eabffc72 100644 --- a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentFailedEvent.cs +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentFailedEvent.cs @@ -8,7 +8,7 @@ namespace Stripe.Events #endif /// - /// An OutboundPayment has transitioned into the failed state. + /// Occurs when an OutboundPayment transitions into the failed state. /// public class V2MoneyManagementOutboundPaymentFailedEvent : V2.Event { diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentPostedEvent.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentPostedEvent.cs index fe7f8ee1ed..c088b75292 100644 --- a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentPostedEvent.cs +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentPostedEvent.cs @@ -8,7 +8,7 @@ namespace Stripe.Events #endif /// - /// An OutboundPayment has transitioned into the posted state. + /// Occurs when an OutboundPayment transitions into the posted state. /// public class V2MoneyManagementOutboundPaymentPostedEvent : V2.Event { diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentReturnedEvent.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentReturnedEvent.cs index a5ad190d0a..d4e851bda0 100644 --- a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentReturnedEvent.cs +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentReturnedEvent.cs @@ -8,7 +8,7 @@ namespace Stripe.Events #endif /// - /// An OutboundPayment has transitioned into the returned state. + /// Occurs when an OutboundPayment transitions into the returned state. /// public class V2MoneyManagementOutboundPaymentReturnedEvent : V2.Event { diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentUpdatedEvent.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentUpdatedEvent.cs index ab35bf1f32..dd38219572 100644 --- a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentUpdatedEvent.cs +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentUpdatedEvent.cs @@ -8,7 +8,7 @@ namespace Stripe.Events #endif /// - /// Event that is emitted every time an Outbound Payment is updated. + /// Occurs when an OutboundPayment is updated. /// public class V2MoneyManagementOutboundPaymentUpdatedEvent : V2.Event { diff --git a/src/Stripe.net/Events/V2OffSessionPaymentRequiresCaptureEvent.cs b/src/Stripe.net/Events/V2OffSessionPaymentRequiresCaptureEvent.cs new file mode 100644 index 0000000000..88b01b936d --- /dev/null +++ b/src/Stripe.net/Events/V2OffSessionPaymentRequiresCaptureEvent.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Off session payment requires capture event definition. + /// + public class V2OffSessionPaymentRequiresCaptureEvent : V2.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Payments.OffSessionPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.cs b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.cs new file mode 100644 index 0000000000..2b75ff7477 --- /dev/null +++ b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Off session payment authorization attempt failed event definition. + /// + public class V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent : V2.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Payments.OffSessionPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent.cs b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent.cs new file mode 100644 index 0000000000..0b3a5c4441 --- /dev/null +++ b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Off session payment authorization attempt started event definition. + /// + public class V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent : V2.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Payments.OffSessionPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2PaymentsOffSessionPaymentCanceledEvent.cs b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentCanceledEvent.cs new file mode 100644 index 0000000000..4513d0c686 --- /dev/null +++ b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentCanceledEvent.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Off session payment canceled event definition. + /// + public class V2PaymentsOffSessionPaymentCanceledEvent : V2.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Payments.OffSessionPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2PaymentsOffSessionPaymentCreatedEvent.cs b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentCreatedEvent.cs new file mode 100644 index 0000000000..73c730a909 --- /dev/null +++ b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentCreatedEvent.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Off session payment created event definition. + /// + public class V2PaymentsOffSessionPaymentCreatedEvent : V2.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Payments.OffSessionPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2PaymentsOffSessionPaymentFailedEvent.cs b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentFailedEvent.cs new file mode 100644 index 0000000000..34ffc2da12 --- /dev/null +++ b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentFailedEvent.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Off session payment failed event definition. + /// + public class V2PaymentsOffSessionPaymentFailedEvent : V2.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Payments.OffSessionPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2PaymentsOffSessionPaymentSucceededEvent.cs b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentSucceededEvent.cs new file mode 100644 index 0000000000..1f48f968d5 --- /dev/null +++ b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentSucceededEvent.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Off session payment succeeded event definition. + /// + public class V2PaymentsOffSessionPaymentSucceededEvent : V2.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Payments.OffSessionPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs index b65f17ebfe..4638cf5230 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs @@ -36,7 +36,6 @@ public static class StripeTypeRegistry }, { "billing.credit_grant", typeof(Billing.CreditGrant) }, { "billing.meter", typeof(Billing.Meter) }, - { "billing.meter_error_report", typeof(Billing.MeterErrorReport) }, { "billing.meter_event", typeof(Billing.MeterEvent) }, { "billing.meter_event_adjustment", typeof(Billing.MeterEventAdjustment) }, { "billing.meter_event_summary", typeof(Billing.MeterEventSummary) }, @@ -101,8 +100,6 @@ public static class StripeTypeRegistry { "forwarding.request", typeof(Forwarding.Request) }, { "funding_instructions", typeof(FundingInstructions) }, { "fx_quote", typeof(FxQuote) }, - { "gift_cards.card", typeof(GiftCards.Card) }, - { "gift_cards.transaction", typeof(GiftCards.Transaction) }, { "identity.verification_report", typeof(Identity.VerificationReport) }, { "identity.verification_session", typeof(Identity.VerificationSession) }, { "invoice", typeof(Invoice) }, @@ -288,6 +285,7 @@ public static class StripeTypeRegistry "v2.money_management.transaction_entry", typeof( V2.MoneyManagement.TransactionEntry) }, + { "v2.payments.off_session_payment", typeof(V2.Payments.OffSessionPayment) }, // V2ObjectsToTypes: The end of the section generated from our OpenAPI spec }); @@ -407,6 +405,34 @@ public static class StripeTypeRegistry "v2.core.event_destination.ping", typeof( Events.V2CoreEventDestinationPingEvent) }, + { + "v2.off_session_payment.requires_capture", typeof( + Events.V2OffSessionPaymentRequiresCaptureEvent) + }, + { + "v2.payments.off_session_payment.authorization_attempt_failed", typeof( + Events.V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent) + }, + { + "v2.payments.off_session_payment.authorization_attempt_started", typeof( + Events.V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent) + }, + { + "v2.payments.off_session_payment.canceled", typeof( + Events.V2PaymentsOffSessionPaymentCanceledEvent) + }, + { + "v2.payments.off_session_payment.created", typeof( + Events.V2PaymentsOffSessionPaymentCreatedEvent) + }, + { + "v2.payments.off_session_payment.failed", typeof( + Events.V2PaymentsOffSessionPaymentFailedEvent) + }, + { + "v2.payments.off_session_payment.succeeded", typeof( + Events.V2PaymentsOffSessionPaymentSucceededEvent) + }, { "v2.money_management.outbound_payment.canceled", typeof( Events.V2MoneyManagementOutboundPaymentCanceledEvent) diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsDisputesListFeaturesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsDisputesListFeaturesOptions.cs new file mode 100644 index 0000000000..a4c9714bce --- /dev/null +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsDisputesListFeaturesOptions.cs @@ -0,0 +1,50 @@ +// 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 AccountSessionComponentsDisputesListFeaturesOptions : INestedOptions + { + /// + /// Whether to allow capturing and cancelling payment intents. This is true by + /// default. + /// + [JsonProperty("capture_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_payments")] +#endif + public bool? CapturePayments { get; set; } + + /// + /// Whether to allow connected accounts to manage destination charges that are created on + /// behalf of them. This is false by default. + /// + [JsonProperty("destination_on_behalf_of_charge_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_on_behalf_of_charge_management")] +#endif + public bool? DestinationOnBehalfOfChargeManagement { get; set; } + + /// + /// Whether to allow responding to disputes, including submitting evidence and accepting + /// disputes. This is true by default. + /// + [JsonProperty("dispute_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dispute_management")] +#endif + public bool? DisputeManagement { get; set; } + + /// + /// Whether to allow sending refunds. This is true by default. + /// + [JsonProperty("refund_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_management")] +#endif + public bool? RefundManagement { get; set; } + } +} diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsDisputesListOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsDisputesListOptions.cs new file mode 100644 index 0000000000..4eaf521460 --- /dev/null +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsDisputesListOptions.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 AccountSessionComponentsDisputesListOptions : INestedOptions + { + /// + /// Whether the embedded component is enabled. + /// + [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif + public bool? Enabled { get; set; } + + /// + /// The list of features enabled in the embedded component. + /// + [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif + public AccountSessionComponentsDisputesListFeaturesOptions Features { get; set; } + } +} diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsOptions.cs index 689801e7da..ed5554f0a6 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsOptions.cs @@ -89,6 +89,15 @@ public class AccountSessionComponentsOptions : INestedOptions #endif public AccountSessionComponentsCapitalOverviewOptions CapitalOverview { get; set; } + /// + /// Configuration for the disputes list embedded component. + /// + [JsonProperty("disputes_list")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disputes_list")] +#endif + public AccountSessionComponentsDisputesListOptions DisputesList { get; set; } + /// /// Configuration for the documents embedded component. /// diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs index a94d8a0271..b9da44d8bc 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs @@ -440,6 +440,15 @@ public class AccountCapabilitiesOptions : INestedOptions #endif public AccountCapabilitiesPaytoPaymentsOptions PaytoPayments { get; set; } + /// + /// The pix_payments capability. + /// + [JsonProperty("pix_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix_payments")] +#endif + public AccountCapabilitiesPixPaymentsOptions PixPayments { get; set; } + /// /// The promptpay_payments capability. /// diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesPixPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesPixPaymentsOptions.cs new file mode 100644 index 0000000000..d9abe9f6a9 --- /dev/null +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesPixPaymentsOptions.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCapabilitiesPixPaymentsOptions : INestedOptions + { + /// + /// Passing true requests the capability for the account, if it is not already requested. A + /// requested capability may not immediately become active. Any requirements to activate the + /// capability are returned in the requirements arrays. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/Charges/ChargePaymentDetailsCarRentalDistanceOptions.cs b/src/Stripe.net/Services/Charges/ChargePaymentDetailsCarRentalDistanceOptions.cs new file mode 100644 index 0000000000..00fc5f33b5 --- /dev/null +++ b/src/Stripe.net/Services/Charges/ChargePaymentDetailsCarRentalDistanceOptions.cs @@ -0,0 +1,30 @@ +// 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 ChargePaymentDetailsCarRentalDistanceOptions : INestedOptions + { + /// + /// Distance traveled. + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public long? Amount { get; set; } + + /// + /// Unit of measurement for the distance traveled. One of miles or kilometers. + /// One of: kilometers, or miles. + /// + [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif + public string Unit { get; set; } + } +} diff --git a/src/Stripe.net/Services/Charges/ChargePaymentDetailsCarRentalDriverOptions.cs b/src/Stripe.net/Services/Charges/ChargePaymentDetailsCarRentalDriverOptions.cs index b7f9b4a4bf..ebd1d7f8c9 100644 --- a/src/Stripe.net/Services/Charges/ChargePaymentDetailsCarRentalDriverOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargePaymentDetailsCarRentalDriverOptions.cs @@ -8,6 +8,24 @@ namespace Stripe public class ChargePaymentDetailsCarRentalDriverOptions : INestedOptions { + /// + /// Driver's identification number. + /// + [JsonProperty("driver_identification_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("driver_identification_number")] +#endif + public string DriverIdentificationNumber { get; set; } + + /// + /// Driver's tax number. + /// + [JsonProperty("driver_tax_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("driver_tax_number")] +#endif + public string DriverTaxNumber { get; set; } + /// /// Full name of the person or entity on the car reservation. /// diff --git a/src/Stripe.net/Services/Charges/ChargePaymentDetailsCarRentalOptions.cs b/src/Stripe.net/Services/Charges/ChargePaymentDetailsCarRentalOptions.cs index 139e2662fd..63e5ebea85 100644 --- a/src/Stripe.net/Services/Charges/ChargePaymentDetailsCarRentalOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargePaymentDetailsCarRentalOptions.cs @@ -92,6 +92,15 @@ public class ChargePaymentDetailsCarRentalOptions : INestedOptions #endif public ChargePaymentDetailsCarRentalDeliveryOptions Delivery { get; set; } + /// + /// The details of the distance traveled during the rental period. + /// + [JsonProperty("distance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("distance")] +#endif + public ChargePaymentDetailsCarRentalDistanceOptions Distance { get; set; } + /// /// The details of the passengers in the travel reservation. /// @@ -141,6 +150,15 @@ public class ChargePaymentDetailsCarRentalOptions : INestedOptions #endif public DateTime? PickupAt { get; set; } + /// + /// Name of the pickup location. + /// + [JsonProperty("pickup_location_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pickup_location_name")] +#endif + public string PickupLocationName { get; set; } + /// /// Rental rate. /// @@ -190,6 +208,15 @@ public class ChargePaymentDetailsCarRentalOptions : INestedOptions #endif public DateTime? ReturnAt { get; set; } + /// + /// Name of the return location. + /// + [JsonProperty("return_location_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_location_name")] +#endif + public string ReturnLocationName { get; set; } + /// /// Indicates whether the goods or services are tax-exempt or tax is not collected. /// @@ -198,5 +225,14 @@ public class ChargePaymentDetailsCarRentalOptions : INestedOptions [STJS.JsonPropertyName("tax_exempt")] #endif public bool? TaxExempt { get; set; } + + /// + /// The vehicle identification number. + /// + [JsonProperty("vehicle_identification_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("vehicle_identification_number")] +#endif + public string VehicleIdentificationNumber { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionSavedPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionSavedPaymentMethodOptionsOptions.cs index 95689a4760..d4a592ecda 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionSavedPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionSavedPaymentMethodOptionsOptions.cs @@ -21,6 +21,17 @@ public class SessionSavedPaymentMethodOptionsOptions : INestedOptions #endif public List AllowRedisplayFilters { get; set; } + /// + /// Enable customers to choose if they wish to remove their saved payment methods. Disabled + /// by default. + /// One of: disabled, or enabled. + /// + [JsonProperty("payment_method_remove")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_remove")] +#endif + public string PaymentMethodRemove { get; set; } + /// /// Enable customers to choose if they wish to save their payment method for future use. /// Disabled by default. diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionService.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionService.cs index 8b17838e8e..cc6e204606 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionService.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionService.cs @@ -123,6 +123,10 @@ public virtual IAsyncEnumerable ListAutoPagingAsync(SessionListOptions /// ///

Updates a Checkout Session object.

. + /// + ///

Related guide: Dynamically update + /// Checkout

. ///
public virtual Session Update(string id, SessionUpdateOptions options, RequestOptions requestOptions = null) { @@ -131,6 +135,10 @@ public virtual Session Update(string id, SessionUpdateOptions options, RequestOp /// ///

Updates a Checkout Session object.

. + /// + ///

Related guide: Dynamically update + /// Checkout

. ///
public virtual Task UpdateAsync(string id, SessionUpdateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs index 4e54db7b70..8612181f08 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs @@ -37,8 +37,7 @@ public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata public DateTime? BillingCycleAnchor { get; set; } /// - /// Configure billing_mode in each subscription to opt in improved credit proration - /// behavior. + /// Controls how prorations and invoices for subscriptions are calculated and orchestrated. /// One of: classic, or flexible. /// [JsonProperty("billing_mode")] diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs index b352b81977..2ca6f01a3c 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs @@ -29,7 +29,8 @@ public class SessionUpdateOptions : BaseOptions, IHasMetadata /// To update an existing line item, specify its id along with the new values of the /// fields to update. /// - /// To add a new line item, specify a price and quantity. + /// To add a new line item, specify one of price or price_data and + /// quantity. /// /// To remove an existing line item, omit the line item's ID from the retransmitted array. /// diff --git a/src/Stripe.net/Services/GiftCards/Cards/CardCreateOptions.cs b/src/Stripe.net/Services/GiftCards/Cards/CardCreateOptions.cs deleted file mode 100644 index ad7a1d9dfe..0000000000 --- a/src/Stripe.net/Services/GiftCards/Cards/CardCreateOptions.cs +++ /dev/null @@ -1,63 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class CardCreateOptions : BaseOptions, IHasMetadata - { - /// - /// The active state for the new gift card, defaults to false. The active state can be - /// updated after creation. - /// - [JsonProperty("active")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("active")] -#endif - public bool? Active { get; set; } - - /// - /// Related objects which created this gift card. - /// - [JsonProperty("created_by")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created_by")] -#endif - public CardCreatedByOptions CreatedBy { get; set; } - - /// - /// Three-letter ISO currency - /// code, in lowercase. Must be a supported - /// currency. - /// - [JsonProperty("currency")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("currency")] -#endif - public string Currency { get; set; } - - /// - /// The initial amount to load onto the new gift card, defaults to 0. - /// - [JsonProperty("initial_amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("initial_amount")] -#endif - public long? InitialAmount { 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/GiftCards/Cards/CardCreatedByOptions.cs b/src/Stripe.net/Services/GiftCards/Cards/CardCreatedByOptions.cs deleted file mode 100644 index bfcb272163..0000000000 --- a/src/Stripe.net/Services/GiftCards/Cards/CardCreatedByOptions.cs +++ /dev/null @@ -1,29 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class CardCreatedByOptions : INestedOptions - { - /// - /// The details for the payment that created this object. - /// - [JsonProperty("payment")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("payment")] -#endif - public CardCreatedByPaymentOptions Payment { get; set; } - - /// - /// The type of event that created this object. - /// - [JsonProperty("type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("type")] -#endif - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Services/GiftCards/Cards/CardCreatedByPaymentOptions.cs b/src/Stripe.net/Services/GiftCards/Cards/CardCreatedByPaymentOptions.cs deleted file mode 100644 index 4578df438e..0000000000 --- a/src/Stripe.net/Services/GiftCards/Cards/CardCreatedByPaymentOptions.cs +++ /dev/null @@ -1,20 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class CardCreatedByPaymentOptions : INestedOptions - { - /// - /// The PaymentIntent used to collect payment for this object. - /// - [JsonProperty("payment_intent")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("payment_intent")] -#endif - public string PaymentIntent { get; set; } - } -} diff --git a/src/Stripe.net/Services/GiftCards/Cards/CardGetOptions.cs b/src/Stripe.net/Services/GiftCards/Cards/CardGetOptions.cs deleted file mode 100644 index bf3bfd9e26..0000000000 --- a/src/Stripe.net/Services/GiftCards/Cards/CardGetOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - public class CardGetOptions : BaseOptions - { - } -} diff --git a/src/Stripe.net/Services/GiftCards/Cards/CardListOptions.cs b/src/Stripe.net/Services/GiftCards/Cards/CardListOptions.cs deleted file mode 100644 index eba6a0e084..0000000000 --- a/src/Stripe.net/Services/GiftCards/Cards/CardListOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - public class CardListOptions : ListOptions - { - } -} diff --git a/src/Stripe.net/Services/GiftCards/Cards/CardService.cs b/src/Stripe.net/Services/GiftCards/Cards/CardService.cs deleted file mode 100644 index 05fe4b8117..0000000000 --- a/src/Stripe.net/Services/GiftCards/Cards/CardService.cs +++ /dev/null @@ -1,127 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using System; - using System.Collections.Generic; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - public class CardService : Service, - ICreatable, - IListable, - IRetrievable, - IUpdatable - { - public CardService() - { - } - - internal CardService(ApiRequestor requestor) - : base(requestor) - { - } - - public CardService(IStripeClient client) - : base(client) - { - } - - /// - ///

Creates a new gift card object.

. - ///
- public virtual Card Create(CardCreateOptions options, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/gift_cards/cards", options, requestOptions); - } - - /// - ///

Creates a new gift card object.

. - ///
- public virtual Task CreateAsync(CardCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/gift_cards/cards", options, requestOptions, cancellationToken); - } - - /// - ///

Retrieve a gift card by id

. - ///
- public virtual Card Get(string id, CardGetOptions options = null, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v1/gift_cards/cards/{WebUtility.UrlEncode(id)}", options, requestOptions); - } - - /// - ///

Retrieve a gift card by id

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

List gift cards for an account

. - ///
- public virtual StripeList List(CardListOptions options = null, RequestOptions requestOptions = null) - { - return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v1/gift_cards/cards", options, requestOptions); - } - - /// - ///

List gift cards for an account

. - ///
- public virtual Task> ListAsync(CardListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v1/gift_cards/cards", options, requestOptions, cancellationToken); - } - - /// - ///

List gift cards for an account

. - ///
- public virtual IEnumerable ListAutoPaging(CardListOptions options = null, RequestOptions requestOptions = null) - { - return this.ListRequestAutoPaging($"/v1/gift_cards/cards", options, requestOptions); - } - - /// - ///

List gift cards for an account

. - ///
- public virtual IAsyncEnumerable ListAutoPagingAsync(CardListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.ListRequestAutoPagingAsync($"/v1/gift_cards/cards", options, requestOptions, cancellationToken); - } - - /// - ///

Update a gift card

. - ///
- public virtual Card Update(string id, CardUpdateOptions options, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/gift_cards/cards/{WebUtility.UrlEncode(id)}", options, requestOptions); - } - - /// - ///

Update a gift card

. - ///
- public virtual Task UpdateAsync(string id, CardUpdateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/gift_cards/cards/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); - } - - /// - ///

Validates a gift card code, returning the matching gift card object if it exists.

. - ///
- public virtual Card Validate(CardValidateOptions options = null, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/gift_cards/cards/validate", options, requestOptions); - } - - /// - ///

Validates a gift card code, returning the matching gift card object if it exists.

. - ///
- public virtual Task ValidateAsync(CardValidateOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/gift_cards/cards/validate", options, requestOptions, cancellationToken); - } - } -} diff --git a/src/Stripe.net/Services/GiftCards/Cards/CardUpdateOptions.cs b/src/Stripe.net/Services/GiftCards/Cards/CardUpdateOptions.cs deleted file mode 100644 index ebda05e3f2..0000000000 --- a/src/Stripe.net/Services/GiftCards/Cards/CardUpdateOptions.cs +++ /dev/null @@ -1,33 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class CardUpdateOptions : BaseOptions, IHasMetadata - { - /// - /// The new active state for the gift card. - /// - [JsonProperty("active")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("active")] -#endif - public bool? Active { 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/GiftCards/Cards/CardValidateOptions.cs b/src/Stripe.net/Services/GiftCards/Cards/CardValidateOptions.cs deleted file mode 100644 index 10faf1be35..0000000000 --- a/src/Stripe.net/Services/GiftCards/Cards/CardValidateOptions.cs +++ /dev/null @@ -1,29 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class CardValidateOptions : BaseOptions - { - /// - /// The gift card code to be validated. - /// - [JsonProperty("code")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("code")] -#endif - public string Code { get; set; } - - /// - /// The pin associated with the gift card. Not all gift cards have pins. - /// - [JsonProperty("giftcard_pin")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("giftcard_pin")] -#endif - public string GiftcardPin { get; set; } - } -} diff --git a/src/Stripe.net/Services/GiftCards/Transactions/TransactionCancelOptions.cs b/src/Stripe.net/Services/GiftCards/Transactions/TransactionCancelOptions.cs deleted file mode 100644 index f1974336f5..0000000000 --- a/src/Stripe.net/Services/GiftCards/Transactions/TransactionCancelOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - public class TransactionCancelOptions : BaseOptions - { - } -} diff --git a/src/Stripe.net/Services/GiftCards/Transactions/TransactionConfirmOptions.cs b/src/Stripe.net/Services/GiftCards/Transactions/TransactionConfirmOptions.cs deleted file mode 100644 index 547ab0a125..0000000000 --- a/src/Stripe.net/Services/GiftCards/Transactions/TransactionConfirmOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - public class TransactionConfirmOptions : BaseOptions - { - } -} diff --git a/src/Stripe.net/Services/GiftCards/Transactions/TransactionCreateOptions.cs b/src/Stripe.net/Services/GiftCards/Transactions/TransactionCreateOptions.cs deleted file mode 100644 index a2390162d0..0000000000 --- a/src/Stripe.net/Services/GiftCards/Transactions/TransactionCreateOptions.cs +++ /dev/null @@ -1,92 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class TransactionCreateOptions : BaseOptions, IHasMetadata - { - /// - /// The amount of the transaction. A negative amount deducts funds, and a positive amount - /// adds funds. - /// - [JsonProperty("amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount")] -#endif - public long? Amount { get; set; } - - /// - /// Whether this is a confirmed transaction. A confirmed transaction immediately deducts - /// from/adds to the amount_available on the gift card. Otherwise, it creates a held - /// transaction that increments the amount_held on the gift card. - /// - [JsonProperty("confirm")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("confirm")] -#endif - public bool? Confirm { get; set; } - - /// - /// Related objects which created this transaction. - /// - [JsonProperty("created_by")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created_by")] -#endif - public TransactionCreatedByOptions CreatedBy { get; set; } - - /// - /// The currency of the transaction. This must match the currency of the gift card. - /// - [JsonProperty("currency")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("currency")] -#endif - public string Currency { 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; } - - /// - /// The gift card to create a new transaction on. - /// - [JsonProperty("gift_card")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("gift_card")] -#endif - public string GiftCard { 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; } - - /// - /// A string that identifies this transaction as part of a group. See the Connect - /// documentation for details. - /// - [JsonProperty("transfer_group")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("transfer_group")] -#endif - public string TransferGroup { get; set; } - } -} diff --git a/src/Stripe.net/Services/GiftCards/Transactions/TransactionCreatedByOptions.cs b/src/Stripe.net/Services/GiftCards/Transactions/TransactionCreatedByOptions.cs deleted file mode 100644 index 2e1d09f037..0000000000 --- a/src/Stripe.net/Services/GiftCards/Transactions/TransactionCreatedByOptions.cs +++ /dev/null @@ -1,29 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class TransactionCreatedByOptions : INestedOptions - { - /// - /// The details for the payment that created this object. - /// - [JsonProperty("payment")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("payment")] -#endif - public TransactionCreatedByPaymentOptions Payment { get; set; } - - /// - /// The type of event that created this object. - /// - [JsonProperty("type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("type")] -#endif - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Services/GiftCards/Transactions/TransactionCreatedByPaymentOptions.cs b/src/Stripe.net/Services/GiftCards/Transactions/TransactionCreatedByPaymentOptions.cs deleted file mode 100644 index 2f6fd1619c..0000000000 --- a/src/Stripe.net/Services/GiftCards/Transactions/TransactionCreatedByPaymentOptions.cs +++ /dev/null @@ -1,20 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class TransactionCreatedByPaymentOptions : INestedOptions - { - /// - /// The PaymentIntent used to collect payment for this object. - /// - [JsonProperty("payment_intent")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("payment_intent")] -#endif - public string PaymentIntent { get; set; } - } -} diff --git a/src/Stripe.net/Services/GiftCards/Transactions/TransactionGetOptions.cs b/src/Stripe.net/Services/GiftCards/Transactions/TransactionGetOptions.cs deleted file mode 100644 index 27c1e3ae41..0000000000 --- a/src/Stripe.net/Services/GiftCards/Transactions/TransactionGetOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - public class TransactionGetOptions : BaseOptions - { - } -} diff --git a/src/Stripe.net/Services/GiftCards/Transactions/TransactionListOptions.cs b/src/Stripe.net/Services/GiftCards/Transactions/TransactionListOptions.cs deleted file mode 100644 index ee91e2e93f..0000000000 --- a/src/Stripe.net/Services/GiftCards/Transactions/TransactionListOptions.cs +++ /dev/null @@ -1,31 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class TransactionListOptions : ListOptions - { - /// - /// The gift card to list transactions for. - /// - [JsonProperty("gift_card")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("gift_card")] -#endif - public string GiftCard { get; set; } - - /// - /// A string that identifies this transaction as part of a group. See the Connect - /// documentation for details. - /// - [JsonProperty("transfer_group")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("transfer_group")] -#endif - public string TransferGroup { get; set; } - } -} diff --git a/src/Stripe.net/Services/GiftCards/Transactions/TransactionService.cs b/src/Stripe.net/Services/GiftCards/Transactions/TransactionService.cs deleted file mode 100644 index 06cdd2e230..0000000000 --- a/src/Stripe.net/Services/GiftCards/Transactions/TransactionService.cs +++ /dev/null @@ -1,143 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using System; - using System.Collections.Generic; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - public class TransactionService : Service, - ICreatable, - IListable, - IRetrievable, - IUpdatable - { - public TransactionService() - { - } - - internal TransactionService(ApiRequestor requestor) - : base(requestor) - { - } - - public TransactionService(IStripeClient client) - : base(client) - { - } - - /// - ///

Cancel a gift card transaction

. - ///
- public virtual Transaction Cancel(string id, TransactionCancelOptions options = null, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/gift_cards/transactions/{WebUtility.UrlEncode(id)}/cancel", options, requestOptions); - } - - /// - ///

Cancel a gift card transaction

. - ///
- public virtual Task CancelAsync(string id, TransactionCancelOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/gift_cards/transactions/{WebUtility.UrlEncode(id)}/cancel", options, requestOptions, cancellationToken); - } - - /// - ///

Confirm a gift card transaction

. - ///
- public virtual Transaction Confirm(string id, TransactionConfirmOptions options = null, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/gift_cards/transactions/{WebUtility.UrlEncode(id)}/confirm", options, requestOptions); - } - - /// - ///

Confirm a gift card transaction

. - ///
- public virtual Task ConfirmAsync(string id, TransactionConfirmOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/gift_cards/transactions/{WebUtility.UrlEncode(id)}/confirm", options, requestOptions, cancellationToken); - } - - /// - ///

Create a gift card transaction

. - ///
- public virtual Transaction Create(TransactionCreateOptions options, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/gift_cards/transactions", options, requestOptions); - } - - /// - ///

Create a gift card transaction

. - ///
- public virtual Task CreateAsync(TransactionCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/gift_cards/transactions", options, requestOptions, cancellationToken); - } - - /// - ///

Retrieves the gift card transaction.

. - ///
- public virtual Transaction Get(string id, TransactionGetOptions options = null, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v1/gift_cards/transactions/{WebUtility.UrlEncode(id)}", options, requestOptions); - } - - /// - ///

Retrieves the gift card transaction.

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

List gift card transactions for a gift card

. - ///
- public virtual StripeList List(TransactionListOptions options = null, RequestOptions requestOptions = null) - { - return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v1/gift_cards/transactions", options, requestOptions); - } - - /// - ///

List gift card transactions for a gift card

. - ///
- public virtual Task> ListAsync(TransactionListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v1/gift_cards/transactions", options, requestOptions, cancellationToken); - } - - /// - ///

List gift card transactions for a gift card

. - ///
- public virtual IEnumerable ListAutoPaging(TransactionListOptions options = null, RequestOptions requestOptions = null) - { - return this.ListRequestAutoPaging($"/v1/gift_cards/transactions", options, requestOptions); - } - - /// - ///

List gift card transactions for a gift card

. - ///
- public virtual IAsyncEnumerable ListAutoPagingAsync(TransactionListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.ListRequestAutoPagingAsync($"/v1/gift_cards/transactions", options, requestOptions, cancellationToken); - } - - /// - ///

Update a gift card transaction

. - ///
- public virtual Transaction Update(string id, TransactionUpdateOptions options, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/gift_cards/transactions/{WebUtility.UrlEncode(id)}", options, requestOptions); - } - - /// - ///

Update a gift card transaction

. - ///
- public virtual Task UpdateAsync(string id, TransactionUpdateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/gift_cards/transactions/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); - } - } -} diff --git a/src/Stripe.net/Services/GiftCards/Transactions/TransactionUpdateOptions.cs b/src/Stripe.net/Services/GiftCards/Transactions/TransactionUpdateOptions.cs deleted file mode 100644 index 67c98d127b..0000000000 --- a/src/Stripe.net/Services/GiftCards/Transactions/TransactionUpdateOptions.cs +++ /dev/null @@ -1,33 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.GiftCards -{ - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class TransactionUpdateOptions : BaseOptions, IHasMetadata - { - /// - /// 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; } - } -} diff --git a/src/Stripe.net/Services/GiftCardsService.cs b/src/Stripe.net/Services/GiftCardsService.cs deleted file mode 100644 index ba240bc146..0000000000 --- a/src/Stripe.net/Services/GiftCardsService.cs +++ /dev/null @@ -1,29 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System; - using System.Threading; - using System.Threading.Tasks; - - public class GiftCardsService : Service - { - private GiftCards.CardService cards; - private GiftCards.TransactionService transactions; - - internal GiftCardsService(ApiRequestor requestor) - : base(requestor) - { - } - - internal GiftCardsService(IStripeClient client) - : base(client) - { - } - - public virtual GiftCards.CardService Cards => this.cards ??= new GiftCards.CardService( - this.Requestor); - - public virtual GiftCards.TransactionService Transactions => this.transactions ??= new GiftCards.TransactionService( - this.Requestor); - } -} diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsOptions.cs index a07fdf1840..e0578dcf97 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsOptions.cs @@ -33,9 +33,7 @@ public class InvoiceScheduleDetailsOptions : INestedOptions public string BillingBehavior { get; set; } /// - /// Configure billing_mode to opt in improved credit proration behavior.When the schedule - /// creates a subscription, the subscription's billing_mode will be set to the same - /// value as the schedule's billing_mode. + /// Controls how prorations and invoices for subscriptions are calculated and orchestrated. /// One of: classic, or flexible. /// [JsonProperty("billing_mode")] diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseBillingThresholdsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseBillingThresholdsOptions.cs new file mode 100644 index 0000000000..56ad07b4f5 --- /dev/null +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseBillingThresholdsOptions.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 InvoiceScheduleDetailsPhaseBillingThresholdsOptions : INestedOptions + { + /// + /// Monetary threshold that triggers the subscription to advance to a new billing period. + /// + [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif + public long? AmountGte { get; set; } + + /// + /// Indicates if the billing_cycle_anchor should be reset when a threshold is + /// reached. If true, billing_cycle_anchor will be updated to the date/time the + /// threshold was last reached; otherwise, the value will remain unchanged. + /// + [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif + public bool? ResetBillingCycleAnchor { get; set; } + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions.cs new file mode 100644 index 0000000000..d7b15b3f94 --- /dev/null +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions.cs @@ -0,0 +1,23 @@ +// 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 InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions : INestedOptions + { + /// + /// Number of units that meets the billing threshold to advance the subscription to a new + /// billing period (e.g., it takes 10 $5 units to meet a $50 monetary + /// threshold). + /// + [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif + public long? UsageGte { get; set; } + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemOptions.cs index 5c98788659..34a16699af 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemOptions.cs @@ -9,6 +9,16 @@ namespace Stripe public class InvoiceScheduleDetailsPhaseItemOptions : INestedOptions, IHasMetadata { + /// + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. Pass an empty string to remove previously-defined thresholds. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions BillingThresholds { get; set; } + /// /// The coupons to redeem into discounts for the subscription item. /// diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs index a6e85207a8..424a706045 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs @@ -58,6 +58,16 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata #endif public string BillingCycleAnchor { get; set; } + /// + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. Pass an empty string to remove previously-defined thresholds. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public InvoiceScheduleDetailsPhaseBillingThresholdsOptions BillingThresholds { get; set; } + /// /// Either charge_automatically, or send_invoice. When charging automatically, /// Stripe will attempt to pay the underlying subscription at the end of each billing cycle @@ -212,14 +222,13 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata public InvoiceScheduleDetailsPhasePauseCollectionOptions PauseCollection { get; set; } /// - /// Whether the subscription schedule will create prorations when - /// transitioning to this phase. The default value is create_prorations. This setting - /// controls prorations when a phase is started asynchronously and it is persisted as a - /// field on the phase. It's different from the request-level proration_behavior /// parameter which controls what happens if the update request affects the billing - /// configuration of the current phase. + /// configuration (item price, quantity, etc.) of the current phase. /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] diff --git a/src/Stripe.net/Services/Invoices/InvoiceService.cs b/src/Stripe.net/Services/Invoices/InvoiceService.cs index 7ea50681c0..fb8095f74c 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceService.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceService.cs @@ -57,10 +57,6 @@ public virtual Task AddLinesAsync(string id, InvoiceAddLinesOptions opt ///

Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the /// list of payments.

. /// - ///

For Out of Band Payment, the payment is credited to the invoice immediately, - /// increasing the amount_paid of the invoice and subsequently transitioning the - /// status of the invoice to paid if necessary.

. - /// ///

For the PaymentIntent, when the PaymentIntent’s status changes to succeeded, /// the payment is credited to the invoice, increasing its amount_paid. When the /// invoice is fully paid, the invoice’s status becomes paid.

. @@ -68,8 +64,8 @@ public virtual Task AddLinesAsync(string id, InvoiceAddLinesOptions opt ///

If the PaymentIntent’s status is already succeeded when it’s attached, it’s /// credited to the invoice immediately.

. /// - ///

See: Create an invoice - /// payment to learn more.

. + ///

See: Partial + /// payments to learn more.

. ///
public virtual Invoice AttachPayment(string id, InvoiceAttachPaymentOptions options = null, RequestOptions requestOptions = null) { @@ -80,10 +76,6 @@ public virtual Invoice AttachPayment(string id, InvoiceAttachPaymentOptions opti ///

Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the /// list of payments.

. /// - ///

For Out of Band Payment, the payment is credited to the invoice immediately, - /// increasing the amount_paid of the invoice and subsequently transitioning the - /// status of the invoice to paid if necessary.

. - /// ///

For the PaymentIntent, when the PaymentIntent’s status changes to succeeded, /// the payment is credited to the invoice, increasing its amount_paid. When the /// invoice is fully paid, the invoice’s status becomes paid.

. @@ -91,8 +83,8 @@ public virtual Invoice AttachPayment(string id, InvoiceAttachPaymentOptions opti ///

If the PaymentIntent’s status is already succeeded when it’s attached, it’s /// credited to the invoice immediately.

. /// - ///

See: Create an invoice - /// payment to learn more.

. + ///

See: Partial + /// payments to learn more.

. ///
public virtual Task AttachPaymentAsync(string id, InvoiceAttachPaymentOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { @@ -129,20 +121,22 @@ public virtual Task CreateAsync(InvoiceCreateOptions options, RequestOp /// renewal charges, invoice item charges, etc. It will also show you any discounts that are /// applicable to the invoice.

. /// + ///

You can also preview the effects of creating or updating a subscription or + /// subscription schedule, including a preview of any prorations that will take place. To + /// ensure that the actual proration is calculated exactly the same as the previewed + /// proration, you should pass the subscription_details.proration_date parameter when + /// doing the actual subscription update.

. + /// + ///

The recommended way to get only the prorations being previewed on the invoice is to + /// consider line items where parent.subscription_item_details.proration is + /// true.

. + /// ///

Note that when you are viewing an upcoming invoice, you are simply viewing a preview /// – the invoice has not yet been created. As such, the upcoming invoice will not show up /// in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you /// want to change the amount that your customer will be billed, you can add, remove, or /// update pending invoice items, or update the customer’s discount.

. /// - ///

You can preview the effects of updating a subscription, including a preview of what - /// proration will take place. To ensure that the actual proration is calculated exactly the - /// same as the previewed proration, you should pass the - /// subscription_details.proration_date parameter when doing the actual subscription - /// update. The recommended way to get only the prorations being previewed is to consider - /// only proration line items where period[start] is equal to the - /// subscription_details.proration_date value passed in the request.

. - /// ///

Note: Currency conversion calculations use the latest exchange rates. Exchange rates /// may vary between the time of the preview and the time of the actual invoice creation. Learn more

. @@ -158,20 +152,22 @@ public virtual Invoice CreatePreview(InvoiceCreatePreviewOptions options = null, /// renewal charges, invoice item charges, etc. It will also show you any discounts that are /// applicable to the invoice.

. /// + ///

You can also preview the effects of creating or updating a subscription or + /// subscription schedule, including a preview of any prorations that will take place. To + /// ensure that the actual proration is calculated exactly the same as the previewed + /// proration, you should pass the subscription_details.proration_date parameter when + /// doing the actual subscription update.

. + /// + ///

The recommended way to get only the prorations being previewed on the invoice is to + /// consider line items where parent.subscription_item_details.proration is + /// true.

. + /// ///

Note that when you are viewing an upcoming invoice, you are simply viewing a preview /// – the invoice has not yet been created. As such, the upcoming invoice will not show up /// in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you /// want to change the amount that your customer will be billed, you can add, remove, or /// update pending invoice items, or update the customer’s discount.

. /// - ///

You can preview the effects of updating a subscription, including a preview of what - /// proration will take place. To ensure that the actual proration is calculated exactly the - /// same as the previewed proration, you should pass the - /// subscription_details.proration_date parameter when doing the actual subscription - /// update. The recommended way to get only the prorations being previewed is to consider - /// only proration line items where period[start] is equal to the - /// subscription_details.proration_date value passed in the request.

. - /// ///

Note: Currency conversion calculations use the latest exchange rates. Exchange rates /// may vary between the time of the preview and the time of the actual invoice creation. Learn more

. diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsCancelAt.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsCancelAt.cs new file mode 100644 index 0000000000..1a839ec195 --- /dev/null +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsCancelAt.cs @@ -0,0 +1,14 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class InvoiceSubscriptionDetailsCancelAt : StringEnum + { + public static readonly InvoiceSubscriptionDetailsCancelAt MaxPeriodEnd = new InvoiceSubscriptionDetailsCancelAt("max_period_end"); + public static readonly InvoiceSubscriptionDetailsCancelAt MinPeriodEnd = new InvoiceSubscriptionDetailsCancelAt("min_period_end"); + + private InvoiceSubscriptionDetailsCancelAt(string value) + : base(value) + { + } + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemBillingThresholdsOptions.cs new file mode 100644 index 0000000000..442591b03f --- /dev/null +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemBillingThresholdsOptions.cs @@ -0,0 +1,23 @@ +// 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 InvoiceSubscriptionDetailsItemBillingThresholdsOptions : INestedOptions + { + /// + /// Number of units that meets the billing threshold to advance the subscription to a new + /// billing period (e.g., it takes 10 $5 units to meet a $50 monetary + /// threshold). + /// + [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif + public long? UsageGte { get; set; } + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemOptions.cs index 4044aabca0..5bc05564d7 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemOptions.cs @@ -9,6 +9,16 @@ namespace Stripe public class InvoiceSubscriptionDetailsItemOptions : INestedOptions, IHasId, IHasMetadata { + /// + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. Pass an empty string to remove previously-defined thresholds. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public InvoiceSubscriptionDetailsItemBillingThresholdsOptions BillingThresholds { get; set; } + /// /// Delete all usage for a given subscription item. You must pass this when deleting a usage /// records subscription item. clear_usage has no effect if the plan has a billing diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs index 23d4b7a483..225ea1156c 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs @@ -27,8 +27,7 @@ public class InvoiceSubscriptionDetailsOptions : INestedOptions public AnyOf BillingCycleAnchor { get; set; } /// - /// Configure billing_mode in each subscription to opt in improved credit proration - /// behavior. + /// Controls how prorations and invoices for subscriptions are calculated and orchestrated. /// One of: classic, or flexible. /// [JsonProperty("billing_mode")] @@ -44,16 +43,17 @@ public class InvoiceSubscriptionDetailsOptions : INestedOptions /// proration for that period. /// [JsonProperty("cancel_at")] - [JsonConverter(typeof(UnixDateTimeConverter))] + [JsonConverter(typeof(AnyOfConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("cancel_at")] - [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] #endif - public DateTime? CancelAt { get; set; } + public AnyOf CancelAt { get; set; } /// /// Indicate whether this subscription should cancel at the end of the current period - /// (current_period_end). Defaults to false. + /// (current_period_end). Defaults to false. This param will be removed in a + /// future API version. Please use cancel_at instead. /// [JsonProperty("cancel_at_period_end")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Issuing/Cards/CardCreateOptions.cs b/src/Stripe.net/Services/Issuing/Cards/CardCreateOptions.cs index 2eca0162df..a8b974942b 100644 --- a/src/Stripe.net/Services/Issuing/Cards/CardCreateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cards/CardCreateOptions.cs @@ -28,6 +28,10 @@ public class CardCreateOptions : BaseOptions, IHasMetadata #endif public string Currency { get; set; } + /// + /// The new financial account ID the card will be associated with. This field allows a card + /// to be reassigned to a different financial account. + /// [JsonProperty("financial_account")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("financial_account")] diff --git a/src/Stripe.net/Services/Orders/OrderCreateOptions.cs b/src/Stripe.net/Services/Orders/OrderCreateOptions.cs index ce89297911..4ca4f70f42 100644 --- a/src/Stripe.net/Services/Orders/OrderCreateOptions.cs +++ b/src/Stripe.net/Services/Orders/OrderCreateOptions.cs @@ -28,15 +28,6 @@ public class OrderCreateOptions : BaseOptions, IHasMetadata #endif public OrderBillingDetailsOptions BillingDetails { get; set; } - /// - /// The credits to apply to the order, only gift_card currently supported. - /// - [JsonProperty("credits")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("credits")] -#endif - public List Credits { get; set; } - /// /// Three-letter ISO currency /// code, in lowercase. Must be a supported diff --git a/src/Stripe.net/Services/Orders/OrderCreditOptions.cs b/src/Stripe.net/Services/Orders/OrderCreditOptions.cs deleted file mode 100644 index 280d459697..0000000000 --- a/src/Stripe.net/Services/Orders/OrderCreditOptions.cs +++ /dev/null @@ -1,29 +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 OrderCreditOptions : INestedOptions - { - /// - /// The gift card to apply to the order. - /// - [JsonProperty("gift_card")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("gift_card")] -#endif - public string GiftCard { get; set; } - - /// - /// The type of credit to apply to the order, only gift_card currently supported. - /// - [JsonProperty("type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("type")] -#endif - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Services/Orders/OrderUpdateOptions.cs b/src/Stripe.net/Services/Orders/OrderUpdateOptions.cs index 309d9d2a1e..62e10221f8 100644 --- a/src/Stripe.net/Services/Orders/OrderUpdateOptions.cs +++ b/src/Stripe.net/Services/Orders/OrderUpdateOptions.cs @@ -28,16 +28,6 @@ public class OrderUpdateOptions : BaseOptions, IHasMetadata #endif public OrderBillingDetailsOptions BillingDetails { get; set; } - /// - /// The credits to apply to the order, only gift_card currently supported. Pass the - /// empty string "" to unset this field. - /// - [JsonProperty("credits")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("credits")] -#endif - public List Credits { get; set; } - /// /// Three-letter ISO currency /// code, in lowercase. Must be a supported diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs index 448b828217..ef0918dfa1 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs @@ -33,15 +33,6 @@ public class PaymentIntentCaptureOptions : BaseOptions, IHasMetadata #endif public long? ApplicationFeeAmount { get; set; } - /// - /// Automations to be run during the PaymentIntent lifecycle. - /// - [JsonProperty("async_workflows")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("async_workflows")] -#endif - public PaymentIntentAsyncWorkflowsOptions AsyncWorkflows { get; set; } - /// /// Defaults to true. When capturing a PaymentIntent, setting final_capture to /// false notifies Stripe to not release the remaining uncaptured funds to make sure @@ -55,6 +46,15 @@ public class PaymentIntentCaptureOptions : BaseOptions, IHasMetadata #endif public bool? FinalCapture { get; set; } + /// + /// Automations to be run during the PaymentIntent lifecycle. + /// + [JsonProperty("hooks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hooks")] +#endif + public PaymentIntentHooksOptions Hooks { 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/PaymentIntents/PaymentIntentConfirmOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs index 562a5da9c0..50ea6bf30a 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs @@ -23,15 +23,6 @@ public class PaymentIntentConfirmOptions : BaseOptions #endif public long? ApplicationFeeAmount { get; set; } - /// - /// Automations to be run during the PaymentIntent lifecycle. - /// - [JsonProperty("async_workflows")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("async_workflows")] -#endif - public PaymentIntentAsyncWorkflowsOptions AsyncWorkflows { get; set; } - /// /// Controls when the funds will be captured from the customer's account. /// One of: automatic, automatic_async, or manual. @@ -84,6 +75,15 @@ public class PaymentIntentConfirmOptions : BaseOptions #endif public string FxQuote { get; set; } + /// + /// Automations to be run during the PaymentIntent lifecycle. + /// + [JsonProperty("hooks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hooks")] +#endif + public PaymentIntentHooksOptions Hooks { get; set; } + /// /// ID of the mandate that's used for this payment. /// @@ -124,7 +124,10 @@ public class PaymentIntentConfirmOptions : BaseOptions /// /// ID of the payment method (a PaymentMethod, Card, or compatible - /// Source object) to attach to this PaymentIntent. + /// Source object) to attach to this PaymentIntent. If the payment method is attached to + /// a Customer, it must match the customer that is + /// set on this PaymentIntent. /// [JsonProperty("payment_method")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs index 1ad3d03a3d..6bb075f7a6 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs @@ -39,15 +39,6 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata #endif public long? ApplicationFeeAmount { get; set; } - /// - /// Automations to be run during the PaymentIntent lifecycle. - /// - [JsonProperty("async_workflows")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("async_workflows")] -#endif - public PaymentIntentAsyncWorkflowsOptions AsyncWorkflows { get; set; } - /// /// When you enable this parameter, this PaymentIntent accepts payment methods that you /// enable in the Dashboard and that are compatible with this PaymentIntent's other @@ -191,6 +182,15 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata #endif public string FxQuote { get; set; } + /// + /// Automations to be run during the PaymentIntent lifecycle. + /// + [JsonProperty("hooks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hooks")] +#endif + public PaymentIntentHooksOptions Hooks { get; set; } + /// /// ID of the mandate that's used for this payment. This parameter can only be used with confirm=true. @@ -266,7 +266,10 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// If you don't provide the payment_method parameter or the source parameter /// with confirm=true, source automatically populates with /// customer.default_source to improve migration for users of the Charges API. We - /// recommend that you explicitly provide the payment_method moving forward. + /// recommend that you explicitly provide the payment_method moving forward. If the + /// payment method is attached to a Customer, you must also provide the ID of that Customer + /// as the customer + /// parameter of this PaymentIntent. end. /// [JsonProperty("payment_method")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentDecrementAuthorizationOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentDecrementAuthorizationOptions.cs index 2b7f245d5c..d18ef54abd 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentDecrementAuthorizationOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentDecrementAuthorizationOptions.cs @@ -35,22 +35,22 @@ public class PaymentIntentDecrementAuthorizationOptions : BaseOptions, IHasMetad public long? ApplicationFeeAmount { get; set; } /// - /// Automations to be run during the PaymentIntent lifecycle. + /// An arbitrary string attached to the object. Often useful for displaying to users. /// - [JsonProperty("async_workflows")] + [JsonProperty("description")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("async_workflows")] + [STJS.JsonPropertyName("description")] #endif - public PaymentIntentAsyncWorkflowsOptions AsyncWorkflows { get; set; } + public string Description { get; set; } /// - /// An arbitrary string attached to the object. Often useful for displaying to users. + /// Automations to be run during the PaymentIntent lifecycle. /// - [JsonProperty("description")] + [JsonProperty("hooks")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("description")] + [STJS.JsonPropertyName("hooks")] #endif - public string Description { get; set; } + public PaymentIntentHooksOptions Hooks { get; set; } /// /// Set of key-value pairs that you can diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentAsyncWorkflowsInputsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsOptions.cs similarity index 70% rename from src/Stripe.net/Services/PaymentIntents/PaymentIntentAsyncWorkflowsInputsOptions.cs rename to src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsOptions.cs index 1581a2b990..34b9144fef 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentAsyncWorkflowsInputsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsOptions.cs @@ -6,7 +6,7 @@ namespace Stripe using STJS = System.Text.Json.Serialization; #endif - public class PaymentIntentAsyncWorkflowsInputsOptions : INestedOptions + public class PaymentIntentHooksInputsOptions : INestedOptions { /// /// Tax arguments for automations. @@ -15,6 +15,6 @@ public class PaymentIntentAsyncWorkflowsInputsOptions : INestedOptions #if NET6_0_OR_GREATER [STJS.JsonPropertyName("tax")] #endif - public PaymentIntentAsyncWorkflowsInputsTaxOptions Tax { get; set; } + public PaymentIntentHooksInputsTaxOptions Tax { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentAsyncWorkflowsInputsTaxOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsTaxOptions.cs similarity index 86% rename from src/Stripe.net/Services/PaymentIntents/PaymentIntentAsyncWorkflowsInputsTaxOptions.cs rename to src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsTaxOptions.cs index 57dd9aac34..da581e6405 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentAsyncWorkflowsInputsTaxOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsTaxOptions.cs @@ -6,7 +6,7 @@ namespace Stripe using STJS = System.Text.Json.Serialization; #endif - public class PaymentIntentAsyncWorkflowsInputsTaxOptions : INestedOptions + public class PaymentIntentHooksInputsTaxOptions : INestedOptions { /// /// The TaxCalculation id. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentAsyncWorkflowsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksOptions.cs similarity index 71% rename from src/Stripe.net/Services/PaymentIntents/PaymentIntentAsyncWorkflowsOptions.cs rename to src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksOptions.cs index 2a28de6226..18e0b5e669 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentAsyncWorkflowsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksOptions.cs @@ -6,7 +6,7 @@ namespace Stripe using STJS = System.Text.Json.Serialization; #endif - public class PaymentIntentAsyncWorkflowsOptions : INestedOptions + public class PaymentIntentHooksOptions : INestedOptions { /// /// Arguments passed in automations. @@ -15,6 +15,6 @@ public class PaymentIntentAsyncWorkflowsOptions : INestedOptions #if NET6_0_OR_GREATER [STJS.JsonPropertyName("inputs")] #endif - public PaymentIntentAsyncWorkflowsInputsOptions Inputs { get; set; } + public PaymentIntentHooksInputsOptions Inputs { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs index 0fbbcbffaa..358d0f1205 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs @@ -34,22 +34,22 @@ public class PaymentIntentIncrementAuthorizationOptions : BaseOptions, IHasMetad public long? ApplicationFeeAmount { get; set; } /// - /// Automations to be run during the PaymentIntent lifecycle. + /// An arbitrary string attached to the object. Often useful for displaying to users. /// - [JsonProperty("async_workflows")] + [JsonProperty("description")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("async_workflows")] + [STJS.JsonPropertyName("description")] #endif - public PaymentIntentAsyncWorkflowsOptions AsyncWorkflows { get; set; } + public string Description { get; set; } /// - /// An arbitrary string attached to the object. Often useful for displaying to users. + /// Automations to be run during the PaymentIntent lifecycle. /// - [JsonProperty("description")] + [JsonProperty("hooks")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("description")] + [STJS.JsonPropertyName("hooks")] #endif - public string Description { get; set; } + public PaymentIntentHooksOptions Hooks { get; set; } /// /// Set of key-value pairs that you can diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsCarRentalDistanceOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsCarRentalDistanceOptions.cs new file mode 100644 index 0000000000..4107419521 --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsCarRentalDistanceOptions.cs @@ -0,0 +1,30 @@ +// 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 PaymentIntentPaymentDetailsCarRentalDistanceOptions : INestedOptions + { + /// + /// Distance traveled. + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public long? Amount { get; set; } + + /// + /// Unit of measurement for the distance traveled. One of miles or kilometers. + /// One of: kilometers, or miles. + /// + [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif + public string Unit { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsCarRentalDriverOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsCarRentalDriverOptions.cs index b709355595..e31f486790 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsCarRentalDriverOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsCarRentalDriverOptions.cs @@ -8,6 +8,24 @@ namespace Stripe public class PaymentIntentPaymentDetailsCarRentalDriverOptions : INestedOptions { + /// + /// Driver's identification number. + /// + [JsonProperty("driver_identification_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("driver_identification_number")] +#endif + public string DriverIdentificationNumber { get; set; } + + /// + /// Driver's tax number. + /// + [JsonProperty("driver_tax_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("driver_tax_number")] +#endif + public string DriverTaxNumber { get; set; } + /// /// Full name of the person or entity on the car reservation. /// diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsCarRentalOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsCarRentalOptions.cs index 078d920aa1..22ec617df6 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsCarRentalOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsCarRentalOptions.cs @@ -92,6 +92,15 @@ public class PaymentIntentPaymentDetailsCarRentalOptions : INestedOptions #endif public PaymentIntentPaymentDetailsCarRentalDeliveryOptions Delivery { get; set; } + /// + /// The details of the distance traveled during the rental period. + /// + [JsonProperty("distance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("distance")] +#endif + public PaymentIntentPaymentDetailsCarRentalDistanceOptions Distance { get; set; } + /// /// The details of the passengers in the travel reservation. /// @@ -141,6 +150,15 @@ public class PaymentIntentPaymentDetailsCarRentalOptions : INestedOptions #endif public DateTime? PickupAt { get; set; } + /// + /// Name of the pickup location. + /// + [JsonProperty("pickup_location_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pickup_location_name")] +#endif + public string PickupLocationName { get; set; } + /// /// Rental rate. /// @@ -190,6 +208,15 @@ public class PaymentIntentPaymentDetailsCarRentalOptions : INestedOptions #endif public DateTime? ReturnAt { get; set; } + /// + /// Name of the return location. + /// + [JsonProperty("return_location_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_location_name")] +#endif + public string ReturnLocationName { get; set; } + /// /// Indicates whether the goods or services are tax-exempt or tax is not collected. /// @@ -198,5 +225,14 @@ public class PaymentIntentPaymentDetailsCarRentalOptions : INestedOptions [STJS.JsonPropertyName("tax_exempt")] #endif public bool? TaxExempt { get; set; } + + /// + /// The vehicle identification number. + /// + [JsonProperty("vehicle_identification_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("vehicle_identification_number")] +#endif + public string VehicleIdentificationNumber { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs index d1f12b4ab7..b84dbb3939 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs @@ -198,7 +198,7 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions public PaymentIntentPaymentMethodOptionsGiropayOptions Giropay { get; set; } /// - /// If this is a gopay PaymentMethod, this sub-hash contains details about the GoPay + /// If this is a gopay PaymentMethod, this sub-hash contains details about the Gopay /// payment method options. /// [JsonProperty("gopay")] @@ -477,6 +477,16 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions #endif public PaymentIntentPaymentMethodOptionsSamsungPayOptions SamsungPay { get; set; } + /// + /// If this is a satispay PaymentMethod, this sub-hash contains details about the + /// Satispay payment method options. + /// + [JsonProperty("satispay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("satispay")] +#endif + public PaymentIntentPaymentMethodOptionsSatispayOptions Satispay { get; set; } + /// /// If this is a sepa_debit PaymentIntent, this sub-hash contains details about the /// SEPA Debit payment method options. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs new file mode 100644 index 0000000000..fe643920e8 --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs @@ -0,0 +1,27 @@ +// 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 PaymentIntentPaymentMethodOptionsSatispayOptions : INestedOptions + { + /// + /// Controls when the funds are captured from the customer's account. + /// + /// If provided, this parameter overrides the behavior of the top-level capture_method + /// for this payment method type when finalizing the payment with this payment method type. + /// + /// If capture_method is already set on the PaymentIntent, providing an empty value + /// for this parameter unsets the stored value for this payment method type. + /// + [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif + public string CaptureMethod { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs index 73ec3db319..d5bcbffb5c 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs @@ -39,15 +39,6 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata #endif public long? ApplicationFeeAmount { get; set; } - /// - /// Automations to be run during the PaymentIntent lifecycle. - /// - [JsonProperty("async_workflows")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("async_workflows")] -#endif - public PaymentIntentAsyncWorkflowsOptions AsyncWorkflows { get; set; } - /// /// Controls when the funds will be captured from the customer's account. /// One of: automatic, automatic_async, or manual. @@ -128,6 +119,15 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata #endif public string FxQuote { get; set; } + /// + /// Automations to be run during the PaymentIntent lifecycle. + /// + [JsonProperty("hooks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hooks")] +#endif + public PaymentIntentHooksOptions Hooks { get; set; } + /// /// This hash contains details about the Mandate to create. /// diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs index 4761268821..7e56297064 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs @@ -336,6 +336,15 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions #endif public PaymentMethodConfigurationJcbOptions Jcb { get; set; } + /// + /// Kakao Pay is a popular local wallet available in South Korea. + /// + [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif + public PaymentMethodConfigurationKakaoPayOptions KakaoPay { get; set; } + /// /// Klarna gives customers a range of payment options @@ -361,6 +370,15 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions #endif public PaymentMethodConfigurationKonbiniOptions Konbini { get; set; } + /// + /// Korean cards let users pay using locally issued cards from South Korea. + /// + [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif + public PaymentMethodConfigurationKrCardOptions KrCard { get; set; } + /// /// Link is a payment method network. /// With Link, users save their payment details once, then reuse that information to pay @@ -406,6 +424,15 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions #endif public string Name { get; set; } + /// + /// Naver Pay is a popular local wallet available in South Korea. + /// + [JsonProperty("naver_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay")] +#endif + public PaymentMethodConfigurationNaverPayOptions NaverPay { get; set; } + /// /// Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct /// debit payments from customers with a New Zeland bank account. Check this + /// PAYCO is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local + /// wallet available in South Korea. + /// + [JsonProperty("payco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco")] +#endif + public PaymentMethodConfigurationPaycoOptions Payco { get; set; } + /// /// PayNow is a Singapore-based payment method that allows customers to make a payment using /// their preferred app from participating banks and participating non-bank financial @@ -543,6 +580,16 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions #endif public PaymentMethodConfigurationRevolutPayOptions RevolutPay { get; set; } + /// + /// Samsung Pay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage + /// local wallet available in South Korea. + /// + [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif + public PaymentMethodConfigurationSamsungPayOptions SamsungPay { get; set; } + /// /// Satispay is a single-use payment diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKakaoPayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKakaoPayDisplayPreferenceOptions.cs new file mode 100644 index 0000000000..8268baa37f --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKakaoPayDisplayPreferenceOptions.cs @@ -0,0 +1,21 @@ +// 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 PaymentMethodConfigurationKakaoPayDisplayPreferenceOptions : INestedOptions + { + /// + /// The account's preference for whether or not to display this payment method. + /// One of: none, off, or on. + /// + [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif + public string Preference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKakaoPayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKakaoPayOptions.cs new file mode 100644 index 0000000000..b64d610dce --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKakaoPayOptions.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 PaymentMethodConfigurationKakaoPayOptions : INestedOptions + { + /// + /// Whether or not the payment method should be displayed. + /// + [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif + public PaymentMethodConfigurationKakaoPayDisplayPreferenceOptions DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKrCardDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKrCardDisplayPreferenceOptions.cs new file mode 100644 index 0000000000..5dfbfef145 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKrCardDisplayPreferenceOptions.cs @@ -0,0 +1,21 @@ +// 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 PaymentMethodConfigurationKrCardDisplayPreferenceOptions : INestedOptions + { + /// + /// The account's preference for whether or not to display this payment method. + /// One of: none, off, or on. + /// + [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif + public string Preference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKrCardOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKrCardOptions.cs new file mode 100644 index 0000000000..9dfc61e34e --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKrCardOptions.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 PaymentMethodConfigurationKrCardOptions : INestedOptions + { + /// + /// Whether or not the payment method should be displayed. + /// + [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif + public PaymentMethodConfigurationKrCardDisplayPreferenceOptions DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationNaverPayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationNaverPayDisplayPreferenceOptions.cs new file mode 100644 index 0000000000..f4cf2c4dc1 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationNaverPayDisplayPreferenceOptions.cs @@ -0,0 +1,21 @@ +// 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 PaymentMethodConfigurationNaverPayDisplayPreferenceOptions : INestedOptions + { + /// + /// The account's preference for whether or not to display this payment method. + /// One of: none, off, or on. + /// + [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif + public string Preference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationNaverPayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationNaverPayOptions.cs new file mode 100644 index 0000000000..9cdd8ed212 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationNaverPayOptions.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 PaymentMethodConfigurationNaverPayOptions : INestedOptions + { + /// + /// Whether or not the payment method should be displayed. + /// + [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif + public PaymentMethodConfigurationNaverPayDisplayPreferenceOptions DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaycoDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaycoDisplayPreferenceOptions.cs new file mode 100644 index 0000000000..1e4fc6190c --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaycoDisplayPreferenceOptions.cs @@ -0,0 +1,21 @@ +// 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 PaymentMethodConfigurationPaycoDisplayPreferenceOptions : INestedOptions + { + /// + /// The account's preference for whether or not to display this payment method. + /// One of: none, off, or on. + /// + [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif + public string Preference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaycoOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaycoOptions.cs new file mode 100644 index 0000000000..f794fb6c9b --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaycoOptions.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 PaymentMethodConfigurationPaycoOptions : INestedOptions + { + /// + /// Whether or not the payment method should be displayed. + /// + [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif + public PaymentMethodConfigurationPaycoDisplayPreferenceOptions DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSamsungPayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSamsungPayDisplayPreferenceOptions.cs new file mode 100644 index 0000000000..1fd62d6186 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSamsungPayDisplayPreferenceOptions.cs @@ -0,0 +1,21 @@ +// 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 PaymentMethodConfigurationSamsungPayDisplayPreferenceOptions : INestedOptions + { + /// + /// The account's preference for whether or not to display this payment method. + /// One of: none, off, or on. + /// + [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif + public string Preference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSamsungPayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSamsungPayOptions.cs new file mode 100644 index 0000000000..7610fcf182 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSamsungPayOptions.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 PaymentMethodConfigurationSamsungPayOptions : INestedOptions + { + /// + /// Whether or not the payment method should be displayed. + /// + [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif + public PaymentMethodConfigurationSamsungPayDisplayPreferenceOptions DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs index 53a33c2523..06aeaf5361 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs @@ -345,6 +345,15 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions #endif public PaymentMethodConfigurationJcbOptions Jcb { get; set; } + /// + /// Kakao Pay is a popular local wallet available in South Korea. + /// + [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif + public PaymentMethodConfigurationKakaoPayOptions KakaoPay { get; set; } + /// /// Klarna gives customers a range of payment options @@ -370,6 +379,15 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions #endif public PaymentMethodConfigurationKonbiniOptions Konbini { get; set; } + /// + /// Korean cards let users pay using locally issued cards from South Korea. + /// + [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif + public PaymentMethodConfigurationKrCardOptions KrCard { get; set; } + /// /// Link is a payment method network. /// With Link, users save their payment details once, then reuse that information to pay @@ -415,6 +433,15 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions #endif public string Name { get; set; } + /// + /// Naver Pay is a popular local wallet available in South Korea. + /// + [JsonProperty("naver_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay")] +#endif + public PaymentMethodConfigurationNaverPayOptions NaverPay { get; set; } + /// /// Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct /// debit payments from customers with a New Zeland bank account. Check this + /// PAYCO is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local + /// wallet available in South Korea. + /// + [JsonProperty("payco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco")] +#endif + public PaymentMethodConfigurationPaycoOptions Payco { get; set; } + /// /// PayNow is a Singapore-based payment method that allows customers to make a payment using /// their preferred app from participating banks and participating non-bank financial @@ -543,6 +580,16 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions #endif public PaymentMethodConfigurationRevolutPayOptions RevolutPay { get; set; } + /// + /// Samsung Pay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage + /// local wallet available in South Korea. + /// + [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif + public PaymentMethodConfigurationSamsungPayOptions SamsungPay { get; set; } + /// /// Satispay is a single-use payment diff --git a/src/Stripe.net/Services/Privacy/RedactionJobValidationErrors/RedactionJobValidationErrorService.cs b/src/Stripe.net/Services/Privacy/RedactionJobValidationErrors/RedactionJobValidationErrorService.cs index 77c9914bd1..c09535bad0 100644 --- a/src/Stripe.net/Services/Privacy/RedactionJobValidationErrors/RedactionJobValidationErrorService.cs +++ b/src/Stripe.net/Services/Privacy/RedactionJobValidationErrors/RedactionJobValidationErrorService.cs @@ -26,7 +26,7 @@ public RedactionJobValidationErrorService(IStripeClient client) } /// - ///

List validation errors method

. + ///

Returns a list of validation errors for the specified redaction job.

. ///
public virtual StripeList List(string parentId, RedactionJobValidationErrorListOptions options = null, RequestOptions requestOptions = null) { @@ -34,7 +34,7 @@ public virtual StripeList List(string parentId, Red } /// - ///

List validation errors method

. + ///

Returns a list of validation errors for the specified redaction job.

. ///
public virtual Task> ListAsync(string parentId, RedactionJobValidationErrorListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { @@ -42,7 +42,7 @@ public virtual Task> ListAsync(string pa } /// - ///

List validation errors method

. + ///

Returns a list of validation errors for the specified redaction job.

. ///
public virtual IEnumerable ListAutoPaging(string parentId, RedactionJobValidationErrorListOptions options = null, RequestOptions requestOptions = null) { @@ -50,7 +50,7 @@ public virtual IEnumerable ListAutoPaging(string pa } /// - ///

List validation errors method

. + ///

Returns a list of validation errors for the specified redaction job.

. ///
public virtual IAsyncEnumerable ListAutoPagingAsync(string parentId, RedactionJobValidationErrorListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/Privacy/RedactionJobs/RedactionJobCreateOptions.cs b/src/Stripe.net/Services/Privacy/RedactionJobs/RedactionJobCreateOptions.cs index 7166407b70..8f62e9221a 100644 --- a/src/Stripe.net/Services/Privacy/RedactionJobs/RedactionJobCreateOptions.cs +++ b/src/Stripe.net/Services/Privacy/RedactionJobs/RedactionJobCreateOptions.cs @@ -9,7 +9,8 @@ namespace Stripe.Privacy public class RedactionJobCreateOptions : BaseOptions { /// - /// The objects at the root level that are subject to redaction. + /// The objects to redact. These root objects and their related ones will be validated for + /// redaction. /// [JsonProperty("objects")] #if NET6_0_OR_GREATER @@ -18,10 +19,7 @@ public class RedactionJobCreateOptions : BaseOptions public RedactionJobObjectsOptions Objects { get; set; } /// - /// Default is "error". If "error", we will make sure all objects in the graph are - /// redactable in the 1st traversal, otherwise error. If "fix", where possible, we will - /// auto-fix any validation errors (e.g. by auto-transitioning objects to a terminal state, - /// etc.) in the 2nd traversal before redacting. + /// Determines the validation behavior of the job. Default is error. /// One of: error, or fix. /// [JsonProperty("validation_behavior")] diff --git a/src/Stripe.net/Services/Privacy/RedactionJobs/RedactionJobService.cs b/src/Stripe.net/Services/Privacy/RedactionJobs/RedactionJobService.cs index 9067a0e80d..2e57dc4fde 100644 --- a/src/Stripe.net/Services/Privacy/RedactionJobs/RedactionJobService.cs +++ b/src/Stripe.net/Services/Privacy/RedactionJobs/RedactionJobService.cs @@ -34,7 +34,11 @@ public RedactionJobService(IStripeClient client) this.Requestor); /// - ///

Cancel redaction job method

. + ///

You can cancel a redaction job when it’s in one of these statuses: ready, + /// failed.

. + /// + ///

Canceling the redaction job will abandon its attempt to redact the configured + /// objects. A canceled job cannot be used again.

. ///
public virtual RedactionJob Cancel(string id, RedactionJobCancelOptions options = null, RequestOptions requestOptions = null) { @@ -42,7 +46,11 @@ public virtual RedactionJob Cancel(string id, RedactionJobCancelOptions options } /// - ///

Cancel redaction job method

. + ///

You can cancel a redaction job when it’s in one of these statuses: ready, + /// failed.

. + /// + ///

Canceling the redaction job will abandon its attempt to redact the configured + /// objects. A canceled job cannot be used again.

. ///
public virtual Task CancelAsync(string id, RedactionJobCancelOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { @@ -50,7 +58,7 @@ public virtual Task CancelAsync(string id, RedactionJobCancelOptio } /// - ///

Create redaction job method

. + ///

Creates a redaction job. When a job is created, it will start to validate.

. ///
public virtual RedactionJob Create(RedactionJobCreateOptions options, RequestOptions requestOptions = null) { @@ -58,7 +66,7 @@ public virtual RedactionJob Create(RedactionJobCreateOptions options, RequestOpt } /// - ///

Create redaction job method

. + ///

Creates a redaction job. When a job is created, it will start to validate.

. ///
public virtual Task CreateAsync(RedactionJobCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { @@ -66,7 +74,7 @@ public virtual Task CreateAsync(RedactionJobCreateOptions options, } /// - ///

Retrieve redaction job method

. + ///

Retrieves the details of a previously created redaction job.

. ///
public virtual RedactionJob Get(string id, RedactionJobGetOptions options = null, RequestOptions requestOptions = null) { @@ -74,7 +82,7 @@ public virtual RedactionJob Get(string id, RedactionJobGetOptions options = null } /// - ///

Retrieve redaction job method

. + ///

Retrieves the details of a previously created redaction job.

. ///
public virtual Task GetAsync(string id, RedactionJobGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { @@ -82,7 +90,7 @@ public virtual Task GetAsync(string id, RedactionJobGetOptions opt } /// - ///

List redaction jobs method...

. + ///

Returns a list of redaction jobs.

. ///
public virtual StripeList List(RedactionJobListOptions options = null, RequestOptions requestOptions = null) { @@ -90,7 +98,7 @@ public virtual StripeList List(RedactionJobListOptions options = n } /// - ///

List redaction jobs method...

. + ///

Returns a list of redaction jobs.

. ///
public virtual Task> ListAsync(RedactionJobListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { @@ -98,7 +106,7 @@ public virtual Task> ListAsync(RedactionJobListOptions } /// - ///

List redaction jobs method...

. + ///

Returns a list of redaction jobs.

. ///
public virtual IEnumerable ListAutoPaging(RedactionJobListOptions options = null, RequestOptions requestOptions = null) { @@ -106,7 +114,7 @@ public virtual IEnumerable ListAutoPaging(RedactionJobListOptions } /// - ///

List redaction jobs method...

. + ///

Returns a list of redaction jobs.

. ///
public virtual IAsyncEnumerable ListAutoPagingAsync(RedactionJobListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { @@ -114,7 +122,15 @@ public virtual IAsyncEnumerable ListAutoPagingAsync(RedactionJobLi } /// - ///

Run redaction job method

. + ///

Run a redaction job in a ready status.

. + /// + ///

When you run a job, the configured objects will be redacted asynchronously. This + /// action is irreversible and cannot be canceled once started.

. + /// + ///

The status of the job will move to redacting. Once all of the objects are + /// redacted, the status will become succeeded. If the job’s + /// validation_behavior is set to fix, the automatic fixes will be applied to + /// objects at this step.

. ///
public virtual RedactionJob Run(string id, RedactionJobRunOptions options = null, RequestOptions requestOptions = null) { @@ -122,7 +138,15 @@ public virtual RedactionJob Run(string id, RedactionJobRunOptions options = null } /// - ///

Run redaction job method

. + ///

Run a redaction job in a ready status.

. + /// + ///

When you run a job, the configured objects will be redacted asynchronously. This + /// action is irreversible and cannot be canceled once started.

. + /// + ///

The status of the job will move to redacting. Once all of the objects are + /// redacted, the status will become succeeded. If the job’s + /// validation_behavior is set to fix, the automatic fixes will be applied to + /// objects at this step.

. ///
public virtual Task RunAsync(string id, RedactionJobRunOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { @@ -130,7 +154,11 @@ public virtual Task RunAsync(string id, RedactionJobRunOptions opt } /// - ///

Update redaction job method

. + ///

Updates the properties of a redaction job without running or canceling the job.

. + /// + ///

If the job to update is in a failed status, it will not automatically start to + /// validate. Once you applied all of the changes, use the validate API to start validation + /// again.

. ///
public virtual RedactionJob Update(string id, RedactionJobUpdateOptions options, RequestOptions requestOptions = null) { @@ -138,7 +166,11 @@ public virtual RedactionJob Update(string id, RedactionJobUpdateOptions options, } /// - ///

Update redaction job method

. + ///

Updates the properties of a redaction job without running or canceling the job.

. + /// + ///

If the job to update is in a failed status, it will not automatically start to + /// validate. Once you applied all of the changes, use the validate API to start validation + /// again.

. ///
public virtual Task UpdateAsync(string id, RedactionJobUpdateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { @@ -146,7 +178,15 @@ public virtual Task UpdateAsync(string id, RedactionJobUpdateOptio } /// - ///

Validate redaction job method

. + ///

Validate a redaction job when it is in a failed status.

. + /// + ///

When a job is created, it automatically begins to validate on the configured objects’ + /// eligibility for redaction. Use this to validate the job again after its validation + /// errors are resolved or the job’s validation_behavior is changed.

. + /// + ///

The status of the job will move to validating. Once all of the objects are + /// validated, the status of the job will become ready. If there are any validation + /// errors preventing the job from running, the status will become failed.

. ///
public virtual RedactionJob Validate(string id, RedactionJobValidateOptions options = null, RequestOptions requestOptions = null) { @@ -154,7 +194,15 @@ public virtual RedactionJob Validate(string id, RedactionJobValidateOptions opti } /// - ///

Validate redaction job method

. + ///

Validate a redaction job when it is in a failed status.

. + /// + ///

When a job is created, it automatically begins to validate on the configured objects’ + /// eligibility for redaction. Use this to validate the job again after its validation + /// errors are resolved or the job’s validation_behavior is changed.

. + /// + ///

The status of the job will move to validating. Once all of the objects are + /// validated, the status of the job will become ready. If there are any validation + /// errors preventing the job from running, the status will become failed.

. ///
public virtual Task ValidateAsync(string id, RedactionJobValidateOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/Privacy/RedactionJobs/RedactionJobUpdateOptions.cs b/src/Stripe.net/Services/Privacy/RedactionJobs/RedactionJobUpdateOptions.cs index d928ecd2db..66f7ea7040 100644 --- a/src/Stripe.net/Services/Privacy/RedactionJobs/RedactionJobUpdateOptions.cs +++ b/src/Stripe.net/Services/Privacy/RedactionJobs/RedactionJobUpdateOptions.cs @@ -9,6 +9,7 @@ namespace Stripe.Privacy public class RedactionJobUpdateOptions : BaseOptions { /// + /// Determines the validation behavior of the job. Default is error. /// One of: error, or fix. /// [JsonProperty("validation_behavior")] diff --git a/src/Stripe.net/Services/Products/ProductCreateOptions.cs b/src/Stripe.net/Services/Products/ProductCreateOptions.cs index 7f3d91e5aa..8089f4db4f 100644 --- a/src/Stripe.net/Services/Products/ProductCreateOptions.cs +++ b/src/Stripe.net/Services/Products/ProductCreateOptions.cs @@ -99,15 +99,6 @@ public class ProductCreateOptions : BaseOptions, IHasId, IHasMetadata #endif public ProductPackageDimensionsOptions PackageDimensions { get; set; } - /// - /// Provisioning configuration for this product. - /// - [JsonProperty("provisioning")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("provisioning")] -#endif - public ProductProvisioningOptions Provisioning { get; set; } - /// /// Whether this product is shipped (i.e., physical goods). /// diff --git a/src/Stripe.net/Services/Products/ProductProvisioningGiftCardFixedAmountOptions.cs b/src/Stripe.net/Services/Products/ProductProvisioningGiftCardFixedAmountOptions.cs deleted file mode 100644 index 076e3414c6..0000000000 --- a/src/Stripe.net/Services/Products/ProductProvisioningGiftCardFixedAmountOptions.cs +++ /dev/null @@ -1,26 +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 ProductProvisioningGiftCardFixedAmountOptions : INestedOptions - { - /// - /// The initial amount with which the provisioned gift card will be created. - /// - [JsonProperty("amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount")] -#endif - public long? Amount { get; set; } - - [JsonProperty("currency")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("currency")] -#endif - public string Currency { get; set; } - } -} diff --git a/src/Stripe.net/Services/Products/ProductProvisioningGiftCardOptions.cs b/src/Stripe.net/Services/Products/ProductProvisioningGiftCardOptions.cs deleted file mode 100644 index ef30a3d1cb..0000000000 --- a/src/Stripe.net/Services/Products/ProductProvisioningGiftCardOptions.cs +++ /dev/null @@ -1,27 +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 ProductProvisioningGiftCardOptions : INestedOptions - { - [JsonProperty("fixed_amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("fixed_amount")] -#endif - public ProductProvisioningGiftCardFixedAmountOptions FixedAmount { get; set; } - - /// - /// The specific type of gift_card provisioning, only fixed_amount currently - /// supported. - /// - [JsonProperty("type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("type")] -#endif - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Services/Products/ProductProvisioningOptions.cs b/src/Stripe.net/Services/Products/ProductProvisioningOptions.cs deleted file mode 100644 index 5fcb96eafa..0000000000 --- a/src/Stripe.net/Services/Products/ProductProvisioningOptions.cs +++ /dev/null @@ -1,26 +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 ProductProvisioningOptions : INestedOptions - { - [JsonProperty("gift_card")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("gift_card")] -#endif - public ProductProvisioningGiftCardOptions GiftCard { get; set; } - - /// - /// The type of provisioning, only gift_card currently supported. - /// - [JsonProperty("type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("type")] -#endif - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs b/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs index 2077447889..2c30b008fb 100644 --- a/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs @@ -45,9 +45,7 @@ public class QuoteSubscriptionDataOptions : INestedOptions, IHasMetadata public string BillingCycleAnchor { get; set; } /// - /// Configure billing_mode to opt in improved credit proration behavior.Once a quote that - /// creates a subscription or subscription schedule is accepted,all future operations on the - /// subscription or subscription schedule will be processed based on this billing_mode. + /// Controls how prorations and invoices for subscriptions are calculated and orchestrated. /// One of: classic, or flexible. /// [JsonProperty("billing_mode")] diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs index f537154ca0..effae66360 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs @@ -11,6 +11,16 @@ namespace Stripe public class SubscriptionItemCreateOptions : BaseOptions, IHasMetadata { + /// + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. Pass an empty string to remove previously-defined thresholds. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public SubscriptionItemBillingThresholdsOptions BillingThresholds { get; set; } + /// /// The coupons to redeem into discounts for the subscription item. /// diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs index 80fb58b04e..e4d6d297c2 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs @@ -11,6 +11,16 @@ namespace Stripe public class SubscriptionItemUpdateOptions : BaseOptions, IHasMetadata { + /// + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. Pass an empty string to remove previously-defined thresholds. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public SubscriptionItemBillingThresholdsOptions BillingThresholds { get; set; } + /// /// The coupons to redeem into discounts for the subscription item. /// diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs index 0185f109c9..ddb72baa75 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs @@ -26,9 +26,7 @@ public class SubscriptionScheduleCreateOptions : BaseOptions, IHasMetadata public string BillingBehavior { get; set; } /// - /// Configure billing_mode to opt in improved credit proration behavior.When the schedule - /// creates a subscription, the subscription's billing_mode will be set to the same - /// value as the schedule's billing_mode. + /// Controls how prorations and invoices for subscriptions are calculated and orchestrated. /// One of: classic, or flexible. /// [JsonProperty("billing_mode")] diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholdsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholdsOptions.cs new file mode 100644 index 0000000000..79b5304646 --- /dev/null +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholdsOptions.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 SubscriptionScheduleDefaultSettingsBillingThresholdsOptions : INestedOptions + { + /// + /// Monetary threshold that triggers the subscription to advance to a new billing period. + /// + [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif + public long? AmountGte { get; set; } + + /// + /// Indicates if the billing_cycle_anchor should be reset when a threshold is + /// reached. If true, billing_cycle_anchor will be updated to the date/time the + /// threshold was last reached; otherwise, the value will remain unchanged. + /// + [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif + public bool? ResetBillingCycleAnchor { get; set; } + } +} diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs index 277d22f70f..5f2fb642dc 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs @@ -45,6 +45,16 @@ public class SubscriptionScheduleDefaultSettingsOptions : INestedOptions #endif public string BillingCycleAnchor { get; set; } + /// + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. Pass an empty string to remove previously-defined thresholds. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public SubscriptionScheduleDefaultSettingsBillingThresholdsOptions BillingThresholds { get; set; } + /// /// Either charge_automatically, or send_invoice. When charging automatically, /// Stripe will attempt to pay the underlying subscription at the end of each billing cycle diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholdsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholdsOptions.cs new file mode 100644 index 0000000000..fd6a11cb11 --- /dev/null +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholdsOptions.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 SubscriptionSchedulePhaseBillingThresholdsOptions : INestedOptions + { + /// + /// Monetary threshold that triggers the subscription to advance to a new billing period. + /// + [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif + public long? AmountGte { get; set; } + + /// + /// Indicates if the billing_cycle_anchor should be reset when a threshold is + /// reached. If true, billing_cycle_anchor will be updated to the date/time the + /// threshold was last reached; otherwise, the value will remain unchanged. + /// + [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif + public bool? ResetBillingCycleAnchor { get; set; } + } +} diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholdsOptions.cs new file mode 100644 index 0000000000..1fb045bd3e --- /dev/null +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholdsOptions.cs @@ -0,0 +1,23 @@ +// 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 SubscriptionSchedulePhaseItemBillingThresholdsOptions : INestedOptions + { + /// + /// Number of units that meets the billing threshold to advance the subscription to a new + /// billing period (e.g., it takes 10 $5 units to meet a $50 monetary + /// threshold). + /// + [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif + public long? UsageGte { get; set; } + } +} diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemOptions.cs index 0bbfc189b3..d6f8a115dc 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemOptions.cs @@ -9,6 +9,16 @@ namespace Stripe public class SubscriptionSchedulePhaseItemOptions : INestedOptions, IHasMetadata { + /// + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. Pass an empty string to remove previously-defined thresholds. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public SubscriptionSchedulePhaseItemBillingThresholdsOptions BillingThresholds { get; set; } + /// /// The coupons to redeem into discounts for the subscription item. /// diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs index b0a4b30769..2e80ff05b3 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs @@ -58,6 +58,16 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata #endif public string BillingCycleAnchor { get; set; } + /// + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. Pass an empty string to remove previously-defined thresholds. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public SubscriptionSchedulePhaseBillingThresholdsOptions BillingThresholds { get; set; } + /// /// Either charge_automatically, or send_invoice. When charging automatically, /// Stripe will attempt to pay the underlying subscription at the end of each billing cycle @@ -212,14 +222,13 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata public SubscriptionSchedulePhasePauseCollectionOptions PauseCollection { get; set; } /// - /// Whether the subscription schedule will create prorations when - /// transitioning to this phase. The default value is create_prorations. This setting - /// controls prorations when a phase is started asynchronously and it is persisted as a - /// field on the phase. It's different from the request-level proration_behavior /// parameter which controls what happens if the update request affects the billing - /// configuration of the current phase. + /// configuration (item price, quantity, etc.) of the current phase. /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs index be78095edf..e2fdc3b889 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs @@ -81,8 +81,9 @@ public class SubscriptionScheduleUpdateOptions : BaseOptions, IHasMetadata public SubscriptionSchedulePrebillingOptions Prebilling { get; set; } /// - /// If the update changes the current phase, indicates whether the changes should be - /// prorated. The default value is create_prorations. + /// If the update changes the billing configuration (item price, quantity, etc.) of the + /// current phase, indicates how prorations from this change should be handled. The default + /// value is create_prorations. /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionBillingThresholdsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingThresholdsOptions.cs new file mode 100644 index 0000000000..0f95b945df --- /dev/null +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingThresholdsOptions.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 SubscriptionBillingThresholdsOptions : INestedOptions + { + /// + /// Monetary threshold that triggers the subscription to advance to a new billing period. + /// + [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif + public long? AmountGte { get; set; } + + /// + /// Indicates if the billing_cycle_anchor should be reset when a threshold is + /// reached. If true, billing_cycle_anchor will be updated to the date/time the + /// threshold was last reached; otherwise, the value will remain unchanged. + /// + [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif + public bool? ResetBillingCycleAnchor { get; set; } + } +} diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionCancelAt.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionCancelAt.cs new file mode 100644 index 0000000000..059afeb172 --- /dev/null +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionCancelAt.cs @@ -0,0 +1,14 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class SubscriptionCancelAt : StringEnum + { + public static readonly SubscriptionCancelAt MaxPeriodEnd = new SubscriptionCancelAt("max_period_end"); + public static readonly SubscriptionCancelAt MinPeriodEnd = new SubscriptionCancelAt("min_period_end"); + + private SubscriptionCancelAt(string value) + : base(value) + { + } + } +} diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs index 74f5158578..19bfbe91f2 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs @@ -85,8 +85,7 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata public SubscriptionBillingCycleAnchorConfigOptions BillingCycleAnchorConfig { get; set; } /// - /// Configure billing_mode in each subscription to opt in improved credit proration - /// behavior. + /// Controls how prorations and invoices for subscriptions are calculated and orchestrated. /// One of: classic, or flexible. /// [JsonProperty("billing_mode")] @@ -95,6 +94,17 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata #endif public string BillingMode { get; set; } + /// + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. When updating, pass an empty string to remove previously-defined + /// thresholds. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public SubscriptionBillingThresholdsOptions BillingThresholds { get; set; } + /// /// A timestamp at which the subscription should cancel. If set to a date before the current /// period ends, this will cause a proration if prorations have been enabled using @@ -102,16 +112,17 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// proration for that period. /// [JsonProperty("cancel_at")] - [JsonConverter(typeof(UnixDateTimeConverter))] + [JsonConverter(typeof(AnyOfConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("cancel_at")] - [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] #endif - public DateTime? CancelAt { get; set; } + public AnyOf CancelAt { get; set; } /// /// Indicate whether this subscription should cancel at the end of the current period - /// (current_period_end). Defaults to false. + /// (current_period_end). Defaults to false. This param will be removed in a + /// future API version. Please use cancel_at instead. /// [JsonProperty("cancel_at_period_end")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionItemBillingThresholdsOptions.cs new file mode 100644 index 0000000000..54ed79ee07 --- /dev/null +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionItemBillingThresholdsOptions.cs @@ -0,0 +1,23 @@ +// 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 SubscriptionItemBillingThresholdsOptions : INestedOptions + { + /// + /// Number of units that meets the billing threshold to advance the subscription to a new + /// billing period (e.g., it takes 10 $5 units to meet a $50 monetary + /// threshold). + /// + [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif + public long? UsageGte { get; set; } + } +} diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionItemOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionItemOptions.cs index 32d7882e85..e3ff67df15 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionItemOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionItemOptions.cs @@ -9,6 +9,16 @@ namespace Stripe public class SubscriptionItemOptions : INestedOptions, IHasId, IHasMetadata { + /// + /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. Pass an empty string to remove previously-defined thresholds. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public SubscriptionItemBillingThresholdsOptions BillingThresholds { get; set; } + /// /// Delete all usage for a given subscription item. You must pass this when deleting a usage /// records subscription item. clear_usage has no effect if the plan has a billing diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionMigrateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionMigrateOptions.cs new file mode 100644 index 0000000000..d26019a084 --- /dev/null +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionMigrateOptions.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 SubscriptionMigrateOptions : BaseOptions + { + /// + /// Controls how prorations and invoices for subscriptions are calculated and orchestrated. + /// + [JsonProperty("billing_mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_mode")] +#endif + public string BillingMode { get; set; } + } +} diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionResumeOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionResumeOptions.cs index fc00dbf275..bcfc7f5e90 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionResumeOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionResumeOptions.cs @@ -25,10 +25,10 @@ public class SubscriptionResumeOptions : BaseOptions /// /// Determines how to handle prorations when the - /// billing cycle changes (e.g., when switching plans, resetting - /// billing_cycle_anchor=now, or starting a trial), or if an item's quantity - /// changes. The default value is create_prorations. + /// href="https://stripe.com/docs/billing/subscriptions/prorations">prorations resulting + /// from the billing_cycle_anchor being unchanged. When the + /// billing_cycle_anchor is set to now (default value), no prorations are + /// generated. If no value is passed, the default is create_prorations. /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] @@ -38,10 +38,10 @@ public class SubscriptionResumeOptions : BaseOptions public string ProrationBehavior { get; set; } /// - /// If set, the proration will be calculated as though the subscription was resumed at the - /// given time. This can be used to apply exactly the same proration that was previewed with - /// upcoming invoice - /// endpoint. + /// If set, prorations will be calculated as though the subscription was resumed at the + /// given time. This can be used to apply exactly the same prorations that were previewed + /// with the create + /// preview endpoint. /// [JsonProperty("proration_date")] [JsonConverter(typeof(UnixDateTimeConverter))] diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs index 342f051fee..4a0f53304f 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs @@ -185,6 +185,22 @@ public virtual IAsyncEnumerable ListAutoPagingAsync(SubscriptionLi return this.ListRequestAutoPagingAsync($"/v1/subscriptions", options, requestOptions, cancellationToken); } + /// + ///

Upgrade the billing_mode of an existing subscription.

. + ///
+ public virtual Subscription Migrate(string id, SubscriptionMigrateOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/subscriptions/{WebUtility.UrlEncode(id)}/migrate", options, requestOptions); + } + + /// + ///

Upgrade the billing_mode of an existing subscription.

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

Initiates resumption of a paused subscription, optionally resetting the billing cycle /// anchor and creating prorations. If a resumption invoice is generated, it must be paid or diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs index f6c518a97d..39d42014e4 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs @@ -58,6 +58,17 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata #endif public SubscriptionBillingCycleAnchor BillingCycleAnchor { get; set; } + ///

+ /// Define thresholds at which an invoice will be sent, and the subscription advanced to a + /// new billing period. When updating, pass an empty string to remove previously-defined + /// thresholds. + /// + [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif + public SubscriptionBillingThresholdsOptions BillingThresholds { get; set; } + /// /// A timestamp at which the subscription should cancel. If set to a date before the current /// period ends, this will cause a proration if prorations have been enabled using @@ -65,16 +76,17 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// proration for that period. /// [JsonProperty("cancel_at")] - [JsonConverter(typeof(UnixDateTimeConverter))] + [JsonConverter(typeof(AnyOfConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("cancel_at")] - [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] #endif - public DateTime? CancelAt { get; set; } + public AnyOf CancelAt { get; set; } /// /// Indicate whether this subscription should cancel at the end of the current period - /// (current_period_end). Defaults to false. + /// (current_period_end). Defaults to false. This param will be removed in a + /// future API version. Please use cancel_at instead. /// [JsonProperty("cancel_at_period_end")] #if NET6_0_OR_GREATER @@ -320,11 +332,12 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata public string ProrationBehavior { get; set; } /// - /// If set, the proration will be calculated as though the subscription was updated at the - /// given time. This can be used to apply exactly the same proration that was previewed with - /// upcoming invoice endpoint. It - /// can also be used to implement custom proration logic, such as prorating by day instead - /// of by second, by providing the time that you wish to use for proration calculations. + /// If set, prorations will be calculated as though the subscription was updated at the + /// given time. This can be used to apply exactly the same prorations that were previewed + /// with the create + /// preview endpoint. proration_date can also be used to implement custom + /// proration logic, such as prorating by day instead of by second, by providing the time + /// that you wish to use for proration calculations. /// [JsonProperty("proration_date")] [JsonConverter(typeof(UnixDateTimeConverter))] @@ -348,9 +361,10 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// /// Unix timestamp representing the end of the trial period the customer will get before /// being charged for the first time. This will always overwrite any trials that might apply - /// via a subscribed plan. If set, trial_end will override the default trial period of the - /// plan the customer is being subscribed to. The special value now can be provided - /// to end the customer's trial immediately. Can be at most two years from + /// via a subscribed plan. If set, trial_end will override the default trial period + /// of the plan the customer is being subscribed to. The billing_cycle_anchor will be + /// updated to the trial_end value. The special value now can be provided to + /// end the customer's trial immediately. Can be at most two years from /// billing_cycle_anchor. /// [JsonProperty("trial_end")] diff --git a/src/Stripe.net/Services/Tax/Calculations/CalculationLineItemOptions.cs b/src/Stripe.net/Services/Tax/Calculations/CalculationLineItemOptions.cs index 8bf978c832..50f32ddf24 100644 --- a/src/Stripe.net/Services/Tax/Calculations/CalculationLineItemOptions.cs +++ b/src/Stripe.net/Services/Tax/Calculations/CalculationLineItemOptions.cs @@ -1,12 +1,13 @@ // File generated from our OpenAPI spec namespace Stripe.Tax { + using System.Collections.Generic; using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif - public class CalculationLineItemOptions : INestedOptions + public class CalculationLineItemOptions : INestedOptions, IHasMetadata { /// /// A positive integer representing the line item's total price in the + /// Set of key-value pairs that you can + /// attach to an object. This can be useful for storing additional information about the + /// object in a structured format. + /// + [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + /// /// If provided, the product's tax_code will be used as the line item's /// tax_code. diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs index 16a330a92a..8c29521f04 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs @@ -12,7 +12,8 @@ public class RegistrationCountryOptionsUsLocalAmusementTaxOptions : INestedOptio /// A FIPS code /// representing the local jurisdiction. Supported FIPS codes are: 14000 (Chicago), /// 06613 (Bloomington), 21696 (East Dundee), 24582 (Evanston), - /// 45421 (Lynwood), 64343 (River Grove), and 68081 (Schiller Park). + /// 45421 (Lynwood), 48892 (Midlothian), 64343 (River Grove), and + /// 68081 (Schiller Park). /// [JsonProperty("jurisdiction")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderConfirmConfigOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderConfirmConfigOptions.cs new file mode 100644 index 0000000000..b38c1f459a --- /dev/null +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderConfirmConfigOptions.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class ReaderConfirmConfigOptions : INestedOptions + { + /// + /// The URL to redirect your customer back to after they authenticate or cancel their + /// payment on the payment method's app or site. If you'd prefer to redirect to a mobile + /// application, you can alternatively supply an application URI scheme. + /// + [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif + public string ReturnUrl { get; set; } + } +} diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderConfirmPaymentIntentOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderConfirmPaymentIntentOptions.cs index 6fadbe2426..4dace8691e 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderConfirmPaymentIntentOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderConfirmPaymentIntentOptions.cs @@ -8,6 +8,15 @@ namespace Stripe.Terminal public class ReaderConfirmPaymentIntentOptions : BaseOptions { + /// + /// Configuration overrides. + /// + [JsonProperty("confirm_config")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirm_config")] +#endif + public ReaderConfirmConfigOptions ConfirmConfig { get; set; } + /// /// PaymentIntent ID. /// diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderListOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderListOptions.cs index cf9c69e725..fb255cc549 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderListOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderListOptions.cs @@ -11,8 +11,8 @@ public class ReaderListOptions : ListOptions /// /// Filters readers by device type. /// One of: bbpos_chipper2x, bbpos_wisepad3, bbpos_wisepos_e, - /// mobile_phone_reader, simulated_wisepos_e, stripe_m2, - /// stripe_s700, or verifone_P400. + /// mobile_phone_reader, simulated_stripe_s700, simulated_wisepos_e, + /// stripe_m2, stripe_s700, or verifone_P400. /// [JsonProperty("device_type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderProcessConfigOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderProcessConfigOptions.cs index 070f119434..ba1a47bcbd 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderProcessConfigOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderProcessConfigOptions.cs @@ -29,6 +29,17 @@ public class ReaderProcessConfigOptions : INestedOptions #endif public bool? EnableCustomerCancellation { 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. If you'd prefer to redirect to a mobile + /// application, you can alternatively supply an application URI scheme. + /// + [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif + public string ReturnUrl { get; set; } + /// /// Override showing a tipping selection screen on this transaction. /// diff --git a/src/Stripe.net/Services/V1Services.cs b/src/Stripe.net/Services/V1Services.cs index 13b007c21d..59ad7606d5 100644 --- a/src/Stripe.net/Services/V1Services.cs +++ b/src/Stripe.net/Services/V1Services.cs @@ -41,7 +41,6 @@ public class V1Services : Service private FinancialConnectionsService financialConnections; private ForwardingService forwarding; private FxQuoteService fxQuotes; - private GiftCardsService giftCards; private IdentityService identity; private InvoiceService invoices; private InvoiceRenderingTemplateService invoiceRenderingTemplates; @@ -200,9 +199,6 @@ internal V1Services(IStripeClient client) public virtual FxQuoteService FxQuotes => this.fxQuotes ??= new FxQuoteService( this.Requestor); - public virtual GiftCardsService GiftCards => this.giftCards ??= new GiftCardsService( - this.Requestor); - public virtual IdentityService Identity => this.identity ??= new IdentityService( this.Requestor); diff --git a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAddresses/FinancialAddressService.cs b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAddresses/FinancialAddressService.cs index f95e4ee5f9..50080641ad 100644 --- a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAddresses/FinancialAddressService.cs +++ b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAddresses/FinancialAddressService.cs @@ -37,7 +37,7 @@ public virtual Task CreateAsync(FinancialAddressCreateOptions } /// - /// Retrieve a FinancialAddress. By default, the FinancialAddress will be returned in it's + /// Retrieve a FinancialAddress. By default, the FinancialAddress will be returned in its /// unexpanded state, revealing only the last 4 digits of the account number. /// public virtual FinancialAddress Get(string id, FinancialAddressGetOptions options = null, RequestOptions requestOptions = null) @@ -46,7 +46,7 @@ public virtual FinancialAddress Get(string id, FinancialAddressGetOptions option } /// - /// Retrieve a FinancialAddress. By default, the FinancialAddress will be returned in it's + /// Retrieve a FinancialAddress. By default, the FinancialAddress will be returned in its /// unexpanded state, revealing only the last 4 digits of the account number. /// public virtual Task GetAsync(string id, FinancialAddressGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) diff --git a/src/Stripe.net/Services/V2/PaymentService.cs b/src/Stripe.net/Services/V2/PaymentService.cs new file mode 100644 index 0000000000..93c07b3789 --- /dev/null +++ b/src/Stripe.net/Services/V2/PaymentService.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2 +{ + using System; + using System.Threading; + using System.Threading.Tasks; + + public class PaymentService : Service + { + private V2.Payments.OffSessionPaymentService offSessionPayments; + + internal PaymentService(ApiRequestor requestor) + : base(requestor) + { + } + + internal PaymentService(IStripeClient client) + : base(client) + { + } + + public virtual V2.Payments.OffSessionPaymentService OffSessionPayments => this.offSessionPayments ??= new V2.Payments.OffSessionPaymentService( + this.Requestor); + } +} diff --git a/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentCancelOptions.cs b/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentCancelOptions.cs new file mode 100644 index 0000000000..8317b33966 --- /dev/null +++ b/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentCancelOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Payments +{ + public class OffSessionPaymentCancelOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentCreateOptions.cs b/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentCreateOptions.cs new file mode 100644 index 0000000000..deff809ab6 --- /dev/null +++ b/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentCreateOptions.cs @@ -0,0 +1,113 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Payments +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class OffSessionPaymentCreateOptions : BaseOptions, IHasMetadata + { + /// + /// Amount you want to collect. + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public V2.Amount Amount { get; set; } + + /// + /// The frequency of the OSP. + /// One of: recurring, or unscheduled. + /// + [JsonProperty("cadence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cadence")] +#endif + public string Cadence { get; set; } + + /// + /// Customer that owns the provided payment method. + /// + [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif + public string Customer { get; set; } + + /// + /// Any of your internal data you want to track here. + /// + [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + + /// + /// The OBO merchant you want to use. + /// + [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif + public string OnBehalfOf { get; set; } + + /// + /// Payment method you want to debit. Must be attached to a customer and set up for + /// off-session usage. + /// + [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif + public string PaymentMethod { get; set; } + + /// + /// How you want stripe to retry the OSP. + /// + [JsonProperty("retry_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("retry_details")] +#endif + public OffSessionPaymentCreateRetryDetailsOptions RetryDetails { get; set; } + + /// + /// String you want to appear on your customer's statement. + /// + [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif + public string StatementDescriptor { get; set; } + + /// + /// Suffix appended to your account level descriptor. + /// + [JsonProperty("statement_descriptor_suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix")] +#endif + public string StatementDescriptorSuffix { get; set; } + + /// + /// Test clock to be used for testing your retry handling. Only usable in a sandbox. + /// + [JsonProperty("test_clock")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] +#endif + public string TestClock { get; set; } + + /// + /// How you want to transfer the funds to your connected accounts. + /// + [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif + public OffSessionPaymentCreateTransferDataOptions TransferData { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentCreateRetryDetailsOptions.cs b/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentCreateRetryDetailsOptions.cs new file mode 100644 index 0000000000..3e8e4e40a3 --- /dev/null +++ b/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentCreateRetryDetailsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Payments +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class OffSessionPaymentCreateRetryDetailsOptions : INestedOptions + { + /// + /// How you want Stripe to retry the payment. + /// One of: none, or smart. + /// + [JsonProperty("retry_strategy")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("retry_strategy")] +#endif + public string RetryStrategy { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentCreateTransferDataOptions.cs b/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentCreateTransferDataOptions.cs new file mode 100644 index 0000000000..4d41f9f88c --- /dev/null +++ b/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentCreateTransferDataOptions.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Payments +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class OffSessionPaymentCreateTransferDataOptions : INestedOptions + { + /// + /// Amount in minor units that you want to transfer. + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public long? Amount { get; set; } + + /// + /// ID of the connected account where you want money to go. + /// + [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif + public string Destination { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentGetOptions.cs b/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentGetOptions.cs new file mode 100644 index 0000000000..8afd772299 --- /dev/null +++ b/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentGetOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Payments +{ + public class OffSessionPaymentGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentListOptions.cs b/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentListOptions.cs new file mode 100644 index 0000000000..3a89ee7a65 --- /dev/null +++ b/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentListOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Payments +{ + public class OffSessionPaymentListOptions : V2.ListOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentService.cs b/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentService.cs new file mode 100644 index 0000000000..6ab080ed65 --- /dev/null +++ b/src/Stripe.net/Services/V2/Payments/OffSessionPayments/OffSessionPaymentService.cs @@ -0,0 +1,103 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Payments +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class OffSessionPaymentService : Service + { + internal OffSessionPaymentService(ApiRequestor requestor) + : base(requestor) + { + } + + internal OffSessionPaymentService(IStripeClient client) + : base(client) + { + } + + /// + /// Cancel OSP. + /// + public virtual OffSessionPayment Cancel(string id, OffSessionPaymentCancelOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/payments/off_session_payments/{WebUtility.UrlEncode(id)}/cancel", options, requestOptions); + } + + /// + /// Cancel OSP. + /// + public virtual Task CancelAsync(string id, OffSessionPaymentCancelOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/payments/off_session_payments/{WebUtility.UrlEncode(id)}/cancel", options, requestOptions, cancellationToken); + } + + /// + /// Create OSP. + /// + public virtual OffSessionPayment Create(OffSessionPaymentCreateOptions options, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/payments/off_session_payments", options, requestOptions); + } + + /// + /// Create OSP. + /// + public virtual Task CreateAsync(OffSessionPaymentCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/payments/off_session_payments", options, requestOptions, cancellationToken); + } + + /// + /// Retrieve OSP by ID. + /// + public virtual OffSessionPayment Get(string id, OffSessionPaymentGetOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/payments/off_session_payments/{WebUtility.UrlEncode(id)}", options, requestOptions); + } + + /// + /// Retrieve OSP by ID. + /// + public virtual Task GetAsync(string id, OffSessionPaymentGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/payments/off_session_payments/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + } + + /// + /// List OSPs matching filter. + /// + public virtual V2.StripeList List(OffSessionPaymentListOptions options = null, RequestOptions requestOptions = null) + { + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/payments/off_session_payments", options, requestOptions); + } + + /// + /// List OSPs matching filter. + /// + public virtual Task> ListAsync(OffSessionPaymentListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/payments/off_session_payments", options, requestOptions, cancellationToken); + } + + /// + /// List OSPs matching filter. + /// + public virtual IEnumerable ListAutoPaging(OffSessionPaymentListOptions options = null, RequestOptions requestOptions = null) + { + return this.ListRequestAutoPaging($"/v2/payments/off_session_payments", options, requestOptions); + } + + /// + /// List OSPs matching filter. + /// + public virtual IAsyncEnumerable ListAutoPagingAsync(OffSessionPaymentListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.ListRequestAutoPagingAsync($"/v2/payments/off_session_payments", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/V2Services.cs b/src/Stripe.net/Services/V2Services.cs index cc0fba0ece..cbd1714334 100644 --- a/src/Stripe.net/Services/V2Services.cs +++ b/src/Stripe.net/Services/V2Services.cs @@ -11,6 +11,7 @@ public class V2Services : Service private V2.MoneyManagementService moneyManagement; private V2.BillingService billing; private V2.TestHelperService testHelpers; + private V2.PaymentService payments; internal V2Services(ApiRequestor requestor) : base(requestor) @@ -33,5 +34,8 @@ internal V2Services(IStripeClient client) public virtual V2.TestHelperService TestHelpers => this.testHelpers ??= new V2.TestHelperService( this.Requestor); + + public virtual V2.PaymentService Payments => this.payments ??= new V2.PaymentService( + this.Requestor); } } diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs index 25abf2caec..f0b4a7e4ee 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs @@ -40,7 +40,7 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// 2024-04-10, 2024-06-20, 2024-09-30.acacia, /// 2024-10-28.acacia, 2024-11-20.acacia, 2024-12-18.acacia, /// 2025-01-27.acacia, 2025-02-24.acacia, 2025-03-01.dashboard, - /// 2025-03-31.basil, or 2025-04-30.basil. + /// 2025-03-31.basil, 2025-04-30.basil, or 2025-05-28.basil. ///
[JsonProperty("api_version")] #if NET6_0_OR_GREATER @@ -77,7 +77,6 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// application_fee.created, application_fee.refund.updated, /// application_fee.refunded, balance.available, /// balance_settings.updated, billing.alert.triggered, - /// billing.meter_error_report.triggered, /// billing_portal.configuration.created, /// billing_portal.configuration.updated, billing_portal.session.created, /// capability.updated, capital.financing_offer.accepted, @@ -136,14 +135,15 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// invoice.payment_action_required, invoice.payment_attempt_required, /// invoice.payment_failed, invoice.payment_succeeded, invoice.sent, /// invoice.upcoming, invoice.updated, invoice.voided, - /// invoice.will_be_due, invoiceitem.created, invoiceitem.deleted, - /// issuing_authorization.created, issuing_authorization.request, - /// issuing_authorization.updated, issuing_card.created, - /// issuing_card.updated, issuing_cardholder.created, - /// issuing_cardholder.updated, issuing_dispute.closed, - /// issuing_dispute.created, issuing_dispute.funds_reinstated, - /// issuing_dispute.funds_rescinded, issuing_dispute.submitted, - /// issuing_dispute.updated, issuing_dispute_settlement_detail.created, + /// invoice.will_be_due, invoice_payment.paid, invoiceitem.created, + /// invoiceitem.deleted, issuing_authorization.created, + /// issuing_authorization.request, issuing_authorization.updated, + /// issuing_card.created, issuing_card.updated, + /// issuing_cardholder.created, issuing_cardholder.updated, + /// issuing_dispute.closed, issuing_dispute.created, + /// issuing_dispute.funds_reinstated, issuing_dispute.funds_rescinded, + /// issuing_dispute.submitted, issuing_dispute.updated, + /// issuing_dispute_settlement_detail.created, /// issuing_dispute_settlement_detail.updated, /// issuing_fraud_liability_debit.created, /// issuing_personalization_design.activated, diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs index aa3decc4e5..f29aa5e089 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs @@ -37,7 +37,6 @@ public class WebhookEndpointUpdateOptions : BaseOptions, IHasMetadata /// application_fee.created, application_fee.refund.updated, /// application_fee.refunded, balance.available, /// balance_settings.updated, billing.alert.triggered, - /// billing.meter_error_report.triggered, /// billing_portal.configuration.created, /// billing_portal.configuration.updated, billing_portal.session.created, /// capability.updated, capital.financing_offer.accepted, @@ -96,14 +95,15 @@ public class WebhookEndpointUpdateOptions : BaseOptions, IHasMetadata /// invoice.payment_action_required, invoice.payment_attempt_required, /// invoice.payment_failed, invoice.payment_succeeded, invoice.sent, /// invoice.upcoming, invoice.updated, invoice.voided, - /// invoice.will_be_due, invoiceitem.created, invoiceitem.deleted, - /// issuing_authorization.created, issuing_authorization.request, - /// issuing_authorization.updated, issuing_card.created, - /// issuing_card.updated, issuing_cardholder.created, - /// issuing_cardholder.updated, issuing_dispute.closed, - /// issuing_dispute.created, issuing_dispute.funds_reinstated, - /// issuing_dispute.funds_rescinded, issuing_dispute.submitted, - /// issuing_dispute.updated, issuing_dispute_settlement_detail.created, + /// invoice.will_be_due, invoice_payment.paid, invoiceitem.created, + /// invoiceitem.deleted, issuing_authorization.created, + /// issuing_authorization.request, issuing_authorization.updated, + /// issuing_card.created, issuing_card.updated, + /// issuing_cardholder.created, issuing_cardholder.updated, + /// issuing_dispute.closed, issuing_dispute.created, + /// issuing_dispute.funds_reinstated, issuing_dispute.funds_rescinded, + /// issuing_dispute.submitted, issuing_dispute.updated, + /// issuing_dispute_settlement_detail.created, /// issuing_dispute_settlement_detail.updated, /// issuing_fraud_liability_debit.created, /// issuing_personalization_design.activated, diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index f99fbff90f..8f0c7bcbab 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -7295,7 +7295,7 @@ public void TestV2MoneyManagementReceivedCreditGet() HttpMethod.Get, "/v2/money_management/received_credits", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_transfer\":null,\"bank_transfer\":null,\"card_spend\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"livemode\":true,\"receipt_url\":null,\"status\":\"returned\",\"status_details\":null,\"status_transitions\":null,\"type\":\"card_spend\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_transfer\":null,\"bank_transfer\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"livemode\":true,\"receipt_url\":null,\"status\":\"returned\",\"status_details\":null,\"status_transitions\":null,\"type\":\"balance_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.ReceivedCredits; Stripe.V2.StripeList receivedCredits = service @@ -7312,7 +7312,7 @@ public void TestV2MoneyManagementReceivedCreditGet2() HttpMethod.Get, "/v2/money_management/received_credits/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_transfer\":null,\"bank_transfer\":null,\"card_spend\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"livemode\":true,\"receipt_url\":null,\"status\":\"returned\",\"status_details\":null,\"status_transitions\":null,\"type\":\"card_spend\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_transfer\":null,\"bank_transfer\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"livemode\":true,\"receipt_url\":null,\"status\":\"returned\",\"status_details\":null,\"status_transitions\":null,\"type\":\"balance_transfer\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.ReceivedCredits; Stripe.V2.MoneyManagement.ReceivedCredit receivedCredit = service @@ -7329,7 +7329,7 @@ public void TestV2MoneyManagementReceivedDebitGet() HttpMethod.Get, "/v2/money_management/received_debits", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"bank_transfer\":null,\"card_spend\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"livemode\":true,\"receipt_url\":null,\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"type\":\"bank_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"bank_transfer\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"livemode\":true,\"receipt_url\":null,\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"type\":\"bank_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.ReceivedDebits; Stripe.V2.StripeList receivedDebits = service @@ -7346,7 +7346,7 @@ public void TestV2MoneyManagementReceivedDebitGet2() HttpMethod.Get, "/v2/money_management/received_debits/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"bank_transfer\":null,\"card_spend\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"livemode\":true,\"receipt_url\":null,\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"type\":\"bank_transfer\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"bank_transfer\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"livemode\":true,\"receipt_url\":null,\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"type\":\"bank_transfer\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.ReceivedDebits; Stripe.V2.MoneyManagement.ReceivedDebit receivedDebit = service.Get( @@ -7563,6 +7563,85 @@ public void TestV2TestHelpersFinancialAddressPost2() "/v2/test_helpers/financial_addresses/id_123/generate_microdeposits"); } + [Fact] + public void TestV2PaymentsOffSessionPaymentPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/payments/off_session_payments/id_123/cancel", + (HttpStatusCode)200, + "{\"id\":\"obj_123\",\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"attempts\":542738246,\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"undefined\":\"metadata\"},\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.OffSessionPayments; + Stripe.V2.Payments.OffSessionPayment offSessionPayment = service + .Cancel("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/payments/off_session_payments/id_123/cancel"); + } + + [Fact] + public void TestV2PaymentsOffSessionPaymentPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/payments/off_session_payments", + (HttpStatusCode)200, + "{\"id\":\"obj_123\",\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"attempts\":542738246,\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"undefined\":\"metadata\"},\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}"); + var options = new Stripe.V2.Payments.OffSessionPaymentCreateOptions + { + Amount = new Stripe.V2.Amount { Currency = "USD", Value = 96 }, + Cadence = "unscheduled", + Customer = "customer", + Metadata = new Dictionary + { + { "undefined", "metadata" }, + }, + PaymentMethod = "payment_method", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.OffSessionPayments; + Stripe.V2.Payments.OffSessionPayment offSessionPayment = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/payments/off_session_payments"); + } + + [Fact] + public void TestV2PaymentsOffSessionPaymentGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/payments/off_session_payments", + (HttpStatusCode)200, + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"attempts\":542738246,\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"undefined\":\"metadata\"},\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.OffSessionPayments; + Stripe.V2.StripeList offSessionPayments = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/payments/off_session_payments"); + } + + [Fact] + public void TestV2PaymentsOffSessionPaymentGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/payments/off_session_payments/id_123", + (HttpStatusCode)200, + "{\"id\":\"obj_123\",\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"attempts\":542738246,\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"undefined\":\"metadata\"},\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.OffSessionPayments; + Stripe.V2.Payments.OffSessionPayment offSessionPayment = service + .Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/payments/off_session_payments/id_123"); + } + [Fact] public void TestTemporarySessionExpiredError() {