Struct MT107

Source
pub struct MT107 {
Show 18 fields pub field_20: Field20, pub field_23e: Option<Field23E>, pub field_21e: Option<Field21>, pub field_30: Field30, pub field_51a: Option<GenericBicField>, pub field_50a_instructing: Option<Field50>, pub field_50a_creditor: Option<Field50>, pub field_52a: Option<GenericBicField>, pub field_26t: Option<Field26T>, pub field_77b: Option<Field77B>, pub field_71a: Option<Field71A>, pub field_72: Option<Field72>, pub transactions: Vec<MT107Transaction>, pub field_32b: Option<GenericCurrencyAmountField>, pub field_19: Option<GenericBalanceField>, pub field_71f: Option<GenericCurrencyAmountField>, pub field_71g: Option<GenericCurrencyAmountField>, pub field_53a: Option<GenericBicField>,
}
Expand description

§MT107: Request for Cancellation/Amendment (Enhanced Architecture)

§Overview

MT107 is used by financial institutions to request cancellation or amendment of previously sent direct debit instructions. It supports batch processing of multiple transaction modifications with detailed settlement information.

This implementation uses the enhanced macro system with separate transaction structures for optimal type safety and validation.

§Structure

  • Sequence A: General Information (mandatory, single occurrence)
  • Sequence B: Transaction Details (mandatory, repetitive) - MT107Transaction struct
  • Sequence C: Settlement Details (optional, single occurrence) - Individual fields

§Key Features

  • Multiple transaction modification support in single message
  • Flexible creditor/debtor identification
  • Optional settlement consolidation
  • Comprehensive regulatory reporting
  • Charge allocation options
  • Amendment and cancellation instructions
  • Type-safe transaction handling

Fields§

§field_20: Field20

Sender’s Reference - Field 20 (Mandatory) Unique ID assigned by the sender to identify this MT107 message.

§field_23e: Option<Field23E>

Instruction Code - Field 23E Seq A (Conditional) Values: AUTH, NAUT, OTHR, RTND (C1)

§field_21e: Option<Field21>

Registration Reference - Field 21E (Conditional) Optional ID. Subject to C2/C3

§field_30: Field30

Requested Execution Date - Field 30 (Mandatory) Format: YYMMDD

§field_51a: Option<GenericBicField>

Sending Institution - Field 51A (Optional) FileAct only

§field_50a_instructing: Option<Field50>

Instructing Party - Field 50a Seq A (Conditional) Options: C, L. Who orders debit. Subject to C2

§field_50a_creditor: Option<Field50>

Creditor - Field 50a Seq A (Conditional) Options: A, K. Name & account details. Subject to C1/C3

§field_52a: Option<GenericBicField>

Creditor’s Bank - Field 52a Seq A (Conditional) Options: A, C, D. Clearing/routing. Subject to C2

§field_26t: Option<Field26T>

Transaction Type Code - Field 26T Seq A (Conditional) Purpose code. Subject to C2

§field_77b: Option<Field77B>

Regulatory Reporting - Field 77B Seq A (Conditional) Statutory codes. Subject to C2

§field_71a: Option<Field71A>

Details of Charges - Field 71A Seq A (Conditional) Values: BEN, OUR, SHA. Subject to C2

§field_72: Option<Field72>

Sender to Receiver Information - Field 72 (Conditional) RTND required. Subject to C4

§transactions: Vec<MT107Transaction>

Transaction Details - Sequence B (Mandatory, Repetitive) Each entry represents one transaction to be cancelled/amended

§field_32b: Option<GenericCurrencyAmountField>

Settlement Amount - Field 32B Seq C (Optional) Final amount including charges

§field_19: Option<GenericBalanceField>

Sum of Amounts - Field 19 (Conditional) If 32B not used. Subject to C8

§field_71f: Option<GenericCurrencyAmountField>

Sum of Sender’s Charges - Field 71F Seq C (Conditional) Totals from B blocks. Subject to C5

§field_71g: Option<GenericCurrencyAmountField>

Sum of Receiver’s Charges - Field 71G Seq C (Conditional) Totals from B blocks. Subject to C5

§field_53a: Option<GenericBicField>

Sender’s Correspondent - Field 53a (Optional) Options: A, B. Reimbursement branch

Implementations§

Source§

impl MT107

Source

pub fn validation_rules() -> &'static str

Get the validation rules for this message type

Trait Implementations§

Source§

impl Clone for MT107

Source§

fn clone(&self) -> MT107

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MT107

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for MT107

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for MT107

Source§

fn eq(&self, other: &MT107) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for MT107

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl SwiftMessageBody for MT107

Source§

fn message_type() -> &'static str

Get the message type identifier (e.g., “103”, “202”)
Source§

fn from_fields(fields: HashMap<String, Vec<String>>) -> SwiftResult<Self>

Create from field map
Source§

fn to_fields(&self) -> HashMap<String, Vec<String>>

Convert to field map
Source§

fn required_fields() -> Vec<&'static str>

Get required field tags for this message type
Source§

fn optional_fields() -> Vec<&'static str>

Get optional field tags for this message type
Source§

impl StructuralPartialEq for MT107

Auto Trait Implementations§

§

impl Freeze for MT107

§

impl RefUnwindSafe for MT107

§

impl Send for MT107

§

impl Sync for MT107

§

impl Unpin for MT107

§

impl UnwindSafe for MT107

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,