Skip to content

Commit

Permalink
feat: update stripe api
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon committed Dec 1, 2023
1 parent 7f243b3 commit 2cba3fe
Show file tree
Hide file tree
Showing 341 changed files with 10,609 additions and 3,705 deletions.
2 changes: 1 addition & 1 deletion openapi/version.json
@@ -1,3 +1,3 @@
{
"version": "v545"
"version": "v692"
}
367 changes: 328 additions & 39 deletions src/resources/generated/account.rs

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions src/resources/generated/account_application_authorized.rs
@@ -0,0 +1,10 @@
// ======================================
// This file was automatically generated.
// ======================================

use serde::{Deserialize, Serialize};

/// The resource representing a Stripe "account.application.authorized".
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct AccountApplicationAuthorized {
}
10 changes: 10 additions & 0 deletions src/resources/generated/account_application_deauthorized.rs
@@ -0,0 +1,10 @@
// ======================================
// This file was automatically generated.
// ======================================

use serde::{Deserialize, Serialize};

/// The resource representing a Stripe "account.application.deauthorized".
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct AccountApplicationDeauthorized {
}
10 changes: 10 additions & 0 deletions src/resources/generated/account_external_account_created.rs
@@ -0,0 +1,10 @@
// ======================================
// This file was automatically generated.
// ======================================

use serde::{Deserialize, Serialize};

/// The resource representing a Stripe "account.external_account.created".
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct AccountExternalAccountCreated {
}
10 changes: 10 additions & 0 deletions src/resources/generated/account_external_account_deleted.rs
@@ -0,0 +1,10 @@
// ======================================
// This file was automatically generated.
// ======================================

use serde::{Deserialize, Serialize};

/// The resource representing a Stripe "account.external_account.deleted".
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct AccountExternalAccountDeleted {
}
10 changes: 10 additions & 0 deletions src/resources/generated/account_external_account_updated.rs
@@ -0,0 +1,10 @@
// ======================================
// This file was automatically generated.
// ======================================

use serde::{Deserialize, Serialize};

/// The resource representing a Stripe "account.external_account.updated".
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct AccountExternalAccountUpdated {
}
8 changes: 5 additions & 3 deletions src/resources/generated/account_link.rs
Expand Up @@ -2,17 +2,17 @@
// This file was automatically generated.
// ======================================

use serde::{Deserialize, Serialize};

use crate::client::{Client, Response};
use crate::ids::AccountId;
use crate::ids::{AccountId};
use crate::params::{Expand, Object, Timestamp};
use serde::{Deserialize, Serialize};

