diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ddf5ac5449..0fef502832 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1505 \ No newline at end of file +v1640 \ No newline at end of file diff --git a/src/Stripe.net/Constants/ApiVersion.cs b/src/Stripe.net/Constants/ApiVersion.cs index aac2243ecb..53a6443585 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-02-24.acacia"; + public const string Current = "2025-03-31.basil"; } } \ No newline at end of file diff --git a/src/Stripe.net/Constants/EventTypes.cs b/src/Stripe.net/Constants/EventTypes.cs index 066dfc427c..81c6a18393 100644 --- a/src/Stripe.net/Constants/EventTypes.cs +++ b/src/Stripe.net/Constants/EventTypes.cs @@ -81,6 +81,41 @@ public static class EventTypes /// public const string BillingAlertTriggered = "billing.alert.triggered"; + /// + /// Occurs when a credit balance transaction is created. + /// + public const string BillingCreditBalanceTransactionCreated = "billing.credit_balance_transaction.created"; + + /// + /// Occurs when a credit grant is created. + /// + public const string BillingCreditGrantCreated = "billing.credit_grant.created"; + + /// + /// Occurs when a credit grant is updated. + /// + public const string BillingCreditGrantUpdated = "billing.credit_grant.updated"; + + /// + /// Occurs when a meter is created. + /// + public const string BillingMeterCreated = "billing.meter.created"; + + /// + /// Occurs when a meter is deactivated. + /// + public const string BillingMeterDeactivated = "billing.meter.deactivated"; + + /// + /// Occurs when a meter is reactivated. + /// + public const string BillingMeterReactivated = "billing.meter.reactivated"; + + /// + /// Occurs when a meter is updated. + /// + public const string BillingMeterUpdated = "billing.meter.updated"; + /// /// Occurs whenever a capability has new requirements or a new status. /// @@ -490,6 +525,11 @@ public static class EventTypes /// public const string InvoiceOverdue = "invoice.overdue"; + /// + /// Occurs when an invoice transitions to paid with a non-zero amount_overpaid. + /// + public const string InvoiceOverpaid = "invoice.overpaid"; + /// /// Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid /// out-of-band. @@ -502,8 +542,8 @@ public static class EventTypes public const string InvoicePaymentActionRequired = "invoice.payment_action_required"; /// - /// Occurs whenever an invoice payment attempt fails, due either to a declined payment or to - /// the lack of a stored payment method. + /// Occurs whenever an invoice payment attempt fails, due to either a declined payment, + /// including soft decline, or to the lack of a stored payment method. /// public const string InvoicePaymentFailed = "invoice.payment_failed"; @@ -918,7 +958,8 @@ public static class EventTypes /// /// Occurs whenever a review is closed. The review's reason field indicates why: - /// approved, disputed, refunded, or refunded_as_fraud. + /// approved, disputed, refunded, refunded_as_fraud, or + /// canceled. /// public const string ReviewClosed = "review.closed"; diff --git a/src/Stripe.net/Entities/Accounts/Account.cs b/src/Stripe.net/Entities/Accounts/Account.cs index 7bc283e15e..3e4d3c1d1e 100644 --- a/src/Stripe.net/Entities/Accounts/Account.cs +++ b/src/Stripe.net/Entities/Accounts/Account.cs @@ -57,12 +57,7 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject, public AccountBusinessProfile BusinessProfile { get; set; } /// - /// The business type. After you create an Account Link or Account Session, this property is - /// only returned for accounts where controller.requirement_collection - /// is application, which includes Custom accounts. + /// The business type. /// One of: company, government_entity, individual, or /// non_profit. /// @@ -192,7 +187,7 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject, /// /// This is an object representing a person associated with a Stripe account. /// - /// A platform cannot access a person for an account where account.controller.requirement_collection /// is stripe, which includes Standard and Express accounts, after creating an /// Account Link or Account Session to start Connect onboarding. diff --git a/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs b/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs index e03fb53fc4..65802d48a4 100644 --- a/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs +++ b/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs @@ -107,6 +107,17 @@ public class AccountCapabilities : StripeEntity #endif public string BankTransferPayments { get; set; } + /// + /// The status of the Billie capability of the account, or whether the account can directly + /// process Billie payments. + /// One of: active, inactive, or pending. + /// + [JsonProperty("billie_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billie_payments")] +#endif + public string BilliePayments { get; set; } + /// /// The status of the blik payments capability of the account, or whether the account can /// directly process blik charges. @@ -381,6 +392,17 @@ public class AccountCapabilities : StripeEntity #endif public string NaverPayPayments { get; set; } + /// + /// The status of the New Zealand BECS Direct Debit payments capability of the account, or + /// whether the account can directly process New Zealand BECS Direct Debit charges. + /// One of: active, inactive, or pending. + /// + [JsonProperty("nz_bank_account_becs_debit_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nz_bank_account_becs_debit_payments")] +#endif + public string NzBankAccountBecsDebitPayments { get; set; } + /// /// The status of the OXXO payments capability of the account, or whether the account can /// directly process OXXO charges. @@ -469,6 +491,17 @@ public class AccountCapabilities : StripeEntity #endif public string SamsungPayPayments { get; set; } + /// + /// The status of the Satispay capability of the account, or whether the account can + /// directly process Satispay payments. + /// One of: active, inactive, or pending. + /// + [JsonProperty("satispay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("satispay_payments")] +#endif + public string SatispayPayments { get; set; } + /// /// The status of the SEPA customer_balance payments (EUR currency) capability of the /// account, or whether the account can directly process SEPA customer_balance charges. diff --git a/src/Stripe.net/Entities/Accounts/AccountCompany.cs b/src/Stripe.net/Entities/Accounts/AccountCompany.cs index ed9722d841..cab28dea10 100644 --- a/src/Stripe.net/Entities/Accounts/AccountCompany.cs +++ b/src/Stripe.net/Entities/Accounts/AccountCompany.cs @@ -87,7 +87,9 @@ public class AccountCompany : StripeEntity public string ExportPurposeCode { get; set; } /// - /// The company's legal name. + /// The company's legal name. Also available for accounts where controller.requirement_collection + /// is stripe. /// [JsonProperty("name")] #if NET6_0_OR_GREATER @@ -96,7 +98,10 @@ public class AccountCompany : StripeEntity public string Name { get; set; } /// - /// The Kana variation of the company's legal name (Japan only). + /// The Kana variation of the company's legal name (Japan only). Also available for accounts + /// where controller.requirement_collection + /// is stripe. /// [JsonProperty("name_kana")] #if NET6_0_OR_GREATER @@ -105,7 +110,10 @@ public class AccountCompany : StripeEntity public string NameKana { get; set; } /// - /// The Kanji variation of the company's legal name (Japan only). + /// The Kanji variation of the company's legal name (Japan only). Also available for + /// accounts where controller.requirement_collection + /// is stripe. /// [JsonProperty("name_kanji")] #if NET6_0_OR_GREATER @@ -139,6 +147,12 @@ public class AccountCompany : StripeEntity public AccountCompanyOwnershipDeclaration OwnershipDeclaration { get; set; } /// + /// This value is used to determine if a business is exempt from providing ultimate + /// beneficial owners. See this + /// support article and changelog + /// for more details. /// One of: qualified_entity_exceeds_ownership_threshold, or /// qualifies_as_financial_institution. /// @@ -158,7 +172,10 @@ public class AccountCompany : StripeEntity public string Phone { get; set; } /// - /// The category identifying the legal structure of the company or legal entity. See controller.requirement_collection + /// is stripe. See Business /// structure for more details. /// One of: free_zone_establishment, free_zone_llc, diff --git a/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsError.cs b/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsError.cs index c5e8e112b8..98fed84463 100644 --- a/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsError.cs +++ b/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsError.cs @@ -10,13 +10,13 @@ public class AccountFutureRequirementsError : StripeEntity /// The code for the type of error. - /// One of: invalid_address_city_state_postal_code, + /// One of: information_missing, invalid_address_city_state_postal_code, /// invalid_address_highway_contract_box, invalid_address_private_mailbox, /// invalid_business_profile_name, invalid_business_profile_name_denylisted, /// invalid_company_name_denylisted, invalid_dob_age_over_maximum, /// invalid_dob_age_under_18, invalid_dob_age_under_minimum, /// invalid_product_description_length, invalid_product_description_url_match, - /// invalid_representative_country, + /// invalid_representative_country, invalid_signator, /// invalid_statement_descriptor_business_mismatch, /// invalid_statement_descriptor_denylisted, /// invalid_statement_descriptor_length, @@ -59,6 +59,7 @@ public class AccountFutureRequirementsError : StripeEntityverification_document_not_uploaded, verification_document_photo_mismatch, /// verification_document_too_large, verification_document_type_not_supported, /// verification_extraneous_directors, verification_failed_address_match, + /// verification_failed_authorizer_authority, /// verification_failed_business_iec_number, /// verification_failed_document_match, verification_failed_id_number_match, /// verification_failed_keyed_identity, verification_failed_keyed_match, @@ -67,6 +68,7 @@ public class AccountFutureRequirementsError : StripeEntityverification_failed_residential_address, verification_failed_tax_id_match, /// verification_failed_tax_id_not_issued, verification_missing_directors, /// verification_missing_executives, verification_missing_owners, + /// verification_rejected_ownership_exemption_reason, /// verification_requires_additional_memorandum_of_associations, /// verification_requires_additional_proof_of_registration, or /// verification_supportability. diff --git a/src/Stripe.net/Entities/Accounts/AccountRequirementsError.cs b/src/Stripe.net/Entities/Accounts/AccountRequirementsError.cs index 9367a9426a..2bf03d9d87 100644 --- a/src/Stripe.net/Entities/Accounts/AccountRequirementsError.cs +++ b/src/Stripe.net/Entities/Accounts/AccountRequirementsError.cs @@ -10,13 +10,13 @@ public class AccountRequirementsError : StripeEntity { /// /// The code for the type of error. - /// One of: invalid_address_city_state_postal_code, + /// One of: information_missing, invalid_address_city_state_postal_code, /// invalid_address_highway_contract_box, invalid_address_private_mailbox, /// invalid_business_profile_name, invalid_business_profile_name_denylisted, /// invalid_company_name_denylisted, invalid_dob_age_over_maximum, /// invalid_dob_age_under_18, invalid_dob_age_under_minimum, /// invalid_product_description_length, invalid_product_description_url_match, - /// invalid_representative_country, + /// invalid_representative_country, invalid_signator, /// invalid_statement_descriptor_business_mismatch, /// invalid_statement_descriptor_denylisted, /// invalid_statement_descriptor_length, @@ -59,6 +59,7 @@ public class AccountRequirementsError : StripeEntity /// verification_document_not_uploaded, verification_document_photo_mismatch, /// verification_document_too_large, verification_document_type_not_supported, /// verification_extraneous_directors, verification_failed_address_match, + /// verification_failed_authorizer_authority, /// verification_failed_business_iec_number, /// verification_failed_document_match, verification_failed_id_number_match, /// verification_failed_keyed_identity, verification_failed_keyed_match, @@ -67,6 +68,7 @@ public class AccountRequirementsError : StripeEntity /// verification_failed_residential_address, verification_failed_tax_id_match, /// verification_failed_tax_id_not_issued, verification_missing_directors, /// verification_missing_executives, verification_missing_owners, + /// verification_rejected_ownership_exemption_reason, /// verification_requires_additional_memorandum_of_associations, /// verification_requires_additional_proof_of_registration, or /// verification_supportability. diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsInvoices.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsInvoices.cs index c67803874d..da4456b976 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsInvoices.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsInvoices.cs @@ -54,5 +54,16 @@ public List DefaultAccountTaxIds #endif internal List> InternalDefaultAccountTaxIds { get; set; } #endregion + + /// + /// Whether payment methods should be saved when a payment is completed for a one-time + /// invoices on a hosted invoice page. + /// One of: always, never, or offer. + /// + [JsonProperty("hosted_payment_method_save")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_payment_method_save")] +#endif + public string HostedPaymentMethodSave { get; set; } } } diff --git a/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs b/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs index 3234bc6ccd..709803f759 100644 --- a/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs +++ b/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs @@ -27,7 +27,7 @@ public class ApplicationFeeFeeSource : StripeEntity public string Payout { get; set; } /// - /// Type of object that created the application fee, either charge or payout. + /// Type of object that created the application fee. /// One of: charge, or payout. /// [JsonProperty("type")] diff --git a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs index 314ce98fda..b8417a344a 100644 --- a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs +++ b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs @@ -214,7 +214,8 @@ public IBalanceTransactionSource Source /// payout, payout_cancel, payout_failure, /// payout_minimum_balance_hold, payout_minimum_balance_release, /// refund, refund_failure, reserve_transaction, reserved_funds, - /// stripe_fee, stripe_fx_fee, tax_fee, topup, + /// stripe_fee, stripe_fx_fee, stripe_balance_payment_debit, + /// stripe_balance_payment_debit_reversal, tax_fee, topup, /// topup_reversal, transfer, transfer_cancel, transfer_failure, /// or transfer_refund. Learn more about balance transaction @@ -232,6 +233,7 @@ public IBalanceTransactionSource Source /// payout, payout_cancel, payout_failure, /// payout_minimum_balance_hold, payout_minimum_balance_release, /// refund, refund_failure, reserve_transaction, reserved_funds, + /// stripe_balance_payment_debit, stripe_balance_payment_debit_reversal, /// stripe_fee, stripe_fx_fee, tax_fee, topup, /// topup_reversal, transfer, transfer_cancel, transfer_failure, /// or transfer_refund. diff --git a/src/Stripe.net/Entities/BankAccounts/BankAccount.cs b/src/Stripe.net/Entities/BankAccounts/BankAccount.cs index d8a215d97f..e96dff8d61 100644 --- a/src/Stripe.net/Entities/BankAccounts/BankAccount.cs +++ b/src/Stripe.net/Entities/BankAccounts/BankAccount.cs @@ -45,7 +45,12 @@ public class BankAccount : StripeEntity, IHasId, IHasMetadata, IHas /// /// (ID of the Account) - /// The ID of the account that the bank account is associated with. + /// The account this bank account belongs to. Only applicable on Accounts (not customers or + /// recipients) This property is only available when returned as an External Account + /// where controller.is_controller + /// is true. /// [JsonIgnore] #if NET6_0_OR_GREATER @@ -59,7 +64,12 @@ public string AccountId /// /// (Expanded) - /// The ID of the account that the bank account is associated with. + /// The account this bank account belongs to. Only applicable on Accounts (not customers or + /// recipients) This property is only available when returned as an External Account + /// where controller.is_controller + /// is true. /// /// For more information, see the expand documentation. /// diff --git a/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirementsError.cs b/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirementsError.cs index 233075bd4f..13f7191e16 100644 --- a/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirementsError.cs +++ b/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirementsError.cs @@ -10,13 +10,13 @@ public class BankAccountFutureRequirementsError : StripeEntity /// The code for the type of error. - /// One of: invalid_address_city_state_postal_code, + /// One of: information_missing, invalid_address_city_state_postal_code, /// invalid_address_highway_contract_box, invalid_address_private_mailbox, /// invalid_business_profile_name, invalid_business_profile_name_denylisted, /// invalid_company_name_denylisted, invalid_dob_age_over_maximum, /// invalid_dob_age_under_18, invalid_dob_age_under_minimum, /// invalid_product_description_length, invalid_product_description_url_match, - /// invalid_representative_country, + /// invalid_representative_country, invalid_signator, /// invalid_statement_descriptor_business_mismatch, /// invalid_statement_descriptor_denylisted, /// invalid_statement_descriptor_length, @@ -59,6 +59,7 @@ public class BankAccountFutureRequirementsError : StripeEntityverification_document_not_uploaded, verification_document_photo_mismatch, /// verification_document_too_large, verification_document_type_not_supported, /// verification_extraneous_directors, verification_failed_address_match, + /// verification_failed_authorizer_authority, /// verification_failed_business_iec_number, /// verification_failed_document_match, verification_failed_id_number_match, /// verification_failed_keyed_identity, verification_failed_keyed_match, @@ -67,6 +68,7 @@ public class BankAccountFutureRequirementsError : StripeEntityverification_failed_residential_address, verification_failed_tax_id_match, /// verification_failed_tax_id_not_issued, verification_missing_directors, /// verification_missing_executives, verification_missing_owners, + /// verification_rejected_ownership_exemption_reason, /// verification_requires_additional_memorandum_of_associations, /// verification_requires_additional_proof_of_registration, or /// verification_supportability. diff --git a/src/Stripe.net/Entities/BankAccounts/BankAccountRequirementsError.cs b/src/Stripe.net/Entities/BankAccounts/BankAccountRequirementsError.cs index a51381f28f..f35f8cb8aa 100644 --- a/src/Stripe.net/Entities/BankAccounts/BankAccountRequirementsError.cs +++ b/src/Stripe.net/Entities/BankAccounts/BankAccountRequirementsError.cs @@ -10,13 +10,13 @@ public class BankAccountRequirementsError : StripeEntity /// The code for the type of error. - /// One of: invalid_address_city_state_postal_code, + /// One of: information_missing, invalid_address_city_state_postal_code, /// invalid_address_highway_contract_box, invalid_address_private_mailbox, /// invalid_business_profile_name, invalid_business_profile_name_denylisted, /// invalid_company_name_denylisted, invalid_dob_age_over_maximum, /// invalid_dob_age_under_18, invalid_dob_age_under_minimum, /// invalid_product_description_length, invalid_product_description_url_match, - /// invalid_representative_country, + /// invalid_representative_country, invalid_signator, /// invalid_statement_descriptor_business_mismatch, /// invalid_statement_descriptor_denylisted, /// invalid_statement_descriptor_length, @@ -59,6 +59,7 @@ public class BankAccountRequirementsError : StripeEntityverification_document_not_uploaded, verification_document_photo_mismatch, /// verification_document_too_large, verification_document_type_not_supported, /// verification_extraneous_directors, verification_failed_address_match, + /// verification_failed_authorizer_authority, /// verification_failed_business_iec_number, /// verification_failed_document_match, verification_failed_id_number_match, /// verification_failed_keyed_identity, verification_failed_keyed_match, @@ -67,6 +68,7 @@ public class BankAccountRequirementsError : StripeEntityverification_failed_residential_address, verification_failed_tax_id_match, /// verification_failed_tax_id_not_issued, verification_missing_directors, /// verification_missing_executives, verification_missing_owners, + /// verification_rejected_ownership_exemption_reason, /// verification_requires_additional_memorandum_of_associations, /// verification_requires_additional_proof_of_registration, or /// verification_supportability. diff --git a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScope.cs b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScope.cs index 61fcbf3e60..672e08d5f5 100644 --- a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScope.cs +++ b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScope.cs @@ -13,6 +13,7 @@ public class CreditGrantApplicabilityConfigScope : StripeEntitymetered price type. This refers to prices that have a Billing Meter attached to them. + /// Cannot be used in combination with prices. /// [JsonProperty("price_type")] #if NET6_0_OR_GREATER @@ -24,6 +25,7 @@ public class CreditGrantApplicabilityConfigScope : StripeEntitymetered /// prices. This refers to prices that have a Billing Meter attached to them. + /// Cannot be used in combination with price_type. /// [JsonProperty("prices")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Billing/Meters/MeterDefaultAggregation.cs b/src/Stripe.net/Entities/Billing/Meters/MeterDefaultAggregation.cs index 7c16418e78..01b5b0b5c5 100644 --- a/src/Stripe.net/Entities/Billing/Meters/MeterDefaultAggregation.cs +++ b/src/Stripe.net/Entities/Billing/Meters/MeterDefaultAggregation.cs @@ -10,7 +10,7 @@ public class MeterDefaultAggregation : StripeEntity { /// /// Specifies how events are aggregated. - /// One of: count, or sum. + /// One of: count, last, or sum. /// [JsonProperty("formula")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirementsError.cs b/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirementsError.cs index b1b9fb5bdb..b560d2978f 100644 --- a/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirementsError.cs +++ b/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirementsError.cs @@ -10,13 +10,13 @@ public class CapabilityFutureRequirementsError : StripeEntity /// The code for the type of error. - /// One of: invalid_address_city_state_postal_code, + /// One of: information_missing, invalid_address_city_state_postal_code, /// invalid_address_highway_contract_box, invalid_address_private_mailbox, /// invalid_business_profile_name, invalid_business_profile_name_denylisted, /// invalid_company_name_denylisted, invalid_dob_age_over_maximum, /// invalid_dob_age_under_18, invalid_dob_age_under_minimum, /// invalid_product_description_length, invalid_product_description_url_match, - /// invalid_representative_country, + /// invalid_representative_country, invalid_signator, /// invalid_statement_descriptor_business_mismatch, /// invalid_statement_descriptor_denylisted, /// invalid_statement_descriptor_length, @@ -59,6 +59,7 @@ public class CapabilityFutureRequirementsError : StripeEntityverification_document_not_uploaded, verification_document_photo_mismatch, /// verification_document_too_large, verification_document_type_not_supported, /// verification_extraneous_directors, verification_failed_address_match, + /// verification_failed_authorizer_authority, /// verification_failed_business_iec_number, /// verification_failed_document_match, verification_failed_id_number_match, /// verification_failed_keyed_identity, verification_failed_keyed_match, @@ -67,6 +68,7 @@ public class CapabilityFutureRequirementsError : StripeEntityverification_failed_residential_address, verification_failed_tax_id_match, /// verification_failed_tax_id_not_issued, verification_missing_directors, /// verification_missing_executives, verification_missing_owners, + /// verification_rejected_ownership_exemption_reason, /// verification_requires_additional_memorandum_of_associations, /// verification_requires_additional_proof_of_registration, or /// verification_supportability. diff --git a/src/Stripe.net/Entities/Cards/Card.cs b/src/Stripe.net/Entities/Cards/Card.cs index fb4b4dee92..19578db948 100644 --- a/src/Stripe.net/Entities/Cards/Card.cs +++ b/src/Stripe.net/Entities/Cards/Card.cs @@ -41,14 +41,6 @@ public class Card : StripeEntity, IHasId, IHasMetadata, IHasObject, IExter #region Expandable Account - /// - /// (ID of the Account) - /// The account this card belongs to. This attribute will not be in the card object if the - /// card belongs to a customer or recipient instead. This property is only available for - /// accounts where controller.requirement_collection - /// is application, which includes Custom accounts. - /// [JsonIgnore] #if NET6_0_OR_GREATER [STJS.JsonIgnore] @@ -59,16 +51,6 @@ public string AccountId set => this.InternalAccount = SetExpandableFieldId(value, this.InternalAccount); } - /// - /// (Expanded) - /// The account this card belongs to. This attribute will not be in the card object if the - /// card belongs to a customer or recipient instead. This property is only available for - /// accounts where controller.requirement_collection - /// is application, which includes Custom accounts. - /// - /// For more information, see the expand documentation. - /// [JsonIgnore] #if NET6_0_OR_GREATER [STJS.JsonIgnore] @@ -212,9 +194,11 @@ public Account Account /// currency in lowercase. Must be a supported currency. Only applicable on /// accounts (not customers or recipients). The card can be used as a transfer destination - /// for funds in this currency. This property is only available for accounts where controller.requirement_collection - /// is application, which includes Custom accounts. + /// for funds in this currency. This property is only available when returned as an External Account where + /// controller.is_controller + /// is true. /// [JsonProperty("currency")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Charges/Charge.cs b/src/Stripe.net/Entities/Charges/Charge.cs index 452ad563c5..6acda1fcbc 100644 --- a/src/Stripe.net/Entities/Charges/Charge.cs +++ b/src/Stripe.net/Entities/Charges/Charge.cs @@ -403,47 +403,6 @@ public BalanceTransaction FailureBalanceTransaction #endif public ChargeFraudDetails FraudDetails { get; set; } - #region Expandable Invoice - - /// - /// (ID of the Invoice) - /// ID of the invoice this charge is for if one exists. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string InvoiceId - { - get => this.InternalInvoice?.Id; - set => this.InternalInvoice = SetExpandableFieldId(value, this.InternalInvoice); - } - - /// - /// (Expanded) - /// ID of the invoice this charge is for if one exists. - /// - /// For more information, see the expand documentation. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public Invoice Invoice - { - get => this.InternalInvoice?.ExpandedObject; - set => this.InternalInvoice = SetExpandableFieldObject(value, this.InternalInvoice); - } - - [JsonProperty("invoice")] - [JsonConverter(typeof(ExpandableFieldConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("invoice")] - [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] -#endif - internal ExpandableField InternalInvoice { get; set; } - #endregion - [JsonProperty("level3")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("level3")] @@ -596,6 +555,12 @@ public PaymentIntent PaymentIntent #endif public ChargePaymentMethodDetails PaymentMethodDetails { get; set; } + [JsonProperty("presentment_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("presentment_details")] +#endif + public ChargePresentmentDetails PresentmentDetails { get; set; } + /// /// Options to configure Radar. See Radar Session for more diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs index a231ab7ed7..0138106144 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs @@ -74,6 +74,12 @@ public class ChargePaymentMethodDetails : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsNzBankAccount.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsNzBankAccount.cs new file mode 100644 index 0000000000..b5e0578585 --- /dev/null +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsNzBankAccount.cs @@ -0,0 +1,66 @@ +// 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 ChargePaymentMethodDetailsNzBankAccount : StripeEntity + { + /// + /// The name on the bank account. Only present if the account holder name is different from + /// the name of the authorized signatory collected in the PaymentMethod’s billing details. + /// + [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif + public string AccountHolderName { get; set; } + + /// + /// The numeric code for the bank account's bank. + /// + [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif + public string BankCode { get; set; } + + /// + /// The name of the bank. + /// + [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif + public string BankName { get; set; } + + /// + /// The numeric code for the bank account's bank branch. + /// + [JsonProperty("branch_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_code")] +#endif + public string BranchCode { get; set; } + + /// + /// Last four digits of the bank account number. + /// + [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif + public string Last4 { get; set; } + + /// + /// The suffix of the bank account number. + /// + [JsonProperty("suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("suffix")] +#endif + public string Suffix { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSatispay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSatispay.cs new file mode 100644 index 0000000000..c183fea85b --- /dev/null +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSatispay.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class ChargePaymentMethodDetailsSatispay : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/Charges/ChargePresentmentDetails.cs b/src/Stripe.net/Entities/Charges/ChargePresentmentDetails.cs new file mode 100644 index 0000000000..c8d2822b73 --- /dev/null +++ b/src/Stripe.net/Entities/Charges/ChargePresentmentDetails.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 ChargePresentmentDetails : StripeEntity + { + /// + /// Amount intended to be collected by this payment, denominated in presentment_currency. + /// + [JsonProperty("presentment_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("presentment_amount")] +#endif + public long PresentmentAmount { get; set; } + + /// + /// Currency presented to the customer during payment. + /// + [JsonProperty("presentment_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("presentment_currency")] +#endif + public string PresentmentCurrency { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Checkout/Sessions/Session.cs b/src/Stripe.net/Entities/Checkout/Sessions/Session.cs index 9922550729..8701191c8b 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/Session.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/Session.cs @@ -134,7 +134,9 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject public string ClientReferenceId { get; set; } /// - /// Client secret to be used when initializing Stripe.js embedded checkout. + /// The client secret of your Checkout Session. Applies to Checkout Sessions with + /// ui_mode: embedded. Client secret to be used when initializing Stripe.js embedded + /// checkout. /// [JsonProperty("client_secret")] #if NET6_0_OR_GREATER @@ -195,7 +197,7 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject /// /// Currency conversion details for Adaptive Pricing - /// sessions. + /// sessions created before 2025-03-31. /// [JsonProperty("currency_conversion")] #if NET6_0_OR_GREATER @@ -427,6 +429,15 @@ public Invoice Invoice #endif public string Mode { get; set; } + /// + /// The optional items presented to the customer at checkout. + /// + [JsonProperty("optional_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("optional_items")] +#endif + public List OptionalItems { get; set; } + #region Expandable PaymentIntent /// @@ -568,12 +579,31 @@ public PaymentLink PaymentLink #endif public string PaymentStatus { get; set; } + /// + /// This property is used to set up permissions for various actions (e.g., update) on the + /// CheckoutSession object. + /// + /// For specific permissions, please refer to their dedicated subsections, such as + /// permissions.update.shipping_details. + /// + [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif + public SessionPermissions Permissions { get; set; } + [JsonProperty("phone_number_collection")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("phone_number_collection")] #endif public SessionPhoneNumberCollection PhoneNumberCollection { get; set; } + [JsonProperty("presentment_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("presentment_details")] +#endif + public SessionPresentmentDetails PresentmentDetails { get; set; } + /// /// The ID of the original expired Checkout Session that triggered the recovery flow. /// @@ -683,15 +713,6 @@ public SetupIntent SetupIntent #endif public SessionShippingCost ShippingCost { get; set; } - /// - /// Shipping information for this Checkout Session. - /// - [JsonProperty("shipping_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("shipping_details")] -#endif - public SessionShippingDetails ShippingDetails { get; set; } - /// /// The shipping rate options applied to this Session. /// @@ -793,7 +814,7 @@ public Subscription Subscription /// /// The UI mode of the Session. Defaults to hosted. - /// One of: embedded, or hosted. + /// One of: custom, embedded, or hosted. /// [JsonProperty("ui_mode")] #if NET6_0_OR_GREATER @@ -802,8 +823,8 @@ public Subscription Subscription public string UiMode { get; set; } /// - /// The URL to the Checkout Session. Redirect customers to this URL to take them to - /// Checkout. If you’re using ui_mode: + /// hosted. Redirect customers to this URL to take them to Checkout. If you’re using Custom Domains, the /// URL will use your subdomain. Otherwise, it’ll use checkout.stripe.com. This value /// is only present when the session is active. diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCollectedInformationShippingDetails.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCollectedInformationShippingDetails.cs index 3adfce72eb..242f919d6c 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCollectedInformationShippingDetails.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCollectedInformationShippingDetails.cs @@ -15,41 +15,12 @@ public class SessionCollectedInformationShippingDetails : StripeEntity - /// The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - /// - [JsonProperty("carrier")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("carrier")] -#endif - public string Carrier { get; set; } - - /// - /// Recipient name. + /// Customer name. /// [JsonProperty("name")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("name")] #endif public string Name { get; set; } - - /// - /// Recipient phone (including extension). - /// - [JsonProperty("phone")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("phone")] -#endif - public string Phone { get; set; } - - /// - /// The tracking number for a physical product, obtained from the delivery service. If - /// multiple tracking numbers were generated for this purchase, please separate them with - /// commas. - /// - [JsonProperty("tracking_number")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("tracking_number")] -#endif - public string TrackingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionOptionalItem.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionOptionalItem.cs new file mode 100644 index 0000000000..6919378ef8 --- /dev/null +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionOptionalItem.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SessionOptionalItem : StripeEntity + { + [JsonProperty("adjustable_quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("adjustable_quantity")] +#endif + public SessionOptionalItemAdjustableQuantity AdjustableQuantity { get; set; } + + [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif + public string Price { get; set; } + + [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif + public long Quantity { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionOptionalItemAdjustableQuantity.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionOptionalItemAdjustableQuantity.cs new file mode 100644 index 0000000000..5307b3a711 --- /dev/null +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionOptionalItemAdjustableQuantity.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SessionOptionalItemAdjustableQuantity : StripeEntity + { + /// + /// Set to true if the quantity can be adjusted to any non-negative integer. + /// + [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif + public bool Enabled { get; set; } + + /// + /// The maximum quantity of this item the customer can purchase. By default this value is + /// 99. You can specify a value up to 999999. + /// + [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif + public long? Maximum { get; set; } + + /// + /// The minimum quantity of this item the customer must purchase, if they choose to purchase + /// it. Because this item is optional, the customer will always be able to remove it from + /// their order, even if the minimum configured here is greater than 0. By default + /// this value is 0. + /// + [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif + public long? Minimum { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPermissions.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPermissions.cs new file mode 100644 index 0000000000..60de921be6 --- /dev/null +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPermissions.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SessionPermissions : StripeEntity + { + /// + /// Determines which entity is allowed to update the shipping details. + /// + /// Default is client_only. Stripe Checkout client will automatically update the + /// shipping details. If set to server_only, only your server is allowed to update + /// the shipping details. + /// + /// When set to server_only, you must add the onShippingDetailsChange event handler + /// when initializing the Stripe Checkout client and manually update the shipping details + /// from your server using the Stripe API. + /// One of: client_only, or server_only. + /// + [JsonProperty("update_shipping_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("update_shipping_details")] +#endif + public string UpdateShippingDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPresentmentDetails.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPresentmentDetails.cs new file mode 100644 index 0000000000..26870a5383 --- /dev/null +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPresentmentDetails.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SessionPresentmentDetails : StripeEntity + { + /// + /// Amount intended to be collected by this payment, denominated in presentment_currency. + /// + [JsonProperty("presentment_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("presentment_amount")] +#endif + public long PresentmentAmount { get; set; } + + /// + /// Currency presented to the customer during payment. + /// + [JsonProperty("presentment_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("presentment_currency")] +#endif + public string PresentmentCurrency { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingDetails.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingDetails.cs deleted file mode 100644 index e5ff79c90f..0000000000 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingDetails.cs +++ /dev/null @@ -1,55 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Checkout -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class SessionShippingDetails : StripeEntity - { - [JsonProperty("address")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("address")] -#endif - public Address Address { get; set; } - - /// - /// The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - /// - [JsonProperty("carrier")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("carrier")] -#endif - public string Carrier { get; set; } - - /// - /// Recipient name. - /// - [JsonProperty("name")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("name")] -#endif - public string Name { get; set; } - - /// - /// Recipient phone (including extension). - /// - [JsonProperty("phone")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("phone")] -#endif - public string Phone { get; set; } - - /// - /// The tracking number for a physical product, obtained from the delivery service. If - /// multiple tracking numbers were generated for this purchase, please separate them with - /// commas. - /// - [JsonProperty("tracking_number")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("tracking_number")] -#endif - public string TrackingNumber { get; set; } - } -} diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs index bbb8eeba68..e62be00249 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs @@ -79,6 +79,12 @@ public class ConfirmationTokenPaymentMethodPreview : StripeEntityacss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, blik, boleto, card, card_present, - /// cashapp, customer_balance, eps, fpx, giropay, - /// grabpay, ideal, interac_present, kakao_pay, klarna, - /// konbini, kr_card, link, mobilepay, multibanco, - /// naver_pay, oxxo, p24, pay_by_bank, payco, - /// paynow, paypal, pix, promptpay, revolut_pay, - /// samsung_pay, sepa_debit, sofort, swish, twint, - /// us_bank_account, wechat_pay, or zip. + /// bancontact, billie, blik, boleto, card, + /// card_present, cashapp, customer_balance, eps, fpx, + /// giropay, grabpay, ideal, interac_present, kakao_pay, + /// klarna, konbini, kr_card, link, mobilepay, + /// multibanco, naver_pay, nz_bank_account, oxxo, p24, + /// pay_by_bank, payco, paynow, paypal, pix, + /// promptpay, revolut_pay, samsung_pay, satispay, + /// sepa_debit, sofort, swish, twint, us_bank_account, + /// wechat_pay, or zip. /// [JsonProperty("type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillie.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillie.cs new file mode 100644 index 0000000000..599402af92 --- /dev/null +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillie.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class ConfirmationTokenPaymentMethodPreviewBillie : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewNaverPay.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewNaverPay.cs index 646907b6fb..1f3bd678e9 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewNaverPay.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewNaverPay.cs @@ -8,6 +8,16 @@ namespace Stripe public class ConfirmationTokenPaymentMethodPreviewNaverPay : StripeEntity { + /// + /// Uniquely identifies this particular Naver Pay account. You can use this attribute to + /// check whether two Naver Pay accounts are the same. + /// + [JsonProperty("buyer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buyer_id")] +#endif + public string BuyerId { get; set; } + /// /// Whether to fund this transaction with Naver Pay points or a card. /// One of: card, or points. diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewNzBankAccount.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewNzBankAccount.cs new file mode 100644 index 0000000000..537bfa22ad --- /dev/null +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewNzBankAccount.cs @@ -0,0 +1,66 @@ +// 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 ConfirmationTokenPaymentMethodPreviewNzBankAccount : StripeEntity + { + /// + /// The name on the bank account. Only present if the account holder name is different from + /// the name of the authorized signatory collected in the PaymentMethod’s billing details. + /// + [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif + public string AccountHolderName { get; set; } + + /// + /// The numeric code for the bank account's bank. + /// + [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif + public string BankCode { get; set; } + + /// + /// The name of the bank. + /// + [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif + public string BankName { get; set; } + + /// + /// The numeric code for the bank account's bank branch. + /// + [JsonProperty("branch_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_code")] +#endif + public string BranchCode { get; set; } + + /// + /// Last four digits of the bank account number. + /// + [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif + public string Last4 { get; set; } + + /// + /// The suffix of the bank account number. + /// + [JsonProperty("suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("suffix")] +#endif + public string Suffix { get; set; } + } +} diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSatispay.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSatispay.cs new file mode 100644 index 0000000000..664b87d611 --- /dev/null +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSatispay.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class ConfirmationTokenPaymentMethodPreviewSatispay : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItem.cs b/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItem.cs index 85127767dc..4cb8ac45a8 100644 --- a/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItem.cs +++ b/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItem.cs @@ -40,16 +40,6 @@ public class CreditNoteLineItem : StripeEntity, IHasId, IHas #endif public long Amount { get; set; } - /// - /// The integer amount in cents (or local equivalent) representing the amount being credited - /// for this line item, excluding all tax and discounts. - /// - [JsonProperty("amount_excluding_tax")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount_excluding_tax")] -#endif - public long? AmountExcludingTax { get; set; } - /// /// Description of the item being credited. /// @@ -116,22 +106,22 @@ public class CreditNoteLineItem : StripeEntity, IHasId, IHas public long? Quantity { get; set; } /// - /// The amount of tax calculated per tax rate for this line item. + /// The tax rates which apply to the line item. /// - [JsonProperty("tax_amounts")] + [JsonProperty("tax_rates")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("tax_amounts")] + [STJS.JsonPropertyName("tax_rates")] #endif - public List TaxAmounts { get; set; } + public List TaxRates { get; set; } /// - /// The tax rates which apply to the line item. + /// The tax information of the line item. /// - [JsonProperty("tax_rates")] + [JsonProperty("taxes")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonPropertyName("taxes")] #endif - public List TaxRates { get; set; } + public List Taxes { get; set; } /// /// The type of the credit note line item, one of invoice_line_item or @@ -163,15 +153,5 @@ public class CreditNoteLineItem : StripeEntity, IHasId, IHas [STJS.JsonPropertyName("unit_amount_decimal")] #endif public decimal? UnitAmountDecimal { get; set; } - - /// - /// The amount in cents (or local equivalent) representing the unit amount being credited - /// for this line item, excluding all tax and discounts. - /// - [JsonProperty("unit_amount_excluding_tax")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("unit_amount_excluding_tax")] -#endif - public decimal? UnitAmountExcludingTax { get; set; } } } diff --git a/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemTax.cs b/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemTax.cs new file mode 100644 index 0000000000..8e0a117eed --- /dev/null +++ b/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemTax.cs @@ -0,0 +1,74 @@ +// 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 CreditNoteLineItemTax : StripeEntity + { + /// + /// The amount of the tax, in cents (or local equivalent). + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public long Amount { get; set; } + + /// + /// Whether this tax is inclusive or exclusive. + /// One of: exclusive, or inclusive. + /// + [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif + public string TaxBehavior { get; set; } + + /// + /// Additional details about the tax rate. Only present when type is + /// tax_rate_details. + /// + [JsonProperty("tax_rate_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate_details")] +#endif + public CreditNoteLineItemTaxTaxRateDetails TaxRateDetails { get; set; } + + /// + /// The reasoning behind this tax, for example, if the product is tax exempt. The possible + /// values for this field may be extended as new tax rules are supported. + /// One of: customer_exempt, not_available, not_collecting, + /// not_subject_to_tax, not_supported, portion_product_exempt, + /// portion_reduced_rated, portion_standard_rated, product_exempt, + /// product_exempt_holiday, proportionally_rated, reduced_rated, + /// reverse_charge, standard_rated, taxable_basis_reduced, or + /// zero_rated. + /// + [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif + public string TaxabilityReason { get; set; } + + /// + /// The amount on which tax is calculated, in cents (or local equivalent). + /// + [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif + public long? TaxableAmount { get; set; } + + /// + /// The type of tax information. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemTaxTaxRateDetails.cs b/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemTaxTaxRateDetails.cs new file mode 100644 index 0000000000..c4272b2885 --- /dev/null +++ b/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemTaxTaxRateDetails.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 CreditNoteLineItemTaxTaxRateDetails : StripeEntity + { + [JsonProperty("tax_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate")] +#endif + public string TaxRate { get; set; } + } +} diff --git a/src/Stripe.net/Entities/CreditNotes/CreditNote.cs b/src/Stripe.net/Entities/CreditNotes/CreditNote.cs index bfb1cf15c8..b66f10b58b 100644 --- a/src/Stripe.net/Entities/CreditNotes/CreditNote.cs +++ b/src/Stripe.net/Entities/CreditNotes/CreditNote.cs @@ -322,46 +322,14 @@ public Invoice Invoice #endif public string Reason { get; set; } - #region Expandable Refund - /// - /// (ID of the Refund) - /// Refund related to this credit note. + /// Refunds related to this credit note. /// - [JsonIgnore] + [JsonProperty("refunds")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("refunds")] #endif - public string RefundId - { - get => this.InternalRefund?.Id; - set => this.InternalRefund = SetExpandableFieldId(value, this.InternalRefund); - } - - /// - /// (Expanded) - /// Refund related to this credit note. - /// - /// For more information, see the expand documentation. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public Refund Refund - { - get => this.InternalRefund?.ExpandedObject; - set => this.InternalRefund = SetExpandableFieldObject(value, this.InternalRefund); - } - - [JsonProperty("refund")] - [JsonConverter(typeof(ExpandableFieldConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("refund")] - [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] -#endif - internal ExpandableField InternalRefund { get; set; } - #endregion + public List Refunds { get; set; } /// /// The details of the cost of shipping, including the ShippingRate applied to the invoice. @@ -404,15 +372,6 @@ public Refund Refund #endif public long? SubtotalExcludingTax { get; set; } - /// - /// The aggregate amounts calculated per tax rate for all line items. - /// - [JsonProperty("tax_amounts")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("tax_amounts")] -#endif - public List TaxAmounts { get; set; } - /// /// The integer amount in cents (or local equivalent) representing the total amount of the /// credit note, including tax and all discount. @@ -433,6 +392,15 @@ public Refund Refund #endif public long? TotalExcludingTax { get; set; } + /// + /// The aggregate tax information for all line items. + /// + [JsonProperty("total_taxes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total_taxes")] +#endif + public List TotalTaxes { get; set; } + /// /// 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 diff --git a/src/Stripe.net/Entities/CreditNotes/CreditNoteRefund.cs b/src/Stripe.net/Entities/CreditNotes/CreditNoteRefund.cs new file mode 100644 index 0000000000..1c85661012 --- /dev/null +++ b/src/Stripe.net/Entities/CreditNotes/CreditNoteRefund.cs @@ -0,0 +1,65 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif + public class CreditNoteRefund : StripeEntity + { + /// + /// Amount of the refund that applies to this credit note, in cents (or local equivalent). + /// + [JsonProperty("amount_refunded")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_refunded")] +#endif + public long AmountRefunded { get; set; } + + #region Expandable Refund + + /// + /// (ID of the Refund) + /// ID of the refund. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public string RefundId + { + get => this.InternalRefund?.Id; + set => this.InternalRefund = SetExpandableFieldId(value, this.InternalRefund); + } + + /// + /// (Expanded) + /// ID of the refund. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public Refund Refund + { + get => this.InternalRefund?.ExpandedObject; + set => this.InternalRefund = SetExpandableFieldObject(value, this.InternalRefund); + } + + [JsonProperty("refund")] + [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif + internal ExpandableField InternalRefund { get; set; } + #endregion + } +} diff --git a/src/Stripe.net/Entities/CreditNotes/CreditNoteTaxAmount.cs b/src/Stripe.net/Entities/CreditNotes/CreditNoteTaxAmount.cs deleted file mode 100644 index d6944cad90..0000000000 --- a/src/Stripe.net/Entities/CreditNotes/CreditNoteTaxAmount.cs +++ /dev/null @@ -1,98 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - using Stripe.Infrastructure; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif - public class CreditNoteTaxAmount : StripeEntity - { - /// - /// The amount, in cents (or local equivalent), of the tax. - /// - [JsonProperty("amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount")] -#endif - public long Amount { get; set; } - - /// - /// Whether this tax amount is inclusive or exclusive. - /// - [JsonProperty("inclusive")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("inclusive")] -#endif - public bool Inclusive { get; set; } - - #region Expandable TaxRate - - /// - /// (ID of the TaxRate) - /// The tax rate that was applied to get this tax amount. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string TaxRateId - { - get => this.InternalTaxRate?.Id; - set => this.InternalTaxRate = SetExpandableFieldId(value, this.InternalTaxRate); - } - - /// - /// (Expanded) - /// The tax rate that was applied to get this tax amount. - /// - /// For more information, see the expand documentation. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public TaxRate TaxRate - { - get => this.InternalTaxRate?.ExpandedObject; - set => this.InternalTaxRate = SetExpandableFieldObject(value, this.InternalTaxRate); - } - - [JsonProperty("tax_rate")] - [JsonConverter(typeof(ExpandableFieldConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("tax_rate")] - [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] -#endif - internal ExpandableField InternalTaxRate { get; set; } - #endregion - - /// - /// The reasoning behind this tax, for example, if the product is tax exempt. The possible - /// values for this field may be extended as new tax rules are supported. - /// One of: customer_exempt, not_collecting, not_subject_to_tax, - /// not_supported, portion_product_exempt, portion_reduced_rated, - /// portion_standard_rated, product_exempt, product_exempt_holiday, - /// proportionally_rated, reduced_rated, reverse_charge, - /// standard_rated, taxable_basis_reduced, or zero_rated. - /// - [JsonProperty("taxability_reason")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("taxability_reason")] -#endif - public string TaxabilityReason { get; set; } - - /// - /// The amount on which tax is calculated, in cents (or local equivalent). - /// - [JsonProperty("taxable_amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("taxable_amount")] -#endif - public long? TaxableAmount { get; set; } - } -} diff --git a/src/Stripe.net/Entities/CreditNotes/CreditNoteTotalTax.cs b/src/Stripe.net/Entities/CreditNotes/CreditNoteTotalTax.cs new file mode 100644 index 0000000000..03de6d2bc9 --- /dev/null +++ b/src/Stripe.net/Entities/CreditNotes/CreditNoteTotalTax.cs @@ -0,0 +1,74 @@ +// 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 CreditNoteTotalTax : StripeEntity + { + /// + /// The amount of the tax, in cents (or local equivalent). + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public long Amount { get; set; } + + /// + /// Whether this tax is inclusive or exclusive. + /// One of: exclusive, or inclusive. + /// + [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif + public string TaxBehavior { get; set; } + + /// + /// Additional details about the tax rate. Only present when type is + /// tax_rate_details. + /// + [JsonProperty("tax_rate_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate_details")] +#endif + public CreditNoteTotalTaxTaxRateDetails TaxRateDetails { get; set; } + + /// + /// The reasoning behind this tax, for example, if the product is tax exempt. The possible + /// values for this field may be extended as new tax rules are supported. + /// One of: customer_exempt, not_available, not_collecting, + /// not_subject_to_tax, not_supported, portion_product_exempt, + /// portion_reduced_rated, portion_standard_rated, product_exempt, + /// product_exempt_holiday, proportionally_rated, reduced_rated, + /// reverse_charge, standard_rated, taxable_basis_reduced, or + /// zero_rated. + /// + [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif + public string TaxabilityReason { get; set; } + + /// + /// The amount on which tax is calculated, in cents (or local equivalent). + /// + [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif + public long? TaxableAmount { get; set; } + + /// + /// The type of tax information. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/CreditNotes/CreditNoteTotalTaxTaxRateDetails.cs b/src/Stripe.net/Entities/CreditNotes/CreditNoteTotalTaxTaxRateDetails.cs new file mode 100644 index 0000000000..b3d31a25f2 --- /dev/null +++ b/src/Stripe.net/Entities/CreditNotes/CreditNoteTotalTaxTaxRateDetails.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 CreditNoteTotalTaxTaxRateDetails : StripeEntity + { + [JsonProperty("tax_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate")] +#endif + public string TaxRate { get; set; } + } +} diff --git a/src/Stripe.net/Entities/CustomerBalanceTransactions/CustomerBalanceTransaction.cs b/src/Stripe.net/Entities/CustomerBalanceTransactions/CustomerBalanceTransaction.cs index 71a7bed11c..70b571fbe6 100644 --- a/src/Stripe.net/Entities/CustomerBalanceTransactions/CustomerBalanceTransaction.cs +++ b/src/Stripe.net/Entities/CustomerBalanceTransactions/CustomerBalanceTransaction.cs @@ -54,6 +54,47 @@ public class CustomerBalanceTransaction : StripeEntity + /// (ID of the Checkout.Session) + /// The ID of the checkout session (if any) that created the transaction. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public string CheckoutSessionId + { + get => this.InternalCheckoutSession?.Id; + set => this.InternalCheckoutSession = SetExpandableFieldId(value, this.InternalCheckoutSession); + } + + /// + /// (Expanded) + /// The ID of the checkout session (if any) that created the transaction. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public Checkout.Session CheckoutSession + { + get => this.InternalCheckoutSession?.ExpandedObject; + set => this.InternalCheckoutSession = SetExpandableFieldObject(value, this.InternalCheckoutSession); + } + + [JsonProperty("checkout_session")] + [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("checkout_session")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif + internal ExpandableField InternalCheckoutSession { get; set; } + #endregion + /// /// Time at which the object was created. Measured in seconds since the Unix epoch. /// @@ -243,11 +284,14 @@ public Invoice Invoice /// /// Transaction type: adjustment, applied_to_invoice, credit_note, /// initial, invoice_overpaid, invoice_too_large, - /// invoice_too_small, unspent_receiver_credit, or - /// unapplied_from_invoice. See the invoice_too_small, unspent_receiver_credit, unapplied_from_invoice, + /// checkout_session_subscription_payment, or + /// checkout_session_subscription_payment_canceled. See the Customer Balance page /// to learn more about transaction types. - /// One of: adjustment, applied_to_invoice, credit_note, + /// One of: adjustment, applied_to_invoice, + /// checkout_session_subscription_payment, + /// checkout_session_subscription_payment_canceled, credit_note, /// initial, invoice_overpaid, invoice_too_large, /// invoice_too_small, migration, unapplied_from_invoice, or /// unspent_receiver_credit. diff --git a/src/Stripe.net/Entities/Customers/CustomerTax.cs b/src/Stripe.net/Entities/Customers/CustomerTax.cs index af1c2d8073..df24d7c5b0 100644 --- a/src/Stripe.net/Entities/Customers/CustomerTax.cs +++ b/src/Stripe.net/Entities/Customers/CustomerTax.cs @@ -30,7 +30,7 @@ public class CustomerTax : StripeEntity public string IpAddress { get; set; } /// - /// The customer's location as identified by Stripe Tax. + /// The identified tax location of the customer. /// [JsonProperty("location")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Customers/CustomerTaxLocation.cs b/src/Stripe.net/Entities/Customers/CustomerTaxLocation.cs index d181d3ed15..c3c13bdb92 100644 --- a/src/Stripe.net/Entities/Customers/CustomerTaxLocation.cs +++ b/src/Stripe.net/Entities/Customers/CustomerTaxLocation.cs @@ -9,7 +9,7 @@ namespace Stripe public class CustomerTaxLocation : StripeEntity { /// - /// The customer's country as identified by Stripe Tax. + /// The identified tax country of the customer. /// [JsonProperty("country")] #if NET6_0_OR_GREATER @@ -29,7 +29,7 @@ public class CustomerTaxLocation : StripeEntity public string Source { 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/Events/Event.cs b/src/Stripe.net/Entities/Events/Event.cs index f108833550..65c7b3d64c 100644 --- a/src/Stripe.net/Entities/Events/Event.cs +++ b/src/Stripe.net/Entities/Events/Event.cs @@ -178,11 +178,11 @@ public class Event : StripeEntity, IHasId, IHasObject /// identity.verification_session.requires_input, /// identity.verification_session.verified, invoice.created, /// invoice.deleted, invoice.finalization_failed, invoice.finalized, - /// invoice.marked_uncollectible, invoice.overdue, invoice.paid, - /// invoice.payment_action_required, invoice.payment_failed, - /// invoice.payment_succeeded, invoice.sent, invoice.upcoming, - /// invoice.updated, invoice.voided, invoice.will_be_due, - /// invoiceitem.created, invoiceitem.deleted, + /// invoice.marked_uncollectible, invoice.overdue, invoice.overpaid, + /// invoice.paid, invoice.payment_action_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, @@ -249,8 +249,11 @@ public class Event : StripeEntity, IHasId, IHasObject /// treasury.outbound_transfer.returned, /// treasury.outbound_transfer.tracking_details_updated, /// treasury.received_credit.created, treasury.received_credit.failed, - /// treasury.received_credit.succeeded, treasury.received_debit.created, or - /// ping. + /// treasury.received_credit.succeeded, treasury.received_debit.created, + /// billing.credit_balance_transaction.created, billing.credit_grant.created, + /// billing.credit_grant.updated, billing.meter.created, + /// billing.meter.deactivated, billing.meter.reactivated, + /// billing.meter.updated, or ping. /// [JsonProperty("type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSession.cs b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSession.cs index 9139b15120..c0db507aaa 100644 --- a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSession.cs +++ b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSession.cs @@ -190,7 +190,7 @@ public VerificationReport LastVerificationReport public VerificationSessionRedaction Redaction { get; set; } /// - /// Token referencing a Customer resource. + /// Customer ID. /// [JsonProperty("related_customer")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs index 352bf38368..b53eb1a35c 100644 --- a/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs @@ -258,30 +258,29 @@ public Invoice Invoice #endif public Dictionary Metadata { get; set; } - [JsonProperty("period")] + /// + /// The parent that generated this invoice. + /// + [JsonProperty("parent")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("period")] + [STJS.JsonPropertyName("parent")] #endif - public InvoiceItemPeriod Period { get; set; } + public InvoiceItemParent Parent { get; set; } - /// - /// If the invoice item is a proration, the plan of the subscription that the proration was - /// computed for. - /// - [JsonProperty("plan")] + [JsonProperty("period")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("plan")] + [STJS.JsonPropertyName("period")] #endif - public Plan Plan { get; set; } + public InvoiceItemPeriod Period { get; set; } /// - /// The price of the invoice item. + /// The pricing information of the invoice item. /// - [JsonProperty("price")] + [JsonProperty("pricing")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("price")] + [STJS.JsonPropertyName("pricing")] #endif - public Price Price { get; set; } + public InvoiceItemPricing Pricing { get; set; } /// /// Whether the invoice item was created automatically as a proration adjustment when the @@ -303,56 +302,6 @@ public Invoice Invoice #endif public long Quantity { get; set; } - #region Expandable Subscription - - /// - /// (ID of the Subscription) - /// The subscription that this invoice item has been created for, if any. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string SubscriptionId - { - get => this.InternalSubscription?.Id; - set => this.InternalSubscription = SetExpandableFieldId(value, this.InternalSubscription); - } - - /// - /// (Expanded) - /// The subscription that this invoice item has been created for, if any. - /// - /// For more information, see the expand documentation. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public Subscription Subscription - { - get => this.InternalSubscription?.ExpandedObject; - set => this.InternalSubscription = SetExpandableFieldObject(value, this.InternalSubscription); - } - - [JsonProperty("subscription")] - [JsonConverter(typeof(ExpandableFieldConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription")] - [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] -#endif - internal ExpandableField InternalSubscription { get; set; } - #endregion - - /// - /// The subscription item that this invoice item has been created for, if any. - /// - [JsonProperty("subscription_item")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_item")] -#endif - public string SubscriptionItem { get; set; } - /// /// The tax rates which apply to the invoice item. When set, the default_tax_rates on /// the invoice do not apply to this invoice item. @@ -403,23 +352,5 @@ public TestHelpers.TestClock TestClock #endif internal ExpandableField InternalTestClock { get; set; } #endregion - - /// - /// Unit amount (in the currency specified) of the invoice item. - /// - [JsonProperty("unit_amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("unit_amount")] -#endif - public long? UnitAmount { get; set; } - - /// - /// Same as unit_amount, but contains a decimal value with at most 12 decimal places. - /// - [JsonProperty("unit_amount_decimal")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("unit_amount_decimal")] -#endif - public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParent.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParent.cs new file mode 100644 index 0000000000..7ed4963b07 --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParent.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 InvoiceItemParent : StripeEntity + { + /// + /// Details about the subscription that generated this invoice item. + /// + [JsonProperty("subscription_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_details")] +#endif + public InvoiceItemParentSubscriptionDetails SubscriptionDetails { get; set; } + + /// + /// The type of parent that generated this invoice item. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentSubscriptionDetails.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentSubscriptionDetails.cs new file mode 100644 index 0000000000..0259b5c172 --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentSubscriptionDetails.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 InvoiceItemParentSubscriptionDetails : StripeEntity + { + /// + /// The subscription that generated this invoice item. + /// + [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif + public string Subscription { get; set; } + + /// + /// The subscription item that generated this invoice item. + /// + [JsonProperty("subscription_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_item")] +#endif + public string SubscriptionItem { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemPricing.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemPricing.cs new file mode 100644 index 0000000000..bddb5ddb12 --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemPricing.cs @@ -0,0 +1,36 @@ +// 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 InvoiceItemPricing : StripeEntity + { + [JsonProperty("price_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_details")] +#endif + public InvoiceItemPricingPriceDetails PriceDetails { get; set; } + + /// + /// The type of the pricing details. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + + /// + /// The unit amount (in the currency specified) of the item which contains a decimal + /// value with at most 12 decimal places. + /// + [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif + public decimal? UnitAmountDecimal { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemPricingPriceDetails.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemPricingPriceDetails.cs new file mode 100644 index 0000000000..74d2045feb --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemPricingPriceDetails.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 InvoiceItemPricingPriceDetails : StripeEntity + { + /// + /// The ID of the price this item is associated with. + /// + [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif + public string Price { get; set; } + + /// + /// The ID of the product this item is associated with. + /// + [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif + public string Product { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItem.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItem.cs index 42258b16b8..7a03fe1c65 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItem.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItem.cs @@ -50,16 +50,6 @@ public class InvoiceLineItem : StripeEntity, IHasId, IHasMetada #endif public long Amount { get; set; } - /// - /// The integer amount in cents (or local equivalent) representing the amount for this line - /// item, excluding all tax and discounts. - /// - [JsonProperty("amount_excluding_tax")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount_excluding_tax")] -#endif - public long? AmountExcludingTax { get; set; } - /// /// Three-letter ISO currency /// code, in lowercase. Must be a supported @@ -148,49 +138,6 @@ public List Discounts #endif public string Invoice { get; set; } - #region Expandable InvoiceItem - - /// - /// (ID of the InvoiceItem) - /// The ID of the invoice item - /// associated with this line item if any. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string InvoiceItemId - { - get => this.InternalInvoiceItem?.Id; - set => this.InternalInvoiceItem = SetExpandableFieldId(value, this.InternalInvoiceItem); - } - - /// - /// (Expanded) - /// The ID of the invoice item - /// associated with this line item if any. - /// - /// For more information, see the expand documentation. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public InvoiceItem InvoiceItem - { - get => this.InternalInvoiceItem?.ExpandedObject; - set => this.InternalInvoiceItem = SetExpandableFieldObject(value, this.InternalInvoiceItem); - } - - [JsonProperty("invoice_item")] - [JsonConverter(typeof(ExpandableFieldConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("invoice_item")] - [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] -#endif - internal ExpandableField InternalInvoiceItem { get; set; } - #endregion - /// /// Has the value true if the object exists in live mode or the value false if /// the object exists in test mode. @@ -215,20 +162,20 @@ public InvoiceItem InvoiceItem #endif public Dictionary Metadata { get; set; } - [JsonProperty("period")] + /// + /// The parent that generated this invoice. + /// + [JsonProperty("parent")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("period")] + [STJS.JsonPropertyName("parent")] #endif - public InvoiceLineItemPeriod Period { get; set; } + public InvoiceLineItemParent Parent { get; set; } - /// - /// The plan of the subscription, if the line item is a subscription or a proration. - /// - [JsonProperty("plan")] + [JsonProperty("period")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("plan")] + [STJS.JsonPropertyName("period")] #endif - public Plan Plan { get; set; } + public InvoiceLineItemPeriod Period { get; set; } /// /// Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this @@ -241,31 +188,13 @@ public InvoiceItem InvoiceItem public List PretaxCreditAmounts { get; set; } /// - /// The price of the line item. - /// - [JsonProperty("price")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("price")] -#endif - public Price Price { get; set; } - - /// - /// Whether this is a proration. + /// The pricing information of the line item. /// - [JsonProperty("proration")] + [JsonProperty("pricing")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("proration")] + [STJS.JsonPropertyName("pricing")] #endif - public bool Proration { get; set; } - - /// - /// Additional details for proration line items. - /// - [JsonProperty("proration_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("proration_details")] -#endif - public InvoiceLineItemProrationDetails ProrationDetails { get; set; } + public InvoiceLineItemPricing Pricing { get; set; } /// /// The quantity of the subscription, if the line item is a subscription or a proration. @@ -278,10 +207,6 @@ public InvoiceItem InvoiceItem #region Expandable Subscription - /// - /// (ID of the Subscription) - /// The subscription that the invoice item pertains to, if any. - /// [JsonIgnore] #if NET6_0_OR_GREATER [STJS.JsonIgnore] @@ -292,12 +217,6 @@ public string SubscriptionId set => this.InternalSubscription = SetExpandableFieldId(value, this.InternalSubscription); } - /// - /// (Expanded) - /// The subscription that the invoice item pertains to, if any. - /// - /// For more information, see the expand documentation. - /// [JsonIgnore] #if NET6_0_OR_GREATER [STJS.JsonIgnore] @@ -317,86 +236,13 @@ public Subscription Subscription internal ExpandableField InternalSubscription { get; set; } #endregion - #region Expandable SubscriptionItem - - /// - /// (ID of the SubscriptionItem) - /// The subscription item that generated this line item. Left empty if the line item is not - /// an explicit result of a subscription. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string SubscriptionItemId - { - get => this.InternalSubscriptionItem?.Id; - set => this.InternalSubscriptionItem = SetExpandableFieldId(value, this.InternalSubscriptionItem); - } - - /// - /// (Expanded) - /// The subscription item that generated this line item. Left empty if the line item is not - /// an explicit result of a subscription. - /// - /// For more information, see the expand documentation. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public SubscriptionItem SubscriptionItem - { - get => this.InternalSubscriptionItem?.ExpandedObject; - set => this.InternalSubscriptionItem = SetExpandableFieldObject(value, this.InternalSubscriptionItem); - } - - [JsonProperty("subscription_item")] - [JsonConverter(typeof(ExpandableFieldConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_item")] - [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] -#endif - internal ExpandableField InternalSubscriptionItem { get; set; } - #endregion - - /// - /// The amount of tax calculated per tax rate for this line item. - /// - [JsonProperty("tax_amounts")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("tax_amounts")] -#endif - public List TaxAmounts { get; set; } - - /// - /// The tax rates which apply to the line item. - /// - [JsonProperty("tax_rates")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("tax_rates")] -#endif - public List TaxRates { get; set; } - - /// - /// A string identifying the type of the source of this line item, either an - /// invoiceitem or a subscription. - /// One of: invoiceitem, or subscription. - /// - [JsonProperty("type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("type")] -#endif - public string Type { get; set; } - /// - /// The amount in cents (or local equivalent) representing the unit amount for this line - /// item, excluding all tax and discounts. + /// The tax information of the line item. /// - [JsonProperty("unit_amount_excluding_tax")] + [JsonProperty("taxes")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("unit_amount_excluding_tax")] + [STJS.JsonPropertyName("taxes")] #endif - public decimal? UnitAmountExcludingTax { get; set; } + public List Taxes { get; set; } } } diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParent.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParent.cs new file mode 100644 index 0000000000..83bdf2a252 --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParent.cs @@ -0,0 +1,39 @@ +// 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 InvoiceLineItemParent : StripeEntity + { + /// + /// Details about the invoice item that generated this line item. + /// + [JsonProperty("invoice_item_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_item_details")] +#endif + public InvoiceLineItemParentInvoiceItemDetails InvoiceItemDetails { get; set; } + + /// + /// Details about the subscription item that generated this line item. + /// + [JsonProperty("subscription_item_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_item_details")] +#endif + public InvoiceLineItemParentSubscriptionItemDetails SubscriptionItemDetails { get; set; } + + /// + /// The type of parent that generated this line item. + /// One of: invoice_item_details, or subscription_item_details. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentInvoiceItemDetails.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentInvoiceItemDetails.cs new file mode 100644 index 0000000000..6007b01567 --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentInvoiceItemDetails.cs @@ -0,0 +1,47 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class InvoiceLineItemParentInvoiceItemDetails : StripeEntity + { + /// + /// The invoice item that generated this line item. + /// + [JsonProperty("invoice_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_item")] +#endif + public string InvoiceItem { get; set; } + + /// + /// Whether this is a proration. + /// + [JsonProperty("proration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration")] +#endif + public bool Proration { get; set; } + + /// + /// Additional details for proration line items. + /// + [JsonProperty("proration_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_details")] +#endif + public InvoiceLineItemParentInvoiceItemDetailsProrationDetails ProrationDetails { get; set; } + + /// + /// The subscription that the invoice item belongs to. + /// + [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif + public string Subscription { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemProrationDetails.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentInvoiceItemDetailsProrationDetails.cs similarity index 65% rename from src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemProrationDetails.cs rename to src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentInvoiceItemDetailsProrationDetails.cs index 7216e26868..4812017109 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemProrationDetails.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentInvoiceItemDetailsProrationDetails.cs @@ -6,7 +6,7 @@ namespace Stripe using STJS = System.Text.Json.Serialization; #endif - public class InvoiceLineItemProrationDetails : StripeEntity + public class InvoiceLineItemParentInvoiceItemDetailsProrationDetails : StripeEntity { /// /// For a credit proration line_item, the original debit line_items to which the @@ -16,6 +16,6 @@ public class InvoiceLineItemProrationDetails : StripeEntity + public class InvoiceLineItemParentInvoiceItemDetailsProrationDetailsCreditedItems : StripeEntity { /// /// Invoice containing the credited invoice line items. diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentSubscriptionItemDetails.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentSubscriptionItemDetails.cs new file mode 100644 index 0000000000..8e34780b36 --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentSubscriptionItemDetails.cs @@ -0,0 +1,56 @@ +// 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 InvoiceLineItemParentSubscriptionItemDetails : StripeEntity + { + /// + /// The invoice item that generated this line item. + /// + [JsonProperty("invoice_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_item")] +#endif + public string InvoiceItem { get; set; } + + /// + /// Whether this is a proration. + /// + [JsonProperty("proration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration")] +#endif + public bool Proration { get; set; } + + /// + /// Additional details for proration line items. + /// + [JsonProperty("proration_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_details")] +#endif + public InvoiceLineItemParentSubscriptionItemDetailsProrationDetails ProrationDetails { get; set; } + + /// + /// The subscription that the subscription item belongs to. + /// + [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif + public string Subscription { get; set; } + + /// + /// The subscription item that generated this line item. + /// + [JsonProperty("subscription_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_item")] +#endif + public string SubscriptionItem { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentSubscriptionItemDetailsProrationDetails.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentSubscriptionItemDetailsProrationDetails.cs new file mode 100644 index 0000000000..f10b4db76b --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentSubscriptionItemDetailsProrationDetails.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 InvoiceLineItemParentSubscriptionItemDetailsProrationDetails : StripeEntity + { + /// + /// For a credit proration line_item, the original debit line_items to which the + /// credit proration applies. + /// + [JsonProperty("credited_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credited_items")] +#endif + public InvoiceLineItemParentSubscriptionItemDetailsProrationDetailsCreditedItems CreditedItems { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentSubscriptionItemDetailsProrationDetailsCreditedItems.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentSubscriptionItemDetailsProrationDetailsCreditedItems.cs new file mode 100644 index 0000000000..8e839fa7ef --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentSubscriptionItemDetailsProrationDetailsCreditedItems.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 InvoiceLineItemParentSubscriptionItemDetailsProrationDetailsCreditedItems : StripeEntity + { + /// + /// Invoice containing the credited invoice line items. + /// + [JsonProperty("invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] +#endif + public string Invoice { get; set; } + + /// + /// Credited invoice line items. + /// + [JsonProperty("invoice_line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_line_items")] +#endif + public List InvoiceLineItems { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemPricing.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemPricing.cs new file mode 100644 index 0000000000..6d90cea3b7 --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemPricing.cs @@ -0,0 +1,36 @@ +// 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 InvoiceLineItemPricing : StripeEntity + { + [JsonProperty("price_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_details")] +#endif + public InvoiceLineItemPricingPriceDetails PriceDetails { get; set; } + + /// + /// The type of the pricing details. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + + /// + /// The unit amount (in the currency specified) of the item which contains a decimal + /// value with at most 12 decimal places. + /// + [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif + public decimal? UnitAmountDecimal { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemPricingPriceDetails.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemPricingPriceDetails.cs new file mode 100644 index 0000000000..eae143184a --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemPricingPriceDetails.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 InvoiceLineItemPricingPriceDetails : StripeEntity + { + /// + /// The ID of the price this item is associated with. + /// + [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif + public string Price { get; set; } + + /// + /// The ID of the product this item is associated with. + /// + [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif + public string Product { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTax.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTax.cs new file mode 100644 index 0000000000..7288937ebb --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTax.cs @@ -0,0 +1,74 @@ +// 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 InvoiceLineItemTax : StripeEntity + { + /// + /// The amount of the tax, in cents (or local equivalent). + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public long Amount { get; set; } + + /// + /// Whether this tax is inclusive or exclusive. + /// One of: exclusive, or inclusive. + /// + [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif + public string TaxBehavior { get; set; } + + /// + /// Additional details about the tax rate. Only present when type is + /// tax_rate_details. + /// + [JsonProperty("tax_rate_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate_details")] +#endif + public InvoiceLineItemTaxTaxRateDetails TaxRateDetails { get; set; } + + /// + /// The reasoning behind this tax, for example, if the product is tax exempt. The possible + /// values for this field may be extended as new tax rules are supported. + /// One of: customer_exempt, not_available, not_collecting, + /// not_subject_to_tax, not_supported, portion_product_exempt, + /// portion_reduced_rated, portion_standard_rated, product_exempt, + /// product_exempt_holiday, proportionally_rated, reduced_rated, + /// reverse_charge, standard_rated, taxable_basis_reduced, or + /// zero_rated. + /// + [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif + public string TaxabilityReason { get; set; } + + /// + /// The amount on which tax is calculated, in cents (or local equivalent). + /// + [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif + public long? TaxableAmount { get; set; } + + /// + /// The type of tax information. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTaxAmount.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTaxAmount.cs deleted file mode 100644 index a35f7ccd05..0000000000 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTaxAmount.cs +++ /dev/null @@ -1,98 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - using Stripe.Infrastructure; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif - public class InvoiceLineItemTaxAmount : StripeEntity - { - /// - /// The amount, in cents (or local equivalent), of the tax. - /// - [JsonProperty("amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount")] -#endif - public long Amount { get; set; } - - /// - /// Whether this tax amount is inclusive or exclusive. - /// - [JsonProperty("inclusive")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("inclusive")] -#endif - public bool Inclusive { get; set; } - - #region Expandable TaxRate - - /// - /// (ID of the TaxRate) - /// The tax rate that was applied to get this tax amount. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string TaxRateId - { - get => this.InternalTaxRate?.Id; - set => this.InternalTaxRate = SetExpandableFieldId(value, this.InternalTaxRate); - } - - /// - /// (Expanded) - /// The tax rate that was applied to get this tax amount. - /// - /// For more information, see the expand documentation. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public TaxRate TaxRate - { - get => this.InternalTaxRate?.ExpandedObject; - set => this.InternalTaxRate = SetExpandableFieldObject(value, this.InternalTaxRate); - } - - [JsonProperty("tax_rate")] - [JsonConverter(typeof(ExpandableFieldConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("tax_rate")] - [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] -#endif - internal ExpandableField InternalTaxRate { get; set; } - #endregion - - /// - /// The reasoning behind this tax, for example, if the product is tax exempt. The possible - /// values for this field may be extended as new tax rules are supported. - /// One of: customer_exempt, not_collecting, not_subject_to_tax, - /// not_supported, portion_product_exempt, portion_reduced_rated, - /// portion_standard_rated, product_exempt, product_exempt_holiday, - /// proportionally_rated, reduced_rated, reverse_charge, - /// standard_rated, taxable_basis_reduced, or zero_rated. - /// - [JsonProperty("taxability_reason")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("taxability_reason")] -#endif - public string TaxabilityReason { get; set; } - - /// - /// The amount on which tax is calculated, in cents (or local equivalent). - /// - [JsonProperty("taxable_amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("taxable_amount")] -#endif - public long? TaxableAmount { get; set; } - } -} diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTaxTaxRateDetails.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTaxTaxRateDetails.cs new file mode 100644 index 0000000000..8da24238db --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTaxTaxRateDetails.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 InvoiceLineItemTaxTaxRateDetails : StripeEntity + { + [JsonProperty("tax_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate")] +#endif + public string TaxRate { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoicePayments/InvoicePayment.cs b/src/Stripe.net/Entities/InvoicePayments/InvoicePayment.cs new file mode 100644 index 0000000000..d7a96912c2 --- /dev/null +++ b/src/Stripe.net/Entities/InvoicePayments/InvoicePayment.cs @@ -0,0 +1,163 @@ +// 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 + + /// + /// The invoice payment object. + /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif + public class InvoicePayment : 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; } + + /// + /// Amount that was actually paid for this invoice, in cents (or local equivalent). This + /// field is null until the payment is paid. This amount can be less than the + /// amount_requested if the PaymentIntent’s amount_received is not sufficient + /// to pay all of the invoices that it is attached to. + /// + [JsonProperty("amount_paid")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_paid")] +#endif + public long? AmountPaid { get; set; } + + /// + /// Amount intended to be paid toward this invoice, in cents (or local equivalent). + /// + [JsonProperty("amount_requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_requested")] +#endif + public long AmountRequested { 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; + + /// + /// 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; } + + #region Expandable Invoice + + /// + /// (ID of the Invoice) + /// The invoice that was paid. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public string InvoiceId + { + get => this.InternalInvoice?.Id; + set => this.InternalInvoice = SetExpandableFieldId(value, this.InternalInvoice); + } + + /// + /// (Expanded) + /// The invoice that was paid. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public Invoice Invoice + { + get => this.InternalInvoice?.ExpandedObject; + set => this.InternalInvoice = SetExpandableFieldObject(value, this.InternalInvoice); + } + + [JsonProperty("invoice")] + [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif + internal ExpandableField InternalInvoice { get; set; } + #endregion + + /// + /// Stripe automatically creates a default InvoicePayment when the invoice is finalized, and + /// keeps it synchronized with the invoice’s amount_remaining. The PaymentIntent + /// associated with the default payment can’t be edited or canceled directly. + /// + [JsonProperty("is_default")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_default")] +#endif + public bool IsDefault { get; set; } + + /// + /// 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; } + + [JsonProperty("payment")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment")] +#endif + public InvoicePaymentPayment Payment { get; set; } + + /// + /// The status of the payment, one of open, paid, or canceled. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + + [JsonProperty("status_transitions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_transitions")] +#endif + public InvoicePaymentStatusTransitions StatusTransitions { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoicePayments/InvoicePaymentPayment.cs b/src/Stripe.net/Entities/InvoicePayments/InvoicePaymentPayment.cs new file mode 100644 index 0000000000..eb9cfa020e --- /dev/null +++ b/src/Stripe.net/Entities/InvoicePayments/InvoicePaymentPayment.cs @@ -0,0 +1,111 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif + public class InvoicePaymentPayment : StripeEntity + { + #region Expandable Charge + + /// + /// (ID of the Charge) + /// ID of the successful charge for this payment when type is charge. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public string ChargeId + { + get => this.InternalCharge?.Id; + set => this.InternalCharge = SetExpandableFieldId(value, this.InternalCharge); + } + + /// + /// (Expanded) + /// ID of the successful charge for this payment when type is charge. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public Charge Charge + { + get => this.InternalCharge?.ExpandedObject; + set => this.InternalCharge = SetExpandableFieldObject(value, this.InternalCharge); + } + + [JsonProperty("charge")] + [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif + internal ExpandableField InternalCharge { get; set; } + #endregion + + #region Expandable PaymentIntent + + /// + /// (ID of the PaymentIntent) + /// ID of the PaymentIntent associated with this payment when type is + /// payment_intent. Note: This property is only populated for invoices finalized on + /// or after March 15th, 2019. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public string PaymentIntentId + { + get => this.InternalPaymentIntent?.Id; + set => this.InternalPaymentIntent = SetExpandableFieldId(value, this.InternalPaymentIntent); + } + + /// + /// (Expanded) + /// ID of the PaymentIntent associated with this payment when type is + /// payment_intent. Note: This property is only populated for invoices finalized on + /// or after March 15th, 2019. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public PaymentIntent PaymentIntent + { + get => this.InternalPaymentIntent?.ExpandedObject; + set => this.InternalPaymentIntent = SetExpandableFieldObject(value, this.InternalPaymentIntent); + } + + [JsonProperty("payment_intent")] + [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif + internal ExpandableField InternalPaymentIntent { get; set; } + #endregion + + /// + /// Type of payment object associated with this invoice payment. + /// One of: charge, or payment_intent. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummaryPeriod.cs b/src/Stripe.net/Entities/InvoicePayments/InvoicePaymentStatusTransitions.cs similarity index 53% rename from src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummaryPeriod.cs rename to src/Stripe.net/Entities/InvoicePayments/InvoicePaymentStatusTransitions.cs index 63bd9c42b5..4f7e146137 100644 --- a/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummaryPeriod.cs +++ b/src/Stripe.net/Entities/InvoicePayments/InvoicePaymentStatusTransitions.cs @@ -8,29 +8,28 @@ namespace Stripe using STJS = System.Text.Json.Serialization; #endif - public class UsageRecordSummaryPeriod : StripeEntity + public class InvoicePaymentStatusTransitions : StripeEntity { /// - /// The end date of this usage period. All usage up to and including this point in time is - /// included. + /// The time that the payment was canceled. /// - [JsonProperty("end")] + [JsonProperty("canceled_at")] [JsonConverter(typeof(UnixDateTimeConverter))] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("end")] + [STJS.JsonPropertyName("canceled_at")] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] #endif - public DateTime? End { get; set; } + public DateTime? CanceledAt { get; set; } /// - /// The start date of this usage period. All usage after this point in time is included. + /// The time that the payment succeeded. /// - [JsonProperty("start")] + [JsonProperty("paid_at")] [JsonConverter(typeof(UnixDateTimeConverter))] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("start")] + [STJS.JsonPropertyName("paid_at")] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] #endif - public DateTime? Start { get; set; } + public DateTime? PaidAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/Invoice.cs b/src/Stripe.net/Entities/Invoices/Invoice.cs index 7c88c16052..5ebad3e8c9 100644 --- a/src/Stripe.net/Entities/Invoices/Invoice.cs +++ b/src/Stripe.net/Entities/Invoices/Invoice.cs @@ -146,6 +146,16 @@ public List AccountTaxIds #endif public long AmountDue { get; set; } + /// + /// Amount that was overpaid on the invoice. The amount overpaid is credited to the + /// customer's credit balance. + /// + [JsonProperty("amount_overpaid")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_overpaid")] +#endif + public long AmountOverpaid { get; set; } + /// /// The amount, in cents (or local equivalent), that was paid. /// @@ -214,16 +224,6 @@ public Application Application internal ExpandableField InternalApplication { get; set; } #endregion - /// - /// The fee in cents (or local equivalent) that will be applied to the invoice and - /// transferred to the application owner's Stripe account when the invoice is paid. - /// - [JsonProperty("application_fee_amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("application_fee_amount")] -#endif - public long? ApplicationFeeAmount { get; set; } - /// /// Number of payment attempts made for this invoice, from the perspective of the payment /// retry schedule. Any payment attempt counts as the first attempt, and subsequently only @@ -305,47 +305,6 @@ public Application Application #endif public string BillingReason { get; set; } - #region Expandable Charge - - /// - /// (ID of the Charge) - /// ID of the latest charge generated for this invoice, if any. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string ChargeId - { - get => this.InternalCharge?.Id; - set => this.InternalCharge = SetExpandableFieldId(value, this.InternalCharge); - } - - /// - /// (Expanded) - /// ID of the latest charge generated for this invoice, if any. - /// - /// For more information, see the expand documentation. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public Charge Charge - { - get => this.InternalCharge?.ExpandedObject; - set => this.InternalCharge = SetExpandableFieldObject(value, this.InternalCharge); - } - - [JsonProperty("charge")] - [JsonConverter(typeof(ExpandableFieldConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("charge")] - [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] -#endif - internal ExpandableField InternalCharge { get; set; } - #endregion - /// /// Either charge_automatically, or send_invoice. When charging automatically, /// Stripe will attempt to pay this invoice using the default source attached to the @@ -359,6 +318,16 @@ public Charge Charge #endif public string CollectionMethod { get; set; } + /// + /// The confirmation secret associated with this invoice. Currently, this contains the + /// client_secret of the PaymentIntent that Stripe creates during invoice finalization. + /// + [JsonProperty("confirmation_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmation_secret")] +#endif + public InvoiceConfirmationSecret ConfirmationSecret { get; set; } + /// /// Time at which the object was created. Measured in seconds since the Unix epoch. /// @@ -628,16 +597,6 @@ public IPaymentSource DefaultSource #endif public string Description { get; set; } - /// - /// Describes the current discount applied to this invoice, if there is one. Not populated - /// if there are multiple discounts. - /// - [JsonProperty("discount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("discount")] -#endif - public Discount Discount { get; set; } - #region Expandable Discounts /// @@ -915,75 +874,28 @@ public Account OnBehalfOf #endregion /// - /// Whether payment was successfully collected for this invoice. An invoice can be paid - /// (most commonly) with a charge or with credit from the customer's account balance. + /// The parent that generated this invoice. /// - [JsonProperty("paid")] + [JsonProperty("parent")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("paid")] + [STJS.JsonPropertyName("parent")] #endif - public bool Paid { get; set; } + public InvoiceParent Parent { get; set; } - /// - /// Returns true if the invoice was manually marked paid, returns false if the invoice - /// hasn't been paid yet or was paid on Stripe. - /// - [JsonProperty("paid_out_of_band")] + [JsonProperty("payment_settings")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("paid_out_of_band")] + [STJS.JsonPropertyName("payment_settings")] #endif - public bool PaidOutOfBand { get; set; } - - #region Expandable PaymentIntent + public InvoicePaymentSettings PaymentSettings { get; set; } /// - /// (ID of the PaymentIntent) - /// The PaymentIntent associated with this invoice. The PaymentIntent is generated when the - /// invoice is finalized, and can then be used to pay the invoice. Note that voiding an - /// invoice will cancel the PaymentIntent. + /// Payments for this invoice. /// - [JsonIgnore] + [JsonProperty("payments")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("payments")] #endif - public string PaymentIntentId - { - get => this.InternalPaymentIntent?.Id; - set => this.InternalPaymentIntent = SetExpandableFieldId(value, this.InternalPaymentIntent); - } - - /// - /// (Expanded) - /// The PaymentIntent associated with this invoice. The PaymentIntent is generated when the - /// invoice is finalized, and can then be used to pay the invoice. Note that voiding an - /// invoice will cancel the PaymentIntent. - /// - /// For more information, see the expand documentation. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public PaymentIntent PaymentIntent - { - get => this.InternalPaymentIntent?.ExpandedObject; - set => this.InternalPaymentIntent = SetExpandableFieldObject(value, this.InternalPaymentIntent); - } - - [JsonProperty("payment_intent")] - [JsonConverter(typeof(ExpandableFieldConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("payment_intent")] - [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] -#endif - internal ExpandableField InternalPaymentIntent { get; set; } - #endregion - - [JsonProperty("payment_settings")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("payment_settings")] -#endif - public InvoicePaymentSettings PaymentSettings { get; set; } + public StripeList Payments { get; set; } /// /// End of the usage period during which invoice items were added to this invoice. This @@ -1031,47 +943,6 @@ public PaymentIntent PaymentIntent #endif public long PrePaymentCreditNotesAmount { get; set; } - #region Expandable Quote - - /// - /// (ID of the Quote) - /// The quote this invoice was generated from. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string QuoteId - { - get => this.InternalQuote?.Id; - set => this.InternalQuote = SetExpandableFieldId(value, this.InternalQuote); - } - - /// - /// (Expanded) - /// The quote this invoice was generated from. - /// - /// For more information, see the expand documentation. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public Quote Quote - { - get => this.InternalQuote?.ExpandedObject; - set => this.InternalQuote = SetExpandableFieldObject(value, this.InternalQuote); - } - - [JsonProperty("quote")] - [JsonConverter(typeof(ExpandableFieldConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("quote")] - [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] -#endif - internal ExpandableField InternalQuote { get; set; } - #endregion - /// /// This is the transaction number that appears on email receipts sent for this invoice. /// @@ -1152,10 +1023,6 @@ public Quote Quote #region Expandable Subscription - /// - /// (ID of the Subscription) - /// The subscription that this invoice was prepared for, if any. - /// [JsonIgnore] #if NET6_0_OR_GREATER [STJS.JsonIgnore] @@ -1166,12 +1033,6 @@ public string SubscriptionId set => this.InternalSubscription = SetExpandableFieldId(value, this.InternalSubscription); } - /// - /// (Expanded) - /// The subscription that this invoice was prepared for, if any. - /// - /// For more information, see the expand documentation. - /// [JsonIgnore] #if NET6_0_OR_GREATER [STJS.JsonIgnore] @@ -1191,27 +1052,6 @@ public Subscription Subscription internal ExpandableField InternalSubscription { get; set; } #endregion - /// - /// Details about the subscription that created this invoice. - /// - [JsonProperty("subscription_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_details")] -#endif - public InvoiceSubscriptionDetails SubscriptionDetails { get; set; } - - /// - /// Only set for upcoming invoices that preview prorations. The time used to calculate - /// prorations. - /// - [JsonProperty("subscription_proration_date")] - [JsonConverter(typeof(UnixDateTimeConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_proration_date")] - [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] -#endif - public DateTime SubscriptionProrationDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; - /// /// Total of all subscriptions, invoice items, and prorations on the invoice before any /// invoice level discount or exclusive tax is applied. Item discounts are already @@ -1234,16 +1074,6 @@ public Subscription Subscription #endif public long? SubtotalExcludingTax { get; set; } - /// - /// The amount of tax on this invoice. This is the sum of all the tax amounts on this - /// invoice. - /// - [JsonProperty("tax")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("tax")] -#endif - public long? Tax { get; set; } - #region Expandable TestClock /// @@ -1331,23 +1161,13 @@ public TestHelpers.TestClock TestClock public List TotalPretaxCreditAmounts { get; set; } /// - /// The aggregate amounts calculated per tax rate for all line items. - /// - [JsonProperty("total_tax_amounts")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("total_tax_amounts")] -#endif - public List TotalTaxAmounts { get; set; } - - /// - /// The account (if any) the payment will be attributed to for tax reporting, and where - /// funds from the payment will be transferred to for the invoice. + /// The aggregate tax information of all line items. /// - [JsonProperty("transfer_data")] + [JsonProperty("total_taxes")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("transfer_data")] + [STJS.JsonPropertyName("total_taxes")] #endif - public InvoiceTransferData TransferData { get; set; } + public List TotalTaxes { get; set; } /// /// Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until diff --git a/src/Stripe.net/Entities/Invoices/InvoiceConfirmationSecret.cs b/src/Stripe.net/Entities/Invoices/InvoiceConfirmationSecret.cs new file mode 100644 index 0000000000..17ddb4c4fb --- /dev/null +++ b/src/Stripe.net/Entities/Invoices/InvoiceConfirmationSecret.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 InvoiceConfirmationSecret : StripeEntity + { + /// + /// The client_secret of the payment that Stripe creates for the invoice after finalization. + /// + [JsonProperty("client_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_secret")] +#endif + public string ClientSecret { get; set; } + + /// + /// The type of client_secret. Currently this is always payment_intent, referencing the + /// default payment_intent that Stripe creates during invoice finalization. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Invoices/InvoiceParent.cs b/src/Stripe.net/Entities/Invoices/InvoiceParent.cs new file mode 100644 index 0000000000..16b197ab88 --- /dev/null +++ b/src/Stripe.net/Entities/Invoices/InvoiceParent.cs @@ -0,0 +1,39 @@ +// 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 InvoiceParent : StripeEntity + { + /// + /// Details about the quote that generated this invoice. + /// + [JsonProperty("quote_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quote_details")] +#endif + public InvoiceParentQuoteDetails QuoteDetails { get; set; } + + /// + /// Details about the subscription that generated this invoice. + /// + [JsonProperty("subscription_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_details")] +#endif + public InvoiceParentSubscriptionDetails SubscriptionDetails { get; set; } + + /// + /// The type of parent that generated this invoice. + /// One of: quote_details, or subscription_details. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Invoices/InvoiceParentQuoteDetails.cs b/src/Stripe.net/Entities/Invoices/InvoiceParentQuoteDetails.cs new file mode 100644 index 0000000000..1f5bb86f3d --- /dev/null +++ b/src/Stripe.net/Entities/Invoices/InvoiceParentQuoteDetails.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 InvoiceParentQuoteDetails : StripeEntity + { + /// + /// The quote that generated this invoice. + /// + [JsonProperty("quote")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quote")] +#endif + public string Quote { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Invoices/InvoiceParentSubscriptionDetails.cs b/src/Stripe.net/Entities/Invoices/InvoiceParentSubscriptionDetails.cs new file mode 100644 index 0000000000..8f337f21db --- /dev/null +++ b/src/Stripe.net/Entities/Invoices/InvoiceParentSubscriptionDetails.cs @@ -0,0 +1,82 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif + public class InvoiceParentSubscriptionDetails : StripeEntity, IHasMetadata + { + /// + /// Set of key-value pairs defined as + /// subscription metadata when an invoice is created. Becomes an immutable snapshot of the + /// subscription metadata at the time of invoice finalization. Note: This attribute is + /// populated only for invoices created on or after June 29, 2023.. + /// + [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + + #region Expandable Subscription + + /// + /// (ID of the Subscription) + /// The subscription that generated this invoice. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public string SubscriptionId + { + get => this.InternalSubscription?.Id; + set => this.InternalSubscription = SetExpandableFieldId(value, this.InternalSubscription); + } + + /// + /// (Expanded) + /// The subscription that generated this invoice. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public Subscription Subscription + { + get => this.InternalSubscription?.ExpandedObject; + set => this.InternalSubscription = SetExpandableFieldObject(value, this.InternalSubscription); + } + + [JsonProperty("subscription")] + [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif + internal ExpandableField InternalSubscription { get; set; } + #endregion + + /// + /// Only set for upcoming invoices that preview prorations. The time used to calculate + /// prorations. + /// + [JsonProperty("subscription_proration_date")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_proration_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime SubscriptionProrationDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + } +} diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs index 088386bc06..99c593b691 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs @@ -40,10 +40,11 @@ public class InvoicePaymentSettings : StripeEntity /// amazon_pay, au_becs_debit, bacs_debit, bancontact, /// boleto, card, cashapp, customer_balance, eps, /// fpx, giropay, grabpay, ideal, jp_credit_transfer, - /// kakao_pay, konbini, kr_card, link, multibanco, - /// naver_pay, p24, payco, paynow, paypal, - /// promptpay, revolut_pay, sepa_credit_transfer, sepa_debit, - /// sofort, swish, us_bank_account, or wechat_pay. + /// kakao_pay, klarna, konbini, kr_card, link, + /// multibanco, naver_pay, nz_bank_account, p24, payco, + /// paynow, paypal, promptpay, revolut_pay, + /// sepa_credit_transfer, sepa_debit, sofort, swish, + /// us_bank_account, or wechat_pay. /// [JsonProperty("payment_method_types")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Invoices/InvoiceSubscriptionDetails.cs b/src/Stripe.net/Entities/Invoices/InvoiceSubscriptionDetails.cs deleted file mode 100644 index 5529d40a71..0000000000 --- a/src/Stripe.net/Entities/Invoices/InvoiceSubscriptionDetails.cs +++ /dev/null @@ -1,24 +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 InvoiceSubscriptionDetails : StripeEntity, IHasMetadata - { - /// - /// Set of key-value pairs defined as - /// subscription metadata when an invoice is created. Becomes an immutable snapshot of the - /// subscription metadata at the time of invoice finalization. Note: This attribute is - /// populated only for invoices created on or after June 29, 2023.. - /// - [JsonProperty("metadata")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("metadata")] -#endif - public Dictionary Metadata { get; set; } - } -} diff --git a/src/Stripe.net/Entities/Invoices/InvoiceTotalTax.cs b/src/Stripe.net/Entities/Invoices/InvoiceTotalTax.cs new file mode 100644 index 0000000000..d743f8405e --- /dev/null +++ b/src/Stripe.net/Entities/Invoices/InvoiceTotalTax.cs @@ -0,0 +1,74 @@ +// 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 InvoiceTotalTax : StripeEntity + { + /// + /// The amount of the tax, in cents (or local equivalent). + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public long Amount { get; set; } + + /// + /// Whether this tax is inclusive or exclusive. + /// One of: exclusive, or inclusive. + /// + [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif + public string TaxBehavior { get; set; } + + /// + /// Additional details about the tax rate. Only present when type is + /// tax_rate_details. + /// + [JsonProperty("tax_rate_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate_details")] +#endif + public InvoiceTotalTaxTaxRateDetails TaxRateDetails { get; set; } + + /// + /// The reasoning behind this tax, for example, if the product is tax exempt. The possible + /// values for this field may be extended as new tax rules are supported. + /// One of: customer_exempt, not_available, not_collecting, + /// not_subject_to_tax, not_supported, portion_product_exempt, + /// portion_reduced_rated, portion_standard_rated, product_exempt, + /// product_exempt_holiday, proportionally_rated, reduced_rated, + /// reverse_charge, standard_rated, taxable_basis_reduced, or + /// zero_rated. + /// + [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif + public string TaxabilityReason { get; set; } + + /// + /// The amount on which tax is calculated, in cents (or local equivalent). + /// + [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif + public long? TaxableAmount { get; set; } + + /// + /// The type of tax information. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Invoices/InvoiceTotalTaxTaxRateDetails.cs b/src/Stripe.net/Entities/Invoices/InvoiceTotalTaxTaxRateDetails.cs new file mode 100644 index 0000000000..5ef072b8f5 --- /dev/null +++ b/src/Stripe.net/Entities/Invoices/InvoiceTotalTaxTaxRateDetails.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 InvoiceTotalTaxTaxRateDetails : StripeEntity + { + [JsonProperty("tax_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate")] +#endif + public string TaxRate { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Invoices/InvoiceTransferData.cs b/src/Stripe.net/Entities/Invoices/InvoiceTransferData.cs deleted file mode 100644 index ca9d366aba..0000000000 --- a/src/Stripe.net/Entities/Invoices/InvoiceTransferData.cs +++ /dev/null @@ -1,67 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - using Stripe.Infrastructure; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif - public class InvoiceTransferData : StripeEntity - { - /// - /// The amount in cents (or local equivalent) that will be transferred to the destination - /// account when the invoice is paid. By default, the entire amount is transferred to the - /// destination. - /// - [JsonProperty("amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount")] -#endif - public long? Amount { get; set; } - - #region Expandable Destination - - /// - /// (ID of the Account) - /// The account where funds from the payment will be transferred to upon payment success. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string DestinationId - { - get => this.InternalDestination?.Id; - set => this.InternalDestination = SetExpandableFieldId(value, this.InternalDestination); - } - - /// - /// (Expanded) - /// The account where funds from the payment will be transferred to upon payment success. - /// - /// For more information, see the expand documentation. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public Account Destination - { - get => this.InternalDestination?.ExpandedObject; - set => this.InternalDestination = SetExpandableFieldObject(value, this.InternalDestination); - } - - [JsonProperty("destination")] - [JsonConverter(typeof(ExpandableFieldConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("destination")] - [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] -#endif - internal ExpandableField InternalDestination { get; set; } - #endregion - } -} diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs b/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs index 1e13a8038a..29fbeccab1 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs @@ -286,7 +286,7 @@ public Cardholder Cardholder /// /// The current status of the authorization in its lifecycle. - /// One of: closed, pending, or reversed. + /// One of: closed, expired, pending, or reversed. /// [JsonProperty("status")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationRequestHistory.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationRequestHistory.cs index b3d026af98..609ac8fcf2 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationRequestHistory.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationRequestHistory.cs @@ -117,10 +117,11 @@ public class AuthorizationRequestHistory : StripeEntityaccount_disabled, card_active, card_canceled, /// card_expired, card_inactive, cardholder_blocked, /// cardholder_inactive, cardholder_verification_required, - /// insecure_authorization_method, insufficient_funds, not_allowed, - /// pin_blocked, spending_controls, suspected_fraud, - /// verification_failed, webhook_approved, webhook_declined, - /// webhook_error, or webhook_timeout. + /// insecure_authorization_method, insufficient_funds, + /// network_fallback, not_allowed, pin_blocked, + /// spending_controls, suspected_fraud, verification_failed, + /// webhook_approved, webhook_declined, webhook_error, or + /// webhook_timeout. /// [JsonProperty("reason")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs index df27dbbe66..786656f036 100644 --- a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs @@ -62,6 +62,18 @@ public class MandatePaymentMethodDetails : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsNzBankAccount.cs b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsNzBankAccount.cs new file mode 100644 index 0000000000..c1ca27d67b --- /dev/null +++ b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsNzBankAccount.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class MandatePaymentMethodDetailsNzBankAccount : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs index 3cce856521..215c16a04f 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs @@ -130,7 +130,7 @@ public Application Application /// /// The amount of the application fee (if any) that will be requested to be applied to the /// payment and transferred to the application owner's Stripe account. The amount of the - /// application fee collected will be capped at the total payment amount. For more + /// application fee collected will be capped at the total amount captured. For more /// information, see the PaymentIntents use case for connected /// accounts. @@ -166,9 +166,11 @@ public Application Application /// /// Reason for cancellation of this PaymentIntent, either user-provided (duplicate, /// fraudulent, requested_by_customer, or abandoned) or generated by - /// Stripe internally (failed_invoice, void_invoice, or automatic). - /// One of: abandoned, automatic, duplicate, failed_invoice, - /// fraudulent, requested_by_customer, or void_invoice. + /// Stripe internally (failed_invoice, void_invoice, automatic, or + /// expired). + /// One of: abandoned, automatic, duplicate, expired, + /// failed_invoice, fraudulent, requested_by_customer, or + /// void_invoice. /// [JsonProperty("cancellation_reason")] #if NET6_0_OR_GREATER @@ -309,47 +311,6 @@ public Customer Customer #endif public string Description { get; set; } - #region Expandable Invoice - - /// - /// (ID of the Invoice) - /// ID of the invoice that created this PaymentIntent, if it exists. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string InvoiceId - { - get => this.InternalInvoice?.Id; - set => this.InternalInvoice = SetExpandableFieldId(value, this.InternalInvoice); - } - - /// - /// (Expanded) - /// ID of the invoice that created this PaymentIntent, if it exists. - /// - /// For more information, see the expand documentation. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public Invoice Invoice - { - get => this.InternalInvoice?.ExpandedObject; - set => this.InternalInvoice = SetExpandableFieldObject(value, this.InternalInvoice); - } - - [JsonProperty("invoice")] - [JsonConverter(typeof(ExpandableFieldConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("invoice")] - [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] -#endif - internal ExpandableField InternalInvoice { get; set; } - #endregion - /// /// The payment error encountered in the previous PaymentIntent confirmation. It will be /// cleared if the PaymentIntent is later updated for any reason. @@ -546,6 +507,8 @@ public PaymentMethod PaymentMethod /// /// The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. + /// A comprehensive list of valid payment method types can be found here. /// [JsonProperty("payment_method_types")] #if NET6_0_OR_GREATER @@ -553,6 +516,12 @@ public PaymentMethod PaymentMethod #endif public List PaymentMethodTypes { get; set; } + [JsonProperty("presentment_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("presentment_details")] +#endif + public PaymentIntentPresentmentDetails PresentmentDetails { get; set; } + /// /// If present, this property tells you about the processing state of the payment. /// diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs index 5a33b3d357..353319fcb9 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs @@ -182,6 +182,12 @@ public class PaymentIntentPaymentMethodOptions : 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/PaymentIntents/PaymentIntentPaymentMethodOptionsNzBankAccount.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsNzBankAccount.cs new file mode 100644 index 0000000000..4c68f295d0 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsNzBankAccount.cs @@ -0,0 +1,49 @@ +// 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 PaymentIntentPaymentMethodOptionsNzBankAccount : 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, off_session, or on_session. + /// + [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif + public string SetupFutureUsage { get; set; } + + /// + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPresentmentDetails.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPresentmentDetails.cs new file mode 100644 index 0000000000..dc461cb5cb --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPresentmentDetails.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 PaymentIntentPresentmentDetails : StripeEntity + { + /// + /// Amount intended to be collected by this payment, denominated in presentment_currency. + /// + [JsonProperty("presentment_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("presentment_amount")] +#endif + public long PresentmentAmount { get; set; } + + /// + /// Currency presented to the customer during payment. + /// + [JsonProperty("presentment_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("presentment_currency")] +#endif + public string PresentmentCurrency { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs index 60701ea2d2..23d7a0bc6c 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs @@ -285,6 +285,15 @@ public Account OnBehalfOf internal ExpandableField InternalOnBehalfOf { get; set; } #endregion + /// + /// The optional items presented to the customer at checkout. + /// + [JsonProperty("optional_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("optional_items")] +#endif + public List OptionalItems { get; set; } + /// /// Indicates the parameters to be passed to PaymentIntent creation during checkout. /// @@ -311,12 +320,13 @@ public Account OnBehalfOf /// href="https://dashboard.stripe.com/settings/payment_methods">payment method /// settings. /// One of: affirm, afterpay_clearpay, alipay, alma, - /// au_becs_debit, bacs_debit, bancontact, blik, boleto, - /// card, cashapp, eps, fpx, giropay, grabpay, - /// ideal, klarna, konbini, link, mobilepay, - /// multibanco, oxxo, p24, pay_by_bank, paynow, - /// paypal, pix, promptpay, sepa_debit, sofort, - /// swish, twint, us_bank_account, wechat_pay, or zip. + /// au_becs_debit, bacs_debit, bancontact, billie, blik, + /// boleto, card, cashapp, eps, fpx, giropay, + /// grabpay, ideal, klarna, konbini, link, + /// mobilepay, multibanco, oxxo, p24, pay_by_bank, + /// paynow, paypal, pix, promptpay, satispay, + /// sepa_debit, sofort, swish, twint, us_bank_account, + /// wechat_pay, or zip. /// [JsonProperty("payment_method_types")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldDropdown.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldDropdown.cs index 3b500bc991..cdbd358759 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldDropdown.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldDropdown.cs @@ -9,6 +9,15 @@ namespace Stripe public class PaymentLinkCustomFieldDropdown : StripeEntity { + /// + /// The value that will pre-fill on the payment page. + /// + [JsonProperty("default_value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_value")] +#endif + public string DefaultValue { get; set; } + /// /// The options available for the customer to select. Up to 200 options allowed. /// diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldNumeric.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldNumeric.cs index e1240d901b..9a5d6255eb 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldNumeric.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldNumeric.cs @@ -8,6 +8,15 @@ namespace Stripe public class PaymentLinkCustomFieldNumeric : StripeEntity { + /// + /// The value that will pre-fill the field on the payment page. + /// + [JsonProperty("default_value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_value")] +#endif + public string DefaultValue { get; set; } + /// /// The maximum character length constraint for the customer's input. /// diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldText.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldText.cs index 83a80e3888..94c0ac3f92 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldText.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldText.cs @@ -8,6 +8,15 @@ namespace Stripe public class PaymentLinkCustomFieldText : StripeEntity { + /// + /// The value that will pre-fill the field on the payment page. + /// + [JsonProperty("default_value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_value")] +#endif + public string DefaultValue { get; set; } + /// /// The maximum character length constraint for the customer's input. /// diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkOptionalItem.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkOptionalItem.cs new file mode 100644 index 0000000000..c4ef47c599 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkOptionalItem.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 PaymentLinkOptionalItem : StripeEntity + { + [JsonProperty("adjustable_quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("adjustable_quantity")] +#endif + public PaymentLinkOptionalItemAdjustableQuantity AdjustableQuantity { get; set; } + + [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif + public string Price { get; set; } + + [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif + public long Quantity { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkOptionalItemAdjustableQuantity.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkOptionalItemAdjustableQuantity.cs new file mode 100644 index 0000000000..fe8904a680 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkOptionalItemAdjustableQuantity.cs @@ -0,0 +1,42 @@ +// 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 PaymentLinkOptionalItemAdjustableQuantity : StripeEntity + { + /// + /// Set to true if the quantity can be adjusted to any non-negative integer. + /// + [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif + public bool Enabled { get; set; } + + /// + /// The maximum quantity of this item the customer can purchase. By default this value is + /// 99. + /// + [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif + public long? Maximum { get; set; } + + /// + /// The minimum quantity of this item the customer must purchase, if they choose to purchase + /// it. Because this item is optional, the customer will always be able to remove it from + /// their order, even if the minimum configured here is greater than 0. By default + /// this value is 0. + /// + [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif + public long? Minimum { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs index f6ccadefeb..b45c1c5755 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs @@ -134,6 +134,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 PaymentMethodConfigurationBillieDisplayPreference DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBillieDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBillieDisplayPreference.cs new file mode 100644 index 0000000000..4bcc8aaccc --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBillieDisplayPreference.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 PaymentMethodConfigurationBillieDisplayPreference : 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/PaymentMethodConfigurationNzBankAccount.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationNzBankAccount.cs new file mode 100644 index 0000000000..2c7b79879d --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationNzBankAccount.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 PaymentMethodConfigurationNzBankAccount : 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 PaymentMethodConfigurationNzBankAccountDisplayPreference DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationNzBankAccountDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationNzBankAccountDisplayPreference.cs new file mode 100644 index 0000000000..cc974a78b8 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationNzBankAccountDisplayPreference.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 PaymentMethodConfigurationNzBankAccountDisplayPreference : 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/PaymentMethodConfigurationSatispay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSatispay.cs new file mode 100644 index 0000000000..266f906bd9 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSatispay.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 PaymentMethodConfigurationSatispay : 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 PaymentMethodConfigurationSatispayDisplayPreference DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSatispayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSatispayDisplayPreference.cs new file mode 100644 index 0000000000..151838dbf2 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSatispayDisplayPreference.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 PaymentMethodConfigurationSatispayDisplayPreference : 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/PaymentMethods/PaymentMethod.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs index bdaa2d07c0..9ffaaa1939 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs @@ -109,6 +109,12 @@ public class PaymentMethod : StripeEntity, IHasId, IHasMetadata, #endif public PaymentMethodBancontact Bancontact { get; set; } + [JsonProperty("billie")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billie")] +#endif + public PaymentMethodBillie Billie { get; set; } + [JsonProperty("billing_details")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("billing_details")] @@ -310,6 +316,12 @@ public Customer Customer #endif public PaymentMethodNaverPay NaverPay { get; set; } + [JsonProperty("nz_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nz_bank_account")] +#endif + public PaymentMethodNzBankAccount NzBankAccount { get; set; } + [JsonProperty("oxxo")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("oxxo")] @@ -381,6 +393,12 @@ public Customer Customer #endif public PaymentMethodSamsungPay SamsungPay { get; set; } + [JsonProperty("satispay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("satispay")] +#endif + public PaymentMethodSatispay Satispay { get; set; } + [JsonProperty("sepa_debit")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("sepa_debit")] @@ -411,14 +429,15 @@ public Customer Customer /// PaymentMethod type. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, blik, boleto, card, card_present, - /// cashapp, customer_balance, eps, fpx, giropay, - /// grabpay, ideal, interac_present, kakao_pay, klarna, - /// konbini, kr_card, link, mobilepay, multibanco, - /// naver_pay, oxxo, p24, pay_by_bank, payco, - /// paynow, paypal, pix, promptpay, revolut_pay, - /// samsung_pay, sepa_debit, sofort, swish, twint, - /// us_bank_account, wechat_pay, or zip. + /// bancontact, billie, blik, boleto, card, + /// card_present, cashapp, customer_balance, eps, fpx, + /// giropay, grabpay, ideal, interac_present, kakao_pay, + /// klarna, konbini, kr_card, link, mobilepay, + /// multibanco, naver_pay, nz_bank_account, oxxo, p24, + /// pay_by_bank, payco, paynow, paypal, pix, + /// promptpay, revolut_pay, samsung_pay, satispay, + /// sepa_debit, sofort, swish, twint, us_bank_account, + /// wechat_pay, or zip. /// [JsonProperty("type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillie.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillie.cs new file mode 100644 index 0000000000..165dcc8eb5 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillie.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class PaymentMethodBillie : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodNaverPay.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodNaverPay.cs index 6f2b2c1fc0..352195262a 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodNaverPay.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodNaverPay.cs @@ -8,6 +8,16 @@ namespace Stripe public class PaymentMethodNaverPay : StripeEntity { + /// + /// Uniquely identifies this particular Naver Pay account. You can use this attribute to + /// check whether two Naver Pay accounts are the same. + /// + [JsonProperty("buyer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buyer_id")] +#endif + public string BuyerId { get; set; } + /// /// Whether to fund this transaction with Naver Pay points or a card. /// One of: card, or points. diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodNzBankAccount.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodNzBankAccount.cs new file mode 100644 index 0000000000..435f4ad29d --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodNzBankAccount.cs @@ -0,0 +1,66 @@ +// 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 PaymentMethodNzBankAccount : StripeEntity + { + /// + /// The name on the bank account. Only present if the account holder name is different from + /// the name of the authorized signatory collected in the PaymentMethod’s billing details. + /// + [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif + public string AccountHolderName { get; set; } + + /// + /// The numeric code for the bank account's bank. + /// + [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif + public string BankCode { get; set; } + + /// + /// The name of the bank. + /// + [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif + public string BankName { get; set; } + + /// + /// The numeric code for the bank account's bank branch. + /// + [JsonProperty("branch_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_code")] +#endif + public string BranchCode { get; set; } + + /// + /// Last four digits of the bank account number. + /// + [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif + public string Last4 { get; set; } + + /// + /// The suffix of the bank account number. + /// + [JsonProperty("suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("suffix")] +#endif + public string Suffix { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSatispay.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSatispay.cs new file mode 100644 index 0000000000..08005bd0d1 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSatispay.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class PaymentMethodSatispay : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/Persons/Person.cs b/src/Stripe.net/Entities/Persons/Person.cs index b57b58e190..c560c82929 100644 --- a/src/Stripe.net/Entities/Persons/Person.cs +++ b/src/Stripe.net/Entities/Persons/Person.cs @@ -12,7 +12,7 @@ namespace Stripe /// /// This is an object representing a person associated with a Stripe account. /// - /// A platform cannot access a person for an account where account.controller.requirement_collection /// is stripe, which includes Standard and Express accounts, after creating an /// Account Link or Account Session to start Connect onboarding. @@ -111,7 +111,9 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject public Dob Dob { get; set; } /// - /// The person's email address. + /// The person's email address. Also available for accounts where controller.requirement_collection + /// is stripe. /// [JsonProperty("email")] #if NET6_0_OR_GREATER @@ -120,7 +122,9 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject public string Email { get; set; } /// - /// The person's first name. + /// The person's first name. Also available for accounts where controller.requirement_collection + /// is stripe. /// [JsonProperty("first_name")] #if NET6_0_OR_GREATER @@ -129,7 +133,10 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject public string FirstName { get; set; } /// - /// The Kana variation of the person's first name (Japan only). + /// The Kana variation of the person's first name (Japan only). Also available for accounts + /// where controller.requirement_collection + /// is stripe. /// [JsonProperty("first_name_kana")] #if NET6_0_OR_GREATER @@ -138,7 +145,10 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject public string FirstNameKana { get; set; } /// - /// The Kanji variation of the person's first name (Japan only). + /// The Kanji variation of the person's first name (Japan only). Also available for accounts + /// where controller.requirement_collection + /// is stripe. /// [JsonProperty("first_name_kanji")] #if NET6_0_OR_GREATER @@ -147,7 +157,10 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject public string FirstNameKanji { get; set; } /// - /// A list of alternate names or aliases that the person is known by. + /// A list of alternate names or aliases that the person is known by. Also available for + /// accounts where controller.requirement_collection + /// is stripe. /// [JsonProperty("full_name_aliases")] #if NET6_0_OR_GREATER @@ -197,7 +210,9 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject public bool IdNumberSecondaryProvided { get; set; } /// - /// The person's last name. + /// The person's last name. Also available for accounts where controller.requirement_collection + /// is stripe. /// [JsonProperty("last_name")] #if NET6_0_OR_GREATER @@ -206,7 +221,10 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject public string LastName { get; set; } /// - /// The Kana variation of the person's last name (Japan only). + /// The Kana variation of the person's last name (Japan only). Also available for accounts + /// where controller.requirement_collection + /// is stripe. /// [JsonProperty("last_name_kana")] #if NET6_0_OR_GREATER @@ -215,7 +233,10 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject public string LastNameKana { get; set; } /// - /// The Kanji variation of the person's last name (Japan only). + /// The Kanji variation of the person's last name (Japan only). Also available for accounts + /// where controller.requirement_collection + /// is stripe. /// [JsonProperty("last_name_kanji")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Persons/PersonFutureRequirementsError.cs b/src/Stripe.net/Entities/Persons/PersonFutureRequirementsError.cs index 212db3635a..7499873499 100644 --- a/src/Stripe.net/Entities/Persons/PersonFutureRequirementsError.cs +++ b/src/Stripe.net/Entities/Persons/PersonFutureRequirementsError.cs @@ -10,13 +10,13 @@ public class PersonFutureRequirementsError : StripeEntity /// The code for the type of error. - /// One of: invalid_address_city_state_postal_code, + /// One of: information_missing, invalid_address_city_state_postal_code, /// invalid_address_highway_contract_box, invalid_address_private_mailbox, /// invalid_business_profile_name, invalid_business_profile_name_denylisted, /// invalid_company_name_denylisted, invalid_dob_age_over_maximum, /// invalid_dob_age_under_18, invalid_dob_age_under_minimum, /// invalid_product_description_length, invalid_product_description_url_match, - /// invalid_representative_country, + /// invalid_representative_country, invalid_signator, /// invalid_statement_descriptor_business_mismatch, /// invalid_statement_descriptor_denylisted, /// invalid_statement_descriptor_length, @@ -59,6 +59,7 @@ public class PersonFutureRequirementsError : StripeEntityverification_document_not_uploaded, verification_document_photo_mismatch, /// verification_document_too_large, verification_document_type_not_supported, /// verification_extraneous_directors, verification_failed_address_match, + /// verification_failed_authorizer_authority, /// verification_failed_business_iec_number, /// verification_failed_document_match, verification_failed_id_number_match, /// verification_failed_keyed_identity, verification_failed_keyed_match, @@ -67,6 +68,7 @@ public class PersonFutureRequirementsError : StripeEntityverification_failed_residential_address, verification_failed_tax_id_match, /// verification_failed_tax_id_not_issued, verification_missing_directors, /// verification_missing_executives, verification_missing_owners, + /// verification_rejected_ownership_exemption_reason, /// verification_requires_additional_memorandum_of_associations, /// verification_requires_additional_proof_of_registration, or /// verification_supportability. diff --git a/src/Stripe.net/Entities/Persons/PersonRequirementsError.cs b/src/Stripe.net/Entities/Persons/PersonRequirementsError.cs index f510621d79..667e080cf7 100644 --- a/src/Stripe.net/Entities/Persons/PersonRequirementsError.cs +++ b/src/Stripe.net/Entities/Persons/PersonRequirementsError.cs @@ -10,13 +10,13 @@ public class PersonRequirementsError : StripeEntity { /// /// The code for the type of error. - /// One of: invalid_address_city_state_postal_code, + /// One of: information_missing, invalid_address_city_state_postal_code, /// invalid_address_highway_contract_box, invalid_address_private_mailbox, /// invalid_business_profile_name, invalid_business_profile_name_denylisted, /// invalid_company_name_denylisted, invalid_dob_age_over_maximum, /// invalid_dob_age_under_18, invalid_dob_age_under_minimum, /// invalid_product_description_length, invalid_product_description_url_match, - /// invalid_representative_country, + /// invalid_representative_country, invalid_signator, /// invalid_statement_descriptor_business_mismatch, /// invalid_statement_descriptor_denylisted, /// invalid_statement_descriptor_length, @@ -59,6 +59,7 @@ public class PersonRequirementsError : StripeEntity /// verification_document_not_uploaded, verification_document_photo_mismatch, /// verification_document_too_large, verification_document_type_not_supported, /// verification_extraneous_directors, verification_failed_address_match, + /// verification_failed_authorizer_authority, /// verification_failed_business_iec_number, /// verification_failed_document_match, verification_failed_id_number_match, /// verification_failed_keyed_identity, verification_failed_keyed_match, @@ -67,6 +68,7 @@ public class PersonRequirementsError : StripeEntity /// verification_failed_residential_address, verification_failed_tax_id_match, /// verification_failed_tax_id_not_issued, verification_missing_directors, /// verification_missing_executives, verification_missing_owners, + /// verification_rejected_ownership_exemption_reason, /// verification_requires_additional_memorandum_of_associations, /// verification_requires_additional_proof_of_registration, or /// verification_supportability. diff --git a/src/Stripe.net/Entities/Plans/Plan.cs b/src/Stripe.net/Entities/Plans/Plan.cs index e19839d6f4..b7c0ca4237 100644 --- a/src/Stripe.net/Entities/Plans/Plan.cs +++ b/src/Stripe.net/Entities/Plans/Plan.cs @@ -61,21 +61,6 @@ public class Plan : StripeEntity, IHasId, IHasMetadata, IHasObject #endif public bool Active { get; set; } - /// - /// Specifies a usage aggregation strategy for plans of usage_type=metered. Allowed - /// values are sum for summing up all usage during a period, - /// last_during_period for using the last usage record reported within a period, - /// last_ever for using the last usage record ever (across period bounds) or - /// max which uses the usage record with the maximum reported usage during a period. - /// Defaults to sum. - /// One of: last_during_period, last_ever, max, or sum. - /// - [JsonProperty("aggregate_usage")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("aggregate_usage")] -#endif - public string AggregateUsage { get; set; } - /// /// The unit amount in cents (or local equivalent) to be charged, represented as a whole /// integer if possible. Only set if billing_scheme=per_unit. diff --git a/src/Stripe.net/Entities/Prices/PriceRecurring.cs b/src/Stripe.net/Entities/Prices/PriceRecurring.cs index 2ecf132afe..f9e8566bb0 100644 --- a/src/Stripe.net/Entities/Prices/PriceRecurring.cs +++ b/src/Stripe.net/Entities/Prices/PriceRecurring.cs @@ -8,17 +8,6 @@ namespace Stripe public class PriceRecurring : StripeEntity { - /// - /// Specifies a usage aggregation strategy for prices of usage_type=metered. Defaults - /// to sum. - /// One of: last_during_period, last_ever, max, or sum. - /// - [JsonProperty("aggregate_usage")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("aggregate_usage")] -#endif - public string AggregateUsage { get; set; } - /// /// The frequency at which a subscription is billed. One of day, week, /// month or year. diff --git a/src/Stripe.net/Entities/Refunds/Refund.cs b/src/Stripe.net/Entities/Refunds/Refund.cs index 82098c259b..84567e583e 100644 --- a/src/Stripe.net/Entities/Refunds/Refund.cs +++ b/src/Stripe.net/Entities/Refunds/Refund.cs @@ -290,6 +290,12 @@ public PaymentIntent PaymentIntent internal ExpandableField InternalPaymentIntent { get; set; } #endregion + [JsonProperty("presentment_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("presentment_details")] +#endif + public RefundPresentmentDetails PresentmentDetails { get; set; } + /// /// Reason for the refund, which is either user-provided (duplicate, /// fraudulent, or requested_by_customer) or generated by Stripe internally diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs index 4c695543ef..a940d78eb3 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs @@ -128,6 +128,12 @@ public class RefundDestinationDetails : StripeEntity #endif public RefundDestinationDetailsMxBankTransfer MxBankTransfer { get; set; } + [JsonProperty("nz_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nz_bank_transfer")] +#endif + public RefundDestinationDetailsNzBankTransfer NzBankTransfer { get; set; } + [JsonProperty("p24")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("p24")] diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsNzBankTransfer.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsNzBankTransfer.cs new file mode 100644 index 0000000000..5515ee87ad --- /dev/null +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsNzBankTransfer.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class RefundDestinationDetailsNzBankTransfer : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/Refunds/RefundPresentmentDetails.cs b/src/Stripe.net/Entities/Refunds/RefundPresentmentDetails.cs new file mode 100644 index 0000000000..02cfa96671 --- /dev/null +++ b/src/Stripe.net/Entities/Refunds/RefundPresentmentDetails.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 RefundPresentmentDetails : StripeEntity + { + /// + /// Amount intended to be collected by this payment, denominated in presentment_currency. + /// + [JsonProperty("presentment_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("presentment_amount")] +#endif + public long PresentmentAmount { get; set; } + + /// + /// Currency presented to the customer during payment. + /// + [JsonProperty("presentment_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("presentment_currency")] +#endif + public string PresentmentCurrency { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Reviews/Review.cs b/src/Stripe.net/Entities/Reviews/Review.cs index 54b80129bb..7eec9e2a4b 100644 --- a/src/Stripe.net/Entities/Reviews/Review.cs +++ b/src/Stripe.net/Entities/Reviews/Review.cs @@ -89,10 +89,10 @@ public Charge Charge /// /// The reason the review was closed, or null if it has not yet been closed. One of - /// approved, refunded, refunded_as_fraud, disputed, or - /// redacted. - /// One of: approved, disputed, redacted, refunded, or - /// refunded_as_fraud. + /// approved, refunded, refunded_as_fraud, disputed, + /// redacted, or canceled. + /// One of: approved, canceled, disputed, redacted, + /// refunded, or refunded_as_fraud. /// [JsonProperty("closed_reason")] #if NET6_0_OR_GREATER @@ -203,8 +203,8 @@ public PaymentIntent PaymentIntent /// /// The reason the review is currently open or closed. One of rule, manual, - /// approved, refunded, refunded_as_fraud, disputed, or - /// redacted. + /// approved, refunded, refunded_as_fraud, disputed, + /// redacted, or canceled. /// [JsonProperty("reason")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs index 1f4f06da67..af69ec48aa 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs @@ -92,6 +92,18 @@ public class SetupAttemptPaymentMethodDetails : StripeEntity + { + /// + /// Uniquely identifies this particular Naver Pay account. You can use this attribute to + /// check whether two Naver Pay accounts are the same. + /// + [JsonProperty("buyer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buyer_id")] +#endif + public string BuyerId { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsNzBankAccount.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsNzBankAccount.cs new file mode 100644 index 0000000000..4f92dad0b4 --- /dev/null +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsNzBankAccount.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class SetupAttemptPaymentMethodDetailsNzBankAccount : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs index 816d03d3f4..4d413223b3 100644 --- a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs +++ b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs @@ -38,25 +38,37 @@ public class SubscriptionItem : StripeEntity, IHasId, IHasMeta public string Object { get; set; } /// - /// Define thresholds at which an invoice will be sent, and the related subscription - /// advanced to a new billing period. + /// Time at which the object was created. Measured in seconds since the Unix epoch. /// - [JsonProperty("billing_thresholds")] + [JsonProperty("created")] + [JsonConverter(typeof(UnixDateTimeConverter))] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("billing_thresholds")] + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] #endif - public SubscriptionItemBillingThresholds BillingThresholds { get; set; } + public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// - /// Time at which the object was created. Measured in seconds since the Unix epoch. + /// The end time of this subscription item's current billing period. /// - [JsonProperty("created")] + [JsonProperty("current_period_end")] [JsonConverter(typeof(UnixDateTimeConverter))] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created")] + [STJS.JsonPropertyName("current_period_end")] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] #endif - public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + public DateTime CurrentPeriodEnd { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The start time of this subscription item's current billing period. + /// + [JsonProperty("current_period_start")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("current_period_start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime CurrentPeriodStart { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Whether this object is deleted or not. diff --git a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItemBillingThresholds.cs b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItemBillingThresholds.cs deleted file mode 100644 index 6e5501e26b..0000000000 --- a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItemBillingThresholds.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 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 35459e069a..80163c265a 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettings.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettings.cs @@ -43,16 +43,6 @@ 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 deleted file mode 100644 index c2f87dbce4..0000000000 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholds.cs +++ /dev/null @@ -1,33 +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 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 62e7b3c62e..90d37539d2 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhase.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhase.cs @@ -55,16 +55,6 @@ 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 @@ -79,47 +69,6 @@ public class SubscriptionSchedulePhase : StripeEntity #endif public string CollectionMethod { get; set; } - #region Expandable Coupon - - /// - /// (ID of the Coupon) - /// ID of the coupon to use during this phase of the subscription schedule. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string CouponId - { - get => this.InternalCoupon?.Id; - set => this.InternalCoupon = SetExpandableFieldId(value, this.InternalCoupon); - } - - /// - /// (Expanded) - /// ID of the coupon to use during this phase of the subscription schedule. - /// - /// For more information, see the expand documentation. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public Coupon Coupon - { - get => this.InternalCoupon?.ExpandedObject; - set => this.InternalCoupon = SetExpandableFieldObject(value, this.InternalCoupon); - } - - [JsonProperty("coupon")] - [JsonConverter(typeof(ExpandableFieldConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("coupon")] - [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] -#endif - internal ExpandableField InternalCoupon { get; set; } - #endregion - /// /// Three-letter ISO currency /// code, in lowercase. Must be a supported diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholds.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholds.cs deleted file mode 100644 index c55587d44e..0000000000 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholds.cs +++ /dev/null @@ -1,33 +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 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 ebb0013de2..352db16d43 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItem.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItem.cs @@ -13,16 +13,6 @@ 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 deleted file mode 100644 index 8a25fdb981..0000000000 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholds.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 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 5f7dd7f283..9a1efa0e3b 100644 --- a/src/Stripe.net/Entities/Subscriptions/Subscription.cs +++ b/src/Stripe.net/Entities/Subscriptions/Subscription.cs @@ -121,16 +121,6 @@ public Application Application #endif public SubscriptionBillingCycleAnchorConfig BillingCycleAnchorConfig { 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. /// @@ -150,7 +140,7 @@ public Application Application #if NET6_0_OR_GREATER [STJS.JsonPropertyName("cancel_at_period_end")] #endif - public bool CancelAtPeriodEnd { get; set; } + public bool? CancelAtPeriodEnd { get; set; } /// /// If the subscription has been canceled, the date of that cancellation. If the @@ -211,29 +201,6 @@ public Application Application #endif public string Currency { get; set; } - /// - /// End of the current period that the subscription has been invoiced for. At the end of - /// this period, a new invoice will be created. - /// - [JsonProperty("current_period_end")] - [JsonConverter(typeof(UnixDateTimeConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("current_period_end")] - [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] -#endif - public DateTime CurrentPeriodEnd { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; - - /// - /// Start of the current period that the subscription has been invoiced for. - /// - [JsonProperty("current_period_start")] - [JsonConverter(typeof(UnixDateTimeConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("current_period_start")] - [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] -#endif - public DateTime CurrentPeriodStart { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; - #region Expandable Customer /// @@ -412,18 +379,6 @@ public IPaymentSource DefaultSource #endif public string Description { get; set; } - /// - /// Describes the current discount applied to this subscription, if there is one. When - /// billing, a discount applied to a subscription overrides a discount applied on a - /// customer-wide basis. This field has been deprecated and will be removed in a future API - /// version. Use discounts instead. - /// - [JsonProperty("discount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("discount")] -#endif - public Discount Discount { get; set; } - #region Expandable Discounts /// @@ -570,7 +525,9 @@ public Invoice LatestInvoice /// /// (ID of the Account) /// The account (if any) the charge was made on behalf of for charges associated with this - /// subscription. See the Connect documentation for details. + /// subscription. See the Connect + /// documentation for details. /// [JsonIgnore] #if NET6_0_OR_GREATER @@ -585,7 +542,9 @@ public string OnBehalfOfId /// /// (Expanded) /// The account (if any) the charge was made on behalf of for charges associated with this - /// subscription. See the Connect documentation for details. + /// subscription. See the Connect + /// documentation for details. /// /// For more information, see the expand documentation. /// diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingThresholds.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingThresholds.cs deleted file mode 100644 index b243bff262..0000000000 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingThresholds.cs +++ /dev/null @@ -1,33 +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 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/Subscriptions/SubscriptionPaymentSettings.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs index 64d1d808b2..c28d8e5e55 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs @@ -30,10 +30,11 @@ public class SubscriptionPaymentSettings : StripeEntityamazon_pay, au_becs_debit, bacs_debit, bancontact, /// boleto, card, cashapp, customer_balance, eps, /// fpx, giropay, grabpay, ideal, jp_credit_transfer, - /// kakao_pay, konbini, kr_card, link, multibanco, - /// naver_pay, p24, payco, paynow, paypal, - /// promptpay, revolut_pay, sepa_credit_transfer, sepa_debit, - /// sofort, swish, us_bank_account, or wechat_pay. + /// kakao_pay, klarna, konbini, kr_card, link, + /// multibanco, naver_pay, nz_bank_account, p24, payco, + /// paynow, paypal, promptpay, revolut_pay, + /// sepa_credit_transfer, sepa_debit, sofort, swish, + /// us_bank_account, or wechat_pay. /// [JsonProperty("payment_method_types")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs index 7435f93864..db0714078a 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs @@ -41,7 +41,8 @@ public class CalculationTaxBreakdownTaxRateDetails : StripeEntity /// Indicates the type of tax rate applied to the taxable amount. This value can be - /// null when no tax applies to the location. + /// null when no tax applies to the location. This field is only present for TaxRates + /// created by Stripe Tax. /// One of: flat_amount, or percentage. /// [JsonProperty("rate_type")] diff --git a/src/Stripe.net/Entities/TaxRates/TaxRate.cs b/src/Stripe.net/Entities/TaxRates/TaxRate.cs index e8c58bacc2..40c5abd7aa 100644 --- a/src/Stripe.net/Entities/TaxRates/TaxRate.cs +++ b/src/Stripe.net/Entities/TaxRates/TaxRate.cs @@ -178,7 +178,8 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// /// Indicates the type of tax rate applied to the taxable amount. This value can be - /// null when no tax applies to the location. + /// null when no tax applies to the location. This field is only present for TaxRates + /// created by Stripe Tax. /// One of: flat_amount, or percentage. /// [JsonProperty("rate_type")] diff --git a/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs b/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs index 8a90ece59f..25bb6ea534 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs @@ -103,5 +103,11 @@ public class Configuration : StripeEntity, IHasId, IHasObject [STJS.JsonPropertyName("verifone_p400")] #endif public ConfigurationVerifoneP400 VerifoneP400 { get; set; } + + [JsonProperty("wifi")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wifi")] +#endif + public ConfigurationWifi Wifi { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationBbposWiseposE.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationBbposWiseposE.cs index f07cc8a12e..e3f53283c5 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationBbposWiseposE.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationBbposWiseposE.cs @@ -16,7 +16,7 @@ public class ConfigurationBbposWiseposE : StripeEntity /// (ID of the File) - /// A File ID representing an image you would like displayed on the reader. + /// A File ID representing an image to display on the reader. /// [JsonIgnore] #if NET6_0_OR_GREATER @@ -30,7 +30,7 @@ public string SplashscreenId /// /// (Expanded) - /// A File ID representing an image you would like displayed on the reader. + /// A File ID representing an image to display on the reader. /// /// For more information, see the expand documentation. /// diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationStripeS700.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationStripeS700.cs index aefbb6d175..48d1cd224a 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationStripeS700.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationStripeS700.cs @@ -16,7 +16,7 @@ public class ConfigurationStripeS700 : StripeEntity /// /// (ID of the File) - /// A File ID representing an image you would like displayed on the reader. + /// A File ID representing an image to display on the reader. /// [JsonIgnore] #if NET6_0_OR_GREATER @@ -30,7 +30,7 @@ public string SplashscreenId /// /// (Expanded) - /// A File ID representing an image you would like displayed on the reader. + /// A File ID representing an image to display on the reader. /// /// For more information, see the expand documentation. /// diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneP400.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneP400.cs index 48c466f980..8673524b2e 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneP400.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneP400.cs @@ -16,7 +16,7 @@ public class ConfigurationVerifoneP400 : StripeEntity /// /// (ID of the File) - /// A File ID representing an image you would like displayed on the reader. + /// A File ID representing an image to display on the reader. /// [JsonIgnore] #if NET6_0_OR_GREATER @@ -30,7 +30,7 @@ public string SplashscreenId /// /// (Expanded) - /// A File ID representing an image you would like displayed on the reader. + /// A File ID representing an image to display on the reader. /// /// For more information, see the expand documentation. /// diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationWifi.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationWifi.cs new file mode 100644 index 0000000000..ff8ddc0f88 --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationWifi.cs @@ -0,0 +1,40 @@ +// 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 ConfigurationWifi : StripeEntity + { + [JsonProperty("enterprise_eap_peap")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enterprise_eap_peap")] +#endif + public ConfigurationWifiEnterpriseEapPeap EnterpriseEapPeap { get; set; } + + [JsonProperty("enterprise_eap_tls")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enterprise_eap_tls")] +#endif + public ConfigurationWifiEnterpriseEapTls EnterpriseEapTls { get; set; } + + [JsonProperty("personal_psk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("personal_psk")] +#endif + public ConfigurationWifiPersonalPsk PersonalPsk { get; set; } + + /// + /// Security type of the WiFi network. The hash with the corresponding name contains the + /// credentials for this security type. + /// One of: enterprise_eap_peap, enterprise_eap_tls, or personal_psk. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationWifiEnterpriseEapPeap.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationWifiEnterpriseEapPeap.cs new file mode 100644 index 0000000000..d24f53960e --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationWifiEnterpriseEapPeap.cs @@ -0,0 +1,47 @@ +// 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 ConfigurationWifiEnterpriseEapPeap : StripeEntity + { + /// + /// A File ID representing a PEM file containing the server certificate. + /// + [JsonProperty("ca_certificate_file")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ca_certificate_file")] +#endif + public string CaCertificateFile { get; set; } + + /// + /// Password for connecting to the WiFi network. + /// + [JsonProperty("password")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("password")] +#endif + public string Password { get; set; } + + /// + /// Name of the WiFi network. + /// + [JsonProperty("ssid")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ssid")] +#endif + public string Ssid { get; set; } + + /// + /// Username for connecting to the WiFi network. + /// + [JsonProperty("username")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("username")] +#endif + public string Username { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationWifiEnterpriseEapTls.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationWifiEnterpriseEapTls.cs new file mode 100644 index 0000000000..6be66dba33 --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationWifiEnterpriseEapTls.cs @@ -0,0 +1,56 @@ +// 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 ConfigurationWifiEnterpriseEapTls : StripeEntity + { + /// + /// A File ID representing a PEM file containing the server certificate. + /// + [JsonProperty("ca_certificate_file")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ca_certificate_file")] +#endif + public string CaCertificateFile { get; set; } + + /// + /// A File ID representing a PEM file containing the client certificate. + /// + [JsonProperty("client_certificate_file")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_certificate_file")] +#endif + public string ClientCertificateFile { get; set; } + + /// + /// A File ID representing a PEM file containing the client RSA private key. + /// + [JsonProperty("private_key_file")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("private_key_file")] +#endif + public string PrivateKeyFile { get; set; } + + /// + /// Password for the private key file. + /// + [JsonProperty("private_key_file_password")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("private_key_file_password")] +#endif + public string PrivateKeyFilePassword { get; set; } + + /// + /// Name of the WiFi network. + /// + [JsonProperty("ssid")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ssid")] +#endif + public string Ssid { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationWifiPersonalPsk.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationWifiPersonalPsk.cs new file mode 100644 index 0000000000..a605916b85 --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationWifiPersonalPsk.cs @@ -0,0 +1,29 @@ +// 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 ConfigurationWifiPersonalPsk : StripeEntity + { + /// + /// Password for connecting to the WiFi network. + /// + [JsonProperty("password")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("password")] +#endif + public string Password { get; set; } + + /// + /// Name of the WiFi network. + /// + [JsonProperty("ssid")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ssid")] +#endif + public string Ssid { get; set; } + } +} diff --git a/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummary.cs b/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummary.cs deleted file mode 100644 index 3fc12372b3..0000000000 --- a/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummary.cs +++ /dev/null @@ -1,76 +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 - - /// - /// A usage record summary represents an aggregated view of how much usage was accrued for a - /// subscription item within a subscription billing period. - /// - public class UsageRecordSummary : 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; } - - /// - /// The invoice in which this usage period has been billed for. - /// - [JsonProperty("invoice")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("invoice")] -#endif - public string Invoice { get; set; } - - /// - /// 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; } - - [JsonProperty("period")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("period")] -#endif - public UsageRecordSummaryPeriod Period { get; set; } - - /// - /// The ID of the subscription item this summary is describing. - /// - [JsonProperty("subscription_item")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_item")] -#endif - public string SubscriptionItem { get; set; } - - /// - /// The total usage within this usage period. - /// - [JsonProperty("total_usage")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("total_usage")] -#endif - public long TotalUsage { get; set; } - } -} diff --git a/src/Stripe.net/Entities/UsageRecords/UsageRecord.cs b/src/Stripe.net/Entities/UsageRecords/UsageRecord.cs deleted file mode 100644 index c23657a212..0000000000 --- a/src/Stripe.net/Entities/UsageRecords/UsageRecord.cs +++ /dev/null @@ -1,81 +0,0 @@ -// 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 - - /// - /// Usage records allow you to report customer usage and metrics to Stripe for metered - /// billing of subscription prices. - /// - /// Related guide: Metered billing. - /// - /// This is our legacy usage-based billing API. See the updated usage-based - /// billing docs. - /// - public class UsageRecord : 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; } - - /// - /// 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 usage quantity for the specified date. - /// - [JsonProperty("quantity")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("quantity")] -#endif - public long Quantity { get; set; } - - /// - /// The ID of the subscription item this usage record contains data for. - /// - [JsonProperty("subscription_item")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_item")] -#endif - public string SubscriptionItem { get; set; } - - /// - /// The timestamp when this usage occurred. - /// - [JsonProperty("timestamp")] - [JsonConverter(typeof(UnixDateTimeConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("timestamp")] - [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] -#endif - public DateTime Timestamp { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; - } -} diff --git a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs index 76424938f7..5e7a35ab38 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs @@ -89,6 +89,7 @@ public static class StripeTypeRegistry { "identity.verification_report", typeof(Identity.VerificationReport) }, { "identity.verification_session", typeof(Identity.VerificationSession) }, { "invoice", typeof(Invoice) }, + { "invoice_payment", typeof(InvoicePayment) }, { "invoice_rendering_template", typeof(InvoiceRenderingTemplate) }, { "invoiceitem", typeof(InvoiceItem) }, { "issuing.authorization", typeof(Issuing.Authorization) }, @@ -167,8 +168,6 @@ public static class StripeTypeRegistry { "treasury.received_debit", typeof(Treasury.ReceivedDebit) }, { "treasury.transaction", typeof(Treasury.Transaction) }, { "treasury.transaction_entry", typeof(Treasury.TransactionEntry) }, - { "usage_record", typeof(UsageRecord) }, - { "usage_record_summary", typeof(UsageRecordSummary) }, { "webhook_endpoint", typeof(WebhookEndpoint) }, // ObjectsToTypes: The end of the section generated from our OpenAPI spec diff --git a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCreateOptions.cs b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCreateOptions.cs index a8b771bfd4..f7a1ff9b0f 100644 --- a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCreateOptions.cs +++ b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCreateOptions.cs @@ -21,7 +21,10 @@ public class AccountExternalAccountCreateOptions : BaseOptions, IHasMetadata public bool? DefaultForCurrency { get; set; } /// - /// Please refer to full documentation instead. + /// A token, like the ones returned by Stripe.js or + /// a dictionary containing a user's external account details (with the options shown + /// below). Please refer to full documentation instead. /// [JsonProperty("external_account")] [JsonConverter(typeof(AnyOfConverter))] diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesBilliePaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesBilliePaymentsOptions.cs new file mode 100644 index 0000000000..9ca9f0806b --- /dev/null +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesBilliePaymentsOptions.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 AccountCapabilitiesBilliePaymentsOptions : 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/Accounts/AccountCapabilitiesNzBankAccountBecsDebitPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesNzBankAccountBecsDebitPaymentsOptions.cs new file mode 100644 index 0000000000..5d5df3ade1 --- /dev/null +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesNzBankAccountBecsDebitPaymentsOptions.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 AccountCapabilitiesNzBankAccountBecsDebitPaymentsOptions : 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/Accounts/AccountCapabilitiesOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs index 5133996f44..d5d6c4231b 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs @@ -89,6 +89,15 @@ public class AccountCapabilitiesOptions : INestedOptions #endif public AccountCapabilitiesBankTransferPaymentsOptions BankTransferPayments { get; set; } + /// + /// The billie_payments capability. + /// + [JsonProperty("billie_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billie_payments")] +#endif + public AccountCapabilitiesBilliePaymentsOptions BilliePayments { get; set; } + /// /// The blik_payments capability. /// @@ -314,6 +323,15 @@ public class AccountCapabilitiesOptions : INestedOptions #endif public AccountCapabilitiesNaverPayPaymentsOptions NaverPayPayments { get; set; } + /// + /// The nz_bank_account_becs_debit_payments capability. + /// + [JsonProperty("nz_bank_account_becs_debit_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nz_bank_account_becs_debit_payments")] +#endif + public AccountCapabilitiesNzBankAccountBecsDebitPaymentsOptions NzBankAccountBecsDebitPayments { get; set; } + /// /// The oxxo_payments capability. /// @@ -386,6 +404,15 @@ public class AccountCapabilitiesOptions : INestedOptions #endif public AccountCapabilitiesSamsungPayPaymentsOptions SamsungPayPayments { get; set; } + /// + /// The satispay_payments capability. + /// + [JsonProperty("satispay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("satispay_payments")] +#endif + public AccountCapabilitiesSatispayPaymentsOptions SatispayPayments { get; set; } + /// /// The sepa_bank_transfer_payments capability. /// diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesSatispayPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesSatispayPaymentsOptions.cs new file mode 100644 index 0000000000..40c1347377 --- /dev/null +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesSatispayPaymentsOptions.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 AccountCapabilitiesSatispayPaymentsOptions : 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/Accounts/AccountCompanyOptions.cs b/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs index 9e330a5872..130cbeb71a 100644 --- a/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs @@ -139,6 +139,12 @@ public class AccountCompanyOptions : INestedOptions public AccountCompanyOwnershipDeclarationOptions OwnershipDeclaration { get; set; } /// + /// This value is used to determine if a business is exempt from providing ultimate + /// beneficial owners. See this + /// support article and changelog + /// for more details. /// One of: qualified_entity_exceeds_ownership_threshold, or /// qualifies_as_financial_institution. /// diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsInvoicesOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsInvoicesOptions.cs index edbed5cbe6..1eea3d961a 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsInvoicesOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsInvoicesOptions.cs @@ -18,5 +18,16 @@ public class AccountSettingsInvoicesOptions : INestedOptions [STJS.JsonPropertyName("default_account_tax_ids")] #endif public List DefaultAccountTaxIds { get; set; } + + /// + /// Whether payment methods should be saved when a payment is completed for a one-time + /// invoices on a hosted invoice page. + /// One of: always, never, or offer. + /// + [JsonProperty("hosted_payment_method_save")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_payment_method_save")] +#endif + public string HostedPaymentMethodSave { get; set; } } } diff --git a/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionListOptions.cs b/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionListOptions.cs index a71aac972c..610d90f472 100644 --- a/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionListOptions.cs +++ b/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionListOptions.cs @@ -52,7 +52,8 @@ public class BalanceTransactionListOptions : ListOptionsWithCreated /// payout, payout_cancel, payout_failure, /// payout_minimum_balance_hold, payout_minimum_balance_release, /// refund, refund_failure, reserve_transaction, reserved_funds, - /// stripe_fee, stripe_fx_fee, tax_fee, topup, + /// stripe_fee, stripe_fx_fee, stripe_balance_payment_debit, + /// stripe_balance_payment_debit_reversal, tax_fee, topup, /// topup_reversal, transfer, transfer_cancel, transfer_failure, /// or transfer_refund. /// diff --git a/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryFilterApplicabilityScopeOptions.cs b/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryFilterApplicabilityScopeOptions.cs index 4aa34e6907..457ea09210 100644 --- a/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryFilterApplicabilityScopeOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryFilterApplicabilityScopeOptions.cs @@ -11,7 +11,7 @@ public class CreditBalanceSummaryFilterApplicabilityScopeOptions : INestedOption { /// /// The price type that credit grants can apply to. We currently only support the - /// metered price type. + /// metered price type. Cannot be used in combination with prices. /// [JsonProperty("price_type")] #if NET6_0_OR_GREATER @@ -21,7 +21,7 @@ public class CreditBalanceSummaryFilterApplicabilityScopeOptions : INestedOption /// /// A list of prices that the credit grant can apply to. We currently only support the - /// metered prices. + /// metered prices. Cannot be used in combination with price_type. /// [JsonProperty("prices")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantApplicabilityConfigScopeOptions.cs b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantApplicabilityConfigScopeOptions.cs index b32f358eff..8a27226489 100644 --- a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantApplicabilityConfigScopeOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantApplicabilityConfigScopeOptions.cs @@ -11,7 +11,7 @@ public class CreditGrantApplicabilityConfigScopeOptions : INestedOptions { /// /// The price type that credit grants can apply to. We currently only support the - /// metered price type. + /// metered price type. Cannot be used in combination with prices. /// [JsonProperty("price_type")] #if NET6_0_OR_GREATER @@ -21,7 +21,7 @@ public class CreditGrantApplicabilityConfigScopeOptions : INestedOptions /// /// A list of prices that the credit grant can apply to. We currently only support the - /// metered prices. + /// metered prices. Cannot be used in combination with price_type. /// [JsonProperty("prices")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Billing/Meters/MeterDefaultAggregationOptions.cs b/src/Stripe.net/Services/Billing/Meters/MeterDefaultAggregationOptions.cs index 7c7de951ba..d92625c666 100644 --- a/src/Stripe.net/Services/Billing/Meters/MeterDefaultAggregationOptions.cs +++ b/src/Stripe.net/Services/Billing/Meters/MeterDefaultAggregationOptions.cs @@ -10,8 +10,9 @@ public class MeterDefaultAggregationOptions : INestedOptions { /// /// Specifies how events are aggregated. Allowed values are count to count the number - /// of events and sum to sum each event's value. - /// One of: count, or sum. + /// of events, sum to sum each event's value and last to take the last event's + /// value in the window. + /// One of: count, last, or sum. /// [JsonProperty("formula")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Charges/ChargeCaptureOptions.cs b/src/Stripe.net/Services/Charges/ChargeCaptureOptions.cs index 96adcdb53a..5bd7ef5bb8 100644 --- a/src/Stripe.net/Services/Charges/ChargeCaptureOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeCaptureOptions.cs @@ -9,8 +9,7 @@ namespace Stripe public class ChargeCaptureOptions : BaseOptions { /// - /// The amount to capture, which must be less than or equal to the original amount. Any - /// additional amount will be automatically refunded. + /// The amount to capture, which must be less than or equal to the original amount. /// [JsonProperty("amount")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs index f504aedf2d..206addd7cc 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs @@ -63,7 +63,7 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// /// If set, Checkout displays a back button and customers will be directed to this URL if /// they decide to cancel payment and return to your website. This parameter is not allowed - /// if ui_mode is embedded. + /// if ui_mode is embedded or custom. /// [JsonProperty("cancel_url")] #if NET6_0_OR_GREATER @@ -283,6 +283,28 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata #endif public string Mode { get; set; } + /// + /// A list of optional items the customer can add to their order at checkout. Use this + /// parameter to pass one-time or recurring Prices. + /// + /// There is a maximum of 10 optional items allowed on a Checkout Session, and the existing + /// limits on the number of line items allowed on a Checkout Session apply to the combined + /// number of line items and optional items. + /// + /// For payment mode, there is a maximum of 100 combined line items and optional + /// items, however it is recommended to consolidate items if there are more than a few + /// dozen. + /// + /// For subscription mode, there is a maximum of 20 line items and optional items + /// with recurring Prices and 20 line items and optional items with one-time Prices. + /// + [JsonProperty("optional_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("optional_items")] +#endif + public List OptionalItems { get; set; } + /// /// A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in /// payment mode. @@ -360,14 +382,14 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// characteristics. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, blik, boleto, card, cashapp, - /// customer_balance, eps, fpx, giropay, grabpay, - /// ideal, kakao_pay, klarna, konbini, kr_card, - /// link, mobilepay, multibanco, naver_pay, oxxo, - /// p24, pay_by_bank, payco, paynow, paypal, pix, - /// promptpay, revolut_pay, samsung_pay, sepa_debit, - /// sofort, swish, twint, us_bank_account, wechat_pay, or - /// zip. + /// bancontact, billie, blik, boleto, card, + /// cashapp, customer_balance, eps, fpx, giropay, + /// grabpay, ideal, kakao_pay, klarna, konbini, + /// kr_card, link, mobilepay, multibanco, naver_pay, + /// oxxo, p24, pay_by_bank, payco, paynow, paypal, + /// pix, promptpay, revolut_pay, samsung_pay, satispay, + /// sepa_debit, sofort, swish, twint, us_bank_account, + /// wechat_pay, or zip. /// [JsonProperty("payment_method_types")] #if NET6_0_OR_GREATER @@ -375,6 +397,19 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata #endif public List PaymentMethodTypes { get; set; } + /// + /// This property is used to set up permissions for various actions (e.g., update) on the + /// CheckoutSession object. + /// + /// For specific permissions, please refer to their dedicated subsections, such as + /// permissions.update.shipping_details. + /// + [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif + public SessionPermissionsOptions Permissions { get; set; } + /// /// Controls phone number collection settings for the session. /// @@ -403,8 +438,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// /// The URL to redirect your customer back to after they authenticate or cancel their - /// payment on the payment method's app or site. This parameter is required if ui_mode is - /// embedded and redirect-based payment methods are enabled on the session. + /// payment on the payment method's app or site. This parameter is required if + /// ui_mode is embedded or custom and redirect-based payment methods + /// are enabled on the session. /// [JsonProperty("return_url")] #if NET6_0_OR_GREATER @@ -454,8 +490,8 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// /// Describes the type of transaction being performed by Checkout in order to customize /// relevant text on the page, such as the submit button. submit_type can only be - /// specified on Checkout Sessions in payment mode. If blank or auto, - /// pay is used. + /// specified on Checkout Sessions in payment or subscription mode. If blank + /// or auto, pay is used. /// One of: auto, book, donate, pay, or subscribe. /// [JsonProperty("submit_type")] @@ -476,9 +512,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// /// The URL to which Stripe should send customers when payment or setup is complete. This - /// parameter is not allowed if ui_mode is embedded. If you’d like to use information - /// from the successful Checkout Session on your page, read the guide on customizing your + /// parameter is not allowed if ui_mode is embedded or custom. If you'd like + /// to use information from the successful Checkout Session on your page, read the guide on + /// customizing your /// success page. /// [JsonProperty("success_url")] @@ -498,7 +534,7 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// /// The UI mode of the Session. Defaults to hosted. - /// One of: embedded, or hosted. + /// One of: custom, embedded, or hosted. /// [JsonProperty("ui_mode")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataOptions.cs index b3eae49af9..82897c9fca 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataOptions.cs @@ -20,8 +20,9 @@ public class SessionLineItemPriceDataOptions : INestedOptions public string Currency { get; set; } /// - /// The ID of the product that this price will belong to. One of product or - /// product_data is required. + /// The ID of the Product that this Price will belong to. One of + /// product or product_data is required. /// [JsonProperty("product")] #if NET6_0_OR_GREATER @@ -30,8 +31,8 @@ public class SessionLineItemPriceDataOptions : INestedOptions public string Product { get; set; } /// - /// Data used to generate a new product object inline. One of product or - /// product_data is required. + /// Data used to generate a new Product + /// object inline. One of product or product_data is required. /// [JsonProperty("product_data")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionOptionalItemAdjustableQuantityOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionOptionalItemAdjustableQuantityOptions.cs new file mode 100644 index 0000000000..a20f9221d5 --- /dev/null +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionOptionalItemAdjustableQuantityOptions.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SessionOptionalItemAdjustableQuantityOptions : INestedOptions + { + /// + /// Set to true if the quantity can be adjusted to any non-negative integer. + /// + [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif + public bool? Enabled { get; set; } + + /// + /// The maximum quantity of this item the customer can purchase. By default this value is + /// 99. You can specify a value up to 999999. + /// + [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif + public long? Maximum { get; set; } + + /// + /// The minimum quantity of this item the customer must purchase, if they choose to purchase + /// it. Because this item is optional, the customer will always be able to remove it from + /// their order, even if the minimum configured here is greater than 0. By default + /// this value is 0. + /// + [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif + public long? Minimum { get; set; } + } +} diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionOptionalItemOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionOptionalItemOptions.cs new file mode 100644 index 0000000000..d55bc68b3b --- /dev/null +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionOptionalItemOptions.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SessionOptionalItemOptions : INestedOptions + { + /// + /// When set, provides configuration for the customer to adjust the quantity of the line + /// item created when a customer chooses to add this optional item to their order. + /// + [JsonProperty("adjustable_quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("adjustable_quantity")] +#endif + public SessionOptionalItemAdjustableQuantityOptions AdjustableQuantity { get; set; } + + /// + /// The ID of the Price or Plan object. + /// + [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif + public string Price { get; set; } + + /// + /// The initial quantity of the line item created when a customer chooses to add this + /// optional item to their order. + /// + [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif + public long? Quantity { get; set; } + } +} diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataOptions.cs index e4a651b845..0f5718bb22 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataOptions.cs @@ -12,7 +12,7 @@ public class SessionPaymentIntentDataOptions : INestedOptions, IHasMetadata /// /// The amount of the application fee (if any) that will be requested to be applied to the /// payment and transferred to the application owner's Stripe account. The amount of the - /// application fee collected will be capped at the total payment amount. For more + /// application fee collected will be capped at the total amount captured. For more /// information, see the PaymentIntents use case for connected /// accounts. diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPermissionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPermissionsOptions.cs new file mode 100644 index 0000000000..d218f13b8a --- /dev/null +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPermissionsOptions.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SessionPermissionsOptions : INestedOptions + { + /// + /// Determines which entity is allowed to update the shipping details. + /// + /// Default is client_only. Stripe Checkout client will automatically update the + /// shipping details. If set to server_only, only your server is allowed to update + /// the shipping details. + /// + /// When set to server_only, you must add the onShippingDetailsChange event handler + /// when initializing the Stripe Checkout client and manually update the shipping details + /// from your server using the Stripe API. + /// One of: client_only, or server_only. + /// + [JsonProperty("update_shipping_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("update_shipping_details")] +#endif + public string UpdateShippingDetails { get; set; } + } +} diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionService.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionService.cs index c6603e8558..8b17838e8e 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionService.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionService.cs @@ -34,7 +34,7 @@ public SessionService(IStripeClient client) this.Requestor); /// - ///

