fireblocks-sdk 2.1.0

Rust implementation of the Fireblocks SDK
Documentation
// Fireblocks API
//
// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
//
// The version of the OpenAPI document: 1.8.0
// Contact: developers@fireblocks.com
// Generated by: https://openapi-generator.tech

use {
    crate::models,
    serde::{Deserialize, Serialize},
};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TravelRuleCreateTransactionRequest {
    /// The Decentralized Identifier (DID) of the exchange (VASP) that is
    /// sending the virtual assets. This identifier is unique to the exchange
    /// and is generated when the exchange's account is  created in the Notabene
    /// network.
    #[serde(rename = "originatorVASPdid", skip_serializing_if = "Option::is_none")]
    pub originator_vas_pdid: Option<String>,
    /// The Decentralized Identifier (DID) of the exchange (VASP) that is
    /// receiving the virtual assets. This identifier is unique to the exchange
    /// and is generated when the exchange's account is  created in the Notabene
    /// network.
    #[serde(rename = "beneficiaryVASPdid", skip_serializing_if = "Option::is_none")]
    pub beneficiary_vas_pdid: Option<String>,
    /// The name of the VASP acting as the transaction originator.
    #[serde(rename = "originatorVASPname", skip_serializing_if = "Option::is_none")]
    pub originator_vas_pname: Option<String>,
    /// The name of the VASP acting as the transaction beneficiary.
    #[serde(
        rename = "beneficiaryVASPname",
        skip_serializing_if = "Option::is_none"
    )]
    pub beneficiary_vas_pname: Option<String>,
    /// The website of the VASP acting as the transaction beneficiary.
    #[serde(
        rename = "beneficiaryVASPwebsite",
        skip_serializing_if = "Option::is_none"
    )]
    pub beneficiary_vas_pwebsite: Option<String>,
    /// Information about the blockchain transaction.
    #[serde(
        rename = "transactionBlockchainInfo",
        skip_serializing_if = "Option::is_none"
    )]
    pub transaction_blockchain_info: Option<models::TravelRuleTransactionBlockchainInfo>,
    /// Information about the originator of the transaction.
    #[serde(rename = "originator")]
    pub originator: models::TravelRulePiiIvms,
    /// Information about the beneficiary of the transaction.
    #[serde(rename = "beneficiary")]
    pub beneficiary: models::TravelRulePiiIvms,
    /// Encrypted data related to the transaction.
    #[serde(rename = "encrypted", skip_serializing_if = "Option::is_none")]
    pub encrypted: Option<String>,
    /// The protocol used to perform the travel rule.
    #[serde(rename = "protocol", skip_serializing_if = "Option::is_none")]
    pub protocol: Option<String>,
    /// Whether to skip validation of beneficiary data.
    #[serde(
        rename = "skipBeneficiaryDataValidation",
        skip_serializing_if = "Option::is_none"
    )]
    pub skip_beneficiary_data_validation: Option<bool>,
    /// Whether to check if the transaction complies with the travel rule in the
    /// beneficiary VASP's jurisdiction.
    #[serde(rename = "travelRuleBehavior", skip_serializing_if = "Option::is_none")]
    pub travel_rule_behavior: Option<bool>,
    /// A reference ID related to the originator of the transaction.
    #[serde(rename = "originatorRef", skip_serializing_if = "Option::is_none")]
    pub originator_ref: Option<String>,
    /// A reference ID related to the beneficiary of the transaction.
    #[serde(rename = "beneficiaryRef", skip_serializing_if = "Option::is_none")]
    pub beneficiary_ref: Option<String>,
    /// A reference ID related to the travel rule behavior.
    #[serde(
        rename = "travelRuleBehaviorRef",
        skip_serializing_if = "Option::is_none"
    )]
    pub travel_rule_behavior_ref: Option<String>,
    /// Ownership proof related to the originator of the transaction.
    #[serde(rename = "originatorProof", skip_serializing_if = "Option::is_none")]
    pub originator_proof: Option<models::TravelRuleOwnershipProof>,
    /// Ownership proof related to the beneficiary of the transaction.
    #[serde(rename = "beneficiaryProof", skip_serializing_if = "Option::is_none")]
    pub beneficiary_proof: Option<models::TravelRuleOwnershipProof>,
    /// The Decentralized Identifier (DID) of the person at the receiving
    /// exchange (VASP).  This identifier is generated when the customer is
    /// registered in the Notabene network,  or automatically created based on
    /// the `beneficiaryRef`.  - If neither `beneficiaryRef` nor
    /// `beneficiaryDid` is provided in the `txCreate` payload,    a new random
    /// DID is generated for every transaction.
    #[serde(rename = "beneficiaryDid", skip_serializing_if = "Option::is_none")]
    pub beneficiary_did: Option<String>,
    /// The Decentralized Identifier (DID) of the person at the exchange (VASP)
    /// who is requesting the withdrawal. This identifier is generated when the
    /// customer is registered in the Notabene network or automatically created
    /// based on the `originatorRef`.  - If neither `originatorRef` nor
    /// `originatorDid` is provided in the `txCreate` payload,    a new random
    /// DID is generated for every transaction.
    #[serde(rename = "originatorDid", skip_serializing_if = "Option::is_none")]
    pub originator_did: Option<String>,
    /// Indicates if the transaction involves a non-custodial wallet.
    #[serde(rename = "isNonCustodial", skip_serializing_if = "Option::is_none")]
    pub is_non_custodial: Option<bool>,
}

impl TravelRuleCreateTransactionRequest {
    pub fn new(
        originator: models::TravelRulePiiIvms,
        beneficiary: models::TravelRulePiiIvms,
    ) -> TravelRuleCreateTransactionRequest {
        TravelRuleCreateTransactionRequest {
            originator_vas_pdid: None,
            beneficiary_vas_pdid: None,
            originator_vas_pname: None,
            beneficiary_vas_pname: None,
            beneficiary_vas_pwebsite: None,
            transaction_blockchain_info: None,
            originator,
            beneficiary,
            encrypted: None,
            protocol: None,
            skip_beneficiary_data_validation: None,
            travel_rule_behavior: None,
            originator_ref: None,
            beneficiary_ref: None,
            travel_rule_behavior_ref: None,
            originator_proof: None,
            beneficiary_proof: None,
            beneficiary_did: None,
            originator_did: None,
            is_non_custodial: None,
        }
    }
}