Exemple #1
0
        private static TransferRequest CreateTransferRequest()
        {
            var result = new TransferRequest
            {
                metadata = new Metadata()
                {
                    sender = "avro-csharp",
                    senderCorrelationId = "tx-request-1234",
                },
                amount = new Amount
                {
                    amount       = LogicalTypesHack.ToLogicalTypeMoneyDecimal(100),
                    currencyCode = "DKK"
                },
                date = LogicalTypesHack.ToLogicalTypeDate(new DateTime(2020, 02, 05)),
                from = new DanishAccount()
                {
                    regnr   = "1000",
                    kontonr = "0000001234",
                },
                to = new IbanAccount()
                {
                    countryCode = "DK",
                    checkDigits = 12,
                    BBAN        = "9999000999",
                },
                senderIdentifier    = "Transfer ref. tx-request-1234",
                recipientIdentifier = "Transfer ref. payment 1234"
            };

            return(result);
        }
Exemple #2
0
 private static void PrintTransferRequest(TransferRequest value)
 {
     Console.WriteLine(
         $"Transfer amount {LogicalTypesHack.FromLogicalTypeMoneyDecimal(value.amount.amount)} {value.amount.currencyCode} from {FormatAccount(value.from)} to {FormatAccount(value.to)} on date {LogicalTypesHack.FromLogicalTypeDate(value.date):yyyy-MM-dd}");
 }