diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 7d4dffb39..e82b642e6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -51,7 +51,7 @@ body: id: language-version attributes: label: Rust version - placeholder: Our MSRV is 1.65.0 + placeholder: Our MSRV is 1.68.0 validations: required: true - type: input diff --git a/.github/workflows/async-stripe.yml b/.github/workflows/async-stripe.yml index a3fb5fb00..9e9cd68a3 100644 --- a/.github/workflows/async-stripe.yml +++ b/.github/workflows/async-stripe.yml @@ -111,7 +111,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: "1.65.0" + toolchain: "1.68.0" override: true - uses: actions/cache@v2 with: diff --git a/Cargo.toml b/Cargo.toml index 277dd1c47..23af66243 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ members = [ name = "async-stripe" version = "0.22.2" description = "API bindings for the Stripe HTTP API" -rust-version = "1.65.0" +rust-version = "1.68.0" authors = [ "Anna Baldwin ", "Kevin Stenerson ", diff --git a/README.md b/README.md index 9cf25ce47..33363a722 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ If you don't see the specific version you are on, prefer the next available vers ## MSRV -We currently have `1.65.0` pinned in CI, so any version of rustc newer than that should work. +We currently have `1.68.0` pinned in CI, so any version of rustc newer than that should work. If this is not the case, please open an issue. As a policy, we permit MSRV increases in non-breaking releases. If you have a compelling usecase for bumping it, we are usually open to do so, as long as the rust version is not too new (generally 3 releases). diff --git a/openapi/Cargo.toml b/openapi/Cargo.toml index 33607e271..d7fc1f3e6 100644 --- a/openapi/Cargo.toml +++ b/openapi/Cargo.toml @@ -15,7 +15,7 @@ serde_json = "1" anyhow = "1.0.34" tracing = "0.1.36" openapiv3 = "1.0.1" -indexmap = "1" +indexmap = "2" tracing-subscriber = "0.3.15" structopt = "0.3.26" indoc = "1.0.7" \ No newline at end of file diff --git a/openapi/version.json b/openapi/version.json index ee831c6c5..aa1a21c90 100644 --- a/openapi/version.json +++ b/openapi/version.json @@ -1,3 +1,3 @@ { - "version": "v446" + "version": "v484" } \ No newline at end of file diff --git a/src/resources.rs b/src/resources.rs index 0dacde1a2..188c82738 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -122,7 +122,6 @@ pub use { file_link::*, invoice_setting_rendering_options::*, mandate::*, - mandate_options_off_session_details_blik::*, payment_intent::*, payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code::*, linked_account_options_us_bank_account::*, diff --git a/src/resources/generated.rs b/src/resources/generated.rs index 9561b8662..6c6062dd4 100644 --- a/src/resources/generated.rs +++ b/src/resources/generated.rs @@ -27,7 +27,6 @@ pub mod core { pub mod invoice_setting_rendering_options; pub mod linked_account_options_us_bank_account; pub mod mandate; - pub mod mandate_options_off_session_details_blik; pub mod payment_intent; pub mod payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code; pub mod payment_method_details_card_checks; diff --git a/src/resources/generated/account.rs b/src/resources/generated/account.rs index ccc741b1e..c489dd94a 100644 --- a/src/resources/generated/account.rs +++ b/src/resources/generated/account.rs @@ -142,7 +142,7 @@ impl Account { /// Any parameters not provided are left unchanged. For Custom accounts, you can update any information on the account. /// For other accounts, you can update all information until that account has started to go through Connect Onboarding. /// Once you create an [Account Link](https://stripe.com/docs/api/account_links) for a Standard or Express account, some parameters can no longer be changed. - /// These are marked as **Custom Only** or **Custom and Express** below. To update your own account, use the [Dashboard](https://dashboard.stripe.com/account). + /// These are marked as **Custom Only** or **Custom and Express** below. To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). /// Refer to our [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts. pub fn update(client: &Client, id: &AccountId, params: UpdateAccount<'_>) -> Response { client.post_form(&format!("/accounts/{}", id), ¶ms) @@ -153,7 +153,7 @@ impl Account { /// Accounts created using test-mode keys can be deleted at any time. /// /// Standard accounts created using live-mode keys cannot be deleted. - /// Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/account) instead. + /// Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. pub fn delete(client: &Client, id: &AccountId) -> Response> { client.delete(&format!("/accounts/{}", id)) } @@ -1460,7 +1460,7 @@ pub struct PersonParams { #[serde(skip_serializing_if = "Option::is_none")] pub gender: Option, - /// The government-issued ID number of the individual, as appropriate for the representative’s country. + /// The government-issued ID number of the individual, as appropriate for the representative's country. /// /// (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). /// Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). @@ -3820,10 +3820,12 @@ pub enum AccountRequirementsErrorCode { InvalidStreetAddress, InvalidTosAcceptance, InvalidValueOther, + VerificationDirectorsMismatch, VerificationDocumentAddressMismatch, VerificationDocumentAddressMissing, VerificationDocumentCorrupt, VerificationDocumentCountryNotSupported, + VerificationDocumentDirectorsMismatch, VerificationDocumentDobMismatch, VerificationDocumentDuplicateType, VerificationDocumentExpired, @@ -3849,6 +3851,7 @@ pub enum AccountRequirementsErrorCode { VerificationDocumentPhotoMismatch, VerificationDocumentTooLarge, VerificationDocumentTypeNotSupported, + VerificationExtraneousDirectors, VerificationFailedAddressMatch, VerificationFailedBusinessIecNumber, VerificationFailedDocumentMatch, @@ -3860,6 +3863,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, + VerificationMissingDirectors, VerificationMissingExecutives, VerificationMissingOwners, VerificationRequiresAdditionalMemorandumOfAssociations, @@ -3874,10 +3878,12 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::InvalidStreetAddress => "invalid_street_address", AccountRequirementsErrorCode::InvalidTosAcceptance => "invalid_tos_acceptance", AccountRequirementsErrorCode::InvalidValueOther => "invalid_value_other", + AccountRequirementsErrorCode::VerificationDirectorsMismatch => "verification_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMismatch => "verification_document_address_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMissing => "verification_document_address_missing", AccountRequirementsErrorCode::VerificationDocumentCorrupt => "verification_document_corrupt", AccountRequirementsErrorCode::VerificationDocumentCountryNotSupported => "verification_document_country_not_supported", + AccountRequirementsErrorCode::VerificationDocumentDirectorsMismatch => "verification_document_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentDobMismatch => "verification_document_dob_mismatch", AccountRequirementsErrorCode::VerificationDocumentDuplicateType => "verification_document_duplicate_type", AccountRequirementsErrorCode::VerificationDocumentExpired => "verification_document_expired", @@ -3903,6 +3909,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationDocumentPhotoMismatch => "verification_document_photo_mismatch", AccountRequirementsErrorCode::VerificationDocumentTooLarge => "verification_document_too_large", AccountRequirementsErrorCode::VerificationDocumentTypeNotSupported => "verification_document_type_not_supported", + AccountRequirementsErrorCode::VerificationExtraneousDirectors => "verification_extraneous_directors", AccountRequirementsErrorCode::VerificationFailedAddressMatch => "verification_failed_address_match", AccountRequirementsErrorCode::VerificationFailedBusinessIecNumber => "verification_failed_business_iec_number", AccountRequirementsErrorCode::VerificationFailedDocumentMatch => "verification_failed_document_match", @@ -3914,6 +3921,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", + AccountRequirementsErrorCode::VerificationMissingDirectors => "verification_missing_directors", AccountRequirementsErrorCode::VerificationMissingExecutives => "verification_missing_executives", AccountRequirementsErrorCode::VerificationMissingOwners => "verification_missing_owners", AccountRequirementsErrorCode::VerificationRequiresAdditionalMemorandumOfAssociations => "verification_requires_additional_memorandum_of_associations", @@ -4053,6 +4061,7 @@ pub enum CompanyParamsStructure { GovernmentInstrumentality, GovernmentalUnit, IncorporatedNonProfit, + IncorporatedPartnership, LimitedLiabilityPartnership, Llc, MultiMemberLlc, @@ -4068,6 +4077,7 @@ pub enum CompanyParamsStructure { TaxExemptGovernmentInstrumentality, UnincorporatedAssociation, UnincorporatedNonProfit, + UnincorporatedPartnership, } impl CompanyParamsStructure { @@ -4078,6 +4088,7 @@ impl CompanyParamsStructure { CompanyParamsStructure::GovernmentInstrumentality => "government_instrumentality", CompanyParamsStructure::GovernmentalUnit => "governmental_unit", CompanyParamsStructure::IncorporatedNonProfit => "incorporated_non_profit", + CompanyParamsStructure::IncorporatedPartnership => "incorporated_partnership", CompanyParamsStructure::LimitedLiabilityPartnership => "limited_liability_partnership", CompanyParamsStructure::Llc => "llc", CompanyParamsStructure::MultiMemberLlc => "multi_member_llc", @@ -4095,6 +4106,7 @@ impl CompanyParamsStructure { } CompanyParamsStructure::UnincorporatedAssociation => "unincorporated_association", CompanyParamsStructure::UnincorporatedNonProfit => "unincorporated_non_profit", + CompanyParamsStructure::UnincorporatedPartnership => "unincorporated_partnership", } } } @@ -4125,6 +4137,7 @@ pub enum CompanyStructure { GovernmentInstrumentality, GovernmentalUnit, IncorporatedNonProfit, + IncorporatedPartnership, LimitedLiabilityPartnership, Llc, MultiMemberLlc, @@ -4140,6 +4153,7 @@ pub enum CompanyStructure { TaxExemptGovernmentInstrumentality, UnincorporatedAssociation, UnincorporatedNonProfit, + UnincorporatedPartnership, } impl CompanyStructure { @@ -4150,6 +4164,7 @@ impl CompanyStructure { CompanyStructure::GovernmentInstrumentality => "government_instrumentality", CompanyStructure::GovernmentalUnit => "governmental_unit", CompanyStructure::IncorporatedNonProfit => "incorporated_non_profit", + CompanyStructure::IncorporatedPartnership => "incorporated_partnership", CompanyStructure::LimitedLiabilityPartnership => "limited_liability_partnership", CompanyStructure::Llc => "llc", CompanyStructure::MultiMemberLlc => "multi_member_llc", @@ -4167,6 +4182,7 @@ impl CompanyStructure { } CompanyStructure::UnincorporatedAssociation => "unincorporated_association", CompanyStructure::UnincorporatedNonProfit => "unincorporated_non_profit", + CompanyStructure::UnincorporatedPartnership => "unincorporated_partnership", } } } diff --git a/src/resources/generated/account_link.rs b/src/resources/generated/account_link.rs index ac1cc1f69..def9a7e3e 100644 --- a/src/resources/generated/account_link.rs +++ b/src/resources/generated/account_link.rs @@ -128,8 +128,6 @@ impl std::default::Default for AccountLinkCollect { pub enum AccountLinkType { AccountOnboarding, AccountUpdate, - CustomAccountUpdate, - CustomAccountVerification, } impl AccountLinkType { @@ -137,8 +135,6 @@ impl AccountLinkType { match self { AccountLinkType::AccountOnboarding => "account_onboarding", AccountLinkType::AccountUpdate => "account_update", - AccountLinkType::CustomAccountUpdate => "custom_account_update", - AccountLinkType::CustomAccountVerification => "custom_account_verification", } } } diff --git a/src/resources/generated/balance_transaction.rs b/src/resources/generated/balance_transaction.rs index fecd59264..e4fb6e495 100644 --- a/src/resources/generated/balance_transaction.rs +++ b/src/resources/generated/balance_transaction.rs @@ -69,7 +69,7 @@ pub struct BalanceTransaction { /// Either `available` or `pending`. pub status: BalanceTransactionStatus, - /// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + /// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. /// /// [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. /// If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. @@ -136,10 +136,6 @@ pub struct Fee { /// The parameters for `BalanceTransaction::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListBalanceTransactions<'a> { - /// This parameter is deprecated and we recommend listing by created and filtering in memory instead. - #[serde(skip_serializing_if = "Option::is_none")] - pub available_on: Option>, - #[serde(skip_serializing_if = "Option::is_none")] pub created: Option>, @@ -184,7 +180,7 @@ pub struct ListBalanceTransactions<'a> { /// Only returns transactions of the given type. /// - /// One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + /// One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option<&'a str>, @@ -193,7 +189,6 @@ pub struct ListBalanceTransactions<'a> { impl<'a> ListBalanceTransactions<'a> { pub fn new() -> Self { ListBalanceTransactions { - available_on: Default::default(), created: Default::default(), currency: Default::default(), ending_before: Default::default(), @@ -232,6 +227,7 @@ pub enum BalanceTransactionType { Payment, PaymentFailureRefund, PaymentRefund, + PaymentReversal, Payout, PayoutCancel, PayoutFailure, @@ -269,6 +265,7 @@ impl BalanceTransactionType { BalanceTransactionType::Payment => "payment", BalanceTransactionType::PaymentFailureRefund => "payment_failure_refund", BalanceTransactionType::PaymentRefund => "payment_refund", + BalanceTransactionType::PaymentReversal => "payment_reversal", BalanceTransactionType::Payout => "payout", BalanceTransactionType::PayoutCancel => "payout_cancel", BalanceTransactionType::PayoutFailure => "payout_failure", diff --git a/src/resources/generated/bank_account.rs b/src/resources/generated/bank_account.rs index 3f78d92ae..db3771ff5 100644 --- a/src/resources/generated/bank_account.rs +++ b/src/resources/generated/bank_account.rs @@ -163,10 +163,12 @@ pub enum AccountRequirementsErrorCode { InvalidStreetAddress, InvalidTosAcceptance, InvalidValueOther, + VerificationDirectorsMismatch, VerificationDocumentAddressMismatch, VerificationDocumentAddressMissing, VerificationDocumentCorrupt, VerificationDocumentCountryNotSupported, + VerificationDocumentDirectorsMismatch, VerificationDocumentDobMismatch, VerificationDocumentDuplicateType, VerificationDocumentExpired, @@ -192,6 +194,7 @@ pub enum AccountRequirementsErrorCode { VerificationDocumentPhotoMismatch, VerificationDocumentTooLarge, VerificationDocumentTypeNotSupported, + VerificationExtraneousDirectors, VerificationFailedAddressMatch, VerificationFailedBusinessIecNumber, VerificationFailedDocumentMatch, @@ -203,6 +206,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, + VerificationMissingDirectors, VerificationMissingExecutives, VerificationMissingOwners, VerificationRequiresAdditionalMemorandumOfAssociations, @@ -217,10 +221,12 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::InvalidStreetAddress => "invalid_street_address", AccountRequirementsErrorCode::InvalidTosAcceptance => "invalid_tos_acceptance", AccountRequirementsErrorCode::InvalidValueOther => "invalid_value_other", + AccountRequirementsErrorCode::VerificationDirectorsMismatch => "verification_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMismatch => "verification_document_address_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMissing => "verification_document_address_missing", AccountRequirementsErrorCode::VerificationDocumentCorrupt => "verification_document_corrupt", AccountRequirementsErrorCode::VerificationDocumentCountryNotSupported => "verification_document_country_not_supported", + AccountRequirementsErrorCode::VerificationDocumentDirectorsMismatch => "verification_document_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentDobMismatch => "verification_document_dob_mismatch", AccountRequirementsErrorCode::VerificationDocumentDuplicateType => "verification_document_duplicate_type", AccountRequirementsErrorCode::VerificationDocumentExpired => "verification_document_expired", @@ -246,6 +252,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationDocumentPhotoMismatch => "verification_document_photo_mismatch", AccountRequirementsErrorCode::VerificationDocumentTooLarge => "verification_document_too_large", AccountRequirementsErrorCode::VerificationDocumentTypeNotSupported => "verification_document_type_not_supported", + AccountRequirementsErrorCode::VerificationExtraneousDirectors => "verification_extraneous_directors", AccountRequirementsErrorCode::VerificationFailedAddressMatch => "verification_failed_address_match", AccountRequirementsErrorCode::VerificationFailedBusinessIecNumber => "verification_failed_business_iec_number", AccountRequirementsErrorCode::VerificationFailedDocumentMatch => "verification_failed_document_match", @@ -257,6 +264,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", + AccountRequirementsErrorCode::VerificationMissingDirectors => "verification_missing_directors", AccountRequirementsErrorCode::VerificationMissingExecutives => "verification_missing_executives", AccountRequirementsErrorCode::VerificationMissingOwners => "verification_missing_owners", AccountRequirementsErrorCode::VerificationRequiresAdditionalMemorandumOfAssociations => "verification_requires_additional_memorandum_of_associations", diff --git a/src/resources/generated/billing_portal_session.rs b/src/resources/generated/billing_portal_session.rs index 9f915f886..b02591320 100644 --- a/src/resources/generated/billing_portal_session.rs +++ b/src/resources/generated/billing_portal_session.rs @@ -118,6 +118,9 @@ pub struct PortalFlowsAfterCompletionRedirect { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsFlowSubscriptionCancel { + /// Specify a retention strategy to be used in the cancellation flow. + pub retention: Option, + /// The ID of the subscription to be canceled. pub subscription: String, } @@ -144,6 +147,22 @@ pub struct PortalFlowsFlowSubscriptionUpdateConfirm { pub subscription: String, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PortalFlowsRetention { + /// Configuration when `retention.type=coupon_offer`. + pub coupon_offer: Option, + + /// Type of retention strategy that will be used. + #[serde(rename = "type")] + pub type_: PortalFlowsRetentionType, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PortalFlowsCouponOffer { + /// The ID of the coupon to be offered. + pub coupon: String, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PortalFlowsSubscriptionUpdateConfirmDiscount { /// The ID of the coupon to apply to this subscription update. @@ -190,7 +209,7 @@ pub struct CreateBillingPortalSession<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub flow_data: Option, - /// The IETF language tag of the locale Customer Portal is displayed in. + /// The IETF language tag of the locale customer portal is displayed in. /// /// If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. #[serde(skip_serializing_if = "Option::is_none")] @@ -265,6 +284,10 @@ pub struct CreateBillingPortalSessionFlowDataAfterCompletion { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionCancel { + /// Specify a retention strategy to be used in the cancellation flow. + #[serde(skip_serializing_if = "Option::is_none")] + pub retention: Option, + /// The ID of the subscription to be canceled. pub subscription: String, } @@ -306,6 +329,16 @@ pub struct CreateBillingPortalSessionFlowDataAfterCompletionRedirect { pub return_url: String, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateBillingPortalSessionFlowDataSubscriptionCancelRetention { + /// Configuration when `retention.type=coupon_offer`. + pub coupon_offer: CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOffer, + + /// Type of retention strategy to use with the customer. + #[serde(rename = "type")] + pub type_: CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirmDiscounts { /// The ID of the coupon to apply to this subscription update. @@ -333,6 +366,12 @@ pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirmItems { pub quantity: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOffer { + /// The ID of the coupon to be offered. + pub coupon: String, +} + /// An enum representing the possible values of an `BillingPortalSession`'s `locale` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -509,6 +548,40 @@ impl std::default::Default for CreateBillingPortalSessionFlowDataAfterCompletion } } +/// An enum representing the possible values of an `CreateBillingPortalSessionFlowDataSubscriptionCancelRetention`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType { + CouponOffer, +} + +impl CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType { + pub fn as_str(self) -> &'static str { + match self { + CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType::CouponOffer => { + "coupon_offer" + } + } + } +} + +impl AsRef for CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionType { + fn default() -> Self { + Self::CouponOffer + } +} + /// An enum representing the possible values of an `CreateBillingPortalSessionFlowData`'s `type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -622,3 +695,35 @@ impl std::default::Default for PortalFlowsFlowType { Self::PaymentMethodUpdate } } + +/// An enum representing the possible values of an `PortalFlowsRetention`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PortalFlowsRetentionType { + CouponOffer, +} + +impl PortalFlowsRetentionType { + pub fn as_str(self) -> &'static str { + match self { + PortalFlowsRetentionType::CouponOffer => "coupon_offer", + } + } +} + +impl AsRef for PortalFlowsRetentionType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PortalFlowsRetentionType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PortalFlowsRetentionType { + fn default() -> Self { + Self::CouponOffer + } +} diff --git a/src/resources/generated/capability.rs b/src/resources/generated/capability.rs index 40cb33924..3041ebbd1 100644 --- a/src/resources/generated/capability.rs +++ b/src/resources/generated/capability.rs @@ -164,10 +164,12 @@ pub enum AccountRequirementsErrorCode { InvalidStreetAddress, InvalidTosAcceptance, InvalidValueOther, + VerificationDirectorsMismatch, VerificationDocumentAddressMismatch, VerificationDocumentAddressMissing, VerificationDocumentCorrupt, VerificationDocumentCountryNotSupported, + VerificationDocumentDirectorsMismatch, VerificationDocumentDobMismatch, VerificationDocumentDuplicateType, VerificationDocumentExpired, @@ -193,6 +195,7 @@ pub enum AccountRequirementsErrorCode { VerificationDocumentPhotoMismatch, VerificationDocumentTooLarge, VerificationDocumentTypeNotSupported, + VerificationExtraneousDirectors, VerificationFailedAddressMatch, VerificationFailedBusinessIecNumber, VerificationFailedDocumentMatch, @@ -204,6 +207,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, + VerificationMissingDirectors, VerificationMissingExecutives, VerificationMissingOwners, VerificationRequiresAdditionalMemorandumOfAssociations, @@ -218,10 +222,12 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::InvalidStreetAddress => "invalid_street_address", AccountRequirementsErrorCode::InvalidTosAcceptance => "invalid_tos_acceptance", AccountRequirementsErrorCode::InvalidValueOther => "invalid_value_other", + AccountRequirementsErrorCode::VerificationDirectorsMismatch => "verification_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMismatch => "verification_document_address_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMissing => "verification_document_address_missing", AccountRequirementsErrorCode::VerificationDocumentCorrupt => "verification_document_corrupt", AccountRequirementsErrorCode::VerificationDocumentCountryNotSupported => "verification_document_country_not_supported", + AccountRequirementsErrorCode::VerificationDocumentDirectorsMismatch => "verification_document_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentDobMismatch => "verification_document_dob_mismatch", AccountRequirementsErrorCode::VerificationDocumentDuplicateType => "verification_document_duplicate_type", AccountRequirementsErrorCode::VerificationDocumentExpired => "verification_document_expired", @@ -247,6 +253,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationDocumentPhotoMismatch => "verification_document_photo_mismatch", AccountRequirementsErrorCode::VerificationDocumentTooLarge => "verification_document_too_large", AccountRequirementsErrorCode::VerificationDocumentTypeNotSupported => "verification_document_type_not_supported", + AccountRequirementsErrorCode::VerificationExtraneousDirectors => "verification_extraneous_directors", AccountRequirementsErrorCode::VerificationFailedAddressMatch => "verification_failed_address_match", AccountRequirementsErrorCode::VerificationFailedBusinessIecNumber => "verification_failed_business_iec_number", AccountRequirementsErrorCode::VerificationFailedDocumentMatch => "verification_failed_document_match", @@ -258,6 +265,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", + AccountRequirementsErrorCode::VerificationMissingDirectors => "verification_missing_directors", AccountRequirementsErrorCode::VerificationMissingExecutives => "verification_missing_executives", AccountRequirementsErrorCode::VerificationMissingOwners => "verification_missing_owners", AccountRequirementsErrorCode::VerificationRequiresAdditionalMemorandumOfAssociations => "verification_requires_additional_memorandum_of_associations", diff --git a/src/resources/generated/card.rs b/src/resources/generated/card.rs index e0d829a65..416f4507f 100644 --- a/src/resources/generated/card.rs +++ b/src/resources/generated/card.rs @@ -122,7 +122,7 @@ pub struct Card { /// Uniquely identifies this particular card number. /// /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. #[serde(skip_serializing_if = "Option::is_none")] pub fingerprint: Option, diff --git a/src/resources/generated/charge.rs b/src/resources/generated/charge.rs index 78818814f..3d55bf462 100644 --- a/src/resources/generated/charge.rs +++ b/src/resources/generated/charge.rs @@ -9,10 +9,10 @@ use crate::ids::{ChargeId, CustomerId, PaymentIntentId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{ Account, Address, Application, ApplicationFee, BalanceTransaction, BillingDetails, - ChargeSourceParams, Currency, Customer, Dispute, Invoice, Mandate, PaymentIntent, - PaymentMethod, PaymentMethodDetailsCardChecks, PaymentMethodDetailsCardInstallmentsPlan, + ChargeSourceParams, Currency, Customer, Invoice, Mandate, PaymentIntent, PaymentMethod, + PaymentMethodDetailsCardChecks, PaymentMethodDetailsCardInstallmentsPlan, PaymentMethodDetailsCardWalletApplePay, PaymentMethodDetailsCardWalletGooglePay, PaymentSource, - RadarRadarOptions, Refund, Review, Shipping, ThreeDSecureDetails, Transfer, + RadarRadarOptions, Refund, Review, Shipping, Transfer, }; /// The resource representing a Stripe "Charge". @@ -23,9 +23,6 @@ pub struct Charge { /// Unique identifier for the object. pub id: ChargeId, - #[serde(skip_serializing_if = "Option::is_none")] - pub alternate_statement_descriptors: Option, - /// Amount intended to be collected by this payment. /// /// A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). @@ -87,12 +84,6 @@ pub struct Charge { /// Often useful for displaying to users. pub description: Option, - /// ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. - pub destination: Option>, - - /// Details about the dispute if the charge has been disputed. - pub dispute: Option>, - /// Whether the charge has been disputed. pub disputed: bool, @@ -259,17 +250,6 @@ impl Object for Charge { } } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct AlternateStatementDescriptors { - /// The Kana variation of the descriptor. - #[serde(skip_serializing_if = "Option::is_none")] - pub kana: Option, - - /// The Kanji variation of the descriptor. - #[serde(skip_serializing_if = "Option::is_none")] - pub kanji: Option, -} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct FraudDetails { /// Assessments from Stripe. @@ -702,7 +682,7 @@ pub struct PaymentMethodDetailsCard { /// Uniquely identifies this particular card number. /// /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. #[serde(skip_serializing_if = "Option::is_none")] pub fingerprint: Option, @@ -748,7 +728,7 @@ pub struct PaymentMethodDetailsCard { pub network_token: Option, /// Populated if this transaction used 3D Secure authentication. - pub three_d_secure: Option, + pub three_d_secure: Option, /// If this Card is part of a card wallet, this contains the details of the card wallet. pub wallet: Option, @@ -810,7 +790,7 @@ pub struct PaymentMethodDetailsCardPresent { /// Uniquely identifies this particular card number. /// /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. pub fingerprint: Option, /// Card funding type. @@ -1121,7 +1101,7 @@ pub struct PaymentMethodDetailsInteracPresent { /// Uniquely identifies this particular card number. /// /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. pub fingerprint: Option, /// Card funding type. @@ -1450,6 +1430,23 @@ pub struct Rule { pub predicate: String, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ThreeDSecureDetailsCharge { + /// For authenticated transactions: how the customer was authenticated by + /// the issuing bank. + pub authentication_flow: Option, + + /// Indicates the outcome of 3D Secure authentication. + pub result: Option, + + /// Additional information about why 3D Secure succeeded or failed based + /// on the `result`. + pub result_reason: Option, + + /// The version of 3D Secure that was used. + pub version: Option, +} + /// The parameters for `Charge::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateCharge<'a> { @@ -2749,6 +2746,165 @@ impl std::default::Default for PaypalSellerProtectionStatus { } } +/// An enum representing the possible values of an `ThreeDSecureDetailsCharge`'s `authentication_flow` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsChargeAuthenticationFlow { + Challenge, + Frictionless, +} + +impl ThreeDSecureDetailsChargeAuthenticationFlow { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsChargeAuthenticationFlow::Challenge => "challenge", + ThreeDSecureDetailsChargeAuthenticationFlow::Frictionless => "frictionless", + } + } +} + +impl AsRef for ThreeDSecureDetailsChargeAuthenticationFlow { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsChargeAuthenticationFlow { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsChargeAuthenticationFlow { + fn default() -> Self { + Self::Challenge + } +} + +/// An enum representing the possible values of an `ThreeDSecureDetailsCharge`'s `result` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsChargeResult { + AttemptAcknowledged, + Authenticated, + Exempted, + Failed, + NotSupported, + ProcessingError, +} + +impl ThreeDSecureDetailsChargeResult { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsChargeResult::AttemptAcknowledged => "attempt_acknowledged", + ThreeDSecureDetailsChargeResult::Authenticated => "authenticated", + ThreeDSecureDetailsChargeResult::Exempted => "exempted", + ThreeDSecureDetailsChargeResult::Failed => "failed", + ThreeDSecureDetailsChargeResult::NotSupported => "not_supported", + ThreeDSecureDetailsChargeResult::ProcessingError => "processing_error", + } + } +} + +impl AsRef for ThreeDSecureDetailsChargeResult { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsChargeResult { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsChargeResult { + fn default() -> Self { + Self::AttemptAcknowledged + } +} + +/// An enum representing the possible values of an `ThreeDSecureDetailsCharge`'s `result_reason` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsChargeResultReason { + Abandoned, + Bypassed, + Canceled, + CardNotEnrolled, + NetworkNotSupported, + ProtocolError, + Rejected, +} + +impl ThreeDSecureDetailsChargeResultReason { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsChargeResultReason::Abandoned => "abandoned", + ThreeDSecureDetailsChargeResultReason::Bypassed => "bypassed", + ThreeDSecureDetailsChargeResultReason::Canceled => "canceled", + ThreeDSecureDetailsChargeResultReason::CardNotEnrolled => "card_not_enrolled", + ThreeDSecureDetailsChargeResultReason::NetworkNotSupported => "network_not_supported", + ThreeDSecureDetailsChargeResultReason::ProtocolError => "protocol_error", + ThreeDSecureDetailsChargeResultReason::Rejected => "rejected", + } + } +} + +impl AsRef for ThreeDSecureDetailsChargeResultReason { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsChargeResultReason { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsChargeResultReason { + fn default() -> Self { + Self::Abandoned + } +} + +/// An enum representing the possible values of an `ThreeDSecureDetailsCharge`'s `version` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsChargeVersion { + #[serde(rename = "1.0.2")] + V1_0_2, + #[serde(rename = "2.1.0")] + V2_1_0, + #[serde(rename = "2.2.0")] + V2_2_0, +} + +impl ThreeDSecureDetailsChargeVersion { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsChargeVersion::V1_0_2 => "1.0.2", + ThreeDSecureDetailsChargeVersion::V2_1_0 => "2.1.0", + ThreeDSecureDetailsChargeVersion::V2_2_0 => "2.2.0", + } + } +} + +impl AsRef for ThreeDSecureDetailsChargeVersion { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsChargeVersion { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsChargeVersion { + fn default() -> Self { + Self::V1_0_2 + } +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DestinationSpecs { /// ID of an existing, connected Stripe account. diff --git a/src/resources/generated/checkout_session.rs b/src/resources/generated/checkout_session.rs index 747957d9a..8469a9f5a 100644 --- a/src/resources/generated/checkout_session.rs +++ b/src/resources/generated/checkout_session.rs @@ -1229,14 +1229,10 @@ pub struct CreateCheckoutSession<'a> { pub shipping_address_collection: Option, /// The shipping rate options to apply to this Session. - #[serde(skip_serializing_if = "Option::is_none")] - pub shipping_options: Option>, - - /// [Deprecated] The shipping rate to apply to this Session. /// - /// Only up to one may be specified. + /// Up to a maximum of 5. #[serde(skip_serializing_if = "Option::is_none")] - pub shipping_rates: Option>, + pub shipping_options: Option>, /// Describes the type of transaction being performed by Checkout in order to customize /// relevant text on the page, such as the submit button. @@ -1293,7 +1289,6 @@ impl<'a> CreateCheckoutSession<'a> { setup_intent_data: Default::default(), shipping_address_collection: Default::default(), shipping_options: Default::default(), - shipping_rates: Default::default(), submit_type: Default::default(), subscription_data: Default::default(), success_url, @@ -1605,7 +1600,7 @@ pub struct CreateCheckoutSessionPaymentIntentData { /// A string that identifies the resulting payment as part of a group. /// - /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. #[serde(skip_serializing_if = "Option::is_none")] pub transfer_group: Option, } @@ -1786,12 +1781,6 @@ pub struct CreateCheckoutSessionSubscriptionData { #[serde(skip_serializing_if = "Option::is_none")] pub billing_cycle_anchor: Option, - /// 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. - #[serde(skip_serializing_if = "Option::is_none")] - pub coupon: Option, - /// The tax rates that will apply to any subscription item that does not have /// `tax_rates` set. /// @@ -1834,13 +1823,6 @@ pub struct CreateCheckoutSessionSubscriptionData { #[serde(skip_serializing_if = "Option::is_none")] pub trial_end: Option, - /// Indicates if a plan’s `trial_period_days` should be applied to the subscription. - /// - /// Setting `trial_end` on `subscription_data` is preferred. - /// Defaults to `false`. - #[serde(skip_serializing_if = "Option::is_none")] - pub trial_from_plan: Option, - /// Integer representing the number of trial period days before the /// customer is charged for the first time. /// @@ -2738,6 +2720,12 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnec pub permissions: Option< Vec, >, + + /// List of data features that you would like to retrieve upon account creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub prefetch: Option< + Vec, + >, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -6078,6 +6066,44 @@ impl std::default::Default } } +/// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + Balances, +} + +impl CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef + for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display + for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default + for CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn default() -> Self { + Self::Balances + } +} + /// An enum representing the possible values of an `CreateCheckoutSessionPaymentMethodOptionsUsBankAccount`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/customer_cash_balance_transaction.rs b/src/resources/generated/customer_cash_balance_transaction.rs index 260503566..e2d8951bf 100644 --- a/src/resources/generated/customer_cash_balance_transaction.rs +++ b/src/resources/generated/customer_cash_balance_transaction.rs @@ -4,7 +4,7 @@ use crate::ids::{CustomerCashBalanceTransactionId}; use crate::params::{Expandable, Object, Timestamp}; -use crate::resources::{Currency, Customer, PaymentIntent, Refund}; +use crate::resources::{BalanceTransaction, Currency, Customer, PaymentIntent, Refund}; use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "CustomerCashBalanceTransaction". @@ -15,6 +15,9 @@ pub struct CustomerCashBalanceTransaction { /// Unique identifier for the object. pub id: CustomerCashBalanceTransactionId, + #[serde(skip_serializing_if = "Option::is_none")] + pub adjusted_for_overdraft: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub applied_to_payment: Option, @@ -71,6 +74,16 @@ impl Object for CustomerCashBalanceTransaction { } } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraft { + + /// The [Balance Transaction](docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. + pub balance_transaction: Expandable, + + /// The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. + pub linked_transaction: Expandable, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction { @@ -253,6 +266,7 @@ impl std::default::Default for CustomerBalanceResourceCashBalanceTransactionReso #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] pub enum CustomerCashBalanceTransactionType { + AdjustedForOverdraft, AppliedToPayment, Funded, FundingReversed, @@ -265,6 +279,7 @@ pub enum CustomerCashBalanceTransactionType { impl CustomerCashBalanceTransactionType { pub fn as_str(self) -> &'static str { match self { + CustomerCashBalanceTransactionType::AdjustedForOverdraft => "adjusted_for_overdraft", CustomerCashBalanceTransactionType::AppliedToPayment => "applied_to_payment", CustomerCashBalanceTransactionType::Funded => "funded", CustomerCashBalanceTransactionType::FundingReversed => "funding_reversed", @@ -289,6 +304,6 @@ impl std::fmt::Display for CustomerCashBalanceTransactionType { } impl std::default::Default for CustomerCashBalanceTransactionType { fn default() -> Self { - Self::AppliedToPayment + Self::AdjustedForOverdraft } } diff --git a/src/resources/generated/dispute.rs b/src/resources/generated/dispute.rs index 72c15b2ff..348b35f2d 100644 --- a/src/resources/generated/dispute.rs +++ b/src/resources/generated/dispute.rs @@ -62,6 +62,9 @@ pub struct Dispute { /// ID of the PaymentIntent that was disputed. pub payment_intent: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub payment_method_details: Option, + /// Reason given by cardholder for dispute. /// /// Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. @@ -70,7 +73,7 @@ pub struct Dispute { /// Current status of dispute. /// - /// Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`. + /// Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. pub status: DisputeStatus, } @@ -219,6 +222,29 @@ pub struct DisputeEvidenceDetails { pub submission_count: u64, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct DisputePaymentMethodDetails { + /// Card specific dispute details. + pub card: Option, + + /// Payment method type. + #[serde(rename = "type")] + pub type_: DisputePaymentMethodDetailsType, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct DisputePaymentMethodDetailsCard { + /// Card brand. + /// + /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + pub brand: String, + + /// The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. + /// + /// The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. + pub network_reason_code: Option, +} + /// The parameters for `Dispute::list`. #[derive(Clone, Debug, Serialize, Default)] pub struct ListDisputes<'a> { @@ -277,11 +303,42 @@ impl Paginable for ListDisputes<'_> { self.starting_after = Some(item.id()); } } +/// An enum representing the possible values of an `DisputePaymentMethodDetails`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum DisputePaymentMethodDetailsType { + Card, +} + +impl DisputePaymentMethodDetailsType { + pub fn as_str(self) -> &'static str { + match self { + DisputePaymentMethodDetailsType::Card => "card", + } + } +} + +impl AsRef for DisputePaymentMethodDetailsType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for DisputePaymentMethodDetailsType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for DisputePaymentMethodDetailsType { + fn default() -> Self { + Self::Card + } +} + /// An enum representing the possible values of an `Dispute`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] pub enum DisputeStatus { - ChargeRefunded, Lost, NeedsResponse, UnderReview, @@ -294,7 +351,6 @@ pub enum DisputeStatus { impl DisputeStatus { pub fn as_str(self) -> &'static str { match self { - DisputeStatus::ChargeRefunded => "charge_refunded", DisputeStatus::Lost => "lost", DisputeStatus::NeedsResponse => "needs_response", DisputeStatus::UnderReview => "under_review", @@ -319,6 +375,6 @@ impl std::fmt::Display for DisputeStatus { } impl std::default::Default for DisputeStatus { fn default() -> Self { - Self::ChargeRefunded + Self::Lost } } diff --git a/src/resources/generated/financial_connections_session.rs b/src/resources/generated/financial_connections_session.rs index a6766857f..c32276e9b 100644 --- a/src/resources/generated/financial_connections_session.rs +++ b/src/resources/generated/financial_connections_session.rs @@ -34,6 +34,9 @@ pub struct FinancialConnectionsSession { /// Permissions requested for accounts collected during this session. pub permissions: Vec, + /// Data features requested to be retrieved upon account creation. + pub prefetch: Option>, + /// For webview integrations only. /// /// Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. @@ -88,6 +91,10 @@ pub struct CreateFinancialConnectionsSession<'a> { /// Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. pub permissions: Vec, + /// List of data features that you would like to retrieve upon account creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub prefetch: Option>, + /// For webview integrations only. /// /// Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. @@ -102,6 +109,7 @@ impl<'a> CreateFinancialConnectionsSession<'a> { expand: Default::default(), filters: Default::default(), permissions, + prefetch: Default::default(), return_url: Default::default(), } } @@ -206,6 +214,40 @@ impl std::default::Default for CreateFinancialConnectionsSessionPermissions { } } +/// An enum representing the possible values of an `CreateFinancialConnectionsSession`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateFinancialConnectionsSessionPrefetch { + Balances, + Ownership, +} + +impl CreateFinancialConnectionsSessionPrefetch { + pub fn as_str(self) -> &'static str { + match self { + CreateFinancialConnectionsSessionPrefetch::Balances => "balances", + CreateFinancialConnectionsSessionPrefetch::Ownership => "ownership", + } + } +} + +impl AsRef for CreateFinancialConnectionsSessionPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateFinancialConnectionsSessionPrefetch { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateFinancialConnectionsSessionPrefetch { + fn default() -> Self { + Self::Balances + } +} + /// An enum representing the possible values of an `FinancialConnectionsSession`'s `permissions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -243,3 +285,37 @@ impl std::default::Default for FinancialConnectionsSessionPermissions { Self::Balances } } + +/// An enum representing the possible values of an `FinancialConnectionsSession`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum FinancialConnectionsSessionPrefetch { + Balances, + Ownership, +} + +impl FinancialConnectionsSessionPrefetch { + pub fn as_str(self) -> &'static str { + match self { + FinancialConnectionsSessionPrefetch::Balances => "balances", + FinancialConnectionsSessionPrefetch::Ownership => "ownership", + } + } +} + +impl AsRef for FinancialConnectionsSessionPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for FinancialConnectionsSessionPrefetch { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for FinancialConnectionsSessionPrefetch { + fn default() -> Self { + Self::Balances + } +} diff --git a/src/resources/generated/invoice.rs b/src/resources/generated/invoice.rs index f359a1e8a..f3f29c77f 100644 --- a/src/resources/generated/invoice.rs +++ b/src/resources/generated/invoice.rs @@ -673,7 +673,6 @@ pub struct SubscriptionDetailsData { /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will reflect the metadata of the subscription at the time of invoice creation. /// /// *Note: This attribute is populated only for invoices created on or after June 29, 2023.*. - #[serde(default)] pub metadata: Metadata, } @@ -1322,6 +1321,10 @@ pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancia /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. #[serde(skip_serializing_if = "Option::is_none")] pub permissions: Option>, + + /// List of data features that you would like to retrieve upon account creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub prefetch: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -1759,6 +1762,44 @@ impl std::default::Default } } +/// An enum representing the possible values of an `CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + Balances, +} + +impl CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef + for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display + for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default + for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn default() -> Self { + Self::Balances + } +} + /// An enum representing the possible values of an `CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccount`'s `verification_method` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/invoice_payment_method_options_us_bank_account.rs b/src/resources/generated/invoice_payment_method_options_us_bank_account.rs index de7dcbc4e..e742f3468 100644 --- a/src/resources/generated/invoice_payment_method_options_us_bank_account.rs +++ b/src/resources/generated/invoice_payment_method_options_us_bank_account.rs @@ -23,6 +23,9 @@ pub struct InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions { #[serde(skip_serializing_if = "Option::is_none")] pub permissions: Option>, + + /// Data features requested to be retrieved upon account creation. + pub prefetch: Option>, } /// An enum representing the possible values of an `InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions`'s `permissions` field. @@ -63,6 +66,42 @@ impl std::default::Default } } +/// An enum representing the possible values of an `InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { + Balances, +} + +impl InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch::Balances => { + "balances" + } + } + } +} + +impl AsRef for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default + for InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetch +{ + fn default() -> Self { + Self::Balances + } +} + /// An enum representing the possible values of an `InvoicePaymentMethodOptionsUsBankAccount`'s `verification_method` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/linked_account_options_us_bank_account.rs b/src/resources/generated/linked_account_options_us_bank_account.rs index 7c2a30d3f..1ed512a17 100644 --- a/src/resources/generated/linked_account_options_us_bank_account.rs +++ b/src/resources/generated/linked_account_options_us_bank_account.rs @@ -13,6 +13,9 @@ pub struct LinkedAccountOptionsUsBankAccount { #[serde(skip_serializing_if = "Option::is_none")] pub permissions: Option>, + /// Data features requested to be retrieved upon account creation. + pub prefetch: Option>, + /// For webview integrations only. /// /// Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. @@ -57,3 +60,35 @@ impl std::default::Default for LinkedAccountOptionsUsBankAccountPermissions { Self::Balances } } + +/// An enum representing the possible values of an `LinkedAccountOptionsUsBankAccount`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum LinkedAccountOptionsUsBankAccountPrefetch { + Balances, +} + +impl LinkedAccountOptionsUsBankAccountPrefetch { + pub fn as_str(self) -> &'static str { + match self { + LinkedAccountOptionsUsBankAccountPrefetch::Balances => "balances", + } + } +} + +impl AsRef for LinkedAccountOptionsUsBankAccountPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for LinkedAccountOptionsUsBankAccountPrefetch { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for LinkedAccountOptionsUsBankAccountPrefetch { + fn default() -> Self { + Self::Balances + } +} diff --git a/src/resources/generated/mandate.rs b/src/resources/generated/mandate.rs index 634c1e566..ffd5600e5 100644 --- a/src/resources/generated/mandate.rs +++ b/src/resources/generated/mandate.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; use crate::client::{Client, Response}; use crate::ids::MandateId; use crate::params::{Expand, Expandable, Object, Timestamp}; -use crate::resources::{Currency, MandateOptionsOffSessionDetailsBlik, PaymentMethod}; +use crate::resources::{Currency, PaymentMethod}; /// The resource representing a Stripe "Mandate". /// @@ -94,9 +94,6 @@ pub struct MandatePaymentMethodDetails { #[serde(skip_serializing_if = "Option::is_none")] pub bacs_debit: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub blik: Option, - #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, @@ -166,19 +163,6 @@ pub struct MandateBacsDebit { pub url: String, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct MandateBlik { - /// Date at which the mandate expires. - pub expires_after: Option, - - #[serde(skip_serializing_if = "Option::is_none")] - pub off_session: Option, - - /// Type of the mandate. - #[serde(rename = "type")] - pub type_: Option, -} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct MandateCashapp {} @@ -410,40 +394,6 @@ impl std::default::Default for MandateBacsDebitNetworkStatus { } } -/// An enum representing the possible values of an `MandateBlik`'s `type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum MandateBlikType { - OffSession, - OnSession, -} - -impl MandateBlikType { - pub fn as_str(self) -> &'static str { - match self { - MandateBlikType::OffSession => "off_session", - MandateBlikType::OnSession => "on_session", - } - } -} - -impl AsRef for MandateBlikType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for MandateBlikType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for MandateBlikType { - fn default() -> Self { - Self::OffSession - } -} - /// An enum representing the possible values of an `Mandate`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/mandate_options_off_session_details_blik.rs b/src/resources/generated/mandate_options_off_session_details_blik.rs deleted file mode 100644 index d219e2716..000000000 --- a/src/resources/generated/mandate_options_off_session_details_blik.rs +++ /dev/null @@ -1,61 +0,0 @@ -// ====================================== -// This file was automatically generated. -// ====================================== - -use serde::{Deserialize, Serialize}; - -use crate::resources::Currency; - -/// The resource representing a Stripe "mandate_options_off_session_details_blik". -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct MandateOptionsOffSessionDetailsBlik { - /// Amount of each recurring payment. - pub amount: Option, - - /// Currency of each recurring payment. - pub currency: Option, - - /// Frequency interval of each recurring payment. - pub interval: Option, - - /// Frequency indicator of each recurring payment. - pub interval_count: Option, -} - -/// An enum representing the possible values of an `MandateOptionsOffSessionDetailsBlik`'s `interval` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum MandateOptionsOffSessionDetailsBlikInterval { - Day, - Month, - Week, - Year, -} - -impl MandateOptionsOffSessionDetailsBlikInterval { - pub fn as_str(self) -> &'static str { - match self { - MandateOptionsOffSessionDetailsBlikInterval::Day => "day", - MandateOptionsOffSessionDetailsBlikInterval::Month => "month", - MandateOptionsOffSessionDetailsBlikInterval::Week => "week", - MandateOptionsOffSessionDetailsBlikInterval::Year => "year", - } - } -} - -impl AsRef for MandateOptionsOffSessionDetailsBlikInterval { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for MandateOptionsOffSessionDetailsBlikInterval { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for MandateOptionsOffSessionDetailsBlikInterval { - fn default() -> Self { - Self::Day - } -} diff --git a/src/resources/generated/payment_intent.rs b/src/resources/generated/payment_intent.rs index f672906bf..afced3728 100644 --- a/src/resources/generated/payment_intent.rs +++ b/src/resources/generated/payment_intent.rs @@ -182,7 +182,7 @@ pub struct PaymentIntent { /// A string that identifies the resulting payment as part of a group. /// - /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. pub transfer_group: Option, } @@ -1624,7 +1624,7 @@ pub struct CreatePaymentIntent<'a> { /// A string that identifies the resulting payment as part of a group. /// - /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. #[serde(skip_serializing_if = "Option::is_none")] pub transfer_group: Option<&'a str>, @@ -4436,6 +4436,12 @@ pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnecti Vec, >, + /// List of data features that you would like to retrieve upon account creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub prefetch: Option< + Vec, + >, + /// For webview integrations only. /// /// Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. @@ -4616,6 +4622,12 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnecti Vec, >, + /// List of data features that you would like to retrieve upon account creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub prefetch: Option< + Vec, + >, + /// For webview integrations only. /// /// Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. @@ -7390,6 +7402,44 @@ impl std::default::Default } } +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + Balances, +} + +impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef + for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display + for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default + for CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn default() -> Self { + Self::Balances + } +} + /// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks`'s `requested` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -12629,6 +12679,44 @@ impl std::default::Default } } +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + Balances, +} + +impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef + for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display + for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default + for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn default() -> Self { + Self::Balances + } +} + /// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks`'s `requested` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/payment_link.rs b/src/resources/generated/payment_link.rs index 754145cae..07a68c3c2 100644 --- a/src/resources/generated/payment_link.rs +++ b/src/resources/generated/payment_link.rs @@ -678,7 +678,7 @@ pub struct UpdatePaymentLink<'a> { /// The list of payment method types that customers can use. /// - /// Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + /// Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). #[serde(skip_serializing_if = "Option::is_none")] pub payment_method_types: Option>, diff --git a/src/resources/generated/payment_method.rs b/src/resources/generated/payment_method.rs index 9f1981e5e..e49638dc4 100644 --- a/src/resources/generated/payment_method.rs +++ b/src/resources/generated/payment_method.rs @@ -299,7 +299,7 @@ pub struct CardDetails { /// Uniquely identifies this particular card number. /// /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. #[serde(skip_serializing_if = "Option::is_none")] pub fingerprint: Option, @@ -388,7 +388,7 @@ pub struct CardPresent { /// Uniquely identifies this particular card number. /// /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. pub fingerprint: Option, /// Card funding type. @@ -605,7 +605,7 @@ pub struct PaymentMethodInteracPresent { /// Uniquely identifies this particular card number. /// /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. pub fingerprint: Option, /// Card funding type. @@ -663,12 +663,6 @@ pub struct PaymentMethodKonbini {} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodLink { - /// Two-letter ISO code representing the funding source (i.e. - /// - /// card, bank) country beneath the Link payment method. You could use this attribute to get a sense of the international breakdown of funding sources you've collected. - #[serde(skip_serializing_if = "Option::is_none")] - pub country: Option, - /// Account owner's email address. pub email: Option, @@ -1102,50 +1096,14 @@ impl Paginable for ListPaymentMethods<'_> { /// The parameters for `PaymentMethod::update`. #[derive(Clone, Debug, Serialize, Default)] pub struct UpdatePaymentMethod<'a> { - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub acss_debit: Option, - - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub affirm: Option, - - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub au_becs_debit: Option, - - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub bacs_debit: Option, - /// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. #[serde(skip_serializing_if = "Option::is_none")] pub billing_details: Option, - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub blik: Option, - /// If this is a `card` PaymentMethod, this hash contains the user's card details. #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub cashapp: Option, - /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] pub expand: &'a [&'a str], @@ -1162,40 +1120,20 @@ pub struct UpdatePaymentMethod<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option, - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub sepa_debit: Option, - /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, - - /// This is a legacy parameter that will be removed in the future. - /// - /// It is a hash that does not accept any keys. - #[serde(skip_serializing_if = "Option::is_none")] - pub zip: Option, } impl<'a> UpdatePaymentMethod<'a> { pub fn new() -> Self { UpdatePaymentMethod { - acss_debit: Default::default(), - affirm: Default::default(), - au_becs_debit: Default::default(), - bacs_debit: Default::default(), billing_details: Default::default(), - blik: Default::default(), card: Default::default(), - cashapp: Default::default(), expand: Default::default(), link: Default::default(), metadata: Default::default(), - sepa_debit: Default::default(), us_bank_account: Default::default(), - zip: Default::default(), } } } @@ -1379,30 +1317,9 @@ pub struct CreatePaymentMethodWechatPay {} #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodZip {} -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodAcssDebit {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodAffirm {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodAuBecsDebit {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodBacsDebit {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodBlik {} - -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodCashapp {} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodLink {} -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodSepaDebit {} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentMethodUsBankAccount { /// Bank account type. @@ -1410,9 +1327,6 @@ pub struct UpdatePaymentMethodUsBankAccount { pub account_holder_type: Option, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePaymentMethodZip {} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodKlarnaDob { /// The day of birth, between 1 and 31. @@ -2498,7 +2412,6 @@ pub enum PaymentMethodTypeFilter { Blik, Boleto, Card, - CardPresent, Cashapp, CustomerBalance, Eps, @@ -2535,7 +2448,6 @@ impl PaymentMethodTypeFilter { PaymentMethodTypeFilter::Blik => "blik", PaymentMethodTypeFilter::Boleto => "boleto", PaymentMethodTypeFilter::Card => "card", - PaymentMethodTypeFilter::CardPresent => "card_present", PaymentMethodTypeFilter::Cashapp => "cashapp", PaymentMethodTypeFilter::CustomerBalance => "customer_balance", PaymentMethodTypeFilter::Eps => "eps", diff --git a/src/resources/generated/payout.rs b/src/resources/generated/payout.rs index cfe9c41c8..c8f4aee53 100644 --- a/src/resources/generated/payout.rs +++ b/src/resources/generated/payout.rs @@ -70,8 +70,8 @@ pub struct Payout { /// The method used to send this payout, which can be `standard` or `instant`. /// - /// `instant` is only supported for payouts to debit cards. - /// (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.). + /// `instant` is supported for payouts to debit cards and bank accounts in certain countries. + /// (See [Bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks) for more information.). pub method: String, /// If the payout reverses another, this is the ID of the original payout. @@ -182,8 +182,8 @@ pub struct CreatePayout<'a> { /// The method used to send this payout, which can be `standard` or `instant`. /// - /// `instant` is only supported for payouts to debit cards. - /// (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).). + /// `instant` is supported for payouts to debit cards and bank accounts in certain countries. + /// (See [Bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks) for more information.). #[serde(skip_serializing_if = "Option::is_none")] pub method: Option, diff --git a/src/resources/generated/person.rs b/src/resources/generated/person.rs index be8219724..a80f9184a 100644 --- a/src/resources/generated/person.rs +++ b/src/resources/generated/person.rs @@ -322,10 +322,12 @@ pub enum AccountRequirementsErrorCode { InvalidStreetAddress, InvalidTosAcceptance, InvalidValueOther, + VerificationDirectorsMismatch, VerificationDocumentAddressMismatch, VerificationDocumentAddressMissing, VerificationDocumentCorrupt, VerificationDocumentCountryNotSupported, + VerificationDocumentDirectorsMismatch, VerificationDocumentDobMismatch, VerificationDocumentDuplicateType, VerificationDocumentExpired, @@ -351,6 +353,7 @@ pub enum AccountRequirementsErrorCode { VerificationDocumentPhotoMismatch, VerificationDocumentTooLarge, VerificationDocumentTypeNotSupported, + VerificationExtraneousDirectors, VerificationFailedAddressMatch, VerificationFailedBusinessIecNumber, VerificationFailedDocumentMatch, @@ -362,6 +365,7 @@ pub enum AccountRequirementsErrorCode { VerificationFailedResidentialAddress, VerificationFailedTaxIdMatch, VerificationFailedTaxIdNotIssued, + VerificationMissingDirectors, VerificationMissingExecutives, VerificationMissingOwners, VerificationRequiresAdditionalMemorandumOfAssociations, @@ -376,10 +380,12 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::InvalidStreetAddress => "invalid_street_address", AccountRequirementsErrorCode::InvalidTosAcceptance => "invalid_tos_acceptance", AccountRequirementsErrorCode::InvalidValueOther => "invalid_value_other", + AccountRequirementsErrorCode::VerificationDirectorsMismatch => "verification_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMismatch => "verification_document_address_mismatch", AccountRequirementsErrorCode::VerificationDocumentAddressMissing => "verification_document_address_missing", AccountRequirementsErrorCode::VerificationDocumentCorrupt => "verification_document_corrupt", AccountRequirementsErrorCode::VerificationDocumentCountryNotSupported => "verification_document_country_not_supported", + AccountRequirementsErrorCode::VerificationDocumentDirectorsMismatch => "verification_document_directors_mismatch", AccountRequirementsErrorCode::VerificationDocumentDobMismatch => "verification_document_dob_mismatch", AccountRequirementsErrorCode::VerificationDocumentDuplicateType => "verification_document_duplicate_type", AccountRequirementsErrorCode::VerificationDocumentExpired => "verification_document_expired", @@ -405,6 +411,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationDocumentPhotoMismatch => "verification_document_photo_mismatch", AccountRequirementsErrorCode::VerificationDocumentTooLarge => "verification_document_too_large", AccountRequirementsErrorCode::VerificationDocumentTypeNotSupported => "verification_document_type_not_supported", + AccountRequirementsErrorCode::VerificationExtraneousDirectors => "verification_extraneous_directors", AccountRequirementsErrorCode::VerificationFailedAddressMatch => "verification_failed_address_match", AccountRequirementsErrorCode::VerificationFailedBusinessIecNumber => "verification_failed_business_iec_number", AccountRequirementsErrorCode::VerificationFailedDocumentMatch => "verification_failed_document_match", @@ -416,6 +423,7 @@ impl AccountRequirementsErrorCode { AccountRequirementsErrorCode::VerificationFailedResidentialAddress => "verification_failed_residential_address", AccountRequirementsErrorCode::VerificationFailedTaxIdMatch => "verification_failed_tax_id_match", AccountRequirementsErrorCode::VerificationFailedTaxIdNotIssued => "verification_failed_tax_id_not_issued", + AccountRequirementsErrorCode::VerificationMissingDirectors => "verification_missing_directors", AccountRequirementsErrorCode::VerificationMissingExecutives => "verification_missing_executives", AccountRequirementsErrorCode::VerificationMissingOwners => "verification_missing_owners", AccountRequirementsErrorCode::VerificationRequiresAdditionalMemorandumOfAssociations => "verification_requires_additional_memorandum_of_associations", diff --git a/src/resources/generated/price.rs b/src/resources/generated/price.rs index 8645612dd..5b7f8414b 100644 --- a/src/resources/generated/price.rs +++ b/src/resources/generated/price.rs @@ -510,10 +510,6 @@ pub struct UpdatePrice<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub nickname: Option<&'a str>, - /// The recurring components of a price such as `interval` and `usage_type`. - #[serde(skip_serializing_if = "Option::is_none")] - pub recurring: Option, - /// Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. /// /// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. @@ -536,7 +532,6 @@ impl<'a> UpdatePrice<'a> { lookup_key: Default::default(), metadata: Default::default(), nickname: Default::default(), - recurring: Default::default(), tax_behavior: Default::default(), transfer_lookup_key: Default::default(), } @@ -760,13 +755,6 @@ pub struct UpdatePriceCurrencyOptions { pub unit_amount_decimal: Option, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdatePriceRecurring { - /// Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). - #[serde(skip_serializing_if = "Option::is_none")] - pub trial_period_days: Option, -} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePriceCurrencyOptionsCustomUnitAmount { /// Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. diff --git a/src/resources/generated/product.rs b/src/resources/generated/product.rs index dac375d4d..46418c7b1 100644 --- a/src/resources/generated/product.rs +++ b/src/resources/generated/product.rs @@ -24,28 +24,12 @@ pub struct Product { #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, - /// A list of up to 5 attributes that each SKU can provide values for (e.g., `["color", "size"]`). - #[serde(skip_serializing_if = "Option::is_none")] - pub attributes: Option>, - - /// A short one-line description of the product, meant to be displayable to the customer. - /// - /// Only applicable to products of `type=good`. - #[serde(skip_serializing_if = "Option::is_none")] - pub caption: Option, - /// Time at which the object was created. /// /// Measured in seconds since the Unix epoch. #[serde(skip_serializing_if = "Option::is_none")] pub created: Option, - /// An array of connect application identifiers that cannot purchase this product. - /// - /// Only applicable to products of `type=good`. - #[serde(skip_serializing_if = "Option::is_none")] - pub deactivate_on: Option>, - /// The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. #[serde(skip_serializing_if = "Option::is_none")] pub default_price: Option>, @@ -190,24 +174,6 @@ pub struct CreateProduct<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, - /// A list of up to 5 alphanumeric attributes. - /// - /// Should only be set if type=`good`. - #[serde(skip_serializing_if = "Option::is_none")] - pub attributes: Option>, - - /// A short one-line description of the product, meant to be displayable to the customer. - /// - /// May only be set if type=`good`. - #[serde(skip_serializing_if = "Option::is_none")] - pub caption: Option<&'a str>, - - /// An array of Connect application names or identifiers that should not be able to order the SKUs for this product. - /// - /// May only be set if type=`good`. - #[serde(skip_serializing_if = "Option::is_none")] - pub deactivate_on: Option>, - /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. /// /// This Price will be set as the default price for this product. @@ -289,9 +255,6 @@ impl<'a> CreateProduct<'a> { pub fn new(name: &'a str) -> Self { CreateProduct { active: Default::default(), - attributes: Default::default(), - caption: Default::default(), - deactivate_on: Default::default(), default_price_data: Default::default(), description: Default::default(), expand: Default::default(), @@ -394,25 +357,6 @@ pub struct UpdateProduct<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub active: Option, - /// A list of up to 5 alphanumeric attributes that each SKU can provide values for (e.g., `["color", "size"]`). - /// - /// If a value for `attributes` is specified, the list specified will replace the existing attributes list on this product. - /// Any attributes not present after the update will be deleted from the SKUs for this product. - #[serde(skip_serializing_if = "Option::is_none")] - pub attributes: Option>, - - /// A short one-line description of the product, meant to be displayable to the customer. - /// - /// May only be set if `type=good`. - #[serde(skip_serializing_if = "Option::is_none")] - pub caption: Option, - - /// An array of Connect application names or identifiers that should not be able to order the SKUs for this product. - /// - /// May only be set if `type=good`. - #[serde(skip_serializing_if = "Option::is_none")] - pub deactivate_on: Option>, - /// The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. #[serde(skip_serializing_if = "Option::is_none")] pub default_price: Option<&'a str>, @@ -480,9 +424,6 @@ impl<'a> UpdateProduct<'a> { pub fn new() -> Self { UpdateProduct { active: Default::default(), - attributes: Default::default(), - caption: Default::default(), - deactivate_on: Default::default(), default_price: Default::default(), description: Default::default(), expand: Default::default(), diff --git a/src/resources/generated/setup_attempt.rs b/src/resources/generated/setup_attempt.rs index 001d4f079..314cf12c9 100644 --- a/src/resources/generated/setup_attempt.rs +++ b/src/resources/generated/setup_attempt.rs @@ -10,7 +10,7 @@ use crate::params::{Expand, Expandable, List, Object, Paginable, RangeQuery, Tim use crate::resources::{ Account, ApiErrors, Application, Customer, Mandate, PaymentMethod, PaymentMethodDetailsCardChecks, PaymentMethodDetailsCardWalletApplePay, - PaymentMethodDetailsCardWalletGooglePay, SetupIntent, ThreeDSecureDetails, + PaymentMethodDetailsCardWalletGooglePay, SetupIntent, }; /// The resource representing a Stripe "PaymentFlowsSetupIntentSetupAttempt". @@ -103,9 +103,6 @@ pub struct SetupAttemptPaymentMethodDetails { #[serde(skip_serializing_if = "Option::is_none")] pub bancontact: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub blik: Option, - #[serde(skip_serializing_if = "Option::is_none")] pub boleto: Option, @@ -187,9 +184,6 @@ pub struct SetupAttemptPaymentMethodDetailsBancontact { pub verified_name: Option, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupAttemptPaymentMethodDetailsBlik {} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsBoleto {} @@ -223,7 +217,7 @@ pub struct SetupAttemptPaymentMethodDetailsCard { /// Uniquely identifies this particular card number. /// /// You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. - /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*. + /// For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*. #[serde(skip_serializing_if = "Option::is_none")] pub fingerprint: Option, @@ -356,6 +350,23 @@ pub struct SetupAttemptPaymentMethodDetailsSofort { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupAttemptPaymentMethodDetailsUsBankAccount {} +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ThreeDSecureDetails { + /// For authenticated transactions: how the customer was authenticated by + /// the issuing bank. + pub authentication_flow: Option, + + /// Indicates the outcome of 3D Secure authentication. + pub result: Option, + + /// Additional information about why 3D Secure succeeded or failed based + /// on the `result`. + pub result_reason: Option, + + /// The version of 3D Secure that was used. + pub version: Option, +} + /// The parameters for `SetupAttempt::list`. #[derive(Clone, Debug, Serialize)] pub struct ListSetupAttempts<'a> { @@ -690,3 +701,162 @@ impl std::default::Default for SetupAttemptPaymentMethodDetailsSofortPreferredLa Self::De } } + +/// An enum representing the possible values of an `ThreeDSecureDetails`'s `authentication_flow` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsAuthenticationFlow { + Challenge, + Frictionless, +} + +impl ThreeDSecureDetailsAuthenticationFlow { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsAuthenticationFlow::Challenge => "challenge", + ThreeDSecureDetailsAuthenticationFlow::Frictionless => "frictionless", + } + } +} + +impl AsRef for ThreeDSecureDetailsAuthenticationFlow { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsAuthenticationFlow { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsAuthenticationFlow { + fn default() -> Self { + Self::Challenge + } +} + +/// An enum representing the possible values of an `ThreeDSecureDetails`'s `result` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsResult { + AttemptAcknowledged, + Authenticated, + Exempted, + Failed, + NotSupported, + ProcessingError, +} + +impl ThreeDSecureDetailsResult { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsResult::AttemptAcknowledged => "attempt_acknowledged", + ThreeDSecureDetailsResult::Authenticated => "authenticated", + ThreeDSecureDetailsResult::Exempted => "exempted", + ThreeDSecureDetailsResult::Failed => "failed", + ThreeDSecureDetailsResult::NotSupported => "not_supported", + ThreeDSecureDetailsResult::ProcessingError => "processing_error", + } + } +} + +impl AsRef for ThreeDSecureDetailsResult { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsResult { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsResult { + fn default() -> Self { + Self::AttemptAcknowledged + } +} + +/// An enum representing the possible values of an `ThreeDSecureDetails`'s `result_reason` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsResultReason { + Abandoned, + Bypassed, + Canceled, + CardNotEnrolled, + NetworkNotSupported, + ProtocolError, + Rejected, +} + +impl ThreeDSecureDetailsResultReason { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsResultReason::Abandoned => "abandoned", + ThreeDSecureDetailsResultReason::Bypassed => "bypassed", + ThreeDSecureDetailsResultReason::Canceled => "canceled", + ThreeDSecureDetailsResultReason::CardNotEnrolled => "card_not_enrolled", + ThreeDSecureDetailsResultReason::NetworkNotSupported => "network_not_supported", + ThreeDSecureDetailsResultReason::ProtocolError => "protocol_error", + ThreeDSecureDetailsResultReason::Rejected => "rejected", + } + } +} + +impl AsRef for ThreeDSecureDetailsResultReason { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsResultReason { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsResultReason { + fn default() -> Self { + Self::Abandoned + } +} + +/// An enum representing the possible values of an `ThreeDSecureDetails`'s `version` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ThreeDSecureDetailsVersion { + #[serde(rename = "1.0.2")] + V1_0_2, + #[serde(rename = "2.1.0")] + V2_1_0, + #[serde(rename = "2.2.0")] + V2_2_0, +} + +impl ThreeDSecureDetailsVersion { + pub fn as_str(self) -> &'static str { + match self { + ThreeDSecureDetailsVersion::V1_0_2 => "1.0.2", + ThreeDSecureDetailsVersion::V2_1_0 => "2.1.0", + ThreeDSecureDetailsVersion::V2_2_0 => "2.2.0", + } + } +} + +impl AsRef for ThreeDSecureDetailsVersion { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ThreeDSecureDetailsVersion { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ThreeDSecureDetailsVersion { + fn default() -> Self { + Self::V1_0_2 + } +} diff --git a/src/resources/generated/setup_intent.rs b/src/resources/generated/setup_intent.rs index aa003a200..a6f3e5f1f 100644 --- a/src/resources/generated/setup_intent.rs +++ b/src/resources/generated/setup_intent.rs @@ -9,8 +9,8 @@ use crate::ids::{CustomerId, PaymentMethodId, SetupIntentId}; use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp}; use crate::resources::{ Account, ApiErrors, Application, Currency, Customer, LinkedAccountOptionsUsBankAccount, - Mandate, MandateOptionsOffSessionDetailsBlik, - PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentMethod, SetupAttempt, + Mandate, PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, PaymentMethod, + SetupAttempt, }; /// The resource representing a Stripe "SetupIntent". @@ -32,7 +32,7 @@ pub struct SetupIntent { #[serde(skip_serializing_if = "Option::is_none")] pub attach_to_self: Option, - /// Settings for automatic payment methods compatible with this Setup Intent. + /// Settings for dynamic payment methods compatible with this Setup Intent. pub automatic_payment_methods: Option, /// Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. @@ -227,9 +227,6 @@ pub struct SetupIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub blik: Option, - #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, @@ -259,12 +256,6 @@ pub struct SetupIntentPaymentMethodOptionsAcssDebit { pub verification_method: Option, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupIntentPaymentMethodOptionsBlik { - #[serde(skip_serializing_if = "Option::is_none")] - pub mandate_options: Option, -} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsCard { /// Configuration options for setting up an eMandate for cards issued in India. @@ -367,19 +358,6 @@ pub struct SetupIntentPaymentMethodOptionsMandateOptionsAcssDebit { Option, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct SetupIntentPaymentMethodOptionsMandateOptionsBlik { - /// Date at which the mandate expires. - pub expires_after: Option, - - #[serde(skip_serializing_if = "Option::is_none")] - pub off_session: Option, - - /// Type of the mandate. - #[serde(rename = "type")] - pub type_: Option, -} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SetupIntentPaymentMethodOptionsPaypal { /// The PayPal Billing Agreement ID (BAID). @@ -866,10 +844,6 @@ pub struct CreateSetupIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, - /// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub blik: Option, - /// Configuration for any card setup attempted on this SetupIntent. #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, @@ -1064,10 +1038,6 @@ pub struct UpdateSetupIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub acss_debit: Option, - /// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - #[serde(skip_serializing_if = "Option::is_none")] - pub blik: Option, - /// Configuration for any card setup attempted on this SetupIntent. #[serde(skip_serializing_if = "Option::is_none")] pub card: Option, @@ -1327,15 +1297,6 @@ pub struct CreateSetupIntentPaymentMethodOptionsAcssDebit { Option, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct CreateSetupIntentPaymentMethodOptionsBlik { - /// The 6-digit BLIK code that a customer has generated using their banking application. - /// - /// Can only be set on confirmation. - #[serde(skip_serializing_if = "Option::is_none")] - pub code: Option, -} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodOptionsCard { /// Configuration options for setting up an eMandate for cards issued in India. @@ -1624,15 +1585,6 @@ pub struct UpdateSetupIntentPaymentMethodOptionsAcssDebit { Option, } -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct UpdateSetupIntentPaymentMethodOptionsBlik { - /// The 6-digit BLIK code that a customer has generated using their banking application. - /// - /// Can only be set on confirmation. - #[serde(skip_serializing_if = "Option::is_none")] - pub code: Option, -} - #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodOptionsCard { /// Configuration options for setting up an eMandate for cards issued in India. @@ -1856,6 +1808,11 @@ pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnection Vec, >, + /// List of data features that you would like to retrieve upon account creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub prefetch: + Option>, + /// For webview integrations only. /// /// Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. @@ -2010,6 +1967,11 @@ pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnection Vec, >, + /// List of data features that you would like to retrieve upon account creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub prefetch: + Option>, + /// For webview integrations only. /// /// Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. @@ -3088,6 +3050,42 @@ impl std::default::Default } } +/// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + Balances, +} + +impl CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display + for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default + for CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn default() -> Self { + Self::Balances + } +} + /// An enum representing the possible values of an `CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworks`'s `requested` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3662,40 +3660,6 @@ impl std::default::Default } } -/// An enum representing the possible values of an `SetupIntentPaymentMethodOptionsMandateOptionsBlik`'s `type` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum SetupIntentPaymentMethodOptionsMandateOptionsBlikType { - OffSession, - OnSession, -} - -impl SetupIntentPaymentMethodOptionsMandateOptionsBlikType { - pub fn as_str(self) -> &'static str { - match self { - SetupIntentPaymentMethodOptionsMandateOptionsBlikType::OffSession => "off_session", - SetupIntentPaymentMethodOptionsMandateOptionsBlikType::OnSession => "on_session", - } - } -} - -impl AsRef for SetupIntentPaymentMethodOptionsMandateOptionsBlikType { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for SetupIntentPaymentMethodOptionsMandateOptionsBlikType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for SetupIntentPaymentMethodOptionsMandateOptionsBlikType { - fn default() -> Self { - Self::OffSession - } -} - /// An enum representing the possible values of an `SetupIntentPaymentMethodOptionsUsBankAccount`'s `verification_method` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -4774,6 +4738,42 @@ impl std::default::Default } } +/// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + Balances, +} + +impl UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + pub fn as_str(self) -> &'static str { + match self { + UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display + for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default + for UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + fn default() -> Self { + Self::Balances + } +} + /// An enum representing the possible values of an `UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworks`'s `requested` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/subscription.rs b/src/resources/generated/subscription.rs index 039f834a3..fda67bfa2 100644 --- a/src/resources/generated/subscription.rs +++ b/src/resources/generated/subscription.rs @@ -1622,6 +1622,10 @@ pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFin /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. #[serde(skip_serializing_if = "Option::is_none")] pub permissions: Option>, + + /// List of data features that you would like to retrieve upon account creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub prefetch: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -1676,6 +1680,10 @@ pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFin /// Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. #[serde(skip_serializing_if = "Option::is_none")] pub permissions: Option>, + + /// List of data features that you would like to retrieve upon account creation. + #[serde(skip_serializing_if = "Option::is_none")] + pub prefetch: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] @@ -2084,6 +2092,41 @@ impl std::default::Default for CreateSubscriptionPaymentSettingsPaymentMethodOpt } } +/// An enum representing the possible values of an `CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + Balances, +} + +impl + CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + pub fn as_str(self) -> &'static str { + match self { + CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn default() -> Self { + Self::Balances + } +} + /// An enum representing the possible values of an `CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount`'s `verification_method` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -3302,6 +3345,41 @@ impl std::default::Default for UpdateSubscriptionPaymentSettingsPaymentMethodOpt } } +/// An enum representing the possible values of an `UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`'s `prefetch` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + Balances, +} + +impl + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch +{ + pub fn as_str(self) -> &'static str { + match self { + UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch::Balances => "balances", + } + } +} + +impl AsRef for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsPrefetch { + fn default() -> Self { + Self::Balances + } +} + /// An enum representing the possible values of an `UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount`'s `verification_method` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/subscription_schedule.rs b/src/resources/generated/subscription_schedule.rs index 17b05eb3d..9fcf8ca20 100644 --- a/src/resources/generated/subscription_schedule.rs +++ b/src/resources/generated/subscription_schedule.rs @@ -200,7 +200,7 @@ pub struct SubscriptionSchedulePhaseConfiguration { pub end_date: Timestamp, /// The invoice settings applicable during this phase. - pub invoice_settings: Option, + pub invoice_settings: Option, /// Subscription items to configure the subscription to during this phase of the subscription schedule. pub items: Vec, @@ -232,7 +232,7 @@ pub struct SubscriptionSchedulePhaseConfiguration { } #[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct InvoiceSettingPhaseSetting { +pub struct InvoiceSettingSubscriptionSchedulePhaseSetting { /// Number of days within which a customer must pay invoices generated by this subscription schedule. /// /// This value will be `null` for subscription schedules where `billing=charge_automatically`. diff --git a/src/resources/generated/tax_rate.rs b/src/resources/generated/tax_rate.rs index 110a924ea..967df8436 100644 --- a/src/resources/generated/tax_rate.rs +++ b/src/resources/generated/tax_rate.rs @@ -39,7 +39,7 @@ pub struct TaxRate { /// Actual/effective tax rate percentage out of 100. /// - /// For tax calculations with automatic_tax[enabled]=true, this percentage does not include the statutory tax rate of non-taxable jurisdictions. + /// For tax calculations with automatic_tax[enabled]=true, this percentage reflects the rate actually used to calculate tax based on the product's taxability and whether the user is registered to collect taxes in the corresponding jurisdiction. pub effective_percentage: Option, /// This specifies if the tax rate is inclusive or exclusive. diff --git a/src/resources/generated/terminal_reader.rs b/src/resources/generated/terminal_reader.rs index 1ab1bf6b9..2fccdcbf4 100644 --- a/src/resources/generated/terminal_reader.rs +++ b/src/resources/generated/terminal_reader.rs @@ -128,10 +128,16 @@ pub struct TerminalReaderReaderResourceProcessSetupIntentAction { #[serde(skip_serializing_if = "Option::is_none")] pub generated_card: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub process_config: Option, + /// Most recent SetupIntent processed by the reader. pub setup_intent: Expandable, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TerminalReaderReaderResourceProcessSetupConfig {} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TerminalReaderReaderResourceRefundPaymentAction { /// The amount being refunded. diff --git a/src/resources/generated/three_d_secure_details.rs b/src/resources/generated/three_d_secure_details.rs deleted file mode 100644 index b85604545..000000000 --- a/src/resources/generated/three_d_secure_details.rs +++ /dev/null @@ -1,183 +0,0 @@ -// ====================================== -// This file was automatically generated. -// ====================================== - -use serde::{Deserialize, Serialize}; - -/// The resource representing a Stripe "three_d_secure_details". -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct ThreeDSecureDetails { - - /// For authenticated transactions: how the customer was authenticated by - /// the issuing bank. - pub authentication_flow: Option, - - /// Indicates the outcome of 3D Secure authentication. - pub result: Option, - - /// Additional information about why 3D Secure succeeded or failed based - /// on the `result`. - pub result_reason: Option, - - /// The version of 3D Secure that was used. - pub version: Option, -} - -/// An enum representing the possible values of an `ThreeDSecureDetails`'s `authentication_flow` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum ThreeDSecureDetailsAuthenticationFlow { - Challenge, - Frictionless, -} - -impl ThreeDSecureDetailsAuthenticationFlow { - pub fn as_str(self) -> &'static str { - match self { - ThreeDSecureDetailsAuthenticationFlow::Challenge => "challenge", - ThreeDSecureDetailsAuthenticationFlow::Frictionless => "frictionless", - } - } -} - -impl AsRef for ThreeDSecureDetailsAuthenticationFlow { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for ThreeDSecureDetailsAuthenticationFlow { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for ThreeDSecureDetailsAuthenticationFlow { - fn default() -> Self { - Self::Challenge - } -} - -/// An enum representing the possible values of an `ThreeDSecureDetails`'s `result` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum ThreeDSecureDetailsResult { - AttemptAcknowledged, - Authenticated, - Exempted, - Failed, - NotSupported, - ProcessingError, -} - -impl ThreeDSecureDetailsResult { - pub fn as_str(self) -> &'static str { - match self { - ThreeDSecureDetailsResult::AttemptAcknowledged => "attempt_acknowledged", - ThreeDSecureDetailsResult::Authenticated => "authenticated", - ThreeDSecureDetailsResult::Exempted => "exempted", - ThreeDSecureDetailsResult::Failed => "failed", - ThreeDSecureDetailsResult::NotSupported => "not_supported", - ThreeDSecureDetailsResult::ProcessingError => "processing_error", - } - } -} - -impl AsRef for ThreeDSecureDetailsResult { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for ThreeDSecureDetailsResult { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for ThreeDSecureDetailsResult { - fn default() -> Self { - Self::AttemptAcknowledged - } -} - -/// An enum representing the possible values of an `ThreeDSecureDetails`'s `result_reason` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum ThreeDSecureDetailsResultReason { - Abandoned, - Bypassed, - Canceled, - CardNotEnrolled, - NetworkNotSupported, - ProtocolError, - Rejected, -} - -impl ThreeDSecureDetailsResultReason { - pub fn as_str(self) -> &'static str { - match self { - ThreeDSecureDetailsResultReason::Abandoned => "abandoned", - ThreeDSecureDetailsResultReason::Bypassed => "bypassed", - ThreeDSecureDetailsResultReason::Canceled => "canceled", - ThreeDSecureDetailsResultReason::CardNotEnrolled => "card_not_enrolled", - ThreeDSecureDetailsResultReason::NetworkNotSupported => "network_not_supported", - ThreeDSecureDetailsResultReason::ProtocolError => "protocol_error", - ThreeDSecureDetailsResultReason::Rejected => "rejected", - } - } -} - -impl AsRef for ThreeDSecureDetailsResultReason { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for ThreeDSecureDetailsResultReason { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for ThreeDSecureDetailsResultReason { - fn default() -> Self { - Self::Abandoned - } -} - -/// An enum representing the possible values of an `ThreeDSecureDetails`'s `version` field. -#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum ThreeDSecureDetailsVersion { - #[serde(rename = "1.0.2")] - V1_0_2, - #[serde(rename = "2.1.0")] - V2_1_0, - #[serde(rename = "2.2.0")] - V2_2_0, -} - -impl ThreeDSecureDetailsVersion { - pub fn as_str(self) -> &'static str { - match self { - ThreeDSecureDetailsVersion::V1_0_2 => "1.0.2", - ThreeDSecureDetailsVersion::V2_1_0 => "2.1.0", - ThreeDSecureDetailsVersion::V2_2_0 => "2.2.0", - } - } -} - -impl AsRef for ThreeDSecureDetailsVersion { - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl std::fmt::Display for ThreeDSecureDetailsVersion { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - self.as_str().fmt(f) - } -} -impl std::default::Default for ThreeDSecureDetailsVersion { - fn default() -> Self { - Self::V1_0_2 - } -} diff --git a/src/resources/generated/version.rs b/src/resources/generated/version.rs index 8a98fdbc5..2d5a335b9 100644 --- a/src/resources/generated/version.rs +++ b/src/resources/generated/version.rs @@ -1,3 +1,3 @@ use crate::ApiVersion; -pub const VERSION: ApiVersion = ApiVersion::V2022_11_15; +pub const VERSION: ApiVersion = ApiVersion::V2023_08_16; diff --git a/src/resources/types.rs b/src/resources/types.rs index b0ccf607d..9e5bfa40a 100644 --- a/src/resources/types.rs +++ b/src/resources/types.rs @@ -192,6 +192,8 @@ pub enum ApiVersion { V2022_08_01, #[serde(rename = "2022-11-15")] V2022_11_15, + #[serde(rename = "2023-08-16")] + V2023_08_16, } impl ApiVersion { @@ -290,6 +292,7 @@ impl ApiVersion { ApiVersion::V2020_08_27 => "2020-08-27", ApiVersion::V2022_08_01 => "2022-08-01", ApiVersion::V2022_11_15 => "2022-11-15", + ApiVersion::V2023_08_16 => "2023-08-16", } } }