예제 #1
0
 private void ImportSingleOrder(OrderSnapshotDTO snap)
 {
     Api oldProxy = GetOldStoreBV6Proxy();
     ApiResponse<OrderDTO> response = oldProxy.OrdersFind(snap.bvin);
     ImportSingleOrder(snap);
 }
예제 #2
0
        // DTO
        public OrderSnapshotDTO ToDto()
        {
            OrderSnapshotDTO dto = new OrderSnapshotDTO();

            dto.AffiliateID = this.AffiliateID ?? string.Empty;
            dto.BillingAddress = this.BillingAddress.ToDto();
            dto.bvin = this.bvin ?? string.Empty;
            dto.CustomProperties = new List<CustomPropertyDTO>();
            foreach (CustomProperty prop in this.CustomProperties)
            {
                dto.CustomProperties.Add(prop.ToDto());
            }
            dto.FraudScore = this.FraudScore;
            dto.Id = this.Id;
            dto.Instructions = this.Instructions ?? string.Empty;
            dto.IsPlaced = this.IsPlaced;
            dto.LastUpdatedUtc = this.LastUpdatedUtc;
            dto.OrderNumber = this.OrderNumber ?? string.Empty;
            dto.PaymentStatus = (OrderPaymentStatusDTO)((int)this.PaymentStatus);
            dto.ShippingAddress = this.ShippingAddress.ToDto();
            dto.ShippingMethodDisplayName = this.ShippingMethodDisplayName ?? string.Empty;
            dto.ShippingMethodId = this.ShippingMethodId ?? string.Empty;
            dto.ShippingProviderId = this.ShippingProviderId ?? string.Empty;
            dto.ShippingProviderServiceCode = this.ShippingProviderServiceCode ?? string.Empty;
            dto.ShippingStatus = (OrderShippingStatusDTO)((int)this.ShippingStatus);
            dto.StatusCode = this.StatusCode ?? string.Empty;
            dto.StatusName = this.StatusName ?? string.Empty;
            dto.StoreId = this.StoreId;
            dto.ThirdPartyOrderId = this.ThirdPartyOrderId ?? string.Empty;
            dto.TimeOfOrderUtc = this.TimeOfOrderUtc;
            dto.TotalGrand = this.TotalGrand;
            dto.TotalHandling = this.TotalHandling;
            dto.TotalOrderBeforeDiscounts = this.TotalOrderBeforeDiscounts;
            dto.TotalOrderDiscounts = this.TotalOrderDiscounts;
            dto.TotalShippingBeforeDiscounts = this.TotalShippingBeforeDiscounts;
            dto.TotalShippingDiscounts = this.TotalShippingDiscounts;
            dto.TotalTax = this.TotalTax;
            dto.TotalTax2 = this.TotalTax2;
            dto.UserEmail = this.UserEmail ?? string.Empty;
            dto.UserID = this.UserID ?? string.Empty;

            return dto;
        }