Beispiel #1
0
        public static Payment Create(string identifier, bool pay, NonNegativeMoney paymentAmount,
                                     DateTime adjustedPaymentDate, PaymentType paymentType,
                                     decimal discountFactor, Money presentValueAmount)
        {
            var payment = new Payment();
            var result  = AdjustableOrAdjustedDateHelper.CreateAdjustedDate(adjustedPaymentDate);

            payment.paymentDate             = result;
            payment.discountFactor          = discountFactor;
            payment.discountFactorSpecified = true;
            payment.href = identifier;
            payment.payerPartyReference    = (pay) ? PartyReferenceFactory.Create("CBA") : PartyReferenceFactory.Create("");
            payment.paymentAmount          = paymentAmount;
            payment.paymentType            = paymentType;
            payment.presentValueAmount     = presentValueAmount;
            payment.receiverPartyReference = (pay) ? PartyReferenceFactory.Create("") : PartyReferenceFactory.Create("CBA");
            return(payment);
        }
Beispiel #2
0
        public static Payment Create(String payerPartyReference,
                                     String receiverPartyReference, String currency, Decimal paymentAmount,
                                     DateTime valueDate)
        {
            var payment = new Payment
            {
                paymentDate         = AdjustableOrAdjustedDateHelper.CreateAdjustedDate(valueDate),
                payerPartyReference = PartyReferenceFactory.Create(payerPartyReference),
                paymentAmount       = new NonNegativeMoney {
                    amount = paymentAmount, currency = new Currency {
                        Value = currency
                    }
                },
                receiverPartyReference = PartyReferenceFactory.Create(receiverPartyReference)
            };

            return(payment);
        }