Initial commit
This is definitely not functional yet. Signed-off-by: Jacob Kiers <code@kiers.eu>
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* GoCardless Bank Account Data API
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 2.0 (v2)
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// SpectacularRequisition : Create requisition.
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct SpectacularRequisition {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<uuid::Uuid>,
|
||||
/// The date & time at which the requisition was created.
|
||||
#[serde(rename = "created", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub created: Option<Option<String>>,
|
||||
/// redirect URL to your application after end-user authorization with ASPSP
|
||||
#[serde(rename = "redirect", deserialize_with = "Option::deserialize")]
|
||||
pub redirect: Option<String>,
|
||||
/// status of this requisition
|
||||
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
|
||||
pub status: Option<models::StatusEnum>,
|
||||
/// an Institution ID for this Requisition
|
||||
#[serde(rename = "institution_id")]
|
||||
pub institution_id: String,
|
||||
/// EUA associated with this requisition
|
||||
#[serde(rename = "agreement", skip_serializing_if = "Option::is_none")]
|
||||
pub agreement: Option<uuid::Uuid>,
|
||||
/// additional ID to identify the end user
|
||||
#[serde(rename = "reference", skip_serializing_if = "Option::is_none")]
|
||||
pub reference: Option<String>,
|
||||
/// array of account IDs retrieved within a scope of this requisition
|
||||
#[serde(rename = "accounts", skip_serializing_if = "Option::is_none")]
|
||||
pub accounts: Option<Vec<serde_json::Value>>,
|
||||
/// A two-letter country code (ISO 639-1)
|
||||
#[serde(rename = "user_language", skip_serializing_if = "Option::is_none")]
|
||||
pub user_language: Option<String>,
|
||||
/// link to initiate authorization with Institution
|
||||
#[serde(rename = "link", skip_serializing_if = "Option::is_none")]
|
||||
pub link: Option<String>,
|
||||
/// optional SSN field to verify ownership of the account
|
||||
#[serde(rename = "ssn", skip_serializing_if = "Option::is_none")]
|
||||
pub ssn: Option<String>,
|
||||
/// option to enable account selection view for the end user
|
||||
#[serde(rename = "account_selection", skip_serializing_if = "Option::is_none")]
|
||||
pub account_selection: Option<bool>,
|
||||
/// enable redirect back to the client after account list received
|
||||
#[serde(rename = "redirect_immediate", skip_serializing_if = "Option::is_none")]
|
||||
pub redirect_immediate: Option<bool>,
|
||||
}
|
||||
|
||||
impl SpectacularRequisition {
|
||||
/// Create requisition.
|
||||
pub fn new(redirect: Option<String>, institution_id: String) -> SpectacularRequisition {
|
||||
SpectacularRequisition {
|
||||
id: None,
|
||||
created: None,
|
||||
redirect,
|
||||
status: None,
|
||||
institution_id,
|
||||
agreement: None,
|
||||
reference: None,
|
||||
accounts: None,
|
||||
user_language: None,
|
||||
link: None,
|
||||
ssn: None,
|
||||
account_selection: None,
|
||||
redirect_immediate: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user