Creates a Session object.

. + ///

Creates a Checkout Session object.

. ///
public virtual Session Create(SessionCreateOptions options, RequestOptions requestOptions = null) { @@ -42,7 +42,7 @@ public virtual Session Create(SessionCreateOptions options, RequestOptions reque } /// - ///

Creates a Session object.

. + ///

Creates a Checkout Session object.

. ///
public virtual Task CreateAsync(SessionCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { @@ -50,10 +50,11 @@ public virtual Task CreateAsync(SessionCreateOptions options, RequestOp } /// - ///

A Session can be expired when it is in one of these statuses: open

. + ///

A Checkout Session can be expired when it is in one of these statuses: open + ///

. /// - ///

After it expires, a customer can’t complete a Session and customers loading the - /// Session see a message saying the Session is expired.

. + ///

After it expires, a customer can’t complete a Checkout Session and customers loading + /// the Checkout Session see a message saying the Checkout Session is expired.

. ///
public virtual Session Expire(string id, SessionExpireOptions options = null, RequestOptions requestOptions = null) { @@ -61,10 +62,11 @@ public virtual Session Expire(string id, SessionExpireOptions options = null, Re } /// - ///

A Session can be expired when it is in one of these statuses: open

. + ///

A Checkout Session can be expired when it is in one of these statuses: open + ///

. /// - ///

After it expires, a customer can’t complete a Session and customers loading the - /// Session see a message saying the Session is expired.

. + ///

After it expires, a customer can’t complete a Checkout Session and customers loading + /// the Checkout Session see a message saying the Checkout Session is expired.

. ///
public virtual Task ExpireAsync(string id, SessionExpireOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { @@ -72,7 +74,7 @@ public virtual Task ExpireAsync(string id, SessionExpireOptions options } /// - ///

Retrieves a Session object.

. + ///

Retrieves a Checkout Session object.

. ///
public virtual Session Get(string id, SessionGetOptions options = null, RequestOptions requestOptions = null) { @@ -80,7 +82,7 @@ public virtual Session Get(string id, SessionGetOptions options = null, RequestO } /// - ///

Retrieves a Session object.

. + ///

Retrieves a Checkout Session object.

. ///
public virtual Task GetAsync(string id, SessionGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { @@ -120,7 +122,7 @@ public virtual IAsyncEnumerable ListAutoPagingAsync(SessionListOptions } /// - ///

Updates a Session object.

. + ///

Updates a Checkout Session object.

. ///
public virtual Session Update(string id, SessionUpdateOptions options, RequestOptions requestOptions = null) { @@ -128,7 +130,7 @@ public virtual Session Update(string id, SessionUpdateOptions options, RequestOp } /// - ///

Updates a Session object.

. + ///

Updates a Checkout Session object.

. ///
public virtual Task UpdateAsync(string id, SessionUpdateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs index 54d8f0c9a4..f6ff1df81e 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs @@ -29,5 +29,14 @@ public class SessionUpdateOptions : BaseOptions, IHasMetadata [STJS.JsonPropertyName("metadata")] #endif public Dictionary Metadata { get; set; } + + /// + /// The shipping rate options to apply to this Session. Up to a maximum of 5. + /// + [JsonProperty("shipping_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_options")] +#endif + public List ShippingOptions { get; set; } } } diff --git a/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesListOptions.cs b/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesListOptions.cs index e789882a57..13aca05572 100644 --- a/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesListOptions.cs +++ b/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesListOptions.cs @@ -116,15 +116,6 @@ public class CreditNotePreviewLinesListOptions : ListOptions, IHasMetadata #endif public string Reason { get; set; } - /// - /// ID of an existing refund to link this credit note to. - /// - [JsonProperty("refund")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("refund")] -#endif - public string Refund { get; set; } - /// /// The integer amount in cents (or local equivalent) representing the amount to refund. If /// set, a refund will be created for the charge associated with the invoice. @@ -135,6 +126,15 @@ public class CreditNotePreviewLinesListOptions : ListOptions, IHasMetadata #endif public long? RefundAmount { get; set; } + /// + /// Refunds to link to this credit note. + /// + [JsonProperty("refunds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refunds")] +#endif + public List Refunds { get; set; } + /// /// When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is /// included in the credit note. diff --git a/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesRefundOptions.cs b/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesRefundOptions.cs new file mode 100644 index 0000000000..8bc0b83449 --- /dev/null +++ b/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesRefundOptions.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 CreditNotePreviewLinesRefundOptions : INestedOptions + { + /// + /// Amount of the refund that applies to this credit note, in cents (or local equivalent). + /// Defaults to the entire refund amount. + /// + [JsonProperty("amount_refunded")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_refunded")] +#endif + public long? AmountRefunded { get; set; } + + /// + /// ID of an existing refund to link this credit note to. + /// + [JsonProperty("refund")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund")] +#endif + public string Refund { get; set; } + } +} diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteCreateOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteCreateOptions.cs index 4f1145bfea..97acdae83e 100644 --- a/src/Stripe.net/Services/CreditNotes/CreditNoteCreateOptions.cs +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteCreateOptions.cs @@ -116,15 +116,6 @@ public class CreditNoteCreateOptions : BaseOptions, IHasMetadata #endif public string Reason { get; set; } - /// - /// ID of an existing refund to link this credit note to. - /// - [JsonProperty("refund")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("refund")] -#endif - public string Refund { get; set; } - /// /// The integer amount in cents (or local equivalent) representing the amount to refund. If /// set, a refund will be created for the charge associated with the invoice. @@ -135,6 +126,15 @@ public class CreditNoteCreateOptions : BaseOptions, IHasMetadata #endif public long? RefundAmount { get; set; } + /// + /// Refunds to link to this credit note. + /// + [JsonProperty("refunds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refunds")] +#endif + public List Refunds { get; set; } + /// /// When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is /// included in the credit note. diff --git a/src/Stripe.net/Services/CreditNotes/CreditNotePreviewOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNotePreviewOptions.cs index 39e6732e24..12867ca7b5 100644 --- a/src/Stripe.net/Services/CreditNotes/CreditNotePreviewOptions.cs +++ b/src/Stripe.net/Services/CreditNotes/CreditNotePreviewOptions.cs @@ -116,15 +116,6 @@ public class CreditNotePreviewOptions : BaseOptions, IHasMetadata #endif public string Reason { get; set; } - /// - /// ID of an existing refund to link this credit note to. - /// - [JsonProperty("refund")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("refund")] -#endif - public string Refund { get; set; } - /// /// The integer amount in cents (or local equivalent) representing the amount to refund. If /// set, a refund will be created for the charge associated with the invoice. @@ -135,6 +126,15 @@ public class CreditNotePreviewOptions : BaseOptions, IHasMetadata #endif public long? RefundAmount { get; set; } + /// + /// Refunds to link to this credit note. + /// + [JsonProperty("refunds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refunds")] +#endif + public List Refunds { get; set; } + /// /// When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is /// included in the credit note. diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteRefundOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteRefundOptions.cs new file mode 100644 index 0000000000..b7ea072cc9 --- /dev/null +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteRefundOptions.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 CreditNoteRefundOptions : INestedOptions + { + /// + /// Amount of the refund that applies to this credit note, in cents (or local equivalent). + /// Defaults to the entire refund amount. + /// + [JsonProperty("amount_refunded")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_refunded")] +#endif + public long? AmountRefunded { get; set; } + + /// + /// ID of an existing refund to link this credit note to. + /// + [JsonProperty("refund")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund")] +#endif + public string Refund { get; set; } + } +} diff --git a/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs b/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs index 9e98724146..1e60941c34 100644 --- a/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs +++ b/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs @@ -28,14 +28,14 @@ public class CustomerPaymentMethodListOptions : ListOptions /// provide a type value in the request. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, blik, boleto, card, cashapp, - /// customer_balance, eps, fpx, giropay, grabpay, - /// ideal, kakao_pay, klarna, konbini, kr_card, - /// link, mobilepay, multibanco, naver_pay, oxxo, - /// p24, pay_by_bank, payco, paynow, paypal, pix, - /// promptpay, revolut_pay, samsung_pay, sepa_debit, - /// sofort, swish, twint, us_bank_account, wechat_pay, or - /// zip. + /// bancontact, billie, blik, boleto, card, + /// cashapp, customer_balance, eps, fpx, giropay, + /// grabpay, ideal, kakao_pay, klarna, konbini, + /// kr_card, link, mobilepay, multibanco, naver_pay, + /// nz_bank_account, oxxo, p24, pay_by_bank, payco, + /// paynow, paypal, pix, promptpay, revolut_pay, + /// samsung_pay, satispay, sepa_debit, sofort, swish, + /// twint, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs b/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs index ef46b7e414..ebacf198d6 100644 --- a/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs @@ -40,12 +40,6 @@ public class CustomerCreateOptions : BaseOptions, IHasMetadata #endif public CustomerCashBalanceOptions CashBalance { get; set; } - [JsonProperty("coupon")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("coupon")] -#endif - public string Coupon { get; set; } - /// /// An arbitrary string that you can attach to a customer object. It is displayed alongside /// the customer in the dashboard. @@ -145,17 +139,6 @@ public class CustomerCreateOptions : BaseOptions, IHasMetadata #endif public List PreferredLocales { get; set; } - /// - /// The ID of a promotion code to apply to the customer. The customer will have a discount - /// applied on all recurring payments. Charges you create through the API will not have the - /// discount. - /// - [JsonProperty("promotion_code")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("promotion_code")] -#endif - public string PromotionCode { get; set; } - /// /// The customer's shipping information. Appears on invoices emailed to this customer. /// diff --git a/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs b/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs index 2e8f2518b6..30ee3ecaf0 100644 --- a/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs @@ -40,12 +40,6 @@ public class CustomerUpdateOptions : BaseOptions, IHasMetadata #endif public CustomerCashBalanceOptions CashBalance { get; set; } - [JsonProperty("coupon")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("coupon")] -#endif - public string Coupon { get; set; } - /// /// If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method @@ -151,17 +145,6 @@ public class CustomerUpdateOptions : BaseOptions, IHasMetadata #endif public List PreferredLocales { get; set; } - /// - /// The ID of a promotion code to apply to the customer. The customer will have a discount - /// applied on all recurring payments. Charges you create through the API will not have the - /// discount. - /// - [JsonProperty("promotion_code")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("promotion_code")] -#endif - public string PromotionCode { get; set; } - /// /// The customer's shipping information. Appears on invoices emailed to this customer. /// diff --git a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionCreateOptions.cs b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionCreateOptions.cs index 8cf5cea8fa..362edd2054 100644 --- a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionCreateOptions.cs +++ b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionCreateOptions.cs @@ -50,7 +50,7 @@ public class VerificationSessionCreateOptions : BaseOptions, IHasMetadata public VerificationSessionProvidedDetailsOptions ProvidedDetails { get; set; } /// - /// Token referencing a Customer resource. + /// Customer ID. /// [JsonProperty("related_customer")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs index b4cac85130..b025f5f03e 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs @@ -109,23 +109,23 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata public InvoiceItemPeriodOptions Period { get; set; } /// - /// The ID of the price object. One of price or price_data is required. + /// Data used to generate a new Price + /// object inline. /// - [JsonProperty("price")] + [JsonProperty("price_data")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("price")] + [STJS.JsonPropertyName("price_data")] #endif - public string Price { get; set; } + public InvoiceItemPriceDataOptions PriceData { get; set; } /// - /// Data used to generate a new Price - /// object inline. One of price or price_data is required. + /// The pricing information for the invoice item. /// - [JsonProperty("price_data")] + [JsonProperty("pricing")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("price_data")] + [STJS.JsonPropertyName("pricing")] #endif - public InvoiceItemPriceDataOptions PriceData { get; set; } + public InvoiceItemPricingOptions Pricing { get; set; } /// /// Non-negative integer. The quantity of units for the invoice item. @@ -184,21 +184,10 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata public List TaxRates { get; set; } /// - /// The integer unit amount in cents (or local equivalent) of the charge to be applied to - /// the upcoming invoice. This unit_amount will be multiplied by the quantity to get - /// the full amount. Passing in a negative unit_amount will reduce the - /// amount_due on the invoice. - /// - [JsonProperty("unit_amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("unit_amount")] -#endif - public long? UnitAmount { get; set; } - - /// - /// Same as unit_amount, but accepts a decimal value in cents (or local equivalent) - /// with at most 12 decimal places. Only one of unit_amount and - /// unit_amount_decimal can be set. + /// The decimal unit amount in cents (or local equivalent) of the charge to be applied to + /// the upcoming invoice. This unit_amount_decimal will be multiplied by the quantity + /// to get the full amount. Passing in a negative unit_amount_decimal will reduce the + /// amount_due on the invoice. Accepts at most 12 decimal places. /// [JsonProperty("unit_amount_decimal")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemPriceDataOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemPriceDataOptions.cs index d6ff6cb3a6..3342f8edb1 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemPriceDataOptions.cs @@ -20,7 +20,8 @@ public class InvoiceItemPriceDataOptions : INestedOptions public string Currency { get; set; } /// - /// The ID of the product that this price will belong to. + /// The ID of the Product that this Price will belong to. /// [JsonProperty("product")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemPricingOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemPricingOptions.cs new file mode 100644 index 0000000000..fb7edfc84a --- /dev/null +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemPricingOptions.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 InvoiceItemPricingOptions : INestedOptions + { + /// + /// The ID of the price object. + /// + [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif + public string Price { get; set; } + } +} diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs index a8e171ed7f..3755c8ec14 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs @@ -79,23 +79,23 @@ public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata public InvoiceItemPeriodOptions Period { get; set; } /// - /// The ID of the price object. One of price or price_data is required. + /// Data used to generate a new Price + /// object inline. /// - [JsonProperty("price")] + [JsonProperty("price_data")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("price")] + [STJS.JsonPropertyName("price_data")] #endif - public string Price { get; set; } + public InvoiceItemPriceDataOptions PriceData { get; set; } /// - /// Data used to generate a new Price - /// object inline. One of price or price_data is required. + /// The pricing information for the invoice item. /// - [JsonProperty("price_data")] + [JsonProperty("pricing")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("price_data")] + [STJS.JsonPropertyName("pricing")] #endif - public InvoiceItemPriceDataOptions PriceData { get; set; } + public InvoiceItemPricingOptions Pricing { get; set; } /// /// Non-negative integer. The quantity of units for the invoice item. @@ -142,21 +142,10 @@ public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata public List TaxRates { get; set; } /// - /// The integer unit amount in cents (or local equivalent) of the charge to be applied to - /// the upcoming invoice. This unit_amount will be multiplied by the quantity to get the - /// full amount. If you want to apply a credit to the customer's account, pass a negative - /// unit_amount. - /// - [JsonProperty("unit_amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("unit_amount")] -#endif - public long? UnitAmount { get; set; } - - /// - /// Same as unit_amount, but accepts a decimal value in cents (or local equivalent) - /// with at most 12 decimal places. Only one of unit_amount and - /// unit_amount_decimal can be set. + /// The decimal unit amount in cents (or local equivalent) of the charge to be applied to + /// the upcoming invoice. This unit_amount_decimal will be multiplied by the quantity + /// to get the full amount. Passing in a negative unit_amount_decimal will reduce the + /// amount_due on the invoice. Accepts at most 12 decimal places. /// [JsonProperty("unit_amount_decimal")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataOptions.cs b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataOptions.cs index 53872b4991..9892e2bd2c 100644 --- a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataOptions.cs @@ -20,8 +20,9 @@ public class InvoiceLineItemPriceDataOptions : INestedOptions public string Currency { get; set; } /// - /// The ID of the product that this price will belong to. One of product or - /// product_data is required. + /// The ID of the Product that this Price will belong to. One of + /// product or product_data is required. /// [JsonProperty("product")] #if NET6_0_OR_GREATER @@ -30,8 +31,8 @@ public class InvoiceLineItemPriceDataOptions : INestedOptions public string Product { get; set; } /// - /// Data used to generate a new product object inline. One of product or - /// product_data is required. + /// Data used to generate a new Product + /// object inline. One of product or product_data is required. /// [JsonProperty("product_data")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPricingOptions.cs b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPricingOptions.cs new file mode 100644 index 0000000000..b14ac9bba5 --- /dev/null +++ b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPricingOptions.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 InvoiceLineItemPricingOptions : INestedOptions + { + /// + /// The ID of the price object. + /// + [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif + public string Price { get; set; } + } +} diff --git a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountOptions.cs b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountOptions.cs index 7d668a5ec6..ede7173b4c 100644 --- a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountOptions.cs +++ b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountOptions.cs @@ -32,6 +32,20 @@ public class InvoiceLineItemTaxAmountOptions : INestedOptions #endif public InvoiceLineItemTaxAmountTaxRateDataOptions TaxRateData { get; set; } + /// + /// The reasoning behind this tax, for example, if the product is tax exempt. + /// One of: customer_exempt, not_collecting, not_subject_to_tax, + /// not_supported, portion_product_exempt, portion_reduced_rated, + /// portion_standard_rated, product_exempt, product_exempt_holiday, + /// proportionally_rated, reduced_rated, reverse_charge, + /// standard_rated, taxable_basis_reduced, or zero_rated. + /// + [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif + public string TaxabilityReason { get; set; } + /// /// The amount on which tax is calculated, in cents (or local equivalent). /// diff --git a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountTaxRateDataOptions.cs b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountTaxRateDataOptions.cs index 8ac630e2a7..94deda8982 100644 --- a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountTaxRateDataOptions.cs +++ b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountTaxRateDataOptions.cs @@ -56,6 +56,17 @@ public class InvoiceLineItemTaxAmountTaxRateDataOptions : INestedOptions #endif public string Jurisdiction { get; set; } + /// + /// The level of the jurisdiction that imposes this tax rate. + /// One of: city, country, county, district, multiple, or + /// state. + /// + [JsonProperty("jurisdiction_level")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction_level")] +#endif + public string JurisdictionLevel { get; set; } + /// /// The statutory tax rate percent. This field accepts decimal values between 0 and 100 /// inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the diff --git a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemUpdateOptions.cs b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemUpdateOptions.cs index 546175b79a..a72d495d11 100644 --- a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemUpdateOptions.cs +++ b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemUpdateOptions.cs @@ -84,23 +84,23 @@ public class InvoiceLineItemUpdateOptions : BaseOptions, IHasMetadata public InvoiceLineItemPeriodOptions Period { get; set; } /// - /// The ID of the price object. One of price or price_data is required. + /// Data used to generate a new Price + /// object inline. /// - [JsonProperty("price")] + [JsonProperty("price_data")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("price")] + [STJS.JsonPropertyName("price_data")] #endif - public string Price { get; set; } + public InvoiceLineItemPriceDataOptions PriceData { get; set; } /// - /// Data used to generate a new Price - /// object inline. One of price or price_data is required. + /// The pricing information for the invoice item. /// - [JsonProperty("price_data")] + [JsonProperty("pricing")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("price_data")] + [STJS.JsonPropertyName("pricing")] #endif - public InvoiceLineItemPriceDataOptions PriceData { get; set; } + public InvoiceLineItemPricingOptions Pricing { get; set; } /// /// Non-negative integer. The quantity of units for the line item. diff --git a/src/Stripe.net/Services/InvoicePayments/InvoicePaymentGetOptions.cs b/src/Stripe.net/Services/InvoicePayments/InvoicePaymentGetOptions.cs new file mode 100644 index 0000000000..8bde6e0a55 --- /dev/null +++ b/src/Stripe.net/Services/InvoicePayments/InvoicePaymentGetOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class InvoicePaymentGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/InvoicePayments/InvoicePaymentListOptions.cs b/src/Stripe.net/Services/InvoicePayments/InvoicePaymentListOptions.cs new file mode 100644 index 0000000000..7b6066f04e --- /dev/null +++ b/src/Stripe.net/Services/InvoicePayments/InvoicePaymentListOptions.cs @@ -0,0 +1,39 @@ +// 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 InvoicePaymentListOptions : ListOptions + { + /// + /// The identifier of the invoice whose payments to return. + /// + [JsonProperty("invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] +#endif + public string Invoice { get; set; } + + /// + /// The payment details of the invoice payments to return. + /// + [JsonProperty("payment")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment")] +#endif + public InvoicePaymentPaymentOptions Payment { get; set; } + + /// + /// The status of the invoice payments to return. + /// One of: canceled, open, or paid. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Services/InvoicePayments/InvoicePaymentPaymentOptions.cs b/src/Stripe.net/Services/InvoicePayments/InvoicePaymentPaymentOptions.cs new file mode 100644 index 0000000000..b686d13b02 --- /dev/null +++ b/src/Stripe.net/Services/InvoicePayments/InvoicePaymentPaymentOptions.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 InvoicePaymentPaymentOptions : INestedOptions + { + /// + /// Only return invoice payments associated by this payment intent ID. + /// + [JsonProperty("payment_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] +#endif + public string PaymentIntent { get; set; } + + /// + /// Only return invoice payments associated by this payment type. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/InvoicePayments/InvoicePaymentService.cs b/src/Stripe.net/Services/InvoicePayments/InvoicePaymentService.cs new file mode 100644 index 0000000000..98ed9ad25c --- /dev/null +++ b/src/Stripe.net/Services/InvoicePayments/InvoicePaymentService.cs @@ -0,0 +1,85 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class InvoicePaymentService : Service, + IListable, + IRetrievable + { + public InvoicePaymentService() + { + } + + internal InvoicePaymentService(ApiRequestor requestor) + : base(requestor) + { + } + + public InvoicePaymentService(IStripeClient client) + : base(client) + { + } + + /// + ///

Retrieves the invoice payment with the given ID.

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

Retrieves the invoice payment with the given ID.

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

When retrieving an invoice, there is an includable payments property containing the + /// first handful of those items. There is also a URL where you can retrieve the full + /// (paginated) list of payments.

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

When retrieving an invoice, there is an includable payments property containing the + /// first handful of those items. There is also a URL where you can retrieve the full + /// (paginated) list of payments.

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

When retrieving an invoice, there is an includable payments property containing the + /// first handful of those items. There is also a URL where you can retrieve the full + /// (paginated) list of payments.

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

When retrieving an invoice, there is an includable payments property containing the + /// first handful of those items. There is also a URL where you can retrieve the full + /// (paginated) list of payments.

. + ///
+ public virtual IAsyncEnumerable ListAutoPagingAsync(InvoicePaymentListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.ListRequestAutoPagingAsync($"/v1/invoice_payments", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceCreatePreviewOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceCreatePreviewOptions.cs index 5ed03820e4..d11a9e2287 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceCreatePreviewOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceCreatePreviewOptions.cs @@ -18,17 +18,6 @@ public class InvoiceCreatePreviewOptions : BaseOptions #endif public InvoiceAutomaticTaxOptions AutomaticTax { get; set; } - /// - /// The ID of the coupon to apply to this phase of the subscription schedule. This field has - /// been deprecated and will be removed in a future API version. Use discounts - /// instead. - /// - [JsonProperty("coupon")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("coupon")] -#endif - public string Coupon { get; set; } - /// /// The currency to preview this invoice in. Defaults to that of customer if not /// specified. diff --git a/src/Stripe.net/Services/Invoices/InvoiceLineItemListOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLineItemListOptions.cs index e0c6dd34c9..3694ea93b5 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceLineItemListOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceLineItemListOptions.cs @@ -26,12 +26,6 @@ public class InvoiceLineItemListOptions : ListOptions #endif public string Subscription { get; set; } - [JsonProperty("subscription_items")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_items")] -#endif - public List SubscriptionItems { get; set; } - [JsonProperty("subscription_plan")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("subscription_plan")] diff --git a/src/Stripe.net/Services/Invoices/InvoiceLineOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLineOptions.cs index e4908a3fac..0f85c1372e 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceLineOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceLineOptions.cs @@ -114,23 +114,23 @@ public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId public InvoiceLinePeriodOptions Period { get; set; } /// - /// The ID of the price object. One of price or price_data is required. + /// Data used to generate a new Price + /// object inline. /// - [JsonProperty("price")] + [JsonProperty("price_data")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("price")] + [STJS.JsonPropertyName("price_data")] #endif - public string Price { get; set; } + public InvoiceLinePriceDataOptions PriceData { get; set; } /// - /// Data used to generate a new Price - /// object inline. One of price or price_data is required. + /// The pricing information for the invoice item. /// - [JsonProperty("price_data")] + [JsonProperty("pricing")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("price_data")] + [STJS.JsonPropertyName("pricing")] #endif - public InvoiceLinePriceDataOptions PriceData { get; set; } + public InvoiceLinePricingOptions Pricing { get; set; } /// /// Non-negative integer. The quantity of units for the line item. diff --git a/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataOptions.cs index 59ffe78936..f6150f0846 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataOptions.cs @@ -20,8 +20,9 @@ public class InvoiceLinePriceDataOptions : INestedOptions public string Currency { get; set; } /// - /// The ID of the product that this price will belong to. One of product or - /// product_data is required. + /// The ID of the Product that this Price will belong to. One of + /// product or product_data is required. /// [JsonProperty("product")] #if NET6_0_OR_GREATER @@ -30,8 +31,8 @@ public class InvoiceLinePriceDataOptions : INestedOptions public string Product { get; set; } /// - /// Data used to generate a new product object inline. One of product or - /// product_data is required. + /// Data used to generate a new Product + /// object inline. One of product or product_data is required. /// [JsonProperty("product_data")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Invoices/InvoiceLinePricingOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLinePricingOptions.cs new file mode 100644 index 0000000000..78f2b8d91d --- /dev/null +++ b/src/Stripe.net/Services/Invoices/InvoiceLinePricingOptions.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 InvoiceLinePricingOptions : INestedOptions + { + /// + /// The ID of the price object. + /// + [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif + public string Price { get; set; } + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountOptions.cs index d43d4e39d3..86c6683de5 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountOptions.cs @@ -32,6 +32,20 @@ public class InvoiceLineTaxAmountOptions : INestedOptions #endif public InvoiceLineTaxAmountTaxRateDataOptions TaxRateData { get; set; } + /// + /// The reasoning behind this tax, for example, if the product is tax exempt. + /// One of: customer_exempt, not_collecting, not_subject_to_tax, + /// not_supported, portion_product_exempt, portion_reduced_rated, + /// portion_standard_rated, product_exempt, product_exempt_holiday, + /// proportionally_rated, reduced_rated, reverse_charge, + /// standard_rated, taxable_basis_reduced, or zero_rated. + /// + [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif + public string TaxabilityReason { get; set; } + /// /// The amount on which tax is calculated, in cents (or local equivalent). /// diff --git a/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountTaxRateDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountTaxRateDataOptions.cs index 55fcef3c83..019e5f864b 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountTaxRateDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountTaxRateDataOptions.cs @@ -56,6 +56,17 @@ public class InvoiceLineTaxAmountTaxRateDataOptions : INestedOptions #endif public string Jurisdiction { get; set; } + /// + /// The level of the jurisdiction that imposes this tax rate. + /// One of: city, country, county, district, multiple, or + /// state. + /// + [JsonProperty("jurisdiction_level")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction_level")] +#endif + public string JurisdictionLevel { get; set; } + /// /// The statutory tax rate percent. This field accepts decimal values between 0 and 100 /// inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the diff --git a/src/Stripe.net/Services/Invoices/InvoiceListLineItemsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceListLineItemsOptions.cs index 58208e64d0..a82bd0b6b3 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceListLineItemsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceListLineItemsOptions.cs @@ -28,12 +28,6 @@ public class InvoiceListLineItemsOptions : ListOptions #endif public string Subscription { get; set; } - [JsonProperty("subscription_items")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_items")] -#endif - public List SubscriptionItems { get; set; } - [JsonProperty("subscription_plan")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("subscription_plan")] diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs index 6bd33bd469..1b1c43ee13 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs @@ -40,10 +40,11 @@ public class InvoicePaymentSettingsOptions : INestedOptions /// amazon_pay, au_becs_debit, bacs_debit, bancontact, /// boleto, card, cashapp, customer_balance, eps, /// fpx, giropay, grabpay, ideal, jp_credit_transfer, - /// kakao_pay, konbini, kr_card, link, multibanco, - /// naver_pay, p24, payco, paynow, paypal, - /// promptpay, revolut_pay, sepa_credit_transfer, sepa_debit, - /// sofort, swish, us_bank_account, or wechat_pay. + /// kakao_pay, klarna, konbini, kr_card, link, + /// multibanco, naver_pay, nz_bank_account, p24, payco, + /// paynow, paypal, promptpay, revolut_pay, + /// sepa_credit_transfer, sepa_debit, sofort, swish, + /// us_bank_account, or wechat_pay. /// [JsonProperty("payment_method_types")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs index 2562255d4a..8580a64dfe 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs @@ -20,7 +20,8 @@ public class InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions : INested public string Currency { get; set; } /// - /// The ID of the product that this price will belong to. + /// The ID of the Product that this Price will belong to. /// [JsonProperty("product")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseBillingThresholdsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseBillingThresholdsOptions.cs deleted file mode 100644 index 56ad07b4f5..0000000000 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseBillingThresholdsOptions.cs +++ /dev/null @@ -1,31 +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 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 deleted file mode 100644 index d7b15b3f94..0000000000 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions.cs +++ /dev/null @@ -1,23 +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 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 0b381026a6..5d62d38e4c 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemOptions.cs @@ -9,17 +9,6 @@ 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. 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 InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions BillingThresholds { get; set; } - /// /// The coupons to redeem into discounts for the subscription item. /// diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemPriceDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemPriceDataOptions.cs index a5334993d4..a4a9b59285 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemPriceDataOptions.cs @@ -20,7 +20,8 @@ public class InvoiceScheduleDetailsPhaseItemPriceDataOptions : INestedOptions public string Currency { get; set; } /// - /// The ID of the product that this price will belong to. + /// The ID of the Product that this Price will belong to. /// [JsonProperty("product")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs index 3b629db5d5..1917a113bd 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs @@ -58,16 +58,6 @@ 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 @@ -82,17 +72,6 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata #endif public string CollectionMethod { get; set; } - /// - /// The ID of the coupon to apply to this phase of the subscription schedule. This field has - /// been deprecated and will be removed in a future API version. Use discounts - /// instead. - /// - [JsonProperty("coupon")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("coupon")] -#endif - public string Coupon { get; set; } - /// /// Three-letter ISO currency /// code, in lowercase. Must be a supported diff --git a/src/Stripe.net/Services/Invoices/InvoiceService.cs b/src/Stripe.net/Services/Invoices/InvoiceService.cs index 420434832a..15d9cbeae8 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceService.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceService.cs @@ -375,104 +375,6 @@ public virtual Task SendInvoiceAsync(string id, InvoiceSendOptions opti return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/invoices/{WebUtility.UrlEncode(id)}/send", options, requestOptions, cancellationToken); } - /// - ///

At any time, you can preview the upcoming invoice for a customer. This will show you - /// all the charges that are pending, including subscription renewal charges, invoice item - /// charges, etc. It will also show you any discounts that are applicable to the - /// invoice.

. - /// - ///

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

. - ///
- public virtual Invoice Upcoming(UpcomingInvoiceOptions options = null, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/upcoming", options, requestOptions); - } - - /// - ///

At any time, you can preview the upcoming invoice for a customer. This will show you - /// all the charges that are pending, including subscription renewal charges, invoice item - /// charges, etc. It will also show you any discounts that are applicable to the - /// invoice.

. - /// - ///

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

. - ///
- public virtual Task UpcomingAsync(UpcomingInvoiceOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/upcoming", options, requestOptions, cancellationToken); - } - - /// - ///

When retrieving an upcoming invoice, you’ll get a lines property - /// containing the total count of line items and the first handful of those items. There is - /// also a URL where you can retrieve the full (paginated) list of line items.

. - ///
- public virtual StripeList UpcomingLines(InvoiceUpcomingLinesOptions options = null, RequestOptions requestOptions = null) - { - return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/upcoming/lines", options, requestOptions); - } - - /// - ///

When retrieving an upcoming invoice, you’ll get a lines property - /// containing the total count of line items and the first handful of those items. There is - /// also a URL where you can retrieve the full (paginated) list of line items.

. - ///
- public virtual Task> UpcomingLinesAsync(InvoiceUpcomingLinesOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/upcoming/lines", options, requestOptions, cancellationToken); - } - - /// - ///

When retrieving an upcoming invoice, you’ll get a lines property - /// containing the total count of line items and the first handful of those items. There is - /// also a URL where you can retrieve the full (paginated) list of line items.

. - ///
- public virtual IEnumerable UpcomingLinesAutoPaging(InvoiceUpcomingLinesOptions options = null, RequestOptions requestOptions = null) - { - return this.ListRequestAutoPaging($"/v1/invoices/upcoming/lines", options, requestOptions); - } - - /// - ///

When retrieving an upcoming invoice, you’ll get a lines property - /// containing the total count of line items and the first handful of those items. There is - /// also a URL where you can retrieve the full (paginated) list of line items.

. - ///
- public virtual IAsyncEnumerable UpcomingLinesAutoPagingAsync(InvoiceUpcomingLinesOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.ListRequestAutoPagingAsync($"/v1/invoices/upcoming/lines", options, requestOptions, cancellationToken); - } - /// ///

Draft invoices are fully editable. Once an invoice is finalized, diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemBillingThresholdsOptions.cs deleted file mode 100644 index 442591b03f..0000000000 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemBillingThresholdsOptions.cs +++ /dev/null @@ -1,23 +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 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 2b7287608a..4044aabca0 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemOptions.cs @@ -9,17 +9,6 @@ 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. 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 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/InvoiceSubscriptionDetailsItemPriceDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemPriceDataOptions.cs index f9a434ac3c..ffd627552a 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemPriceDataOptions.cs @@ -20,7 +20,8 @@ public class InvoiceSubscriptionDetailsItemPriceDataOptions : INestedOptions public string Currency { get; set; } /// - /// The ID of the product that this price will belong to. + /// The ID of the Product that this Price will belong to. /// [JsonProperty("product")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemBillingThresholdsOptions.cs deleted file mode 100644 index 283c4f89ac..0000000000 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemBillingThresholdsOptions.cs +++ /dev/null @@ -1,23 +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 InvoiceSubscriptionItemBillingThresholdsOptions : 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/InvoiceSubscriptionItemDiscountOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemDiscountOptions.cs deleted file mode 100644 index 12a4b1702f..0000000000 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemDiscountOptions.cs +++ /dev/null @@ -1,38 +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 InvoiceSubscriptionItemDiscountOptions : INestedOptions - { - /// - /// ID of the coupon to create a new discount for. - /// - [JsonProperty("coupon")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("coupon")] -#endif - public string Coupon { get; set; } - - /// - /// ID of an existing discount on the object (or one of its ancestors) to reuse. - /// - [JsonProperty("discount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("discount")] -#endif - public string Discount { get; set; } - - /// - /// ID of the promotion code to create a new discount for. - /// - [JsonProperty("promotion_code")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("promotion_code")] -#endif - public string PromotionCode { get; set; } - } -} diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemOptions.cs deleted file mode 100644 index dabf0fd0aa..0000000000 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemOptions.cs +++ /dev/null @@ -1,125 +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 InvoiceSubscriptionItemOptions : INestedOptions, IHasId, IHasMetadata - { - /// - /// 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 InvoiceSubscriptionItemBillingThresholdsOptions 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 - /// meter attached. - /// - [JsonProperty("clear_usage")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("clear_usage")] -#endif - public bool? ClearUsage { get; set; } - - /// - /// A flag that, if set to true, will delete the specified item. - /// - [JsonProperty("deleted")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("deleted")] -#endif - public bool? Deleted { get; set; } - - /// - /// The coupons to redeem into discounts for the subscription item. - /// - [JsonProperty("discounts")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("discounts")] -#endif - public List Discounts { get; set; } - - /// - /// Subscription item to update. - /// - [JsonProperty("id")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("id")] -#endif - public string Id { get; set; } - - /// - /// Set of key-value pairs that you can - /// attach to an object. This can be useful for storing additional information about the - /// object in a structured format. Individual keys can be unset by posting an empty value to - /// them. All keys can be unset by posting an empty value to metadata. - /// - [JsonProperty("metadata")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("metadata")] -#endif - public Dictionary Metadata { get; set; } - - /// - /// Plan ID for this item, as a string. - /// - [JsonProperty("plan")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("plan")] -#endif - public string Plan { get; set; } - - /// - /// The ID of the price object. One of price or price_data is required. When - /// changing a subscription item's price, quantity is set to 1 unless a - /// quantity parameter is provided. - /// - [JsonProperty("price")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("price")] -#endif - public string Price { get; set; } - - /// - /// Data used to generate a new Price - /// object inline. One of price or price_data is required. - /// - [JsonProperty("price_data")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("price_data")] -#endif - public InvoiceSubscriptionItemPriceDataOptions PriceData { get; set; } - - /// - /// Quantity for this item. - /// - [JsonProperty("quantity")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("quantity")] -#endif - public long? Quantity { get; set; } - - /// - /// A list of Tax Rate ids. These Tax - /// Rates will override the default_tax_rates - /// on the Subscription. When updating, pass an empty string to remove previously-defined - /// tax rates. - /// - [JsonProperty("tax_rates")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("tax_rates")] -#endif - public List TaxRates { get; set; } - } -} diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemPriceDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemPriceDataOptions.cs deleted file mode 100644 index 840e48b7e4..0000000000 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemPriceDataOptions.cs +++ /dev/null @@ -1,76 +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 InvoiceSubscriptionItemPriceDataOptions : INestedOptions - { - /// - /// Three-letter ISO currency - /// code, in lowercase. Must be a supported - /// currency. - /// - [JsonProperty("currency")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("currency")] -#endif - public string Currency { get; set; } - - /// - /// The ID of the product that this price will belong to. - /// - [JsonProperty("product")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("product")] -#endif - public string Product { get; set; } - - /// - /// The recurring components of a price such as interval and interval_count. - /// - [JsonProperty("recurring")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("recurring")] -#endif - public InvoiceSubscriptionItemPriceDataRecurringOptions Recurring { get; set; } - - /// - /// Only required if a default - /// tax behavior was not provided in the Stripe Tax settings. Specifies whether the - /// price is considered inclusive of taxes or exclusive of taxes. One of inclusive, - /// exclusive, or unspecified. Once specified as either inclusive or - /// exclusive, it cannot be changed. - /// One of: exclusive, inclusive, or unspecified. - /// - [JsonProperty("tax_behavior")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("tax_behavior")] -#endif - public string TaxBehavior { get; set; } - - /// - /// A positive integer in cents (or local equivalent) (or 0 for a free price) representing - /// how much to charge. - /// - [JsonProperty("unit_amount")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("unit_amount")] -#endif - public long? UnitAmount { get; set; } - - /// - /// Same as unit_amount, but accepts a decimal value in cents (or local equivalent) - /// with at most 12 decimal places. Only one of unit_amount and - /// unit_amount_decimal can be set. - /// - [JsonProperty("unit_amount_decimal")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("unit_amount_decimal")] -#endif - public decimal? UnitAmountDecimal { get; set; } - } -} diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemPriceDataRecurringOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemPriceDataRecurringOptions.cs deleted file mode 100644 index 5abc22bad6..0000000000 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemPriceDataRecurringOptions.cs +++ /dev/null @@ -1,33 +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 InvoiceSubscriptionItemPriceDataRecurringOptions : INestedOptions - { - /// - /// Specifies billing frequency. Either day, week, month or - /// year. - /// One of: day, month, week, or year. - /// - [JsonProperty("interval")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("interval")] -#endif - public string Interval { get; set; } - - /// - /// The number of intervals between subscription billings. For example, - /// interval=month and interval_count=3 bills every 3 months. Maximum of three - /// years interval allowed (3 years, 36 months, or 156 weeks). - /// - [JsonProperty("interval_count")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("interval_count")] -#endif - public long? IntervalCount { get; set; } - } -} diff --git a/src/Stripe.net/Services/Invoices/InvoiceUpcomingLinesOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceUpcomingLinesOptions.cs deleted file mode 100644 index 9dfe546b3d..0000000000 --- a/src/Stripe.net/Services/Invoices/InvoiceUpcomingLinesOptions.cs +++ /dev/null @@ -1,329 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System; - using System.Collections.Generic; - using Newtonsoft.Json; - using Stripe.Infrastructure; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class InvoiceUpcomingLinesOptions : ListOptions - { - /// - /// Settings for automatic tax lookup for this invoice preview. - /// - [JsonProperty("automatic_tax")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("automatic_tax")] -#endif - public InvoiceAutomaticTaxOptions AutomaticTax { get; set; } - - /// - /// The ID of the coupon to apply to this phase of the subscription schedule. This field has - /// been deprecated and will be removed in a future API version. Use discounts - /// instead. - /// - [JsonProperty("coupon")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("coupon")] -#endif - public string Coupon { get; set; } - - /// - /// The currency to preview this invoice in. Defaults to that of customer if not - /// specified. - /// - [JsonProperty("currency")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("currency")] -#endif - public string Currency { get; set; } - - /// - /// The identifier of the customer whose upcoming invoice you'd like to retrieve. If - /// automatic_tax is enabled then one of customer, customer_details, - /// subscription, or schedule must be set. - /// - [JsonProperty("customer")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("customer")] -#endif - public string Customer { get; set; } - - /// - /// Details about the customer you want to invoice or overrides for an existing customer. If - /// automatic_tax is enabled then one of customer, customer_details, - /// subscription, or schedule must be set. - /// - [JsonProperty("customer_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("customer_details")] -#endif - public InvoiceCustomerDetailsOptions CustomerDetails { get; set; } - - /// - /// The coupons to redeem into discounts for the invoice preview. If not specified, inherits - /// the discount from the subscription or customer. This works for both coupons directly - /// applied to an invoice and coupons applied to a subscription. Pass an empty string to - /// avoid inheriting any discounts. - /// - [JsonProperty("discounts")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("discounts")] -#endif - public List Discounts { get; set; } - - /// - /// List of invoice items to add or update in the upcoming invoice preview (up to 250). - /// - [JsonProperty("invoice_items")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("invoice_items")] -#endif - public List InvoiceItems { get; set; } - - /// - /// The connected account that issues the invoice. The invoice is presented with the - /// branding and support information of the specified account. - /// - [JsonProperty("issuer")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("issuer")] -#endif - public InvoiceIssuerOptions Issuer { get; set; } - - /// - /// The account (if any) for which the funds of the invoice payment are intended. If set, - /// the invoice will be presented with the branding and support information of the specified - /// account. See the Invoices - /// with Connect documentation for details. - /// - [JsonProperty("on_behalf_of")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("on_behalf_of")] -#endif - public string OnBehalfOf { get; set; } - - /// - /// Customizes the types of values to include when calculating the invoice. Defaults to - /// next if unspecified. - /// One of: next, or recurring. - /// - [JsonProperty("preview_mode")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("preview_mode")] -#endif - public string PreviewMode { get; set; } - - /// - /// The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be - /// used with subscription or subscription fields. - /// - [JsonProperty("schedule")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("schedule")] -#endif - public string Schedule { get; set; } - - /// - /// The schedule creation or modification params to apply as a preview. Cannot be used with - /// subscription or subscription_ prefixed fields. - /// - [JsonProperty("schedule_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("schedule_details")] -#endif - public InvoiceScheduleDetailsOptions ScheduleDetails { get; set; } - - /// - /// The identifier of the subscription for which you'd like to retrieve the upcoming - /// invoice. If not provided, but a subscription_details.items is provided, you will - /// preview creating a subscription with those items. If neither subscription nor - /// subscription_details.items is provided, you will retrieve the next upcoming - /// invoice from among the customer's subscriptions. - /// - [JsonProperty("subscription")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription")] -#endif - public string Subscription { get; set; } - - /// - /// For new subscriptions, a future timestamp to anchor the subscription's billing cycle. This is - /// used to determine the date of the first full invoice, and, for plans with month - /// or year intervals, the day of the month for subsequent invoices. For existing - /// subscriptions, the value can only be set to now or unchanged. This field - /// has been deprecated and will be removed in a future API version. Use - /// subscription_details.billing_cycle_anchor instead. - /// - [JsonProperty("subscription_billing_cycle_anchor")] - [JsonConverter(typeof(AnyOfConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_billing_cycle_anchor")] - [STJS.JsonConverter(typeof(STJAnyOfConverter))] -#endif - public AnyOf SubscriptionBillingCycleAnchor { 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 - /// proration_behavior. If set during a future period, this will always cause a - /// proration for that period. This field has been deprecated and will be removed in a - /// future API version. Use subscription_details.cancel_at instead. - /// - [JsonProperty("subscription_cancel_at")] - [JsonConverter(typeof(UnixDateTimeConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_cancel_at")] - [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] -#endif - public DateTime? SubscriptionCancelAt { get; set; } - - /// - /// Indicate whether this subscription should cancel at the end of the current period - /// (current_period_end). Defaults to false. This field has been deprecated - /// and will be removed in a future API version. Use - /// subscription_details.cancel_at_period_end instead. - /// - [JsonProperty("subscription_cancel_at_period_end")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_cancel_at_period_end")] -#endif - public bool? SubscriptionCancelAtPeriodEnd { get; set; } - - /// - /// This simulates the subscription being canceled or expired immediately. This field has - /// been deprecated and will be removed in a future API version. Use - /// subscription_details.cancel_now instead. - /// - [JsonProperty("subscription_cancel_now")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_cancel_now")] -#endif - public bool? SubscriptionCancelNow { get; set; } - - /// - /// If provided, the invoice returned will preview updating or creating a subscription with - /// these default tax rates. The default tax rates will apply to any line item that does not - /// have tax_rates set. This field has been deprecated and will be removed in a - /// future API version. Use subscription_details.default_tax_rates instead. - /// - [JsonProperty("subscription_default_tax_rates")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_default_tax_rates")] -#endif - public List SubscriptionDefaultTaxRates { get; set; } - - /// - /// The subscription creation or modification params to apply as a preview. Cannot be used - /// with schedule or schedule_details fields. - /// - [JsonProperty("subscription_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_details")] -#endif - public InvoiceSubscriptionDetailsOptions SubscriptionDetails { get; set; } - - /// - /// A list of up to 20 subscription items, each with an attached price. This field has been - /// deprecated and will be removed in a future API version. Use - /// subscription_details.items instead. - /// - [JsonProperty("subscription_items")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_items")] -#endif - public List SubscriptionItems { get; set; } - - /// - /// 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. This field has been deprecated - /// and will be removed in a future API version. Use - /// subscription_details.proration_behavior instead. - /// One of: always_invoice, create_prorations, or none. - /// - [JsonProperty("subscription_proration_behavior")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_proration_behavior")] -#endif - public string SubscriptionProrationBehavior { get; set; } - - /// - /// If previewing an update to a subscription, and doing proration, - /// subscription_proration_date forces the proration to be calculated as though the - /// update was done at the specified time. The time given must be within the current - /// subscription period and within the current phase of the schedule backing this - /// subscription, if the schedule exists. If set, subscription, and one of - /// subscription_items, or subscription_trial_end are required. Also, - /// subscription_proration_behavior cannot be set to 'none'. This field has been - /// deprecated and will be removed in a future API version. Use - /// subscription_details.proration_date instead. - /// - [JsonProperty("subscription_proration_date")] - [JsonConverter(typeof(UnixDateTimeConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_proration_date")] - [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] -#endif - public DateTime? SubscriptionProrationDate { get; set; } - - /// - /// For paused subscriptions, setting subscription_resume_at to now will - /// preview the invoice that will be generated if the subscription is resumed. This field - /// has been deprecated and will be removed in a future API version. Use - /// subscription_details.resume_at instead. - /// - [JsonProperty("subscription_resume_at")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_resume_at")] -#endif - public string SubscriptionResumeAt { get; set; } - - /// - /// Date a subscription is intended to start (can be future or past). This field has been - /// deprecated and will be removed in a future API version. Use - /// subscription_details.start_date instead. - /// - [JsonProperty("subscription_start_date")] - [JsonConverter(typeof(UnixDateTimeConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_start_date")] - [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] -#endif - public DateTime? SubscriptionStartDate { get; set; } - - /// - /// If provided, the invoice returned will preview updating or creating a subscription with - /// that trial end. If set, one of subscription_items or subscription is - /// required. This field has been deprecated and will be removed in a future API version. - /// Use subscription_details.trial_end instead. - /// - [JsonProperty("subscription_trial_end")] - [JsonConverter(typeof(AnyOfConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_trial_end")] - [STJS.JsonConverter(typeof(STJAnyOfConverter))] -#endif - public AnyOf SubscriptionTrialEnd { get; set; } - - /// - /// Indicates if a plan's trial_period_days should be applied to the subscription. - /// Setting subscription_trial_end per subscription is preferred, and this defaults - /// to false. Setting this flag to true together with - /// subscription_trial_end is not allowed. See Using trial periods on - /// subscriptions to learn more. - /// - [JsonProperty("subscription_trial_from_plan")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_trial_from_plan")] -#endif - public bool? SubscriptionTrialFromPlan { get; set; } - } -} diff --git a/src/Stripe.net/Services/Invoices/UpcomingInvoiceOptions.cs b/src/Stripe.net/Services/Invoices/UpcomingInvoiceOptions.cs index 2fe1da749e..8f066479eb 100644 --- a/src/Stripe.net/Services/Invoices/UpcomingInvoiceOptions.cs +++ b/src/Stripe.net/Services/Invoices/UpcomingInvoiceOptions.cs @@ -105,12 +105,6 @@ public class UpcomingInvoiceOptions : BaseOptions #endif public List SubscriptionDefaultTaxRates { get; set; } - [JsonProperty("subscription_items")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("subscription_items")] -#endif - public List SubscriptionItems { get; set; } - [Obsolete("Use SubscriptionProrationBehavior instead.")] [JsonProperty("subscription_prorate")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationListOptions.cs b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationListOptions.cs index a0e07763ee..53f2fc576e 100644 --- a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationListOptions.cs +++ b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationListOptions.cs @@ -29,7 +29,7 @@ public class AuthorizationListOptions : ListOptionsWithCreated /// /// Only return authorizations with the given status. One of pending, closed, /// or reversed. - /// One of: closed, pending, or reversed. + /// One of: closed, expired, pending, or reversed. /// [JsonProperty("status")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs index ff2bc026f3..7a8f77a3bf 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs @@ -11,8 +11,7 @@ public class PaymentIntentCaptureOptions : BaseOptions, IHasMetadata { /// /// The amount to capture from the PaymentIntent, which must be less than or equal to the - /// original amount. Any additional amount is automatically refunded. Defaults to the full - /// amount_capturable if it's not provided. + /// original amount. Defaults to the full amount_capturable if it's not provided. /// [JsonProperty("amount_to_capture")] #if NET6_0_OR_GREATER @@ -23,7 +22,7 @@ public class PaymentIntentCaptureOptions : BaseOptions, IHasMetadata /// /// The amount of the application fee (if any) that will be requested to be applied to the /// payment and transferred to the application owner's Stripe account. The amount of the - /// application fee collected will be capped at the total payment amount. For more + /// application fee collected will be capped at the total amount captured. For more /// information, see the PaymentIntents use case for connected /// accounts. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs index e72efb3c20..e0e732ec3e 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs @@ -28,7 +28,7 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// /// The amount of the application fee (if any) that will be requested to be applied to the /// payment and transferred to the application owner's Stripe account. The amount of the - /// application fee collected will be capped at the total payment amount. For more + /// application fee collected will be capped at the total amount captured. For more /// information, see the PaymentIntents use case for connected /// accounts. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs index 1b2f275956..7bfc8e4b3d 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs @@ -22,7 +22,7 @@ public class PaymentIntentIncrementAuthorizationOptions : BaseOptions, IHasMetad /// /// The amount of the application fee (if any) that will be requested to be applied to the /// payment and transferred to the application owner's Stripe account. The amount of the - /// application fee collected will be capped at the total payment amount. For more + /// application fee collected will be capped at the total amount captured. For more /// information, see the PaymentIntents use case for connected /// accounts. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillieOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillieOptions.cs new file mode 100644 index 0000000000..d4b617d169 --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillieOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class PaymentIntentPaymentMethodDataBillieOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataNzBankAccountOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataNzBankAccountOptions.cs new file mode 100644 index 0000000000..e3fbf27658 --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataNzBankAccountOptions.cs @@ -0,0 +1,63 @@ +// 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 PaymentIntentPaymentMethodDataNzBankAccountOptions : INestedOptions + { + /// + /// The name on the bank account. Only required if the account holder name is different from + /// the name of the authorized signatory collected in the PaymentMethod’s billing details. + /// + [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif + public string AccountHolderName { get; set; } + + /// + /// The account number for the bank account. + /// + [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif + public string AccountNumber { get; set; } + + /// + /// The numeric code for the bank account's bank. + /// + [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif + public string BankCode { get; set; } + + /// + /// The numeric code for the bank account's bank branch. + /// + [JsonProperty("branch_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_code")] +#endif + public string BranchCode { get; set; } + + [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif + public string Reference { get; set; } + + /// + /// The suffix of the bank account number. + /// + [JsonProperty("suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("suffix")] +#endif + public string Suffix { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs index c42f05682b..298e2ad302 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs @@ -112,6 +112,16 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat #endif public PaymentIntentPaymentMethodDataBancontactOptions Bancontact { get; set; } + /// + /// If this is a billie PaymentMethod, this hash contains details about the billie + /// payment method. + /// + [JsonProperty("billie")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billie")] +#endif + public PaymentIntentPaymentMethodDataBillieOptions Billie { get; set; } + /// /// Billing information associated with the PaymentMethod that may be used or required by /// particular types of payment methods. @@ -314,6 +324,16 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat #endif public PaymentIntentPaymentMethodDataNaverPayOptions NaverPay { get; set; } + /// + /// If this is an nz_bank_account PaymentMethod, this hash contains details about the + /// nz_bank_account payment method. + /// + [JsonProperty("nz_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nz_bank_account")] +#endif + public PaymentIntentPaymentMethodDataNzBankAccountOptions NzBankAccount { get; set; } + /// /// If this is an oxxo PaymentMethod, this hash contains details about the OXXO /// payment method. @@ -425,6 +445,16 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat #endif public PaymentIntentPaymentMethodDataSamsungPayOptions SamsungPay { get; set; } + /// + /// If this is a satispay PaymentMethod, this hash contains details about the + /// satispay payment method. + /// + [JsonProperty("satispay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("satispay")] +#endif + public PaymentIntentPaymentMethodDataSatispayOptions Satispay { get; set; } + /// /// If this is a sepa_debit PaymentMethod, this hash contains details about the SEPA /// debit bank account. @@ -471,12 +501,13 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// PaymentMethod type. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, blik, boleto, cashapp, customer_balance, - /// eps, fpx, giropay, grabpay, ideal, kakao_pay, - /// klarna, konbini, kr_card, link, mobilepay, - /// multibanco, naver_pay, oxxo, p24, pay_by_bank, - /// payco, paynow, paypal, pix, promptpay, - /// revolut_pay, samsung_pay, sepa_debit, sofort, swish, + /// bancontact, billie, blik, boleto, cashapp, + /// customer_balance, eps, fpx, giropay, grabpay, + /// ideal, kakao_pay, klarna, konbini, kr_card, + /// link, mobilepay, multibanco, naver_pay, + /// nz_bank_account, oxxo, p24, pay_by_bank, payco, + /// paynow, paypal, pix, promptpay, revolut_pay, + /// samsung_pay, satispay, sepa_debit, sofort, swish, /// twint, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataSatispayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataSatispayOptions.cs new file mode 100644 index 0000000000..6a8ac0d9b3 --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataSatispayOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class PaymentIntentPaymentMethodDataSatispayOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPayOptions.cs index a1b4ef4361..adaaa52f96 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPayOptions.cs @@ -23,5 +23,32 @@ public class PaymentIntentPaymentMethodOptionsNaverPayOptions : INestedOptions [STJS.JsonPropertyName("capture_method")] #endif public string CaptureMethod { get; set; } + + /// + /// 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/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNzBankAccountOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNzBankAccountOptions.cs new file mode 100644 index 0000000000..a33734dde3 --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNzBankAccountOptions.cs @@ -0,0 +1,53 @@ +// 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 PaymentIntentPaymentMethodOptionsNzBankAccountOptions : INestedOptions + { + /// + /// 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. + /// + /// If you've already set setup_future_usage and you're performing a request using a + /// publishable key, you can only update the value from on_session to + /// off_session. + /// One of: none, off_session, or on_session. + /// + [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif + public string SetupFutureUsage { get; set; } + + /// + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs index c8fefc7033..95574bdda8 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs @@ -297,6 +297,16 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions #endif public PaymentIntentPaymentMethodOptionsNaverPayOptions NaverPay { get; set; } + /// + /// If this is a nz_bank_account PaymentMethod, this sub-hash contains details about + /// the NZ BECS Direct Debit payment method options. + /// + [JsonProperty("nz_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nz_bank_account")] +#endif + public PaymentIntentPaymentMethodOptionsNzBankAccountOptions NzBankAccount { get; set; } + /// /// If this is a oxxo PaymentMethod, this sub-hash contains details about the OXXO /// payment method options. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs index 0acb33634c..d98e75f3f9 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs @@ -28,7 +28,7 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// /// The amount of the application fee (if any) that will be requested to be applied to the /// payment and transferred to the application owner's Stripe account. The amount of the - /// application fee collected will be capped at the total payment amount. For more + /// application fee collected will be capped at the total amount captured. For more /// information, see the PaymentIntents use case for connected /// accounts. diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs index c2302d4f50..eda20ccea5 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs @@ -173,6 +173,20 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata #endif public string OnBehalfOf { get; set; } + /// + /// A list of optional items the customer can add to their order at checkout. Use this + /// parameter to pass one-time or recurring Prices. There is a maximum of 10 optional + /// items allowed on a payment link, and the existing limits on the number of line items + /// allowed on a payment link apply to the combined number of line items and optional items. + /// There is a maximum of 20 combined line items and optional items. + /// + [JsonProperty("optional_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("optional_items")] +#endif + public List OptionalItems { get; set; } + /// /// A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in /// payment mode. @@ -209,12 +223,13 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// (20+ payment methods supported). /// One of: affirm, afterpay_clearpay, alipay, alma, - /// au_becs_debit, bacs_debit, bancontact, blik, boleto, - /// card, cashapp, eps, fpx, giropay, grabpay, - /// ideal, klarna, konbini, link, mobilepay, - /// multibanco, oxxo, p24, pay_by_bank, paynow, - /// paypal, pix, promptpay, sepa_debit, sofort, - /// swish, twint, us_bank_account, wechat_pay, or zip. + /// au_becs_debit, bacs_debit, bancontact, billie, blik, + /// boleto, card, cashapp, eps, fpx, giropay, + /// grabpay, ideal, klarna, konbini, link, + /// mobilepay, multibanco, oxxo, p24, pay_by_bank, + /// paynow, paypal, pix, promptpay, satispay, + /// sepa_debit, sofort, swish, twint, us_bank_account, + /// wechat_pay, or zip. /// [JsonProperty("payment_method_types")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldDropdownOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldDropdownOptions.cs index 6275981143..60cf1c96f0 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldDropdownOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldDropdownOptions.cs @@ -9,6 +9,16 @@ namespace Stripe public class PaymentLinkCustomFieldDropdownOptions : INestedOptions { + /// + /// The value that will pre-fill the field on the payment page.Must match a value in + /// the options array. + /// + [JsonProperty("default_value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_value")] +#endif + public string DefaultValue { get; set; } + /// /// The options available for the customer to select. Up to 200 options allowed. /// diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldNumericOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldNumericOptions.cs index b7d5b30fb3..fe0ef1e974 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldNumericOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldNumericOptions.cs @@ -8,6 +8,15 @@ namespace Stripe public class PaymentLinkCustomFieldNumericOptions : INestedOptions { + /// + /// The value that will pre-fill the field on the payment page. + /// + [JsonProperty("default_value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_value")] +#endif + public string DefaultValue { get; set; } + /// /// The maximum character length constraint for the customer's input. /// diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldTextOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldTextOptions.cs index 7bd0bebd7f..0d93430830 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldTextOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldTextOptions.cs @@ -8,6 +8,15 @@ namespace Stripe public class PaymentLinkCustomFieldTextOptions : INestedOptions { + /// + /// The value that will pre-fill the field on the payment page. + /// + [JsonProperty("default_value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_value")] +#endif + public string DefaultValue { get; set; } + /// /// The maximum character length constraint for the customer's input. /// diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkOptionalItemAdjustableQuantityOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkOptionalItemAdjustableQuantityOptions.cs new file mode 100644 index 0000000000..d8a99bafff --- /dev/null +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkOptionalItemAdjustableQuantityOptions.cs @@ -0,0 +1,42 @@ +// 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 PaymentLinkOptionalItemAdjustableQuantityOptions : INestedOptions + { + /// + /// Set to true if the quantity can be adjusted to any non-negative integer. + /// + [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif + public bool? Enabled { get; set; } + + /// + /// The maximum quantity of this item the customer can purchase. By default this value is + /// 99. + /// + [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif + public long? Maximum { get; set; } + + /// + /// The minimum quantity of this item the customer must purchase, if they choose to purchase + /// it. Because this item is optional, the customer will always be able to remove it from + /// their order, even if the minimum configured here is greater than 0. By default + /// this value is 0. + /// + [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif + public long? Minimum { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkOptionalItemOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkOptionalItemOptions.cs new file mode 100644 index 0000000000..4c107d22c1 --- /dev/null +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkOptionalItemOptions.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 PaymentLinkOptionalItemOptions : INestedOptions + { + /// + /// When set, provides configuration for the customer to adjust the quantity of the line + /// item created when a customer chooses to add this optional item to their order. + /// + [JsonProperty("adjustable_quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("adjustable_quantity")] +#endif + public PaymentLinkOptionalItemAdjustableQuantityOptions AdjustableQuantity { get; set; } + + /// + /// The ID of the Price or Plan object. + /// + [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif + public string Price { get; set; } + + /// + /// The initial quantity of the line item created when a customer chooses to add this + /// optional item to their order. + /// + [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif + public long? Quantity { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs index 82ace2cc6b..5c36aa8319 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs @@ -166,12 +166,13 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata /// href="https://dashboard.stripe.com/settings/payment_methods">payment method /// settings. /// One of: affirm, afterpay_clearpay, alipay, alma, - /// au_becs_debit, bacs_debit, bancontact, blik, boleto, - /// card, cashapp, eps, fpx, giropay, grabpay, - /// ideal, klarna, konbini, link, mobilepay, - /// multibanco, oxxo, p24, pay_by_bank, paynow, - /// paypal, pix, promptpay, sepa_debit, sofort, - /// swish, twint, us_bank_account, wechat_pay, or zip. + /// au_becs_debit, bacs_debit, bancontact, billie, blik, + /// boleto, card, cashapp, eps, fpx, giropay, + /// grabpay, ideal, klarna, konbini, link, + /// mobilepay, multibanco, oxxo, p24, pay_by_bank, + /// paynow, paypal, pix, promptpay, satispay, + /// sepa_debit, sofort, swish, twint, us_bank_account, + /// wechat_pay, or zip. /// [JsonProperty("payment_method_types")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBillieDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBillieDisplayPreferenceOptions.cs new file mode 100644 index 0000000000..105bce8f87 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBillieDisplayPreferenceOptions.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 PaymentMethodConfigurationBillieDisplayPreferenceOptions : 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/PaymentMethodConfigurationBillieOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBillieOptions.cs new file mode 100644 index 0000000000..11305221a3 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBillieOptions.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 PaymentMethodConfigurationBillieOptions : INestedOptions + { + /// + /// Whether or not the payment method should be displayed. + /// + [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif + public PaymentMethodConfigurationBillieDisplayPreferenceOptions DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs index 85e75bbcf1..2e5da2449f 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs @@ -136,6 +136,21 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions #endif public PaymentMethodConfigurationBancontactOptions Bancontact { get; set; } + /// + /// Billie is a single-use payment + /// method that offers businesses Pay by Invoice where they offer payment terms ranging from + /// 7-120 days. Customers are redirected from your website or app, authorize the payment + /// with Billie, then return to your website or app. You get immediate + /// notification of whether the payment succeeded or failed. + /// + [JsonProperty("billie")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billie")] +#endif + public PaymentMethodConfigurationBillieOptions Billie { get; set; } + /// /// BLIK is a single /// use payment method that requires customers to authenticate their payments. When @@ -368,6 +383,17 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions #endif public string Name { 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 page for more details. + /// + [JsonProperty("nz_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nz_bank_account")] +#endif + public PaymentMethodConfigurationNzBankAccountOptions NzBankAccount { get; set; } + /// /// OXXO is a Mexican chain of convenience stores with thousands of locations across Latin /// America and represents nearly 20% of online transactions in Mexico. OXXO allows @@ -460,6 +486,22 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions #endif public PaymentMethodConfigurationRevolutPayOptions RevolutPay { get; set; } + /// + /// Satispay is a single-use payment + /// method where customers are required to authenticate + /// their payment. Customers pay by being redirected from your website or app, authorizing + /// the payment with Satispay, then returning to your website or app. You get immediate + /// notification of whether the payment succeeded or failed. + /// + [JsonProperty("satispay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("satispay")] +#endif + public PaymentMethodConfigurationSatispayOptions Satispay { get; set; } + /// /// The Single Euro /// Payments Area (SEPA) is an initiative of the European Union to simplify payments diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationNzBankAccountDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationNzBankAccountDisplayPreferenceOptions.cs new file mode 100644 index 0000000000..077a7f1617 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationNzBankAccountDisplayPreferenceOptions.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 PaymentMethodConfigurationNzBankAccountDisplayPreferenceOptions : 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/PaymentMethodConfigurationNzBankAccountOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationNzBankAccountOptions.cs new file mode 100644 index 0000000000..8874a0dc98 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationNzBankAccountOptions.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 PaymentMethodConfigurationNzBankAccountOptions : INestedOptions + { + /// + /// Whether or not the payment method should be displayed. + /// + [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif + public PaymentMethodConfigurationNzBankAccountDisplayPreferenceOptions DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSatispayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSatispayDisplayPreferenceOptions.cs new file mode 100644 index 0000000000..706bfcd704 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSatispayDisplayPreferenceOptions.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 PaymentMethodConfigurationSatispayDisplayPreferenceOptions : 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/PaymentMethodConfigurationSatispayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSatispayOptions.cs new file mode 100644 index 0000000000..5b9fd2426d --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSatispayOptions.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 PaymentMethodConfigurationSatispayOptions : INestedOptions + { + /// + /// Whether or not the payment method should be displayed. + /// + [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif + public PaymentMethodConfigurationSatispayDisplayPreferenceOptions DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs index 0fd3c75e69..6dd4ee4ac0 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs @@ -145,6 +145,21 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions #endif public PaymentMethodConfigurationBancontactOptions Bancontact { get; set; } + /// + /// Billie is a single-use payment + /// method that offers businesses Pay by Invoice where they offer payment terms ranging from + /// 7-120 days. Customers are redirected from your website or app, authorize the payment + /// with Billie, then return to your website or app. You get immediate + /// notification of whether the payment succeeded or failed. + /// + [JsonProperty("billie")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billie")] +#endif + public PaymentMethodConfigurationBillieOptions Billie { get; set; } + /// /// BLIK is a single /// use payment method that requires customers to authenticate their payments. When @@ -377,6 +392,17 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions #endif public string Name { 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 page for more details. + /// + [JsonProperty("nz_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nz_bank_account")] +#endif + public PaymentMethodConfigurationNzBankAccountOptions NzBankAccount { get; set; } + /// /// OXXO is a Mexican chain of convenience stores with thousands of locations across Latin /// America and represents nearly 20% of online transactions in Mexico. OXXO allows @@ -460,6 +486,22 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions #endif public PaymentMethodConfigurationRevolutPayOptions RevolutPay { get; set; } + /// + /// Satispay is a single-use payment + /// method where customers are required to authenticate + /// their payment. Customers pay by being redirected from your website or app, authorizing + /// the payment with Satispay, then returning to your website or app. You get immediate + /// notification of whether the payment succeeded or failed. + /// + [JsonProperty("satispay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("satispay")] +#endif + public PaymentMethodConfigurationSatispayOptions Satispay { get; set; } + /// /// The Single Euro /// Payments Area (SEPA) is an initiative of the European Union to simplify payments diff --git a/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainCreateOptions.cs b/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainCreateOptions.cs index 34cee048b5..f7c7bcfb28 100644 --- a/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainCreateOptions.cs @@ -19,7 +19,8 @@ public class PaymentMethodDomainCreateOptions : BaseOptions /// /// Whether this payment method domain is enabled. If the domain is not enabled, payment - /// methods that require a payment method domain will not appear in Elements. + /// methods that require a payment method domain will not appear in Elements or Embedded + /// Checkout. /// [JsonProperty("enabled")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainListOptions.cs b/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainListOptions.cs index 373c6af3b3..b10f509f71 100644 --- a/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainListOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainListOptions.cs @@ -19,7 +19,7 @@ public class PaymentMethodDomainListOptions : ListOptions /// /// Whether this payment method domain is enabled. If the domain is not enabled, payment - /// methods will not appear in Elements. + /// methods will not appear in Elements or Embedded Checkout. /// [JsonProperty("enabled")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainService.cs b/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainService.cs index 0cafe2b2af..fcb24f0573 100644 --- a/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainService.cs +++ b/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainService.cs @@ -109,14 +109,14 @@ public virtual Task UpdateAsync(string id, PaymentMethodDom } /// - ///

Some payment methods such as Apple Pay require additional steps to verify a domain. - /// If the requirements weren’t satisfied when the domain was created, the payment method - /// will be inactive on the domain. The payment method doesn’t appear in Elements for this - /// domain until it is active.

. + ///

Some payment methods might require additional steps to register a domain. If the + /// requirements weren’t satisfied when the domain was created, the payment method will be + /// inactive on the domain. The payment method doesn’t appear in Elements or Embedded + /// Checkout for this domain until it is active.

. /// ///

To activate a payment method on an existing payment method domain, complete the - /// required validation steps specific to the payment method, and then validate the payment - /// method domain with this endpoint.

. + /// required registration steps specific to the payment method, and then validate the + /// payment method domain with this endpoint.

. /// ///

Related guides: Payment method @@ -128,14 +128,14 @@ public virtual PaymentMethodDomain Validate(string id, PaymentMethodDomainValida } ///

- ///

Some payment methods such as Apple Pay require additional steps to verify a domain. - /// If the requirements weren’t satisfied when the domain was created, the payment method - /// will be inactive on the domain. The payment method doesn’t appear in Elements for this - /// domain until it is active.

. + ///

Some payment methods might require additional steps to register a domain. If the + /// requirements weren’t satisfied when the domain was created, the payment method will be + /// inactive on the domain. The payment method doesn’t appear in Elements or Embedded + /// Checkout for this domain until it is active.

. /// ///

To activate a payment method on an existing payment method domain, complete the - /// required validation steps specific to the payment method, and then validate the payment - /// method domain with this endpoint.

. + /// required registration steps specific to the payment method, and then validate the + /// payment method domain with this endpoint.

. /// ///

Related guides: Payment method diff --git a/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainUpdateOptions.cs b/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainUpdateOptions.cs index 368d7ddc75..54264a8f67 100644 --- a/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainUpdateOptions.cs @@ -10,7 +10,8 @@ public class PaymentMethodDomainUpdateOptions : BaseOptions { ///

/// Whether this payment method domain is enabled. If the domain is not enabled, payment - /// methods that require a payment method domain will not appear in Elements. + /// methods that require a payment method domain will not appear in Elements or Embedded + /// Checkout. /// [JsonProperty("enabled")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillieOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillieOptions.cs new file mode 100644 index 0000000000..83a2766d00 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillieOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class PaymentMethodBillieOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs index 7039a105a2..3f89850afc 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs @@ -112,6 +112,16 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata #endif public PaymentMethodBancontactOptions Bancontact { get; set; } + /// + /// If this is a billie PaymentMethod, this hash contains details about the billie + /// payment method. + /// + [JsonProperty("billie")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billie")] +#endif + public PaymentMethodBillieOptions Billie { get; set; } + /// /// Billing information associated with the PaymentMethod that may be used or required by /// particular types of payment methods. @@ -338,6 +348,16 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata #endif public PaymentMethodNaverPayOptions NaverPay { get; set; } + /// + /// If this is an nz_bank_account PaymentMethod, this hash contains details about the + /// nz_bank_account payment method. + /// + [JsonProperty("nz_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nz_bank_account")] +#endif + public PaymentMethodNzBankAccountOptions NzBankAccount { get; set; } + /// /// If this is an oxxo PaymentMethod, this hash contains details about the OXXO /// payment method. @@ -458,6 +478,16 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata #endif public PaymentMethodSamsungPayOptions SamsungPay { get; set; } + /// + /// If this is a satispay PaymentMethod, this hash contains details about the + /// satispay payment method. + /// + [JsonProperty("satispay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("satispay")] +#endif + public PaymentMethodSatispayOptions Satispay { get; set; } + /// /// If this is a sepa_debit PaymentMethod, this hash contains details about the SEPA /// debit bank account. @@ -504,14 +534,14 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// PaymentMethod type. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, blik, boleto, card, cashapp, - /// customer_balance, eps, fpx, giropay, grabpay, - /// ideal, kakao_pay, klarna, konbini, kr_card, - /// link, mobilepay, multibanco, naver_pay, oxxo, - /// p24, pay_by_bank, payco, paynow, paypal, pix, - /// promptpay, revolut_pay, samsung_pay, sepa_debit, - /// sofort, swish, twint, us_bank_account, wechat_pay, or - /// zip. + /// bancontact, billie, blik, boleto, card, + /// cashapp, customer_balance, eps, fpx, giropay, + /// grabpay, ideal, kakao_pay, klarna, konbini, + /// kr_card, link, mobilepay, multibanco, naver_pay, + /// nz_bank_account, oxxo, p24, pay_by_bank, payco, + /// paynow, paypal, pix, promptpay, revolut_pay, + /// samsung_pay, satispay, sepa_debit, sofort, swish, + /// twint, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs index 7b20af54b3..2aa7f7173e 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs @@ -24,14 +24,14 @@ public class PaymentMethodListOptions : ListOptions /// provide a type value in the request. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, blik, boleto, card, cashapp, - /// customer_balance, eps, fpx, giropay, grabpay, - /// ideal, kakao_pay, klarna, konbini, kr_card, - /// link, mobilepay, multibanco, naver_pay, oxxo, - /// p24, pay_by_bank, payco, paynow, paypal, pix, - /// promptpay, revolut_pay, samsung_pay, sepa_debit, - /// sofort, swish, twint, us_bank_account, wechat_pay, or - /// zip. + /// bancontact, billie, blik, boleto, card, + /// cashapp, customer_balance, eps, fpx, giropay, + /// grabpay, ideal, kakao_pay, klarna, konbini, + /// kr_card, link, mobilepay, multibanco, naver_pay, + /// nz_bank_account, oxxo, p24, pay_by_bank, payco, + /// paynow, paypal, pix, promptpay, revolut_pay, + /// samsung_pay, satispay, sepa_debit, sofort, swish, + /// twint, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodNzBankAccountOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodNzBankAccountOptions.cs new file mode 100644 index 0000000000..d09087807d --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodNzBankAccountOptions.cs @@ -0,0 +1,63 @@ +// 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 PaymentMethodNzBankAccountOptions : INestedOptions + { + /// + /// The name on the bank account. Only required if the account holder name is different from + /// the name of the authorized signatory collected in the PaymentMethod’s billing details. + /// + [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif + public string AccountHolderName { get; set; } + + /// + /// The account number for the bank account. + /// + [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif + public string AccountNumber { get; set; } + + /// + /// The numeric code for the bank account's bank. + /// + [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif + public string BankCode { get; set; } + + /// + /// The numeric code for the bank account's bank branch. + /// + [JsonProperty("branch_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_code")] +#endif + public string BranchCode { get; set; } + + [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif + public string Reference { get; set; } + + /// + /// The suffix of the bank account number. + /// + [JsonProperty("suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("suffix")] +#endif + public string Suffix { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodSatispayOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodSatispayOptions.cs new file mode 100644 index 0000000000..291e5b6a13 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodSatispayOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class PaymentMethodSatispayOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodUpdateOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodUpdateOptions.cs index 67fba28738..cb99a2e84e 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodUpdateOptions.cs @@ -63,16 +63,6 @@ public class PaymentMethodUpdateOptions : BaseOptions, IHasMetadata #endif public Dictionary Metadata { get; set; } - /// - /// If this is a naver_pay PaymentMethod, this hash contains details about the Naver - /// Pay payment method. - /// - [JsonProperty("naver_pay")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("naver_pay")] -#endif - public PaymentMethodNaverPayOptions NaverPay { get; set; } - /// /// If this is a pay_by_bank PaymentMethod, this hash contains details about the /// PayByBank payment method. diff --git a/src/Stripe.net/Services/Plans/PlanCreateOptions.cs b/src/Stripe.net/Services/Plans/PlanCreateOptions.cs index 43214a98a6..6e0469eb48 100644 --- a/src/Stripe.net/Services/Plans/PlanCreateOptions.cs +++ b/src/Stripe.net/Services/Plans/PlanCreateOptions.cs @@ -19,21 +19,6 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata #endif public bool? Active { get; set; } - /// - /// Specifies a usage aggregation strategy for plans of usage_type=metered. Allowed - /// values are sum for summing up all usage during a period, - /// last_during_period for using the last usage record reported within a period, - /// last_ever for using the last usage record ever (across period bounds) or - /// max which uses the usage record with the maximum reported usage during a period. - /// Defaults to sum. - /// One of: last_during_period, last_ever, max, or sum. - /// - [JsonProperty("aggregate_usage")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("aggregate_usage")] -#endif - public string AggregateUsage { get; set; } - /// /// A positive integer in cents (or local equivalent) (or 0 for a free plan) representing /// how much to charge on a recurring basis. diff --git a/src/Stripe.net/Services/Prices/PriceCreateOptions.cs b/src/Stripe.net/Services/Prices/PriceCreateOptions.cs index 3b69427285..358ba946da 100644 --- a/src/Stripe.net/Services/Prices/PriceCreateOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceCreateOptions.cs @@ -98,7 +98,8 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata public string Nickname { get; set; } /// - /// The ID of the product that this price will belong to. + /// The ID of the Product that this Price will belong to. /// [JsonProperty("product")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Prices/PriceRecurringOptions.cs b/src/Stripe.net/Services/Prices/PriceRecurringOptions.cs index b093d92fec..080e94a405 100644 --- a/src/Stripe.net/Services/Prices/PriceRecurringOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceRecurringOptions.cs @@ -8,17 +8,6 @@ namespace Stripe public class PriceRecurringOptions : INestedOptions { - /// - /// Specifies a usage aggregation strategy for prices of usage_type=metered. Defaults - /// to sum. - /// One of: last_during_period, last_ever, max, or sum. - /// - [JsonProperty("aggregate_usage")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("aggregate_usage")] -#endif - public string AggregateUsage { get; set; } - /// /// Specifies billing frequency. Either day, week, month or /// year. diff --git a/src/Stripe.net/Services/Prices/PriceService.cs b/src/Stripe.net/Services/Prices/PriceService.cs index 7b70982a49..3cf2649c71 100644 --- a/src/Stripe.net/Services/Prices/PriceService.cs +++ b/src/Stripe.net/Services/Prices/PriceService.cs @@ -30,8 +30,9 @@ public PriceService(IStripeClient client) } /// - ///

Creates a new price for an existing product. The price can be recurring or - /// one-time.

. + ///

Creates a new Price for an existing + /// Product. The Price can be recurring + /// or one-time.

. ///
public virtual Price Create(PriceCreateOptions options, RequestOptions requestOptions = null) { @@ -39,8 +40,9 @@ public virtual Price Create(PriceCreateOptions options, RequestOptions requestOp } /// - ///

Creates a new price for an existing product. The price can be recurring or - /// one-time.

. + ///

Creates a new Price for an existing + /// Product. The Price can be recurring + /// or one-time.

. ///
public virtual Task CreateAsync(PriceCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/Quotes/QuoteLineItemPriceDataOptions.cs b/src/Stripe.net/Services/Quotes/QuoteLineItemPriceDataOptions.cs index 00dfe349a1..4725afe25c 100644 --- a/src/Stripe.net/Services/Quotes/QuoteLineItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteLineItemPriceDataOptions.cs @@ -20,7 +20,8 @@ public class QuoteLineItemPriceDataOptions : INestedOptions public string Currency { get; set; } /// - /// The ID of the product that this price will belong to. + /// The ID of the Product that this Price will belong to. /// [JsonProperty("product")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs index 638843e87a..5576045d6a 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs @@ -197,6 +197,10 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// /// If you populate this hash, this SetupIntent generates a single_use mandate after /// successful completion. + /// + /// Single-use mandates are only valid for the following payment methods: acss_debit, + /// alipay, au_becs_debit, bacs_debit, bancontact, + /// boleto, ideal, link, sepa_debit, and us_bank_account. /// [JsonProperty("single_use")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillieOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillieOptions.cs new file mode 100644 index 0000000000..450fd5aad9 --- /dev/null +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillieOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class SetupIntentPaymentMethodDataBillieOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataNzBankAccountOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataNzBankAccountOptions.cs new file mode 100644 index 0000000000..969ab0fadf --- /dev/null +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataNzBankAccountOptions.cs @@ -0,0 +1,63 @@ +// 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 SetupIntentPaymentMethodDataNzBankAccountOptions : INestedOptions + { + /// + /// The name on the bank account. Only required if the account holder name is different from + /// the name of the authorized signatory collected in the PaymentMethod’s billing details. + /// + [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif + public string AccountHolderName { get; set; } + + /// + /// The account number for the bank account. + /// + [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif + public string AccountNumber { get; set; } + + /// + /// The numeric code for the bank account's bank. + /// + [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif + public string BankCode { get; set; } + + /// + /// The numeric code for the bank account's bank branch. + /// + [JsonProperty("branch_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_code")] +#endif + public string BranchCode { get; set; } + + [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif + public string Reference { get; set; } + + /// + /// The suffix of the bank account number. + /// + [JsonProperty("suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("suffix")] +#endif + public string Suffix { get; set; } + } +} diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs index 385822c12e..d1bbc6d765 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs @@ -112,6 +112,16 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata #endif public SetupIntentPaymentMethodDataBancontactOptions Bancontact { get; set; } + /// + /// If this is a billie PaymentMethod, this hash contains details about the billie + /// payment method. + /// + [JsonProperty("billie")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billie")] +#endif + public SetupIntentPaymentMethodDataBillieOptions Billie { get; set; } + /// /// Billing information associated with the PaymentMethod that may be used or required by /// particular types of payment methods. @@ -314,6 +324,16 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata #endif public SetupIntentPaymentMethodDataNaverPayOptions NaverPay { get; set; } + /// + /// If this is an nz_bank_account PaymentMethod, this hash contains details about the + /// nz_bank_account payment method. + /// + [JsonProperty("nz_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nz_bank_account")] +#endif + public SetupIntentPaymentMethodDataNzBankAccountOptions NzBankAccount { get; set; } + /// /// If this is an oxxo PaymentMethod, this hash contains details about the OXXO /// payment method. @@ -425,6 +445,16 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata #endif public SetupIntentPaymentMethodDataSamsungPayOptions SamsungPay { get; set; } + /// + /// If this is a satispay PaymentMethod, this hash contains details about the + /// satispay payment method. + /// + [JsonProperty("satispay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("satispay")] +#endif + public SetupIntentPaymentMethodDataSatispayOptions Satispay { get; set; } + /// /// If this is a sepa_debit PaymentMethod, this hash contains details about the SEPA /// debit bank account. @@ -471,12 +501,13 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// PaymentMethod type. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, blik, boleto, cashapp, customer_balance, - /// eps, fpx, giropay, grabpay, ideal, kakao_pay, - /// klarna, konbini, kr_card, link, mobilepay, - /// multibanco, naver_pay, oxxo, p24, pay_by_bank, - /// payco, paynow, paypal, pix, promptpay, - /// revolut_pay, samsung_pay, sepa_debit, sofort, swish, + /// bancontact, billie, blik, boleto, cashapp, + /// customer_balance, eps, fpx, giropay, grabpay, + /// ideal, kakao_pay, klarna, konbini, kr_card, + /// link, mobilepay, multibanco, naver_pay, + /// nz_bank_account, oxxo, p24, pay_by_bank, payco, + /// paynow, paypal, pix, promptpay, revolut_pay, + /// samsung_pay, satispay, sepa_debit, sofort, swish, /// twint, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataSatispayOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataSatispayOptions.cs new file mode 100644 index 0000000000..87a1553fcb --- /dev/null +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataSatispayOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class SetupIntentPaymentMethodDataSatispayOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/SubscriptionItemUsageRecordSummaries/SubscriptionItemUsageRecordSummaryListOptions.cs b/src/Stripe.net/Services/SubscriptionItemUsageRecordSummaries/SubscriptionItemUsageRecordSummaryListOptions.cs deleted file mode 100644 index 37c2fcf99f..0000000000 --- a/src/Stripe.net/Services/SubscriptionItemUsageRecordSummaries/SubscriptionItemUsageRecordSummaryListOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - public class SubscriptionItemUsageRecordSummaryListOptions : ListOptions - { - } -} diff --git a/src/Stripe.net/Services/SubscriptionItemUsageRecordSummaries/SubscriptionItemUsageRecordSummaryService.cs b/src/Stripe.net/Services/SubscriptionItemUsageRecordSummaries/SubscriptionItemUsageRecordSummaryService.cs deleted file mode 100644 index 69d6ece20a..0000000000 --- a/src/Stripe.net/Services/SubscriptionItemUsageRecordSummaries/SubscriptionItemUsageRecordSummaryService.cs +++ /dev/null @@ -1,93 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System; - using System.Collections.Generic; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - public class SubscriptionItemUsageRecordSummaryService : Service, - INestedListable - { - public SubscriptionItemUsageRecordSummaryService() - { - } - - internal SubscriptionItemUsageRecordSummaryService( - ApiRequestor requestor) - : base(requestor) - { - } - - public SubscriptionItemUsageRecordSummaryService(IStripeClient client) - : base(client) - { - } - - /// - ///

For the specified subscription item, returns a list of summary objects. Each object - /// in the list provides usage information that’s been summarized from multiple usage - /// records and over a subscription billing period (e.g., 15 usage records in the month of - /// September).

. - /// - ///

The list is sorted in reverse-chronological order (newest first). The first list item - /// represents the most current usage period that hasn’t ended yet. Since new usage records - /// can still be added, the returned summary information for the subscription item’s ID - /// should be seen as unstable until the subscription billing period ends.

. - ///
- public virtual StripeList List(string parentId, SubscriptionItemUsageRecordSummaryListOptions options = null, RequestOptions requestOptions = null) - { - return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v1/subscription_items/{WebUtility.UrlEncode(parentId)}/usage_record_summaries", options, requestOptions); - } - - /// - ///

For the specified subscription item, returns a list of summary objects. Each object - /// in the list provides usage information that’s been summarized from multiple usage - /// records and over a subscription billing period (e.g., 15 usage records in the month of - /// September).

. - /// - ///

The list is sorted in reverse-chronological order (newest first). The first list item - /// represents the most current usage period that hasn’t ended yet. Since new usage records - /// can still be added, the returned summary information for the subscription item’s ID - /// should be seen as unstable until the subscription billing period ends.

. - ///
- public virtual Task> ListAsync(string parentId, SubscriptionItemUsageRecordSummaryListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v1/subscription_items/{WebUtility.UrlEncode(parentId)}/usage_record_summaries", options, requestOptions, cancellationToken); - } - - /// - ///

For the specified subscription item, returns a list of summary objects. Each object - /// in the list provides usage information that’s been summarized from multiple usage - /// records and over a subscription billing period (e.g., 15 usage records in the month of - /// September).

. - /// - ///

The list is sorted in reverse-chronological order (newest first). The first list item - /// represents the most current usage period that hasn’t ended yet. Since new usage records - /// can still be added, the returned summary information for the subscription item’s ID - /// should be seen as unstable until the subscription billing period ends.

. - ///
- public virtual IEnumerable ListAutoPaging(string parentId, SubscriptionItemUsageRecordSummaryListOptions options = null, RequestOptions requestOptions = null) - { - return this.ListRequestAutoPaging($"/v1/subscription_items/{WebUtility.UrlEncode(parentId)}/usage_record_summaries", options, requestOptions); - } - - /// - ///

For the specified subscription item, returns a list of summary objects. Each object - /// in the list provides usage information that’s been summarized from multiple usage - /// records and over a subscription billing period (e.g., 15 usage records in the month of - /// September).

. - /// - ///

The list is sorted in reverse-chronological order (newest first). The first list item - /// represents the most current usage period that hasn’t ended yet. Since new usage records - /// can still be added, the returned summary information for the subscription item’s ID - /// should be seen as unstable until the subscription billing period ends.

. - ///
- public virtual IAsyncEnumerable ListAutoPagingAsync(string parentId, SubscriptionItemUsageRecordSummaryListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.ListRequestAutoPagingAsync($"/v1/subscription_items/{WebUtility.UrlEncode(parentId)}/usage_record_summaries", options, requestOptions, cancellationToken); - } - } -} diff --git a/src/Stripe.net/Services/SubscriptionItemUsageRecords/SubscriptionItemUsageRecordCreateOptions.cs b/src/Stripe.net/Services/SubscriptionItemUsageRecords/SubscriptionItemUsageRecordCreateOptions.cs deleted file mode 100644 index 51983474ed..0000000000 --- a/src/Stripe.net/Services/SubscriptionItemUsageRecords/SubscriptionItemUsageRecordCreateOptions.cs +++ /dev/null @@ -1,51 +0,0 @@ -// 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 SubscriptionItemUsageRecordCreateOptions : BaseOptions - { - /// - /// Valid values are increment (default) or set. When using increment - /// the specified quantity will be added to the usage at the specified timestamp. The - /// set action will overwrite the usage quantity at that timestamp. If the - /// subscription has billing - /// thresholds, increment is the only allowed value. - /// One of: increment, or set. - /// - [JsonProperty("action")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("action")] -#endif - public string Action { get; set; } - - /// - /// The usage quantity for the specified timestamp. - /// - [JsonProperty("quantity")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("quantity")] -#endif - public long? Quantity { get; set; } - - /// - /// The timestamp for the usage event. This timestamp must be within the current billing - /// period of the subscription of the provided subscription_item, and must not be in - /// the future. When passing "now", Stripe records usage for the current time. - /// Default is "now" if a value is not provided. - /// - [JsonProperty("timestamp")] - [JsonConverter(typeof(AnyOfConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("timestamp")] - [STJS.JsonConverter(typeof(STJAnyOfConverter))] -#endif - public AnyOf Timestamp { get; set; } - } -} diff --git a/src/Stripe.net/Services/SubscriptionItemUsageRecords/SubscriptionItemUsageRecordService.cs b/src/Stripe.net/Services/SubscriptionItemUsageRecords/SubscriptionItemUsageRecordService.cs deleted file mode 100644 index 66edfb62e8..0000000000 --- a/src/Stripe.net/Services/SubscriptionItemUsageRecords/SubscriptionItemUsageRecordService.cs +++ /dev/null @@ -1,81 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - public class SubscriptionItemUsageRecordService : Service, - INestedCreatable - { - public SubscriptionItemUsageRecordService() - { - } - - internal SubscriptionItemUsageRecordService(ApiRequestor requestor) - : base(requestor) - { - } - - public SubscriptionItemUsageRecordService(IStripeClient client) - : base(client) - { - } - - /// - ///

Creates a usage record for a specified subscription item and date, and fills it with - /// a quantity.

. - /// - ///

Usage records provide quantity information that Stripe uses to track how much - /// a customer is using your service. With usage information and the pricing model set up by - /// the metered - /// billing plan, Stripe helps you send accurate invoices to your customers.

. - /// - ///

The default calculation for usage is to add up all the quantity values of the - /// usage records within a billing period. You can change this default behavior with the - /// billing plan’s aggregate_usage parameter. - /// When there is more than one usage record with the same timestamp, Stripe adds the - /// quantity values together. In most cases, this is the desired resolution, however, - /// you can change this behavior with the action parameter.

. - /// - ///

The default pricing model for metered billing is per-unit - /// pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

. - ///
- public virtual UsageRecord Create(string parentId, SubscriptionItemUsageRecordCreateOptions options = null, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/subscription_items/{WebUtility.UrlEncode(parentId)}/usage_records", options, requestOptions); - } - - /// - ///

Creates a usage record for a specified subscription item and date, and fills it with - /// a quantity.

. - /// - ///

Usage records provide quantity information that Stripe uses to track how much - /// a customer is using your service. With usage information and the pricing model set up by - /// the metered - /// billing plan, Stripe helps you send accurate invoices to your customers.

. - /// - ///

The default calculation for usage is to add up all the quantity values of the - /// usage records within a billing period. You can change this default behavior with the - /// billing plan’s aggregate_usage parameter. - /// When there is more than one usage record with the same timestamp, Stripe adds the - /// quantity values together. In most cases, this is the desired resolution, however, - /// you can change this behavior with the action parameter.

. - /// - ///

The default pricing model for metered billing is per-unit - /// pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

. - ///
- public virtual Task CreateAsync(string parentId, SubscriptionItemUsageRecordCreateOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/subscription_items/{WebUtility.UrlEncode(parentId)}/usage_records", options, requestOptions, cancellationToken); - } - } -} diff --git a/src/Stripe.net/Services/SubscriptionItemUsageRecords/SubscriptionItemUsageRecordTimestamp.cs b/src/Stripe.net/Services/SubscriptionItemUsageRecords/SubscriptionItemUsageRecordTimestamp.cs deleted file mode 100644 index 456a6aaf24..0000000000 --- a/src/Stripe.net/Services/SubscriptionItemUsageRecords/SubscriptionItemUsageRecordTimestamp.cs +++ /dev/null @@ -1,13 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - public class SubscriptionItemUsageRecordTimestamp : StringEnum - { - public static readonly SubscriptionItemUsageRecordTimestamp Now = new SubscriptionItemUsageRecordTimestamp("now"); - - private SubscriptionItemUsageRecordTimestamp(string value) - : base(value) - { - } - } -} diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs index fa79fe592f..3885120ab0 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs @@ -11,17 +11,6 @@ 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. 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 SubscriptionItemBillingThresholdsOptions BillingThresholds { get; set; } - /// /// The coupons to redeem into discounts for the subscription item. /// diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemService.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemService.cs index df81b874eb..59eda61d33 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemService.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemService.cs @@ -15,9 +15,6 @@ public class SubscriptionItemService : Service, IRetrievable, IUpdatable { - private SubscriptionItemUsageRecordService usageRecords; - private SubscriptionItemUsageRecordSummaryService usageRecordSummaries; - public SubscriptionItemService() { } @@ -32,12 +29,6 @@ public SubscriptionItemService(IStripeClient client) { } - public virtual SubscriptionItemUsageRecordService UsageRecords => this.usageRecords ??= new SubscriptionItemUsageRecordService( - this.Requestor); - - public virtual SubscriptionItemUsageRecordSummaryService UsageRecordSummaries => this.usageRecordSummaries ??= new SubscriptionItemUsageRecordSummaryService( - this.Requestor); - /// ///

Adds a new item to an existing subscription. No existing items will be changed or /// replaced.

. diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs index 1c0e364795..80fb58b04e 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs @@ -11,17 +11,6 @@ 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. 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 SubscriptionItemBillingThresholdsOptions BillingThresholds { get; set; } - /// /// The coupons to redeem into discounts for the subscription item. /// diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholdsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholdsOptions.cs deleted file mode 100644 index 79b5304646..0000000000 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholdsOptions.cs +++ /dev/null @@ -1,31 +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 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 5f2fb642dc..277d22f70f 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs @@ -45,16 +45,6 @@ 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/SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions.cs index aefa6074a6..a1247b2185 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions.cs @@ -20,7 +20,8 @@ public class SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions : INestedOp public string Currency { get; set; } /// - /// The ID of the product that this price will belong to. + /// The ID of the Product that this Price will belong to. /// [JsonProperty("product")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholdsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholdsOptions.cs deleted file mode 100644 index fd6a11cb11..0000000000 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholdsOptions.cs +++ /dev/null @@ -1,31 +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 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 deleted file mode 100644 index 1fb045bd3e..0000000000 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholdsOptions.cs +++ /dev/null @@ -1,23 +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 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 849c4323a7..aa007a1f41 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemOptions.cs @@ -9,17 +9,6 @@ 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. 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 SubscriptionSchedulePhaseItemBillingThresholdsOptions BillingThresholds { get; set; } - /// /// The coupons to redeem into discounts for the subscription item. /// diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemPriceDataOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemPriceDataOptions.cs index 198e2ebc77..3928babde9 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemPriceDataOptions.cs @@ -20,7 +20,8 @@ public class SubscriptionSchedulePhaseItemPriceDataOptions : INestedOptions public string Currency { get; set; } /// - /// The ID of the product that this price will belong to. + /// The ID of the Product that this Price will belong to. /// [JsonProperty("product")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs index c8904c3e13..f94635de5c 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs @@ -58,16 +58,6 @@ 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 @@ -82,17 +72,6 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata #endif public string CollectionMethod { get; set; } - /// - /// The ID of the coupon to apply to this phase of the subscription schedule. This field has - /// been deprecated and will be removed in a future API version. Use discounts - /// instead. - /// - [JsonProperty("coupon")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("coupon")] -#endif - public string Coupon { get; set; } - /// /// Three-letter ISO currency /// code, in lowercase. Must be a supported diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemPriceDataOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemPriceDataOptions.cs index c2be271156..8fa183767c 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemPriceDataOptions.cs @@ -20,7 +20,8 @@ public class SubscriptionAddInvoiceItemPriceDataOptions : INestedOptions public string Currency { get; set; } /// - /// The ID of the product that this price will belong to. + /// The ID of the Product that this Price will belong to. /// [JsonProperty("product")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionBillingThresholdsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingThresholdsOptions.cs deleted file mode 100644 index 0f95b945df..0000000000 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionBillingThresholdsOptions.cs +++ /dev/null @@ -1,31 +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 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/SubscriptionCreateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs index c847237508..ae584f2c25 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs @@ -84,16 +84,6 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata #endif public SubscriptionBillingCycleAnchorConfigOptions BillingCycleAnchorConfig { 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 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 @@ -132,17 +122,6 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata #endif public string CollectionMethod { get; set; } - /// - /// The ID of the coupon to apply to this subscription. A coupon applied to a subscription - /// will only affect invoices created for that particular subscription. This field has been - /// deprecated and will be removed in a future API version. Use discounts instead. - /// - [JsonProperty("coupon")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("coupon")] -#endif - public string Coupon { get; set; } - /// /// Three-letter ISO currency /// code, in lowercase. Must be a supported @@ -345,18 +324,6 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata #endif public SubscriptionPendingInvoiceItemIntervalOptions PendingInvoiceItemInterval { get; set; } - /// - /// The promotion code to apply to this subscription. A promotion code applied to a - /// subscription will only affect invoices created for that particular subscription. This - /// field has been deprecated and will be removed in a future API version. Use - /// discounts instead. - /// - [JsonProperty("promotion_code")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("promotion_code")] -#endif - public string PromotionCode { get; set; } - /// /// Determines how to handle prorations resulting diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionItemBillingThresholdsOptions.cs deleted file mode 100644 index 54ed79ee07..0000000000 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionItemBillingThresholdsOptions.cs +++ /dev/null @@ -1,23 +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 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 f4a8b18cb4..ac7e64f74e 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionItemOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionItemOptions.cs @@ -9,17 +9,6 @@ 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. 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 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/SubscriptionItemPriceDataOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionItemPriceDataOptions.cs index 33a56ad348..86e0592bb6 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionItemPriceDataOptions.cs @@ -20,7 +20,8 @@ public class SubscriptionItemPriceDataOptions : INestedOptions public string Currency { get; set; } /// - /// The ID of the product that this price will belong to. + /// The ID of the Product that this Price will belong to. /// [JsonProperty("product")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs index 97820a7aab..642490968b 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs @@ -30,10 +30,11 @@ public class SubscriptionPaymentSettingsOptions : INestedOptions /// amazon_pay, au_becs_debit, bacs_debit, bancontact, /// boleto, card, cashapp, customer_balance, eps, /// fpx, giropay, grabpay, ideal, jp_credit_transfer, - /// kakao_pay, konbini, kr_card, link, multibanco, - /// naver_pay, p24, payco, paynow, paypal, - /// promptpay, revolut_pay, sepa_credit_transfer, sepa_debit, - /// sofort, swish, us_bank_account, or wechat_pay. + /// kakao_pay, klarna, konbini, kr_card, link, + /// multibanco, naver_pay, nz_bank_account, p24, payco, + /// paynow, paypal, promptpay, revolut_pay, + /// sepa_credit_transfer, sepa_debit, sofort, swish, + /// us_bank_account, or wechat_pay. /// [JsonProperty("payment_method_types")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs index b3d35c24cd..3d4502e312 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs @@ -58,16 +58,6 @@ 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. 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 @@ -115,17 +105,6 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata #endif public string CollectionMethod { get; set; } - /// - /// The ID of the coupon to apply to this subscription. A coupon applied to a subscription - /// will only affect invoices created for that particular subscription. This field has been - /// deprecated and will be removed in a future API version. Use discounts instead. - /// - [JsonProperty("coupon")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("coupon")] -#endif - public string Coupon { get; set; } - /// /// Number of days a customer has to pay invoices generated by this subscription. Valid only /// for subscriptions where collection_method is set to send_invoice. @@ -316,18 +295,6 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata #endif public SubscriptionPendingInvoiceItemIntervalOptions PendingInvoiceItemInterval { get; set; } - /// - /// The promotion code to apply to this subscription. A promotion code applied to a - /// subscription will only affect invoices created for that particular subscription. This - /// field has been deprecated and will be removed in a future API version. Use - /// discounts instead. - /// - [JsonProperty("promotion_code")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("promotion_code")] -#endif - public string PromotionCode { get; set; } - /// /// Determines how to handle prorations when the diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs index b1b187d02d..16a330a92a 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs @@ -11,8 +11,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), and - /// 68081 (Schiller Park). + /// 06613 (Bloomington), 21696 (East Dundee), 24582 (Evanston), + /// 45421 (Lynwood), 64343 (River Grove), and 68081 (Schiller Park). /// [JsonProperty("jurisdiction")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWiseposEOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWiseposEOptions.cs index 88262a9bf4..e5d25f8c2c 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWiseposEOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWiseposEOptions.cs @@ -9,7 +9,7 @@ namespace Stripe.Terminal public class ConfigurationBbposWiseposEOptions : INestedOptions { /// - /// A File ID representing an image you would like displayed on the reader. + /// A File ID representing an image to display on the reader. /// [JsonProperty("splashscreen")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs index 1b688d3551..83cc8d8292 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs @@ -70,5 +70,14 @@ public class ConfigurationCreateOptions : BaseOptions [STJS.JsonPropertyName("verifone_p400")] #endif public ConfigurationVerifoneP400Options VerifoneP400 { get; set; } + + /// + /// Configurations for connecting to a WiFi network. + /// + [JsonProperty("wifi")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wifi")] +#endif + public ConfigurationWifiOptions Wifi { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs index ed5a5ed5f4..ef5cdce1d5 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs @@ -70,5 +70,14 @@ public class ConfigurationUpdateOptions : BaseOptions [STJS.JsonPropertyName("verifone_p400")] #endif public ConfigurationVerifoneP400Options VerifoneP400 { get; set; } + + /// + /// Configurations for connecting to a WiFi network. + /// + [JsonProperty("wifi")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wifi")] +#endif + public ConfigurationWifiOptions Wifi { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationWifiEnterpriseEapPeapOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationWifiEnterpriseEapPeapOptions.cs new file mode 100644 index 0000000000..0ea1e7d170 --- /dev/null +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationWifiEnterpriseEapPeapOptions.cs @@ -0,0 +1,47 @@ +// 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 ConfigurationWifiEnterpriseEapPeapOptions : INestedOptions + { + /// + /// A File ID representing a PEM file containing the server certificate. + /// + [JsonProperty("ca_certificate_file")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ca_certificate_file")] +#endif + public string CaCertificateFile { get; set; } + + /// + /// Password for connecting to the WiFi network. + /// + [JsonProperty("password")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("password")] +#endif + public string Password { get; set; } + + /// + /// Name of the WiFi network. + /// + [JsonProperty("ssid")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ssid")] +#endif + public string Ssid { get; set; } + + /// + /// Username for connecting to the WiFi network. + /// + [JsonProperty("username")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("username")] +#endif + public string Username { get; set; } + } +} diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationWifiEnterpriseEapTlsOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationWifiEnterpriseEapTlsOptions.cs new file mode 100644 index 0000000000..9dc8d6ca67 --- /dev/null +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationWifiEnterpriseEapTlsOptions.cs @@ -0,0 +1,56 @@ +// 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 ConfigurationWifiEnterpriseEapTlsOptions : INestedOptions + { + /// + /// A File ID representing a PEM file containing the server certificate. + /// + [JsonProperty("ca_certificate_file")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ca_certificate_file")] +#endif + public string CaCertificateFile { get; set; } + + /// + /// A File ID representing a PEM file containing the client certificate. + /// + [JsonProperty("client_certificate_file")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_certificate_file")] +#endif + public string ClientCertificateFile { get; set; } + + /// + /// A File ID representing a PEM file containing the client RSA private key. + /// + [JsonProperty("private_key_file")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("private_key_file")] +#endif + public string PrivateKeyFile { get; set; } + + /// + /// Password for the private key file. + /// + [JsonProperty("private_key_file_password")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("private_key_file_password")] +#endif + public string PrivateKeyFilePassword { get; set; } + + /// + /// Name of the WiFi network. + /// + [JsonProperty("ssid")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ssid")] +#endif + public string Ssid { get; set; } + } +} diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationWifiOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationWifiOptions.cs new file mode 100644 index 0000000000..6538a81b0d --- /dev/null +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationWifiOptions.cs @@ -0,0 +1,49 @@ +// 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 ConfigurationWifiOptions : INestedOptions + { + /// + /// Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method. + /// + [JsonProperty("enterprise_eap_peap")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enterprise_eap_peap")] +#endif + public ConfigurationWifiEnterpriseEapPeapOptions EnterpriseEapPeap { get; set; } + + /// + /// Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method. + /// + [JsonProperty("enterprise_eap_tls")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enterprise_eap_tls")] +#endif + public ConfigurationWifiEnterpriseEapTlsOptions EnterpriseEapTls { get; set; } + + /// + /// Credentials for a WPA-Personal WiFi network. + /// + [JsonProperty("personal_psk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("personal_psk")] +#endif + public ConfigurationWifiPersonalPskOptions PersonalPsk { get; set; } + + /// + /// Security type of the WiFi network. Fill out the hash with the corresponding name to + /// provide the set of credentials for this security type. + /// One of: enterprise_eap_peap, enterprise_eap_tls, or personal_psk. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationWifiPersonalPskOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationWifiPersonalPskOptions.cs new file mode 100644 index 0000000000..9f7401ac77 --- /dev/null +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationWifiPersonalPskOptions.cs @@ -0,0 +1,29 @@ +// 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 ConfigurationWifiPersonalPskOptions : INestedOptions + { + /// + /// Password for connecting to the WiFi network. + /// + [JsonProperty("password")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("password")] +#endif + public string Password { get; set; } + + /// + /// Name of the WiFi network. + /// + [JsonProperty("ssid")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ssid")] +#endif + public string Ssid { get; set; } + } +} diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillieOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillieOptions.cs new file mode 100644 index 0000000000..bf69a3d463 --- /dev/null +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillieOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe.TestHelpers +{ + public class ConfirmationTokenPaymentMethodDataBillieOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataNzBankAccountOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataNzBankAccountOptions.cs new file mode 100644 index 0000000000..3299e35d33 --- /dev/null +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataNzBankAccountOptions.cs @@ -0,0 +1,63 @@ +// File generated from our OpenAPI spec +namespace Stripe.TestHelpers +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class ConfirmationTokenPaymentMethodDataNzBankAccountOptions : INestedOptions + { + /// + /// The name on the bank account. Only required if the account holder name is different from + /// the name of the authorized signatory collected in the PaymentMethod’s billing details. + /// + [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif + public string AccountHolderName { get; set; } + + /// + /// The account number for the bank account. + /// + [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif + public string AccountNumber { get; set; } + + /// + /// The numeric code for the bank account's bank. + /// + [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif + public string BankCode { get; set; } + + /// + /// The numeric code for the bank account's bank branch. + /// + [JsonProperty("branch_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_code")] +#endif + public string BranchCode { get; set; } + + [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif + public string Reference { get; set; } + + /// + /// The suffix of the bank account number. + /// + [JsonProperty("suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("suffix")] +#endif + public string Suffix { get; set; } + } +} diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs index 35490aafec..ed87090e3f 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs @@ -112,6 +112,16 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet #endif public ConfirmationTokenPaymentMethodDataBancontactOptions Bancontact { get; set; } + /// + /// If this is a billie PaymentMethod, this hash contains details about the billie + /// payment method. + /// + [JsonProperty("billie")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billie")] +#endif + public ConfirmationTokenPaymentMethodDataBillieOptions Billie { get; set; } + /// /// Billing information associated with the PaymentMethod that may be used or required by /// particular types of payment methods. @@ -314,6 +324,16 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet #endif public ConfirmationTokenPaymentMethodDataNaverPayOptions NaverPay { get; set; } + /// + /// If this is an nz_bank_account PaymentMethod, this hash contains details about the + /// nz_bank_account payment method. + /// + [JsonProperty("nz_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nz_bank_account")] +#endif + public ConfirmationTokenPaymentMethodDataNzBankAccountOptions NzBankAccount { get; set; } + /// /// If this is an oxxo PaymentMethod, this hash contains details about the OXXO /// payment method. @@ -425,6 +445,16 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet #endif public ConfirmationTokenPaymentMethodDataSamsungPayOptions SamsungPay { get; set; } + /// + /// If this is a satispay PaymentMethod, this hash contains details about the + /// satispay payment method. + /// + [JsonProperty("satispay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("satispay")] +#endif + public ConfirmationTokenPaymentMethodDataSatispayOptions Satispay { get; set; } + /// /// If this is a sepa_debit PaymentMethod, this hash contains details about the SEPA /// debit bank account. @@ -471,12 +501,13 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// PaymentMethod type. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, blik, boleto, cashapp, customer_balance, - /// eps, fpx, giropay, grabpay, ideal, kakao_pay, - /// klarna, konbini, kr_card, link, mobilepay, - /// multibanco, naver_pay, oxxo, p24, pay_by_bank, - /// payco, paynow, paypal, pix, promptpay, - /// revolut_pay, samsung_pay, sepa_debit, sofort, swish, + /// bancontact, billie, blik, boleto, cashapp, + /// customer_balance, eps, fpx, giropay, grabpay, + /// ideal, kakao_pay, klarna, konbini, kr_card, + /// link, mobilepay, multibanco, naver_pay, + /// nz_bank_account, oxxo, p24, pay_by_bank, payco, + /// paynow, paypal, pix, promptpay, revolut_pay, + /// samsung_pay, satispay, sepa_debit, sofort, swish, /// twint, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataSatispayOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataSatispayOptions.cs new file mode 100644 index 0000000000..4d7a0d33be --- /dev/null +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataSatispayOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe.TestHelpers +{ + public class ConfirmationTokenPaymentMethodDataSatispayOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs index aac9f06252..73a87fd50b 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs @@ -149,6 +149,12 @@ public class TokenAccountCompanyOptions : INestedOptions public bool? OwnershipDeclarationShownAndSigned { get; set; } /// + /// This value is used to determine if a business is exempt from providing ultimate + /// beneficial owners. See this + /// support article and changelog + /// for more details. /// One of: qualified_entity_exceeds_ownership_threshold, or /// qualifies_as_financial_institution. /// diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountService.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountService.cs index 8601b2e0e5..a866cc081d 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountService.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountService.cs @@ -54,8 +54,8 @@ public virtual Task CloseAsync(string id, FinancialAccountClos } /// - ///

Creates a new FinancialAccount. For now, each connected account can only have one - /// FinancialAccount.

. + ///

Creates a new FinancialAccount. Each connected account can have up to three + /// FinancialAccounts by default.

. ///
public virtual FinancialAccount Create(FinancialAccountCreateOptions options, RequestOptions requestOptions = null) { @@ -63,8 +63,8 @@ public virtual FinancialAccount Create(FinancialAccountCreateOptions options, Re } /// - ///

Creates a new FinancialAccount. For now, each connected account can only have one - /// FinancialAccount.

. + ///

Creates a new FinancialAccount. Each connected account can have up to three + /// FinancialAccounts by default.

. ///
public virtual Task CreateAsync(FinancialAccountCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/V1Services.cs b/src/Stripe.net/Services/V1Services.cs index d2fa13c6c0..4adf55b75d 100644 --- a/src/Stripe.net/Services/V1Services.cs +++ b/src/Stripe.net/Services/V1Services.cs @@ -39,6 +39,7 @@ public class V1Services : Service private ForwardingService forwarding; private IdentityService identity; private InvoiceService invoices; + private InvoicePaymentService invoicePayments; private InvoiceRenderingTemplateService invoiceRenderingTemplates; private InvoiceItemService invoiceItems; private IssuingService issuing; @@ -183,6 +184,9 @@ internal V1Services(IStripeClient client) public virtual InvoiceService Invoices => this.invoices ??= new InvoiceService( this.Requestor); + public virtual InvoicePaymentService InvoicePayments => this.invoicePayments ??= new InvoicePaymentService( + this.Requestor); + public virtual InvoiceRenderingTemplateService InvoiceRenderingTemplates => this.invoiceRenderingTemplates ??= new InvoiceRenderingTemplateService( this.Requestor); diff --git a/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs b/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs index dd0ab44300..49db479c1a 100644 --- a/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs @@ -1,7 +1,6 @@ // File generated from our OpenAPI spec namespace Stripe.V2.Core { - using System; using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; @@ -9,53 +8,6 @@ namespace Stripe.V2.Core public class EventListOptions : V2.ListOptions { - /// - /// Filter for events created after the specified timestamp. - /// - [JsonProperty("created_gt")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created_gt")] -#endif - public DateTime? CreatedGt { get; set; } - - /// - /// Filter for events created at or after the specified timestamp. - /// - [JsonProperty("created_gte")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created_gte")] -#endif - public DateTime? CreatedGte { get; set; } - - /// - /// Filter for events created before the specified timestamp. - /// - [JsonProperty("created_lt")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created_lt")] -#endif - public DateTime? CreatedLt { get; set; } - - /// - /// Filter for events created at or before the specified timestamp. - /// - [JsonProperty("created_lte")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created_lte")] -#endif - public DateTime? CreatedLte { get; set; } - - /// - /// Filter events based on whether they were successfully delivered to all subscribed event - /// destinations. If false, events which are still pending or have failed all delivery - /// attempts to a event destination will be returned. - /// - [JsonProperty("delivery_success")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("delivery_success")] -#endif - public bool? DeliverySuccess { get; set; } - /// /// Primary object ID used to retrieve related events. /// diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs index d1784cee97..d63e711e6f 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs @@ -39,7 +39,8 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// 2022-08-01, 2022-11-15, 2023-08-16, 2023-10-16, /// 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, or 2025-02-24.acacia. + /// 2025-01-27.acacia, 2025-02-24.acacia, 2025-03-01.dashboard, or + /// 2025-03-31.basil. ///
[JsonProperty("api_version")] #if NET6_0_OR_GREATER @@ -118,11 +119,11 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// identity.verification_session.requires_input, /// identity.verification_session.verified, invoice.created, /// invoice.deleted, invoice.finalization_failed, invoice.finalized, - /// invoice.marked_uncollectible, invoice.overdue, invoice.paid, - /// invoice.payment_action_required, invoice.payment_failed, - /// invoice.payment_succeeded, invoice.sent, invoice.upcoming, - /// invoice.updated, invoice.voided, invoice.will_be_due, - /// invoiceitem.created, invoiceitem.deleted, + /// invoice.marked_uncollectible, invoice.overdue, invoice.overpaid, + /// invoice.paid, invoice.payment_action_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, @@ -189,8 +190,11 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// treasury.outbound_transfer.returned, /// treasury.outbound_transfer.tracking_details_updated, /// treasury.received_credit.created, treasury.received_credit.failed, - /// treasury.received_credit.succeeded, treasury.received_debit.created, or - /// ping. + /// treasury.received_credit.succeeded, treasury.received_debit.created, + /// billing.credit_balance_transaction.created, billing.credit_grant.created, + /// billing.credit_grant.updated, billing.meter.created, + /// billing.meter.deactivated, billing.meter.reactivated, + /// billing.meter.updated, or ping. ///
[JsonProperty("enabled_events")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs index 7912c7c8bf..8b5cbe27af 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs @@ -79,11 +79,11 @@ public class WebhookEndpointUpdateOptions : BaseOptions, IHasMetadata /// identity.verification_session.requires_input, /// identity.verification_session.verified, invoice.created, /// invoice.deleted, invoice.finalization_failed, invoice.finalized, - /// invoice.marked_uncollectible, invoice.overdue, invoice.paid, - /// invoice.payment_action_required, invoice.payment_failed, - /// invoice.payment_succeeded, invoice.sent, invoice.upcoming, - /// invoice.updated, invoice.voided, invoice.will_be_due, - /// invoiceitem.created, invoiceitem.deleted, + /// invoice.marked_uncollectible, invoice.overdue, invoice.overpaid, + /// invoice.paid, invoice.payment_action_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, @@ -150,8 +150,11 @@ public class WebhookEndpointUpdateOptions : BaseOptions, IHasMetadata /// treasury.outbound_transfer.returned, /// treasury.outbound_transfer.tracking_details_updated, /// treasury.received_credit.created, treasury.received_credit.failed, - /// treasury.received_credit.succeeded, treasury.received_debit.created, or - /// ping. + /// treasury.received_credit.succeeded, treasury.received_debit.created, + /// billing.credit_balance_transaction.created, billing.credit_grant.created, + /// billing.credit_grant.updated, billing.meter.created, + /// billing.meter.deactivated, billing.meter.reactivated, + /// billing.meter.updated, or ping. ///
[JsonProperty("enabled_events")] #if NET6_0_OR_GREATER diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index eac57469ba..4e0126150a 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -6180,11 +6180,20 @@ public void TestV2CoreEventGet() HttpMethod.Get, "/v2/core/events", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"context\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"reason\":null,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"context\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"reason\":null,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}", + "object_id=object_id"); + var options = new Stripe.V2.Core.EventListOptions + { + ObjectId = "object_id", + }; var client = new StripeClient(this.Requestor); var service = client.V2.Core.Events; - Stripe.V2.StripeList events = service.List(); - this.AssertRequest(HttpMethod.Get, "/v2/core/events"); + Stripe.V2.StripeList events = service.List( + options); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/events", + "object_id=object_id"); } [Fact]