-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathIXeroClient.cs
More file actions
29 lines (28 loc) · 1.31 KB
/
IXeroClient.cs
File metadata and controls
29 lines (28 loc) · 1.31 KB
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
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Xero.NetStandard.OAuth2.Config;
using Xero.NetStandard.OAuth2.Models;
using Xero.NetStandard.OAuth2.Token;
namespace Xero.NetStandard.OAuth2.Client
{
public interface IXeroClient
{
XeroConfiguration xeroConfiguration { get; set; }
string BuildLoginUri();
string BuildLoginUri(string state);
string BuildLoginUri(string state, string scope);
string BuildLoginUriPkce(string codeVerifier);
string BuildLoginUriPkce(string codeVerifier, string state);
string BuildLoginUriPkce(string codeVerifier, string state, string scope);
Task<IXeroToken> RequestAccessTokenAsync(string code);
Task<IXeroToken> RequestAccessTokenPkceAsync(string code, string codeVerifier);
Task<IXeroToken> RefreshAccessTokenAsync(IXeroToken xeroToken);
Task<IXeroToken> RequestClientCredentialsTokenAsync(bool fetchTenants=true);
Task<IXeroToken> GetCurrentValidTokenAsync(IXeroToken xeroToken);
Task<List<Tenant>> GetConnectionsAsync(IXeroToken xeroToken);
Task DeleteConnectionAsync(IXeroToken xeroToken, Tenant xeroTenant);
Task DeleteConnectionAsync(IXeroToken xeroToken, Guid connectionId);
Task RevokeAccessTokenAsync(IXeroToken xeroToken);
}
}