/// The resource representing a Stripe "AccountLink".
///
/// For more details see <https://stripe.com/docs/api/account_links/object>
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct AccountLink {

/// Time at which the object was created.
///
/// Measured in seconds since the Unix epoch.
Expand All @@ -26,6 +26,7 @@ pub struct AccountLink {
}

impl AccountLink {

/// Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
pub fn create(client: &Client, params: CreateAccountLink<'_>) -> Response<AccountLink> {
client.post_form("/account_links", &params)
Expand All @@ -43,6 +44,7 @@ impl Object for AccountLink {
/// The parameters for `AccountLink::create`.
#[derive(Clone, Debug, Serialize)]
pub struct CreateAccountLink<'a> {

/// The identifier of the account to create an account link for.
pub account: AccountId,

Expand Down
4 changes: 2 additions & 2 deletions src/resources/generated/account_session.rs
Expand Up @@ -51,11 +51,11 @@ impl Object for AccountSession {
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct ConnectEmbeddedAccountSessionCreateComponents {

pub account_onboarding: ConnectEmbeddedBaseConfig,
pub account_onboarding: ConnectEmbeddedBaseConfigClaim,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct ConnectEmbeddedBaseConfig {
pub struct ConnectEmbeddedBaseConfigClaim {

/// Whether the embedded component is enabled.
pub enabled: bool,
Expand Down
10 changes: 10 additions & 0 deletions src/resources/generated/account_updated.rs
@@ -0,0 +1,10 @@
// ======================================
// This file was automatically generated.
// ======================================

use serde::{Deserialize, Serialize};

/// The resource representing a Stripe "account.updated".
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct AccountUpdated {
}
1 change: 1 addition & 0 deletions src/resources/generated/address.rs
Expand Up @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize};
/// The resource representing a Stripe "Address".
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct Address {

/// City, district, suburb, town, or village.
pub city: Option<String>,

Expand Down
96 changes: 31 additions & 65 deletions src/resources/generated/api_errors.rs
Expand Up @@ -2,13 +2,13 @@
// This file was automatically generated.
// ======================================

use serde::{Deserialize, Serialize};

use crate::resources::{PaymentIntent, PaymentMethod, PaymentSource, SetupIntent};
use serde::{Deserialize, Serialize};

/// The resource representing a Stripe "APIErrors".
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct ApiErrors {

/// For card errors, the ID of the failed charge.
#[serde(skip_serializing_if = "Option::is_none")]
pub charge: Option<String>,
Expand Down Expand Up @@ -84,6 +84,7 @@ pub enum ApiErrorsCode {
ApplicationFeesNotAllowed,
AuthenticationRequired,
BalanceInsufficient,
BalanceInvalidParameter,
BankAccountBadRoutingNumbers,
BankAccountDeclined,
BankAccountExists,
Expand Down Expand Up @@ -114,6 +115,7 @@ pub enum ApiErrorsCode {
DebitNotAuthorized,
EmailInvalid,
ExpiredCard,
FinancialConnectionsAccountInactive,
IdempotencyKeyInUse,
IncorrectAddress,
IncorrectCvc,
Expand Down Expand Up @@ -218,11 +220,13 @@ pub enum ApiErrorsCode {
TaxesCalculationFailed,
TerminalLocationCountryUnsupported,
TerminalReaderBusy,
TerminalReaderHardwareFault,
TerminalReaderOffline,
TerminalReaderTimeout,
TestmodeChargesOnly,
TlsVersionUnsupported,
TokenAlreadyUsed,
TokenCardNetworkInvalid,
TokenInUse,
TransferSourceBalanceParametersMismatch,
TransfersNotAllowed,
Expand All @@ -234,9 +238,7 @@ impl ApiErrorsCode {
match self {
ApiErrorsCode::AccountClosed => "account_closed",
ApiErrorsCode::AccountCountryInvalidAddress => "account_country_invalid_address",
ApiErrorsCode::AccountErrorCountryChangeRequiresAdditionalSteps => {
"account_error_country_change_requires_additional_steps"
}
ApiErrorsCode::AccountErrorCountryChangeRequiresAdditionalSteps => "account_error_country_change_requires_additional_steps",
ApiErrorsCode::AccountInformationMismatch => "account_information_mismatch",
ApiErrorsCode::AccountInvalid => "account_invalid",
ApiErrorsCode::AccountNumberInvalid => "account_number_invalid",
Expand All @@ -248,6 +250,7 @@ impl ApiErrorsCode {
ApiErrorsCode::ApplicationFeesNotAllowed => "application_fees_not_allowed",
ApiErrorsCode::AuthenticationRequired => "authentication_required",
ApiErrorsCode::BalanceInsufficient => "balance_insufficient",
ApiErrorsCode::BalanceInvalidParameter => "balance_invalid_parameter",
ApiErrorsCode::BankAccountBadRoutingNumbers => "bank_account_bad_routing_numbers",
ApiErrorsCode::BankAccountDeclined => "bank_account_declined",
ApiErrorsCode::BankAccountExists => "bank_account_exists",
Expand All @@ -257,9 +260,7 @@ impl ApiErrorsCode {
ApiErrorsCode::BankAccountVerificationFailed => "bank_account_verification_failed",
ApiErrorsCode::BillingInvalidMandate => "billing_invalid_mandate",
ApiErrorsCode::BitcoinUpgradeRequired => "bitcoin_upgrade_required",
ApiErrorsCode::CaptureChargeAuthorizationExpired => {
"capture_charge_authorization_expired"
}
ApiErrorsCode::CaptureChargeAuthorizationExpired => "capture_charge_authorization_expired",
ApiErrorsCode::CaptureUnauthorizedPayment => "capture_unauthorized_payment",
ApiErrorsCode::CardDeclineRateLimitExceeded => "card_decline_rate_limit_exceeded",
ApiErrorsCode::CardDeclined => "card_declined",
Expand All @@ -280,6 +281,7 @@ impl ApiErrorsCode {
ApiErrorsCode::DebitNotAuthorized => "debit_not_authorized",
ApiErrorsCode::EmailInvalid => "email_invalid",
ApiErrorsCode::ExpiredCard => "expired_card",
ApiErrorsCode::FinancialConnectionsAccountInactive => "financial_connections_account_inactive",
ApiErrorsCode::IdempotencyKeyInUse => "idempotency_key_in_use",
ApiErrorsCode::IncorrectAddress => "incorrect_address",
ApiErrorsCode::IncorrectCvc => "incorrect_cvc",
Expand All @@ -306,9 +308,7 @@ impl ApiErrorsCode {
ApiErrorsCode::InvoiceNoSubscriptionLineItems => "invoice_no_subscription_line_items",
ApiErrorsCode::InvoiceNotEditable => "invoice_not_editable",
ApiErrorsCode::InvoiceOnBehalfOfNotEditable => "invoice_on_behalf_of_not_editable",
ApiErrorsCode::InvoicePaymentIntentRequiresAction => {
"invoice_payment_intent_requires_action"
}
ApiErrorsCode::InvoicePaymentIntentRequiresAction => "invoice_payment_intent_requires_action",
ApiErrorsCode::InvoiceUpcomingNone => "invoice_upcoming_none",
ApiErrorsCode::LivemodeMismatch => "livemode_mismatch",
ApiErrorsCode::LockTimeout => "lock_timeout",
Expand All @@ -325,56 +325,28 @@ impl ApiErrorsCode {
ApiErrorsCode::ParameterUnknown => "parameter_unknown",
ApiErrorsCode::ParametersExclusive => "parameters_exclusive",
ApiErrorsCode::PaymentIntentActionRequired => "payment_intent_action_required",
ApiErrorsCode::PaymentIntentAuthenticationFailure => {
"payment_intent_authentication_failure"
}
ApiErrorsCode::PaymentIntentIncompatiblePaymentMethod => {
"payment_intent_incompatible_payment_method"
}
ApiErrorsCode::PaymentIntentAuthenticationFailure => "payment_intent_authentication_failure",
ApiErrorsCode::PaymentIntentIncompatiblePaymentMethod => "payment_intent_incompatible_payment_method",
ApiErrorsCode::PaymentIntentInvalidParameter => "payment_intent_invalid_parameter",
ApiErrorsCode::PaymentIntentKonbiniRejectedConfirmationNumber => {
"payment_intent_konbini_rejected_confirmation_number"
}
ApiErrorsCode::PaymentIntentKonbiniRejectedConfirmationNumber => "payment_intent_konbini_rejected_confirmation_number",
ApiErrorsCode::PaymentIntentMandateInvalid => "payment_intent_mandate_invalid",
ApiErrorsCode::PaymentIntentPaymentAttemptExpired => {
"payment_intent_payment_attempt_expired"
}
ApiErrorsCode::PaymentIntentPaymentAttemptFailed => {
"payment_intent_payment_attempt_failed"
}
ApiErrorsCode::PaymentIntentPaymentAttemptExpired => "payment_intent_payment_attempt_expired",
ApiErrorsCode::PaymentIntentPaymentAttemptFailed => "payment_intent_payment_attempt_failed",
ApiErrorsCode::PaymentIntentUnexpectedState => "payment_intent_unexpected_state",
ApiErrorsCode::PaymentMethodBankAccountAlreadyVerified => {
"payment_method_bank_account_already_verified"
}
ApiErrorsCode::PaymentMethodBankAccountAlreadyVerified => "payment_method_bank_account_already_verified",
ApiErrorsCode::PaymentMethodBankAccountBlocked => "payment_method_bank_account_blocked",
ApiErrorsCode::PaymentMethodBillingDetailsAddressMissing => {
"payment_method_billing_details_address_missing"
}
ApiErrorsCode::PaymentMethodConfigurationFailures => {
"payment_method_configuration_failures"
}
ApiErrorsCode::PaymentMethodBillingDetailsAddressMissing => "payment_method_billing_details_address_missing",
ApiErrorsCode::PaymentMethodConfigurationFailures => "payment_method_configuration_failures",
ApiErrorsCode::PaymentMethodCurrencyMismatch => "payment_method_currency_mismatch",
ApiErrorsCode::PaymentMethodCustomerDecline => "payment_method_customer_decline",
ApiErrorsCode::PaymentMethodInvalidParameter => "payment_method_invalid_parameter",
ApiErrorsCode::PaymentMethodInvalidParameterTestmode => {
"payment_method_invalid_parameter_testmode"
}
ApiErrorsCode::PaymentMethodInvalidParameterTestmode => "payment_method_invalid_parameter_testmode",
ApiErrorsCode::PaymentMethodMicrodepositFailed => "payment_method_microdeposit_failed",
ApiErrorsCode::PaymentMethodMicrodepositVerificationAmountsInvalid => {
"payment_method_microdeposit_verification_amounts_invalid"
}
ApiErrorsCode::PaymentMethodMicrodepositVerificationAmountsMismatch => {
"payment_method_microdeposit_verification_amounts_mismatch"
}
ApiErrorsCode::PaymentMethodMicrodepositVerificationAttemptsExceeded => {
"payment_method_microdeposit_verification_attempts_exceeded"
}
ApiErrorsCode::PaymentMethodMicrodepositVerificationDescriptorCodeMismatch => {
"payment_method_microdeposit_verification_descriptor_code_mismatch"
}
ApiErrorsCode::PaymentMethodMicrodepositVerificationTimeout => {
"payment_method_microdeposit_verification_timeout"
}
ApiErrorsCode::PaymentMethodMicrodepositVerificationAmountsInvalid => "payment_method_microdeposit_verification_amounts_invalid",
ApiErrorsCode::PaymentMethodMicrodepositVerificationAmountsMismatch => "payment_method_microdeposit_verification_amounts_mismatch",
ApiErrorsCode::PaymentMethodMicrodepositVerificationAttemptsExceeded => "payment_method_microdeposit_verification_attempts_exceeded",
ApiErrorsCode::PaymentMethodMicrodepositVerificationDescriptorCodeMismatch => "payment_method_microdeposit_verification_descriptor_code_mismatch",
ApiErrorsCode::PaymentMethodMicrodepositVerificationTimeout => "payment_method_microdeposit_verification_timeout",
ApiErrorsCode::PaymentMethodNotAvailable => "payment_method_not_available",
ApiErrorsCode::PaymentMethodProviderDecline => "payment_method_provider_decline",
ApiErrorsCode::PaymentMethodProviderTimeout => "payment_method_provider_timeout",
Expand All @@ -389,9 +361,7 @@ impl ApiErrorsCode {
ApiErrorsCode::PostalCodeInvalid => "postal_code_invalid",
ApiErrorsCode::ProcessingError => "processing_error",
ApiErrorsCode::ProductInactive => "product_inactive",
ApiErrorsCode::ProgressiveOnboardingLimitExceeded => {
"progressive_onboarding_limit_exceeded"
}
ApiErrorsCode::ProgressiveOnboardingLimitExceeded => "progressive_onboarding_limit_exceeded",
ApiErrorsCode::RateLimit => "rate_limit",
ApiErrorsCode::ReferToCustomer => "refer_to_customer",
ApiErrorsCode::RefundDisputedPayment => "refund_disputed_payment",
Expand All @@ -402,9 +372,7 @@ impl ApiErrorsCode {
ApiErrorsCode::SecretKeyRequired => "secret_key_required",
ApiErrorsCode::SepaUnsupportedAccount => "sepa_unsupported_account",
ApiErrorsCode::SetupAttemptFailed => "setup_attempt_failed",
ApiErrorsCode::SetupIntentAuthenticationFailure => {
"setup_intent_authentication_failure"
}
ApiErrorsCode::SetupIntentAuthenticationFailure => "setup_intent_authentication_failure",
ApiErrorsCode::SetupIntentInvalidParameter => "setup_intent_invalid_parameter",
ApiErrorsCode::SetupIntentMandateInvalid => "setup_intent_mandate_invalid",
ApiErrorsCode::SetupIntentSetupAttemptExpired => "setup_intent_setup_attempt_expired",
Expand All @@ -416,19 +384,17 @@ impl ApiErrorsCode {
ApiErrorsCode::StripeTaxInactive => "stripe_tax_inactive",
ApiErrorsCode::TaxIdInvalid => "tax_id_invalid",
ApiErrorsCode::TaxesCalculationFailed => "taxes_calculation_failed",
ApiErrorsCode::TerminalLocationCountryUnsupported => {
"terminal_location_country_unsupported"
}
ApiErrorsCode::TerminalLocationCountryUnsupported => "terminal_location_country_unsupported",
ApiErrorsCode::TerminalReaderBusy => "terminal_reader_busy",
ApiErrorsCode::TerminalReaderHardwareFault => "terminal_reader_hardware_fault",
ApiErrorsCode::TerminalReaderOffline => "terminal_reader_offline",
ApiErrorsCode::TerminalReaderTimeout => "terminal_reader_timeout",
ApiErrorsCode::TestmodeChargesOnly => "testmode_charges_only",
ApiErrorsCode::TlsVersionUnsupported => "tls_version_unsupported",
ApiErrorsCode::TokenAlreadyUsed => "token_already_used",
ApiErrorsCode::TokenCardNetworkInvalid => "token_card_network_invalid",
ApiErrorsCode::TokenInUse => "token_in_use",
ApiErrorsCode::TransferSourceBalanceParametersMismatch => {
"transfer_source_balance_parameters_mismatch"
}
ApiErrorsCode::TransferSourceBalanceParametersMismatch => "transfer_source_balance_parameters_mismatch",
ApiErrorsCode::TransfersNotAllowed => "transfers_not_allowed",
ApiErrorsCode::UrlInvalid => "url_invalid",
}
Expand Down
5 changes: 2 additions & 3 deletions src/resources/generated/application.rs
Expand Up @@ -2,11 +2,10 @@
// This file was automatically generated.
// ======================================

use crate::ids::{ApplicationId};
use crate::params::{Object};
use serde::{Deserialize, Serialize};

use crate::ids::ApplicationId;
use crate::params::Object;

/// The resource representing a Stripe "Application".
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct Application {
Expand Down

0 comments on commit 2cba3fe

Please sign in to comment.