plaid/model/
link_delivery_get_response.rs

1use serde::{Serialize, Deserialize};
2use super::LinkDeliverySessionStatus;
3///LinkDeliveryGetRequest defines the response schema for `/link_delivery/get`
4#[derive(Debug, Clone, Serialize, Deserialize)]
5pub struct LinkDeliveryGetResponse {
6    ///An array of access tokens associated with the Hosted Link session.
7    #[serde(default, skip_serializing_if = "Option::is_none")]
8    pub access_tokens: Option<Vec<String>>,
9    ///Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:mm:ssZ`) indicating the time the given Hosted Link session was completed at.
10    #[serde(default, skip_serializing_if = "Option::is_none")]
11    pub completed_at: Option<chrono::DateTime<chrono::Utc>>,
12    ///Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:mm:ssZ`) indicating the time the given Hosted Link session was created at.
13    pub created_at: chrono::DateTime<chrono::Utc>,
14    ///An array of `item_id`s associated with the Hosted Link session.
15    #[serde(default, skip_serializing_if = "Option::is_none")]
16    pub item_ids: Option<Vec<String>>,
17    ///A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.
18    pub request_id: String,
19    /**The status of the given Hosted Link session.
20
21`CREATED`: The session is created but not yet accessed by the user
22
23`OPENED`: The session is opened by the user but not yet completed
24
25`EXITED`: The session has been exited by the user
26
27`COMPLETED`: The session has been completed by the user
28
29`EXPIRED`: The session has expired*/
30    pub status: LinkDeliverySessionStatus,
31}
32impl std::fmt::Display for LinkDeliveryGetResponse {
33    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
34        write!(f, "{}", serde_json::to_string(self).unwrap())
35    }
36}