예제 #1
0
        public object Clone()
        {
            var result = MemberwiseClone() as Payment;

            result.BillingAddress    = BillingAddress?.Clone() as Address;
            result.Discounts         = Discounts?.Select(x => x.Clone()).OfType <Discount>().ToList();
            result.TaxDetails        = TaxDetails?.Select(x => x.Clone()).OfType <TaxDetail>().ToList();
            result.DynamicProperties = DynamicProperties?.Select(x => x.Clone()).OfType <DynamicObjectProperty>().ToList();

            return(result);
        }
예제 #2
0
        public override object Clone()
        {
            var result = base.Clone() as PaymentIn;

            result.PaymentMethod        = PaymentMethod?.Clone() as PaymentMethod;
            result.BillingAddress       = BillingAddress?.Clone() as Address;
            result.ProcessPaymentResult = ProcessPaymentResult?.Clone() as ProcessPaymentRequestResult;
            result.Transactions         = Transactions?.Select(x => x.Clone()).OfType <PaymentGatewayTransaction>().ToList();
            result.Discounts            = Discounts?.Select(x => x.Clone()).OfType <Discount>().ToList();
            result.TaxDetails           = TaxDetails?.Select(x => x.Clone()).OfType <TaxDetail>().ToList();

            return(result);
        }