Skip to content

Commit eb7e537

Browse files
Add issuing transactions endpoints
1 parent 8a19339 commit eb7e537

33 files changed

+639
-1
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using Checkout.Issuing.Transactions.Requests.Query;
2+
using Checkout.Issuing.Transactions.Responses.Query;
3+
using System.Threading;
4+
using System.Threading.Tasks;
5+
6+
namespace Checkout.Issuing
7+
{
8+
public partial interface IIssuingClient
9+
{
10+
Task<TransactionsListResponse> GetListTransactions(TransactionsQueryFilter query,
11+
CancellationToken cancellationToken = default);
12+
13+
Task<TransactionSingleResponse> GetSingleTransaction(string transactionId,
14+
CancellationToken cancellationToken = default);
15+
}
16+
}

src/CheckoutSdk/Issuing/IssuingClient.Base.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public partial class IssuingClient : AbstractClient, IIssuingClient
1515
private const string AuthorizationPath = "authorizations";
1616
private const string PresentmentsPath = "presentments";
1717
private const string ReversalsPath = "reversals";
18+
private const string TransactionsPath = "transactions";
1819

1920
public IssuingClient(IApiClient apiClient, CheckoutConfiguration configuration) :
2021
base(apiClient, configuration, SdkAuthorizationType.OAuth)
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using Checkout.Issuing.Transactions.Requests.Query;
2+
using Checkout.Issuing.Transactions.Responses.Query;
3+
using System.Threading;
4+
using System.Threading.Tasks;
5+
6+
namespace Checkout.Issuing
7+
{
8+
public partial class IssuingClient
9+
{
10+
public Task<TransactionsListResponse> GetListTransactions(
11+
TransactionsQueryFilter query,
12+
CancellationToken cancellationToken = default
13+
)
14+
{
15+
CheckoutUtils.ValidateParams("query", query);
16+
return ApiClient.Query<TransactionsListResponse>(
17+
BuildPath(IssuingPath, TransactionsPath),
18+
SdkAuthorization(),
19+
query,
20+
cancellationToken);
21+
}
22+
23+
public Task<TransactionSingleResponse> GetSingleTransaction(
24+
string transactionId,
25+
CancellationToken cancellationToken = default
26+
)
27+
{
28+
CheckoutUtils.ValidateParams("transactionId", transactionId);
29+
return ApiClient.Get<TransactionSingleResponse>(
30+
BuildPath(IssuingPath, TransactionsPath, transactionId),
31+
SdkAuthorization(),
32+
cancellationToken);
33+
}
34+
}
35+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using Checkout.Issuing.Transactions.Responses;
2+
using Checkout.Issuing.Transactions.Responses.Query;
3+
using System;
4+
5+
namespace Checkout.Issuing.Transactions.Requests.Query
6+
{
7+
public class TransactionsQueryFilter
8+
{
9+
public int? Limit { get; set; }
10+
11+
public int? Skip { get; set; }
12+
13+
public string CardholderId { get; set; }
14+
15+
public string CardId { get; set; }
16+
17+
public TransactionStatusType? Status { get; set; }
18+
19+
public DateTime? From { get; set; }
20+
21+
public DateTime? To { get; set; }
22+
}
23+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
namespace Checkout.Issuing.Transactions.Responses
2+
{
3+
public class Amounts
4+
{
5+
public TotalHeld TotalHeld { get; set; }
6+
7+
public TotalAuthorized TotalAuthorized { get; set; }
8+
9+
public TotalReversed TotalReversed { get; set; }
10+
11+
public TotalCleared TotalCleared { get; set; }
12+
13+
public TotalRefunded TotalRefunded { get; set; }
14+
}
15+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace Checkout.Issuing.Transactions.Responses
2+
{
3+
public class Card
4+
{
5+
public string Id { get; set; }
6+
7+
public string Network { get; set; }
8+
}
9+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace Checkout.Issuing.Transactions.Responses
2+
{
3+
public class Cardholder
4+
{
5+
public string Id { get; set; }
6+
}
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace Checkout.Issuing.Transactions.Responses
2+
{
3+
public class Client
4+
{
5+
public string Id { get; set; }
6+
}
7+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace Checkout.Issuing.Transactions.Responses
2+
{
3+
public class DigitalCard
4+
{
5+
public string Id { get; set; }
6+
7+
public WalletType? WalletType { get; set; }
8+
}
9+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace Checkout.Issuing.Transactions.Responses
2+
{
3+
public class Entity
4+
{
5+
public string Id { get; set; }
6+
}
7+
}

0 commit comments

Comments
 (0)