Skip to content

Commit

Permalink
Generate latest changes from OpenApi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon committed Sep 5, 2023
1 parent 7c75741 commit fbf34ab
Show file tree
Hide file tree
Showing 36 changed files with 1,107 additions and 635 deletions.
2 changes: 1 addition & 1 deletion openapi/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "v446"
"version": "v484"
}
1 change: 0 additions & 1 deletion src/resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*,
Expand Down
1 change: 0 additions & 1 deletion src/resources/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
22 changes: 19 additions & 3 deletions src/resources/generated/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Account> {
client.post_form(&format!("/accounts/{}", id), &params)
Expand All @@ -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<Deleted<AccountId>> {
client.delete(&format!("/accounts/{}", id))
}
Expand Down Expand Up @@ -1460,7 +1460,7 @@ pub struct PersonParams {
#[serde(skip_serializing_if = "Option::is_none")]
pub gender: Option<String>,

/// The government-issued ID number of the individual, as appropriate for the representatives 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).
Expand Down Expand Up @@ -3820,10 +3820,12 @@ pub enum AccountRequirementsErrorCode {
InvalidStreetAddress,
InvalidTosAcceptance,
InvalidValueOther,
VerificationDirectorsMismatch,
VerificationDocumentAddressMismatch,
VerificationDocumentAddressMissing,
VerificationDocumentCorrupt,
VerificationDocumentCountryNotSupported,
VerificationDocumentDirectorsMismatch,
VerificationDocumentDobMismatch,
VerificationDocumentDuplicateType,
VerificationDocumentExpired,
Expand All @@ -3849,6 +3851,7 @@ pub enum AccountRequirementsErrorCode {
VerificationDocumentPhotoMismatch,
VerificationDocumentTooLarge,
VerificationDocumentTypeNotSupported,
VerificationExtraneousDirectors,
VerificationFailedAddressMatch,
VerificationFailedBusinessIecNumber,
VerificationFailedDocumentMatch,
Expand All @@ -3860,6 +3863,7 @@ pub enum AccountRequirementsErrorCode {
VerificationFailedResidentialAddress,
VerificationFailedTaxIdMatch,
VerificationFailedTaxIdNotIssued,
VerificationMissingDirectors,
VerificationMissingExecutives,
VerificationMissingOwners,
VerificationRequiresAdditionalMemorandumOfAssociations,
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -4053,6 +4061,7 @@ pub enum CompanyParamsStructure {
GovernmentInstrumentality,
GovernmentalUnit,
IncorporatedNonProfit,
IncorporatedPartnership,
LimitedLiabilityPartnership,
Llc,
MultiMemberLlc,
Expand All @@ -4068,6 +4077,7 @@ pub enum CompanyParamsStructure {
TaxExemptGovernmentInstrumentality,
UnincorporatedAssociation,
UnincorporatedNonProfit,
UnincorporatedPartnership,
}

impl CompanyParamsStructure {
Expand All @@ -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",
Expand All @@ -4095,6 +4106,7 @@ impl CompanyParamsStructure {
}
CompanyParamsStructure::UnincorporatedAssociation => "unincorporated_association",
CompanyParamsStructure::UnincorporatedNonProfit => "unincorporated_non_profit",
CompanyParamsStructure::UnincorporatedPartnership => "unincorporated_partnership",
}
}
}
Expand Down Expand Up @@ -4125,6 +4137,7 @@ pub enum CompanyStructure {
GovernmentInstrumentality,
GovernmentalUnit,
IncorporatedNonProfit,
IncorporatedPartnership,
LimitedLiabilityPartnership,
Llc,
MultiMemberLlc,
Expand All @@ -4140,6 +4153,7 @@ pub enum CompanyStructure {
TaxExemptGovernmentInstrumentality,
UnincorporatedAssociation,
UnincorporatedNonProfit,
UnincorporatedPartnership,
}

impl CompanyStructure {
Expand All @@ -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",
Expand All @@ -4167,6 +4182,7 @@ impl CompanyStructure {
}
CompanyStructure::UnincorporatedAssociation => "unincorporated_association",
CompanyStructure::UnincorporatedNonProfit => "unincorporated_non_profit",
CompanyStructure::UnincorporatedPartnership => "unincorporated_partnership",
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions src/resources/generated/account_link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,13 @@ impl std::default::Default for AccountLinkCollect {
pub enum AccountLinkType {
AccountOnboarding,
AccountUpdate,
CustomAccountUpdate,
CustomAccountVerification,
}

impl AccountLinkType {
pub fn as_str(self) -> &'static str {
match self {
AccountLinkType::AccountOnboarding => "account_onboarding",
AccountLinkType::AccountUpdate => "account_update",
AccountLinkType::CustomAccountUpdate => "custom_account_update",
AccountLinkType::CustomAccountVerification => "custom_account_verification",
}
}
}
Expand Down
11 changes: 4 additions & 7 deletions src/resources/generated/balance_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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<RangeQuery<Timestamp>>,

#[serde(skip_serializing_if = "Option::is_none")]
pub created: Option<RangeQuery<Timestamp>>,

Expand Down Expand Up @@ -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>,
Expand All @@ -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(),
Expand Down Expand Up @@ -232,6 +227,7 @@ pub enum BalanceTransactionType {
Payment,
PaymentFailureRefund,
PaymentRefund,
PaymentReversal,
Payout,
PayoutCancel,
PayoutFailure,
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions src/resources/generated/bank_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,12 @@ pub enum AccountRequirementsErrorCode {
InvalidStreetAddress,
InvalidTosAcceptance,
InvalidValueOther,
VerificationDirectorsMismatch,
VerificationDocumentAddressMismatch,
VerificationDocumentAddressMissing,
VerificationDocumentCorrupt,
VerificationDocumentCountryNotSupported,
VerificationDocumentDirectorsMismatch,
VerificationDocumentDobMismatch,
VerificationDocumentDuplicateType,
VerificationDocumentExpired,
Expand All @@ -192,6 +194,7 @@ pub enum AccountRequirementsErrorCode {
VerificationDocumentPhotoMismatch,
VerificationDocumentTooLarge,
VerificationDocumentTypeNotSupported,
VerificationExtraneousDirectors,
VerificationFailedAddressMatch,
VerificationFailedBusinessIecNumber,
VerificationFailedDocumentMatch,
Expand All @@ -203,6 +206,7 @@ pub enum AccountRequirementsErrorCode {
VerificationFailedResidentialAddress,
VerificationFailedTaxIdMatch,
VerificationFailedTaxIdNotIssued,
VerificationMissingDirectors,
VerificationMissingExecutives,
VerificationMissingOwners,
VerificationRequiresAdditionalMemorandumOfAssociations,
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
Loading

0 comments on commit fbf34ab

Please sign in to comment.