Exemple #1
0
        public virtual subscriptionDto.PaymentPlan ToPaymentPlanDto(PaymentPlan paymentPlan)
        {
            var result = new subscriptionDto.PaymentPlan();

            result.Id              = paymentPlan.Id;
            result.Interval        = paymentPlan.Interval.ToString();
            result.IntervalCount   = paymentPlan.IntervalCount;
            result.TrialPeriodDays = paymentPlan.TrialPeriodDays;
            return(result);
        }
Exemple #2
0
        public virtual PaymentPlan ToPaymentPlan(subscriptionDto.PaymentPlan paymentPlanDto)
        {
            var result = new PaymentPlan();

            result.Id              = paymentPlanDto.Id;
            result.Interval        = EnumUtility.SafeParse(paymentPlanDto.Interval, PaymentInterval.Months);
            result.IntervalCount   = paymentPlanDto.IntervalCount ?? 0;
            result.TrialPeriodDays = paymentPlanDto.TrialPeriodDays ?? 0;
            return(result);
        }
        public static PaymentPlan ToPaymentPlan(this subscriptionDto.PaymentPlan paymentPlanDto)
        {
            var result = new PaymentPlan
            {
                Id              = paymentPlanDto.Id,
                Interval        = EnumUtility.SafeParse(paymentPlanDto.Interval, PaymentInterval.Months),
                IntervalCount   = paymentPlanDto.IntervalCount ?? 0,
                TrialPeriodDays = paymentPlanDto.TrialPeriodDays ?? 0
            };

            return(result);
        }
        public static subscriptionDto.PaymentPlan ToPaymentPlanDto(this PaymentPlan paymentPlan)
        {
            var result = new subscriptionDto.PaymentPlan
            {
                Id              = paymentPlan.Id,
                Interval        = paymentPlan.Interval.ToString(),
                IntervalCount   = paymentPlan.IntervalCount,
                TrialPeriodDays = paymentPlan.TrialPeriodDays
            };

            return(result);
        }
Exemple #5
0
 public static PaymentPlan ToPaymentPlan(this subscriptionDto.PaymentPlan paymentPlanDto)
 {
     return(SubscriptionConverterInstance.ToPaymentPlan(paymentPlanDto));
 }