pub struct Transfer {
pub from: Account,
pub debtor_name: Option<String>,
pub payee_name: String,
pub payee_iban: String,
pub payee_bic: Option<String>,
pub amount: Decimal,
pub purpose: String,
pub end_to_end_id: Option<String>,
pub instant: Instant,
}Expand description
One SEPA credit transfer in EUR from an own account.
Fields§
§from: AccountThe debtor account; must have an IBAN.
debtor_name: Option<String>The debtor name; None: the UPD account holder name.
payee_name: StringAt most 70 characters of the SEPA text set.
payee_iban: StringChecked by Iban::parse; spaces and lower case are accepted.
payee_bic: Option<String>8 or 11 characters; None: IBAN-only.
amount: DecimalEUR, greater than zero, at most 999 999 999.99, at most two decimals.
purpose: StringUnstructured remittance information, at most 140 characters of the SEPA text set; may be empty.
end_to_end_id: Option<String>At most 35 characters of the SEPA reference set; None: the library
generates a unique one in Transfer::check (read it from
CheckedTransfer::end_to_end_id before sending).
instant: InstantStandard or instant transfer.
Implementations§
Source§impl Transfer
impl Transfer
Sourcepub fn check(
&self,
upd_holder: Option<&str>,
) -> Result<CheckedTransfer, InvalidTransfer>
pub fn check( &self, upd_holder: Option<&str>, ) -> Result<CheckedTransfer, InvalidTransfer>
Check every field before contact (payments-design section 2) and
resolve the debtor name: the given one, else upd_holder (the UPD
account holder; crate::jobs::transfer passes it). The first
broken field is the error.