예제 #1
0
        private static PayPlanCustomer HydrateConsumerInfo(HpsPayPlanCustomerEditOptions options, PayPlanCustomer dto)
        {
            if (options.Address != null)
            {
                dto.AddressLine1  = options.Address.Address;
                dto.City          = options.Address.City;
                dto.Country       = options.Address.Country;
                dto.StateProvince = options.Address.State;
                dto.ZipPostalCode = options.Address.Zip;
            }

            dto.PrimaryEmail = options.Email;
            dto.FirstName    = options.FirstName;
            dto.LastName     = options.LastName;
            dto.PhoneDay     = options.Phone;

            return(dto);
        }
        public static PayPlanCustomer Map(HpsPayPlanCustomerEditOptions options)
        {
            var result = new PayPlanCustomer
            {
                Company = options.Company,
                CustomerIdentifier = options.CustomerId,
                CustomerStatus = options.CustomerStatus == HpsPayPlanCustomerStatus.Active ? "Active" : "Inactive",
                Department = options.Department,
                PhoneDayExt = options.PhoneExt,
                PhoneEvening = options.PhoneEvening,
                PhoneEveningExt = options.PhoneEveningExt,
                PhoneMobile = options.PhoneMobile,
                PhoneMobileExt = options.PhoneMobileExt,
                SecondaryEmail = options.SecondaryEmail,
                Title = options.Title
            };

            return HydrateConsumerInfo(options, result);
        }
예제 #3
0
        public static PayPlanCustomer Map(HpsPayPlanCustomerEditOptions options)
        {
            var result = new PayPlanCustomer
            {
                Company            = options.Company,
                CustomerIdentifier = options.CustomerId,
                CustomerStatus     = options.CustomerStatus == HpsPayPlanCustomerStatus.Active ? "Active" : "Inactive",
                Department         = options.Department,
                PhoneDayExt        = options.PhoneExt,
                PhoneEvening       = options.PhoneEvening,
                PhoneEveningExt    = options.PhoneEveningExt,
                PhoneMobile        = options.PhoneMobile,
                PhoneMobileExt     = options.PhoneMobileExt,
                SecondaryEmail     = options.SecondaryEmail,
                Title = options.Title
            };

            return(HydrateConsumerInfo(options, result));
        }
        private static PayPlanCustomer HydrateConsumerInfo(HpsPayPlanCustomerEditOptions options, PayPlanCustomer dto)
        {
            if (options.Address != null)
            {
                dto.AddressLine1 = options.Address.Address;
                dto.City = options.Address.City;
                dto.Country = options.Address.Country;
                dto.StateProvince = options.Address.State;
                dto.ZipPostalCode = options.Address.Zip;
            }

            dto.PrimaryEmail = options.Email;
            dto.FirstName = options.FirstName;
            dto.LastName = options.LastName;
            dto.PhoneDay = options.Phone;

            return dto;
        }