Skip to content

Commit

Permalink
Merge branch 'CondraAndAttachments'
Browse files Browse the repository at this point in the history
  • Loading branch information
RGleb committed Mar 29, 2023
2 parents 39744d0 + e5c7feb commit d5b7d19
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
5 changes: 2 additions & 3 deletions EdiApi.Client/Http/Messages/MessagesEdiApiHttpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ public OutboxMessageMeta GetOutboxMessageMeta(string authToken, string boxId, st

public OutboxMessageMeta SendMessage(string authToken, string boxId, MessageData messageData)
{
var request = BuildPostRequest("V1/Messages/SendMessage", null, authToken, messageData.MessageBody)
.WithAdditionalQueryParameter("boxId", boxId)
.WithAdditionalQueryParameter("messageFileName", messageData.MessageFileName);
var request = BuildPostRequest("V1/Messages/SendMessageExtended", null, authToken, messageData)
.WithAdditionalQueryParameter("boxId", boxId);

var result = clusterClient.Send(request);
EnsureSuccessResult(result);
Expand Down
12 changes: 12 additions & 0 deletions EdiApi.Client/Types/Common/MessageAttachment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace SkbKontur.EdiApi.Client.Types.Common
{
/// <summary>Содержимое вложения</summary>
public class MessageAttachment
{
/// <summary>Имя вложенного файла</summary>
public string AttachmentFileName { get; set; }

/// <summary>Тело вложенного файла</summary>
public byte[] AttachmentBody { get; set; }
}
}
3 changes: 3 additions & 0 deletions EdiApi.Client/Types/Common/MessageData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ public class MessageData

/// <summary>Тело сообщения</summary>
public byte[] MessageBody { get; set; }

/// <summary>Список вложенных файлов</summary>
public MessageAttachment[] MessageAttachments { get; set; }
}
}
5 changes: 4 additions & 1 deletion EdiApi.Client/Types/Messages/DocumentType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public enum DocumentType
Iftmbf,

/// <summary>Подтверждение заявки на транспортировку груза</summary>
Iftmbc
Iftmbc,

/// <summary>Неструктурированное сообщение</summary>
Condra,
}
}
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "2.1",
"version": "2.2",
"assemblyVersion": {
"precision": "build"
},
Expand Down

0 comments on commit d5b7d19

Please sign in to comment.