Expand description
§TAP IVMS 101 Implementation
This crate provides a complete implementation of the IVMS 101.2023 data model for the Travel Asset Protocol (TAP). It includes all data structures, validation, and serialization support as defined in the interVASP Messaging Standard.
§Features
- Complete IVMS 101.2023 data model implementation
- Comprehensive validation for all data types
- Serde JSON serialization/deserialization support
- Builder patterns for easy construction
- Type-safe enumerations for all IVMS code lists
- ISO country code and currency code validation
§Example Usage
use tap_ivms101::builder::*;
use tap_ivms101::types::*;
use tap_ivms101::message::*;
// Create a natural person
let natural_person_name = NaturalPersonNameBuilder::new()
.legal_name("Smith", "John")
.build()?;
let natural_person = NaturalPersonBuilder::new()
.name(natural_person_name)
.country_of_residence("US")
.build()?;
// Create a legal person (VASP)
let legal_person_name = LegalPersonNameBuilder::new()
.legal_name("Example VASP Inc.")
.build()?;
let legal_person = LegalPersonBuilder::new()
.name(legal_person_name)
.lei("529900HNOAA1KXQJUQ27")?
.country_of_registration("US")
.build()?;
// Create an IVMS message
let ivms_message = IvmsMessageBuilder::new()
.originator(vec![Person::NaturalPerson(natural_person.clone())])
.beneficiary(vec![Person::NaturalPerson(natural_person)])
.originating_vasp(Person::LegalPerson(legal_person))
.transaction(
"100.00",
"USD",
TransactionDirection::Outgoing,
"tx-123",
"2024-01-15T10:30:00Z"
)?
.build()?;
// Serialize to JSON
let json = ivms_message.to_json_pretty()?;Re-exports§
pub use error::Error;pub use error::Result;pub use message::IvmsMessage;pub use message::Person;pub use person::LegalPerson;pub use person::NaturalPerson;