stripe/model/
financial_connections_session.rs

1use serde::{Serialize, Deserialize};
2use super::{
3    BankConnectionsResourceLinkAccountSessionFilters,
4    BankConnectionsResourceLinkedAccountList,
5};
6///A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts.
7#[derive(Debug, Clone, Serialize, Deserialize, Default)]
8pub struct FinancialConnectionsSession {
9    ///The account holder for whom accounts are collected in this session.
10    #[serde(skip_serializing_if = "Option::is_none")]
11    pub account_holder: Option<serde_json::Value>,
12    ///The accounts that were collected as part of this Session.
13    pub accounts: BankConnectionsResourceLinkedAccountList,
14    ///A value that will be passed to the client to launch the authentication flow.
15    pub client_secret: String,
16    ///
17    #[serde(skip_serializing_if = "Option::is_none")]
18    pub filters: Option<BankConnectionsResourceLinkAccountSessionFilters>,
19    ///Unique identifier for the object.
20    pub id: String,
21    ///Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
22    pub livemode: bool,
23    ///String representing the object's type. Objects of the same type share the same value.
24    pub object: String,
25    ///Permissions requested for accounts collected during this session.
26    pub permissions: Vec<String>,
27    ///Data features requested to be retrieved upon account creation.
28    #[serde(skip_serializing_if = "Option::is_none")]
29    pub prefetch: Option<Vec<String>>,
30    ///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.
31    #[serde(skip_serializing_if = "Option::is_none")]
32    pub return_url: Option<String>,
33}
34impl std::fmt::Display for FinancialConnectionsSession {
35    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
36        write!(f, "{}", serde_json::to_string(self).unwrap())
37    }
38}