Пример #1
0
        private GetOrderDetailsResponseDto MapGetOrderDetailsResponseRDtoToResponseDto(
            GetOrderDetailsResponseRemoteDto response
            )
        {
            var result = new GetOrderDetailsResponseDto();

            MapGetOrderDetailsResponseRDtoToResponseDto(result, response);

            return(result);
        }
Пример #2
0
 private void MapGetOrderDetailsResponseRDtoToResponseDto(
     GetOrderDetailsResponseDto result,
     GetOrderDetailsResponseRemoteDto obj
     )
 {
     result.TransportType = StringToTransportType(obj.transport_type);
     result.Status        = FormatOrderStatusCode(obj.status);
     result.Addresses     = obj.addresses?.Select(a => new GetOrderDetailsAddressResponseDto
     {
         Id          = a.id,
         Type        = a.type,
         Status      = a.status,
         Address     = a.address,
         City        = a.city,
         Description = a.description,
         Distance    = a.distance,
         Duration    = a.duration,
         Latitude    = a.lat,
         Longitude   = a.lng,
         Number      = a.number,
         Priority    = a.priority,
         Signature   = a.signature is null
             ? null
             : new ResourceDescriptorDto
         {
             Url = a.signature.Url
         },
         Unit            = a.unit,
         ArrivedAt       = a.arrived_at,
         ArriveLatitude  = a.arrive_lat,
         ArriveLongitude = a.arrive_lng,
         CityFa          = a.city_fa,
         CourierId       = a.courier_id,
         CreatedAt       = a.created_at,
         CustomerId      = a.customer_id,
         DeletedAt       = a.deleted_at,
         HandledAt       = a.handled_at,
         HandleLatitude  = a.handle_lat,
         HandleLongitude = a.handle_lng,
         OrderId         = a.order_id,
         PersonPhone     = a.person_phone,
         SignedBy        = a.signed_by,
         UpdatedAt       = a.updated_at,
         PersonFullName  = a.person_fullname
     }).ToArray();