1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
* Ponto Connect
*
* For more info, please refer to the documentation: https://documentation.ibanity.com/ponto-connect/
*
* The version of the OpenAPI document: 2
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateFinancialInstitutionTransactionRequest {
/// Date representing the moment the financial institution transaction is considered effective
#[serde(rename = "valueDate")]
pub value_date: String,
/// Date representing the moment when the financial institution recorded the financial institution transaction.
#[serde(rename = "executionDate")]
pub execution_date: String,
/// Amount of the financial institution transaction. Can be positive or negative
#[serde(rename = "amount")]
pub amount: f64,
/// Currency of the financial institution transaction, in <a href='https://en.wikipedia.org/wiki/ISO_4217'>ISO4217</a> format
#[serde(rename = "currency")]
pub currency: String,
/// Legal name of the counterpart. Can only be updated if it was previously not provided (blank).
#[serde(rename = "counterpartName", skip_serializing_if = "Option::is_none")]
pub counterpart_name: Option<String>,
/// Number representing the counterpart's account
#[serde(rename = "counterpartReference", skip_serializing_if = "Option::is_none")]
pub counterpart_reference: Option<String>,
/// Description of the financial institution transaction
#[serde(rename = "description")]
pub description: String,
/// Content of the remittance information (aka communication)
#[serde(rename = "remittanceInformation", skip_serializing_if = "Option::is_none")]
pub remittance_information: Option<String>,
/// Type of remittance information, can be <code>structured</code> or <code>unstructured</code>
#[serde(rename = "remittanceInformationType")]
pub remittance_information_type: String,
/// Identifier assigned by the initiating party to identify the transaction. This identification is passed on, unchanged, throughout the entire end-to-end chain. Limited to 35 characters in the set <code>a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 / - ? : ( ) . , ' + Space</code> to ensure it is not rejected by the financial institution.
#[serde(rename = "endToEndId", skip_serializing_if = "Option::is_none")]
pub end_to_end_id: Option<String>,
/// Purpose code, based on <a href='https://www.iso20022.org/'>ISO 20022</a>
#[serde(rename = "purposeCode", skip_serializing_if = "Option::is_none")]
pub purpose_code: Option<String>,
/// Unique reference of the mandate which is signed between the remitter and the debtor
#[serde(rename = "mandateId", skip_serializing_if = "Option::is_none")]
pub mandate_id: Option<String>,
/// Identification of the creditor, e.g. a SEPA Creditor ID.
#[serde(rename = "creditorId", skip_serializing_if = "Option::is_none")]
pub creditor_id: Option<String>,
/// Additional transaction-related information provided from the financial institution to the customer
#[serde(rename = "additionalInformation", skip_serializing_if = "Option::is_none")]
pub additional_information: Option<String>,
/// Bank transaction code prorietary to the financial institution. Content will vary per financial institution
#[serde(rename = "proprietaryBankTransactionCode", skip_serializing_if = "Option::is_none")]
pub proprietary_bank_transaction_code: Option<String>,
/// Bank transaction code, based on <a href='https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets'>ISO 20022</a>
#[serde(rename = "bankTransactionCode", skip_serializing_if = "Option::is_none")]
pub bank_transaction_code: Option<String>,
/// Type of card reference (can be <code>PAN</code> or <code>MASKEDPAN</code>)
#[serde(rename = "cardReferenceType", skip_serializing_if = "Option::is_none")]
pub card_reference_type: Option<String>,
/// Reference for card related to the transaction (if any). For example the last 4 digits of the card number.
#[serde(rename = "cardReference", skip_serializing_if = "Option::is_none")]
pub card_reference: Option<String>,
/// A fee that was withheld from this transaction at the financial institution
#[serde(rename = "fee", skip_serializing_if = "Option::is_none")]
pub fee: Option<f64>,
}
impl CreateFinancialInstitutionTransactionRequest {
pub fn new(value_date: String, execution_date: String, amount: f64, currency: String, description: String, remittance_information_type: String) -> CreateFinancialInstitutionTransactionRequest {
CreateFinancialInstitutionTransactionRequest {
value_date,
execution_date,
amount,
currency,
counterpart_name: None,
counterpart_reference: None,
description,
remittance_information: None,
remittance_information_type,
end_to_end_id: None,
purpose_code: None,
mandate_id: None,
creditor_id: None,
additional_information: None,
proprietary_bank_transaction_code: None,
bank_transaction_code: None,
card_reference_type: None,
card_reference: None,
fee: None,
}
}
}