Ejemplo n.º 1
0
        public virtual void MapVippsAddressFields(
            CustomerAddress address,
            VippsAddress vippsAddress
            )
        {
            if (address == null)
            {
                throw new ArgumentNullException(nameof(address));
            }
            if (vippsAddress == null)
            {
                throw new ArgumentNullException(nameof(vippsAddress));
            }

            address.Name        = $"Vipps - {address.GetVippsAddressType()}";
            address.Line1       = vippsAddress.StreetAddress;
            address.City        = vippsAddress.Region;
            address.PostalCode  = vippsAddress.PostalCode;
            address.CountryCode = ToEpiCountryCode(vippsAddress.Country);
            address.SetVippsAddressType(vippsAddress.AddressType);
        }