|
1 | 1 | using System;
|
2 | 2 | using System.Collections.Generic;
|
| 3 | +using System.IO; |
3 | 4 | using System.Threading;
|
4 | 5 | using System.Threading.Tasks;
|
5 | 6 | using Ibanity.Apis.Client.Http;
|
@@ -42,6 +43,10 @@ public Task<EInvoicingCollection<PeppolInboundDocument>> List(ClientAccessToken
|
42 | 43 | public Task<PeppolInboundDocument> Get(ClientAccessToken token, Guid id, CancellationToken? cancellationToken = null) =>
|
43 | 44 | InternalGet(token, id, cancellationToken);
|
44 | 45 |
|
| 46 | + /// <inheritdoc /> |
| 47 | + public Task GetXml(ClientAccessToken token, Guid id, Stream target, CancellationToken? cancellationToken = null) => |
| 48 | + InternalGetToStream(token, id, "application/xml", target, cancellationToken); |
| 49 | + |
45 | 50 | /// <inheritdoc />
|
46 | 51 | protected override PeppolInboundDocument Map(Data<PeppolInboundDocument, object, PeppolInboundDocumentRelationships, object> data)
|
47 | 52 | {
|
@@ -78,5 +83,15 @@ public interface IPeppolInboundDocuments
|
78 | 83 | /// <param name="cancellationToken">Allow to cancel a long-running task</param>
|
79 | 84 | /// <returns></returns>
|
80 | 85 | Task<PeppolInboundDocument> Get(ClientAccessToken token, Guid id, CancellationToken? cancellationToken = null);
|
| 86 | + |
| 87 | + /// <summary> |
| 88 | + /// Get Peppol Inbound Document XML |
| 89 | + /// </summary> |
| 90 | + /// <param name="token">Authentication token</param> |
| 91 | + /// <param name="id">Document ID</param> |
| 92 | + /// <param name="target">Document ID</param> |
| 93 | + /// <param name="cancellationToken">Allow to cancel a long-running task</param> |
| 94 | + /// <returns></returns> |
| 95 | + Task GetXml(ClientAccessToken token, Guid id, Stream target, CancellationToken? cancellationToken = null); |
81 | 96 | }
|
82 | 97 | }
|
0 commit comments