Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate latest changes from OpenApi spec #550

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion openapi/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "v814"
"version": "v1008"
}
839 changes: 748 additions & 91 deletions src/resources/generated/account.rs

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions src/resources/generated/account_link.rs
Original file line number Diff line number Diff line change
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> {
#[allow(clippy::needless_borrows_for_generic_args)]
Expand All @@ -44,6 +45,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 Expand Up @@ -95,6 +97,7 @@ impl<'a> CreateAccountLink<'a> {

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

/// Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`).
///
/// If you don't specify `collection_options`, the default value is `currently_due`.
Expand Down
192 changes: 186 additions & 6 deletions src/resources/generated/account_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,42 @@ impl Object for AccountSession {
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct ConnectEmbeddedAccountSessionCreateComponents {

pub account_onboarding: ConnectEmbeddedBaseConfigClaim,
pub account_management: ConnectEmbeddedAccountConfigClaim,

pub payment_details: ConnectEmbeddedPaymentsConfig,
pub account_onboarding: ConnectEmbeddedAccountConfigClaim,

pub payments: ConnectEmbeddedPaymentsConfig,
pub balances: ConnectEmbeddedPayoutsConfigClaim,

pub payouts: ConnectEmbeddedPayoutsConfig,
pub documents: ConnectEmbeddedBaseConfigClaim,

pub notification_banner: ConnectEmbeddedAccountConfigClaim,

pub payment_details: ConnectEmbeddedPaymentsConfigClaim,

pub payments: ConnectEmbeddedPaymentsConfigClaim,

pub payouts: ConnectEmbeddedPayoutsConfigClaim,

pub payouts_list: ConnectEmbeddedBaseConfigClaim,
}

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

/// Whether the embedded component is enabled.
pub enabled: bool,

pub features: ConnectEmbeddedAccountFeaturesClaim,
}

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

/// Whether to allow platforms to control bank account collection for their connected accounts.
///
/// This feature can only be false for custom accounts (or accounts where the platform is compliance owner).
/// Otherwise, bank account collection is determined by compliance requirements.
pub external_account_collection: bool,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
Expand All @@ -75,7 +104,7 @@ pub struct ConnectEmbeddedBaseFeatures {
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct ConnectEmbeddedPaymentsConfig {
pub struct ConnectEmbeddedPaymentsConfigClaim {

/// Whether the embedded component is enabled.
pub enabled: bool,
Expand All @@ -91,6 +120,11 @@ pub struct ConnectEmbeddedPaymentsFeatures {
/// This is `true` by default.
pub capture_payments: bool,

/// Whether to allow connected accounts to manage destination charges that are created on behalf of them.
///
/// This is `false` by default.
pub destination_on_behalf_of_charge_management: bool,

/// Whether to allow responding to disputes, including submitting evidence and accepting disputes.
///
/// This is `true` by default.
Expand All @@ -103,7 +137,7 @@ pub struct ConnectEmbeddedPaymentsFeatures {
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct ConnectEmbeddedPayoutsConfig {
pub struct ConnectEmbeddedPayoutsConfigClaim {

/// Whether the embedded component is enabled.
pub enabled: bool,
Expand Down Expand Up @@ -160,10 +194,26 @@ impl<'a> CreateAccountSession<'a> {
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreateAccountSessionComponents {

/// Configuration for the account management embedded component.
#[serde(skip_serializing_if = "Option::is_none")]
pub account_management: Option<CreateAccountSessionComponentsAccountManagement>,

/// Configuration for the account onboarding embedded component.
#[serde(skip_serializing_if = "Option::is_none")]
pub account_onboarding: Option<CreateAccountSessionComponentsAccountOnboarding>,

/// Configuration for the balances embedded component.
#[serde(skip_serializing_if = "Option::is_none")]
pub balances: Option<CreateAccountSessionComponentsBalances>,

/// Configuration for the documents embedded component.
#[serde(skip_serializing_if = "Option::is_none")]
pub documents: Option<CreateAccountSessionComponentsDocuments>,

/// Configuration for the notification banner embedded component.
#[serde(skip_serializing_if = "Option::is_none")]
pub notification_banner: Option<CreateAccountSessionComponentsNotificationBanner>,

/// Configuration for the payment details embedded component.
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_details: Option<CreateAccountSessionComponentsPaymentDetails>,
Expand All @@ -175,6 +225,21 @@ pub struct CreateAccountSessionComponents {
/// Configuration for the payouts embedded component.
#[serde(skip_serializing_if = "Option::is_none")]
pub payouts: Option<CreateAccountSessionComponentsPayouts>,

/// Configuration for the payouts list embedded component.
#[serde(skip_serializing_if = "Option::is_none")]
pub payouts_list: Option<CreateAccountSessionComponentsPayoutsList>,
}

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

/// Whether the embedded component is enabled.
pub enabled: bool,

/// The list of features enabled in the embedded component.
#[serde(skip_serializing_if = "Option::is_none")]
pub features: Option<CreateAccountSessionComponentsAccountManagementFeatures>,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
Expand All @@ -188,6 +253,39 @@ pub struct CreateAccountSessionComponentsAccountOnboarding {
pub features: Option<CreateAccountSessionComponentsAccountOnboardingFeatures>,
}

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

/// Whether the embedded component is enabled.
pub enabled: bool,

/// The list of features enabled in the embedded component.
#[serde(skip_serializing_if = "Option::is_none")]
pub features: Option<CreateAccountSessionComponentsBalancesFeatures>,
}

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

/// Whether the embedded component is enabled.
pub enabled: bool,

/// The list of features enabled in the embedded component.
#[serde(skip_serializing_if = "Option::is_none")]
pub features: Option<CreateAccountSessionComponentsDocumentsFeatures>,
}

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

/// Whether the embedded component is enabled.
pub enabled: bool,

/// The list of features enabled in the embedded component.
#[serde(skip_serializing_if = "Option::is_none")]
pub features: Option<CreateAccountSessionComponentsNotificationBannerFeatures>,
}

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

Expand Down Expand Up @@ -221,8 +319,74 @@ pub struct CreateAccountSessionComponentsPayouts {
pub features: Option<CreateAccountSessionComponentsPayoutsFeatures>,
}

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

/// Whether the embedded component is enabled.
pub enabled: bool,

/// The list of features enabled in the embedded component.
#[serde(skip_serializing_if = "Option::is_none")]
pub features: Option<CreateAccountSessionComponentsPayoutsListFeatures>,
}

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

/// Whether to allow platforms to control bank account collection for their connected accounts.
///
/// This feature can only be false for custom accounts (or accounts where the platform is compliance owner).
/// Otherwise, bank account collection is determined by compliance requirements.
#[serde(skip_serializing_if = "Option::is_none")]
pub external_account_collection: Option<bool>,
}

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

/// Whether to allow platforms to control bank account collection for their connected accounts.
///
/// This feature can only be false for custom accounts (or accounts where the platform is compliance owner).
/// Otherwise, bank account collection is determined by compliance requirements.
#[serde(skip_serializing_if = "Option::is_none")]
pub external_account_collection: Option<bool>,
}

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

/// Whether to allow payout schedule to be changed.
///
/// Default `true` when Stripe owns Loss Liability, default `false` otherwise.
#[serde(skip_serializing_if = "Option::is_none")]
pub edit_payout_schedule: Option<bool>,

/// Whether to allow creation of instant payouts.
///
/// Default `true` when Stripe owns Loss Liability, default `false` otherwise.
#[serde(skip_serializing_if = "Option::is_none")]
pub instant_payouts: Option<bool>,

/// Whether to allow creation of standard payouts.
///
/// Default `true` when Stripe owns Loss Liability, default `false` otherwise.
#[serde(skip_serializing_if = "Option::is_none")]
pub standard_payouts: Option<bool>,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreateAccountSessionComponentsDocumentsFeatures {
}

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

/// Whether to allow platforms to control bank account collection for their connected accounts.
///
/// This feature can only be false for custom accounts (or accounts where the platform is compliance owner).
/// Otherwise, bank account collection is determined by compliance requirements.
#[serde(skip_serializing_if = "Option::is_none")]
pub external_account_collection: Option<bool>,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
Expand All @@ -234,6 +398,12 @@ pub struct CreateAccountSessionComponentsPaymentDetailsFeatures {
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_payments: Option<bool>,

/// Whether to allow connected accounts to manage destination charges that are created on behalf of them.
///
/// This is `false` by default.
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_on_behalf_of_charge_management: Option<bool>,

/// Whether to allow responding to disputes, including submitting evidence and accepting disputes.
///
/// This is `true` by default.
Expand All @@ -256,6 +426,12 @@ pub struct CreateAccountSessionComponentsPaymentsFeatures {
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_payments: Option<bool>,

/// Whether to allow connected accounts to manage destination charges that are created on behalf of them.
///
/// This is `false` by default.
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_on_behalf_of_charge_management: Option<bool>,

/// Whether to allow responding to disputes, including submitting evidence and accepting disputes.
///
/// This is `true` by default.
Expand Down Expand Up @@ -290,3 +466,7 @@ pub struct CreateAccountSessionComponentsPayoutsFeatures {
#[serde(skip_serializing_if = "Option::is_none")]
pub standard_payouts: Option<bool>,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreateAccountSessionComponentsPayoutsListFeatures {
}
1 change: 1 addition & 0 deletions src/resources/generated/address.rs
Original file line number Diff line number Diff line change
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