Exemple #1
0
        SendMessageRequest SendMessageMagentoRequest(MessageMagento magentoMessage, TicketMagento magentoTicket)
        {
            var sendMessageRequest = new SendMessageRequest()
            {
                message          = magentoMessage.Message,
                type             = "customer-reply",
                sender_id        = magentoMessage.SenderId,
                sender_name      = magentoMessage.SenderId,
                sender_email     = magentoMessage.SenderEmail,
                ticket_id        = magentoTicket.MagentoId,
                created_at       = magentoMessage.CreatedDate.ToString(Shared.Constants.DateTimeFormat_Magento),
                last_modified_at =
                    magentoMessage.LastModifiedDate?.ToString(Shared.Constants.DateTimeFormat_Magento) ??
                    magentoMessage.CreatedDate.ToString(Shared.Constants.DateTimeFormat_Magento),
                note = string.Empty,
            };

            return(sendMessageRequest);
        }
Exemple #2
0
        CreateTicketRequest CreateTicketMagentoRequest(TicketMagento magentoTicket, Connection connection, ChannelMagento channelMagento)
        {
            var createTicketRequest = new CreateTicketRequest()
            {
                connection_id    = connection.Id.ToString(),
                store_id         = channelMagento.StoreId,
                department_id    = "1", //TODO : need to clarify with customer's site
                agent_id         = "1", //TODO : need to clarify with customer's site
                status           = magentoTicket.Status.ToString(),
                type             = magentoTicket.Type,
                item_id          = magentoTicket.ItemId,
                subject          = magentoTicket.Subject,
                creator_id       = magentoTicket.CreatorId,
                creator_name     = magentoTicket.CreatorId,
                creator_email    = magentoTicket.CreatorEmail,
                recipient_id     = magentoTicket.RecipientId,
                created_at       = magentoTicket.CreatedDate.ToString(Shared.Constants.DateTimeFormat_Magento),
                last_modified_at = magentoTicket.LastModifiedDate?.ToString(Shared.Constants.DateTimeFormat_Magento) ?? magentoTicket.CreatedDate.ToString(Shared.Constants.DateTimeFormat_Magento),
                note             = string.Empty,
            };

            return(createTicketRequest);
        }