Skip to content

Commit 0301a45

Browse files
committed
List Peppol Inbound Documents
1 parent cec9f03 commit 0301a45

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/Client/Products/eInvoicing/PeppolInboundDocuments.cs

+25
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ public PeppolInboundDocuments(IApiClient apiClient, IAccessTokenProvider<ClientA
2424
base(apiClient, accessTokenProvider, urlPrefix, EntityName)
2525
{ }
2626

27+
/// <inheritdoc />
28+
public Task<EInvoicingCollection<PeppolInboundDocument>> List(ClientAccessToken token, DateTimeOffset? fromCreatedAt, Guid? supplierId, long? pageNumber = null, int? pageSize = null, CancellationToken? cancellationToken = null)
29+
{
30+
var parameters = new List<(string, string)>();
31+
32+
if (fromCreatedAt.HasValue)
33+
parameters.Add(("fromCreatedAt", fromCreatedAt.Value.ToString("o")));
34+
35+
if (supplierId.HasValue)
36+
parameters.Add(("supplierId", supplierId.Value.ToString("D")));
37+
38+
return InternalPageBasedList(token, null, parameters, pageNumber, pageSize, cancellationToken);
39+
}
40+
2741
/// <inheritdoc />
2842
protected override PeppolInboundDocument Map(Data<PeppolInboundDocument, object, PeppolInboundDocumentRelationships, object> data)
2943
{
@@ -40,5 +54,16 @@ protected override PeppolInboundDocument Map(Data<PeppolInboundDocument, object,
4054
/// </summary>
4155
public interface IPeppolInboundDocuments
4256
{
57+
/// <summary>
58+
/// List Peppol Inbound Documents
59+
/// </summary>
60+
/// <param name="token">Authentication token</param>
61+
/// <param name="fromCreatedAt">Start of the document created date period scope.</param>
62+
/// <param name="supplierId">The uuid of the supplier given during the on boarding process.</param>
63+
/// <param name="pageNumber">Number of page that should be returned. Must be included to use page-based pagination.</param>
64+
/// <param name="pageSize">Number (1-2000) of document resources that you want to be returned. Defaults to 2000.</param>
65+
/// <param name="cancellationToken">Allow to cancel a long-running task</param>
66+
/// <returns>A list of Peppol Inbound Document resources</returns>
67+
Task<EInvoicingCollection<PeppolInboundDocument>> List(ClientAccessToken token, DateTimeOffset? fromCreatedAt, Guid? supplierId, long? pageNumber = null, int? pageSize = null, CancellationToken? cancellationToken = null);
4368
}
4469
}

0 commit comments

Comments
 (0)