-
Notifications
You must be signed in to change notification settings - Fork 4
/
ILinkingApi.cs
44 lines (40 loc) · 1.42 KB
/
ILinkingApi.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Threading.Tasks;
using JetBrains.Annotations;
using MAVN.Service.PartnerManagement.Client.Models.PartnerLinking;
using Refit;
namespace MAVN.Service.PartnerManagement.Client.Api
{
/// <summary>
/// Linking client API interface.
/// </summary>
[PublicAPI]
public interface ILinkingApi
{
/// <summary>
/// Gets partner linking info
/// </summary>
/// <param name="partnerId">partner id.</param>
/// <response code="200">Partner lining info.</response>
[Get("/api/linking/info")]
Task<PartnerLinkingInfoResponse> GetPartnerLinkingInfoAsync([Query] Guid partnerId);
/// <summary>
/// Regenerates partner linking info
/// </summary>
/// <param name="partnerId">partner id.</param>
[Post("/api/linking/info")]
Task RegeneratePartnerLinkingInfoAsync([Body] Guid partnerId);
/// <summary>
/// Links a partner to a customer
/// </summary>
/// <param name="request">Request model</param>
[Post("/api/linking")]
Task<LinkPartnerResponse> LinkPartnerAsync([Body] LinkPartnerRequest request);
/// <summary>
/// Returns linked partner if exists
/// </summary>
/// <param name="customerId">Id of the customer</param>
[Get("/api/linking")]
Task<Guid?> GetLinkedPartnerAsync([Query] Guid customerId);
}
}