From ddeb836a543c95a43271c4acbf2a59ba2fa8d43a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 14 Feb 2024 12:18:39 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc prealpha, Speakeasy CLI 1.179.0 (#251) Co-authored-by: speakeasybot --- sync-for-expenses/.speakeasy/gen.lock | 16 ++-- .../CodatSyncExpenses/Accounts.cs | 38 +++++--- .../CodatSyncExpenses/CodatSyncExpenses.cs | 41 +++++---- .../CodatSyncExpenses.csproj | 2 +- .../CodatSyncExpenses/Companies.cs | 77 ++++++++++------ .../CodatSyncExpenses/Configuration.cs | 51 +++++++---- .../CodatSyncExpenses/Connections.cs | 90 ++++++++++++------- .../CodatSyncExpenses/Customers.cs | 64 ++++++++----- .../CodatSyncExpenses/Expenses.cs | 51 +++++++---- .../CodatSyncExpenses/ManageData.cs | 77 ++++++++++------ .../Models/Shared/ErrorMessage.cs | 6 ++ .../Models/Shared/ErrorValidation.cs | 28 ++++++ .../Models/Shared/ErrorValidationItem.cs | 36 ++++++++ .../CodatSyncExpenses/PushOperations.cs | 38 +++++--- .../CodatSyncExpenses/Suppliers.cs | 64 ++++++++----- sync-for-expenses/CodatSyncExpenses/Sync.cs | 77 ++++++++++------ .../CodatSyncExpenses/TransactionStatus.cs | 38 +++++--- .../Utils/RequestBodySerializer.cs | 18 ++-- .../Utils/SecuritySerializer.cs | 8 +- .../CodatSyncExpenses/Utils/Utilities.cs | 42 +++++++-- sync-for-expenses/README.md | 10 --- sync-for-expenses/RELEASES.md | 12 ++- sync-for-expenses/USAGE.md | 5 -- .../Operations/CreateCompanyResponse.md | 14 +-- .../Operations/CreateConnectionResponse.md | 14 +-- .../CreatePartnerExpenseConnectionResponse.md | 14 +-- .../Operations/CreateSupplierRequest.md | 14 +-- .../Models/Operations/GetCompanyResponse.md | 14 +-- .../Operations/GetConnectionResponse.md | 14 +-- .../Operations/GetPullOperationResponse.md | 14 +-- .../Models/Operations/GetSupplierResponse.md | 14 +-- .../Operations/ListCompaniesResponse.md | 14 +-- .../Operations/ListConnectionsResponse.md | 14 +-- .../Operations/ListCustomersResponse.md | 14 +-- .../Operations/ListPullOperationsResponse.md | 14 +-- .../Operations/ListPushOperationsResponse.md | 14 +-- .../Operations/ListSuppliersResponse.md | 14 +-- .../ListSyncTransactionsResponse.md | 14 +-- .../Operations/RefreshDataTypeResponse.md | 14 +-- .../Operations/UnlinkConnectionResponse.md | 14 +-- .../Operations/UpdateCompanyResponse.md | 14 +-- .../Operations/UpdateSupplierRequest.md | 18 ++-- .../docs/Models/Shared/Companies.md | 14 +-- .../docs/Models/Shared/Connections.md | 14 +-- .../Models/Shared/CreateSupplierResponse.md | 2 +- .../docs/Models/Shared/Customers.md | 14 +-- .../docs/Models/Shared/ErrorMessage.md | 17 ++-- .../docs/Models/Shared/ErrorValidation.md | 11 +++ .../docs/Models/Shared/ErrorValidationItem.md | 10 +++ .../docs/Models/Shared/PullOperations.md | 14 +-- .../docs/Models/Shared/PushOperations.md | 14 +-- .../docs/Models/Shared/Suppliers.md | 14 +-- .../docs/Models/Shared/Transactions.md | 14 +-- .../Models/Shared/UpdateSupplierResponse.md | 2 +- .../docs/sdks/accounts/README.md | 25 ------ .../docs/sdks/companies/README.md | 14 --- .../docs/sdks/configuration/README.md | 7 -- .../docs/sdks/connections/README.md | 4 - .../docs/sdks/customers/README.md | 72 +-------------- .../docs/sdks/expenses/README.md | 83 ----------------- .../docs/sdks/suppliers/README.md | 62 ++++++++++--- sync-for-expenses/docs/sdks/sync/README.md | 5 -- sync-for-expenses/gen.yaml | 3 +- 63 files changed, 871 insertions(+), 703 deletions(-) create mode 100644 sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorValidation.cs create mode 100644 sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorValidationItem.cs create mode 100644 sync-for-expenses/docs/Models/Shared/ErrorValidation.md create mode 100644 sync-for-expenses/docs/Models/Shared/ErrorValidationItem.md diff --git a/sync-for-expenses/.speakeasy/gen.lock b/sync-for-expenses/.speakeasy/gen.lock index 5a4692592..954ed6800 100755 --- a/sync-for-expenses/.speakeasy/gen.lock +++ b/sync-for-expenses/.speakeasy/gen.lock @@ -1,21 +1,21 @@ lockVersion: 2.0.0 id: 18b9d064-aee3-46b6-b773-6d0ab95e296c management: - docChecksum: fdc7285c8f3a9d1b51e0ac7f1c98ee14 + docChecksum: cd6fa6671764b38bed9a8592c0f117ad docVersion: prealpha speakeasyVersion: internal - generationVersion: 2.248.6 - releaseVersion: 5.0.0 - configChecksum: bd15d9cec6d935b0b22be299083653f4 + generationVersion: 2.257.2 + releaseVersion: 5.1.0 + configChecksum: bf2e9b4d2b7342b0024cf499f9ef09f6 repoURL: https://github.com/codatio/client-sdk-csharp.git repoSubDirectory: sync-for-expenses published: true features: csharp: - core: 3.3.1 + core: 3.3.2 deprecations: 2.81.2 examples: 2.81.3 - globalSecurity: 2.82.0 + globalSecurity: 2.83.0 globalServerURLs: 2.82.2 inputOutputModels: 2.83.0 nameOverrides: 2.81.1 @@ -130,6 +130,8 @@ generatedFiles: - CodatSyncExpenses/Models/Operations/ListSyncTransactionsRequest.cs - CodatSyncExpenses/Models/Operations/ListSyncTransactionsResponse.cs - CodatSyncExpenses/Models/Shared/ErrorMessage.cs + - CodatSyncExpenses/Models/Shared/ErrorValidation.cs + - CodatSyncExpenses/Models/Shared/ErrorValidationItem.cs - CodatSyncExpenses/Models/Shared/GroupReference.cs - CodatSyncExpenses/Models/Shared/Company.cs - CodatSyncExpenses/Models/Shared/SourceType.cs @@ -332,6 +334,8 @@ generatedFiles: - docs/Models/Operations/ListSyncTransactionsRequest.md - docs/Models/Operations/ListSyncTransactionsResponse.md - docs/Models/Shared/ErrorMessage.md + - docs/Models/Shared/ErrorValidation.md + - docs/Models/Shared/ErrorValidationItem.md - docs/Models/Shared/GroupReference.md - docs/Models/Shared/Company.md - docs/Models/Shared/SourceType.md diff --git a/sync-for-expenses/CodatSyncExpenses/Accounts.cs b/sync-for-expenses/CodatSyncExpenses/Accounts.cs index 298e4e443..5ca56608b 100644 --- a/sync-for-expenses/CodatSyncExpenses/Accounts.cs +++ b/sync-for-expenses/CodatSyncExpenses/Accounts.cs @@ -69,18 +69,18 @@ public class Accounts: IAccounts { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0"; - private const string _sdkGenVersion = "2.248.6"; + private const string _sdkVersion = "5.1.0"; + private const string _sdkGenVersion = "2.257.2"; private const string _openapiDocVersion = "prealpha"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0 2.248.6 prealpha Codat.Sync.Expenses"; + private const string _userAgent = "speakeasy-sdk/csharp 5.1.0 2.257.2 prealpha Codat.Sync.Expenses"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; - private ISpeakeasyHttpClient _securityClient; + private Func? _securitySource; - public Accounts(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + public Accounts(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) { _defaultClient = defaultClient; - _securityClient = securityClient; + _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; } @@ -100,8 +100,12 @@ public Accounts(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securit httpRequest.Content = serializedBody; } - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -119,7 +123,7 @@ public Accounts(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securit { response.CreateAccountResponseValue = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -128,11 +132,12 @@ public Accounts(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securit { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task GetCreateModelAsync(GetCreateChartOfAccountsModelRequest? request = null) @@ -144,8 +149,12 @@ public async Task GetCreateModelAsync(Get httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -163,7 +172,7 @@ public async Task GetCreateModelAsync(Get { response.PushOption = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -172,11 +181,12 @@ public async Task GetCreateModelAsync(Get { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + } } \ No newline at end of file diff --git a/sync-for-expenses/CodatSyncExpenses/CodatSyncExpenses.cs b/sync-for-expenses/CodatSyncExpenses/CodatSyncExpenses.cs index e79310bef..b3ac1ef3f 100644 --- a/sync-for-expenses/CodatSyncExpenses/CodatSyncExpenses.cs +++ b/sync-for-expenses/CodatSyncExpenses/CodatSyncExpenses.cs @@ -136,14 +136,14 @@ public class CodatSyncExpenses: ICodatSyncExpenses public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0"; - private const string _sdkGenVersion = "2.248.6"; + private const string _sdkVersion = "5.1.0"; + private const string _sdkGenVersion = "2.257.2"; private const string _openapiDocVersion = "prealpha"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0 2.248.6 prealpha Codat.Sync.Expenses"; + private const string _userAgent = "speakeasy-sdk/csharp 5.1.0 2.257.2 prealpha Codat.Sync.Expenses"; private string _serverUrl = ""; private int _serverIndex = 0; private ISpeakeasyHttpClient _defaultClient; - private ISpeakeasyHttpClient _securityClient; + private Func? _securitySource; public ICompanies Companies { get; private set; } public IConnections Connections { get; private set; } public IAccounts Accounts { get; private set; } @@ -156,7 +156,7 @@ public class CodatSyncExpenses: ICodatSyncExpenses public ISync Sync { get; private set; } public ITransactionStatus TransactionStatus { get; private set; } - public CodatSyncExpenses(Security? security = null, int? serverIndex = null, string? serverUrl = null, Dictionary? urlParams = null, ISpeakeasyHttpClient? client = null) + public CodatSyncExpenses(Security? security = null, Func? securitySource = null, int? serverIndex = null, string? serverUrl = null, Dictionary? urlParams = null, ISpeakeasyHttpClient? client = null) { if (serverIndex != null) { @@ -173,11 +173,14 @@ public CodatSyncExpenses(Security? security = null, int? serverIndex = null, str } _defaultClient = new SpeakeasyHttpClient(client); - _securityClient = _defaultClient; - if(security != null) + if(securitySource != null) { - _securityClient = SecuritySerializer.Apply(_defaultClient, security); + _securitySource = securitySource; + } + else if(security != null) + { + _securitySource = () => security; } SDKConfiguration = new SDKConfig() @@ -186,17 +189,17 @@ public CodatSyncExpenses(Security? security = null, int? serverIndex = null, str serverUrl = _serverUrl }; - Companies = new Companies(_defaultClient, _securityClient, _serverUrl, SDKConfiguration); - Connections = new Connections(_defaultClient, _securityClient, _serverUrl, SDKConfiguration); - Accounts = new Accounts(_defaultClient, _securityClient, _serverUrl, SDKConfiguration); - Customers = new Customers(_defaultClient, _securityClient, _serverUrl, SDKConfiguration); - Suppliers = new Suppliers(_defaultClient, _securityClient, _serverUrl, SDKConfiguration); - ManageData = new ManageData(_defaultClient, _securityClient, _serverUrl, SDKConfiguration); - PushOperations = new PushOperations(_defaultClient, _securityClient, _serverUrl, SDKConfiguration); - Configuration = new Configuration(_defaultClient, _securityClient, _serverUrl, SDKConfiguration); - Expenses = new Expenses(_defaultClient, _securityClient, _serverUrl, SDKConfiguration); - Sync = new Sync(_defaultClient, _securityClient, _serverUrl, SDKConfiguration); - TransactionStatus = new TransactionStatus(_defaultClient, _securityClient, _serverUrl, SDKConfiguration); + Companies = new Companies(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + Connections = new Connections(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + Accounts = new Accounts(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + Customers = new Customers(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + Suppliers = new Suppliers(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + ManageData = new ManageData(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + PushOperations = new PushOperations(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + Configuration = new Configuration(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + Expenses = new Expenses(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + Sync = new Sync(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + TransactionStatus = new TransactionStatus(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); } } } diff --git a/sync-for-expenses/CodatSyncExpenses/CodatSyncExpenses.csproj b/sync-for-expenses/CodatSyncExpenses/CodatSyncExpenses.csproj index f436fd02c..f6f84faa7 100644 --- a/sync-for-expenses/CodatSyncExpenses/CodatSyncExpenses.csproj +++ b/sync-for-expenses/CodatSyncExpenses/CodatSyncExpenses.csproj @@ -2,7 +2,7 @@ true Codat.Sync.Expenses - 5.0.0 + 5.1.0 Codat net6.0 enable diff --git a/sync-for-expenses/CodatSyncExpenses/Companies.cs b/sync-for-expenses/CodatSyncExpenses/Companies.cs index bc52c4c36..e3b711b47 100644 --- a/sync-for-expenses/CodatSyncExpenses/Companies.cs +++ b/sync-for-expenses/CodatSyncExpenses/Companies.cs @@ -98,18 +98,18 @@ public class Companies: ICompanies { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0"; - private const string _sdkGenVersion = "2.248.6"; + private const string _sdkVersion = "5.1.0"; + private const string _sdkGenVersion = "2.257.2"; private const string _openapiDocVersion = "prealpha"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0 2.248.6 prealpha Codat.Sync.Expenses"; + private const string _userAgent = "speakeasy-sdk/csharp 5.1.0 2.257.2 prealpha Codat.Sync.Expenses"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; - private ISpeakeasyHttpClient _securityClient; + private Func? _securitySource; - public Companies(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + public Companies(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) { _defaultClient = defaultClient; - _securityClient = securityClient; + _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; } @@ -129,8 +129,12 @@ public async Task CreateAsync(CompanyRequestBody? request httpRequest.Content = serializedBody; } - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -148,7 +152,7 @@ public async Task CreateAsync(CompanyRequestBody? request { response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -157,11 +161,12 @@ public async Task CreateAsync(CompanyRequestBody? request { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task DeleteAsync(DeleteCompanyRequest? request = null) @@ -173,8 +178,12 @@ public async Task DeleteAsync(DeleteCompanyRequest? reque httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -188,7 +197,7 @@ public async Task DeleteAsync(DeleteCompanyRequest? reque if((response.StatusCode == 204)) { - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -197,11 +206,12 @@ public async Task DeleteAsync(DeleteCompanyRequest? reque { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task GetAsync(GetCompanyRequest? request = null) @@ -213,8 +223,12 @@ public async Task GetAsync(GetCompanyRequest? request = null httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -232,7 +246,7 @@ public async Task GetAsync(GetCompanyRequest? request = null { response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -241,11 +255,12 @@ public async Task GetAsync(GetCompanyRequest? request = null { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task ListAsync(ListCompaniesRequest? request = null) @@ -257,8 +272,12 @@ public async Task ListAsync(ListCompaniesRequest? request httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -276,7 +295,7 @@ public async Task ListAsync(ListCompaniesRequest? request { response.Companies = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -285,11 +304,12 @@ public async Task ListAsync(ListCompaniesRequest? request { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task UpdateAsync(UpdateCompanyRequest? request = null) @@ -306,8 +326,12 @@ public async Task UpdateAsync(UpdateCompanyRequest? reque httpRequest.Content = serializedBody; } - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -325,7 +349,7 @@ public async Task UpdateAsync(UpdateCompanyRequest? reque { response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -334,11 +358,12 @@ public async Task UpdateAsync(UpdateCompanyRequest? reque { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + } } \ No newline at end of file diff --git a/sync-for-expenses/CodatSyncExpenses/Configuration.cs b/sync-for-expenses/CodatSyncExpenses/Configuration.cs index d069bdc81..4054d48ed 100644 --- a/sync-for-expenses/CodatSyncExpenses/Configuration.cs +++ b/sync-for-expenses/CodatSyncExpenses/Configuration.cs @@ -60,18 +60,18 @@ public class Configuration: IConfiguration { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0"; - private const string _sdkGenVersion = "2.248.6"; + private const string _sdkVersion = "5.1.0"; + private const string _sdkGenVersion = "2.257.2"; private const string _openapiDocVersion = "prealpha"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0 2.248.6 prealpha Codat.Sync.Expenses"; + private const string _userAgent = "speakeasy-sdk/csharp 5.1.0 2.257.2 prealpha Codat.Sync.Expenses"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; - private ISpeakeasyHttpClient _securityClient; + private Func? _securitySource; - public Configuration(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + public Configuration(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) { _defaultClient = defaultClient; - _securityClient = securityClient; + _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; } @@ -86,8 +86,12 @@ public async Task GetAsync(GetCompanyConfigurat httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -105,7 +109,7 @@ public async Task GetAsync(GetCompanyConfigurat { response.CompanyConfiguration = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -114,11 +118,12 @@ public async Task GetAsync(GetCompanyConfigurat { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task GetMappingOptionsAsync(GetMappingOptionsRequest? request = null) @@ -130,8 +135,12 @@ public async Task GetMappingOptionsAsync(GetMappingOp httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -149,7 +158,7 @@ public async Task GetMappingOptionsAsync(GetMappingOp { response.MappingOptions = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -158,11 +167,12 @@ public async Task GetMappingOptionsAsync(GetMappingOp { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task SetAsync(SetCompanyConfigurationRequest? request = null) @@ -179,8 +189,12 @@ public async Task SetAsync(SetCompanyConfigurat httpRequest.Content = serializedBody; } - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -198,7 +212,7 @@ public async Task SetAsync(SetCompanyConfigurat { response.CompanyConfiguration = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -207,11 +221,12 @@ public async Task SetAsync(SetCompanyConfigurat { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + } } \ No newline at end of file diff --git a/sync-for-expenses/CodatSyncExpenses/Connections.cs b/sync-for-expenses/CodatSyncExpenses/Connections.cs index bc1deeb31..666874cd9 100644 --- a/sync-for-expenses/CodatSyncExpenses/Connections.cs +++ b/sync-for-expenses/CodatSyncExpenses/Connections.cs @@ -90,18 +90,18 @@ public class Connections: IConnections { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0"; - private const string _sdkGenVersion = "2.248.6"; + private const string _sdkVersion = "5.1.0"; + private const string _sdkGenVersion = "2.257.2"; private const string _openapiDocVersion = "prealpha"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0 2.248.6 prealpha Codat.Sync.Expenses"; + private const string _userAgent = "speakeasy-sdk/csharp 5.1.0 2.257.2 prealpha Codat.Sync.Expenses"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; - private ISpeakeasyHttpClient _securityClient; + private Func? _securitySource; - public Connections(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + public Connections(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) { _defaultClient = defaultClient; - _securityClient = securityClient; + _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; } @@ -121,8 +121,12 @@ public async Task CreateAsync(CreateConnectionRequest? httpRequest.Content = serializedBody; } - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -140,7 +144,7 @@ public async Task CreateAsync(CreateConnectionRequest? { response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -149,11 +153,12 @@ public async Task CreateAsync(CreateConnectionRequest? { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task CreatePartnerExpenseConnectionAsync(CreatePartnerExpenseConnectionRequest? request = null) @@ -165,8 +170,12 @@ public async Task CreatePartnerExpenseCo httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -184,7 +193,7 @@ public async Task CreatePartnerExpenseCo { response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -193,11 +202,12 @@ public async Task CreatePartnerExpenseCo { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task DeleteAsync(DeleteConnectionRequest? request = null) @@ -209,8 +219,12 @@ public async Task DeleteAsync(DeleteConnectionRequest? httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -224,7 +238,7 @@ public async Task DeleteAsync(DeleteConnectionRequest? if((response.StatusCode == 200)) { - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -233,11 +247,12 @@ public async Task DeleteAsync(DeleteConnectionRequest? { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task GetAsync(GetConnectionRequest? request = null) @@ -249,8 +264,12 @@ public async Task GetAsync(GetConnectionRequest? request httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -268,7 +287,7 @@ public async Task GetAsync(GetConnectionRequest? request { response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -277,11 +296,12 @@ public async Task GetAsync(GetConnectionRequest? request { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task ListAsync(ListConnectionsRequest? request = null) @@ -293,8 +313,12 @@ public async Task ListAsync(ListConnectionsRequest? req httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -312,7 +336,7 @@ public async Task ListAsync(ListConnectionsRequest? req { response.Connections = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -321,11 +345,12 @@ public async Task ListAsync(ListConnectionsRequest? req { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task UnlinkAsync(UnlinkConnectionRequest? request = null) @@ -342,8 +367,12 @@ public async Task UnlinkAsync(UnlinkConnectionRequest? httpRequest.Content = serializedBody; } - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -361,7 +390,7 @@ public async Task UnlinkAsync(UnlinkConnectionRequest? { response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -370,11 +399,12 @@ public async Task UnlinkAsync(UnlinkConnectionRequest? { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + } } \ No newline at end of file diff --git a/sync-for-expenses/CodatSyncExpenses/Customers.cs b/sync-for-expenses/CodatSyncExpenses/Customers.cs index 1e898e25a..8c0ce8203 100644 --- a/sync-for-expenses/CodatSyncExpenses/Customers.cs +++ b/sync-for-expenses/CodatSyncExpenses/Customers.cs @@ -99,18 +99,18 @@ public class Customers: ICustomers { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0"; - private const string _sdkGenVersion = "2.248.6"; + private const string _sdkVersion = "5.1.0"; + private const string _sdkGenVersion = "2.257.2"; private const string _openapiDocVersion = "prealpha"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0 2.248.6 prealpha Codat.Sync.Expenses"; + private const string _userAgent = "speakeasy-sdk/csharp 5.1.0 2.257.2 prealpha Codat.Sync.Expenses"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; - private ISpeakeasyHttpClient _securityClient; + private Func? _securitySource; - public Customers(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + public Customers(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) { _defaultClient = defaultClient; - _securityClient = securityClient; + _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; } @@ -130,8 +130,12 @@ public Customers(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securi httpRequest.Content = serializedBody; } - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -149,7 +153,7 @@ public Customers(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securi { response.CreateCustomerResponseValue = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -158,11 +162,12 @@ public Customers(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securi { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task GetAsync(GetCustomerRequest? request = null) @@ -174,8 +179,12 @@ public async Task GetAsync(GetCustomerRequest? request = nu httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -193,7 +202,7 @@ public async Task GetAsync(GetCustomerRequest? request = nu { response.Customer = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -202,11 +211,12 @@ public async Task GetAsync(GetCustomerRequest? request = nu { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task ListAsync(ListCustomersRequest? request = null) @@ -218,8 +228,12 @@ public async Task ListAsync(ListCustomersRequest? request httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -237,7 +251,7 @@ public async Task ListAsync(ListCustomersRequest? request { response.Customers = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -246,11 +260,12 @@ public async Task ListAsync(ListCustomersRequest? request { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task UpdateAsync(UpdateCustomerRequest? request = null) @@ -267,8 +282,12 @@ public async Task ListAsync(ListCustomersRequest? request httpRequest.Content = serializedBody; } - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -286,7 +305,7 @@ public async Task ListAsync(ListCustomersRequest? request { response.UpdateCustomerResponseValue = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -295,11 +314,12 @@ public async Task ListAsync(ListCustomersRequest? request { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + } } \ No newline at end of file diff --git a/sync-for-expenses/CodatSyncExpenses/Expenses.cs b/sync-for-expenses/CodatSyncExpenses/Expenses.cs index c3732cc5b..5f79c63e4 100644 --- a/sync-for-expenses/CodatSyncExpenses/Expenses.cs +++ b/sync-for-expenses/CodatSyncExpenses/Expenses.cs @@ -94,18 +94,18 @@ public class Expenses: IExpenses { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0"; - private const string _sdkGenVersion = "2.248.6"; + private const string _sdkVersion = "5.1.0"; + private const string _sdkGenVersion = "2.257.2"; private const string _openapiDocVersion = "prealpha"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0 2.248.6 prealpha Codat.Sync.Expenses"; + private const string _userAgent = "speakeasy-sdk/csharp 5.1.0 2.257.2 prealpha Codat.Sync.Expenses"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; - private ISpeakeasyHttpClient _securityClient; + private Func? _securitySource; - public Expenses(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + public Expenses(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) { _defaultClient = defaultClient; - _securityClient = securityClient; + _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; } @@ -125,8 +125,12 @@ public async Task CreateAsync(CreateExpenseTra httpRequest.Content = serializedBody; } - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -144,7 +148,7 @@ public async Task CreateAsync(CreateExpenseTra { response.CreateExpenseResponse = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -153,11 +157,12 @@ public async Task CreateAsync(CreateExpenseTra { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task UpdateAsync(UpdateExpenseTransactionRequest? request = null) @@ -174,8 +179,12 @@ public async Task UpdateAsync(UpdateExpenseTra httpRequest.Content = serializedBody; } - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -193,7 +202,7 @@ public async Task UpdateAsync(UpdateExpenseTra { response.UpdateExpenseResponse = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 422) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -202,11 +211,12 @@ public async Task UpdateAsync(UpdateExpenseTra { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task UploadAttachmentAsync(UploadExpenseAttachmentRequest? request = null) @@ -223,8 +233,12 @@ public async Task UploadAttachmentAsync(UploadE httpRequest.Content = serializedBody; } - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -242,7 +256,7 @@ public async Task UploadAttachmentAsync(UploadE { response.Attachment = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -251,11 +265,12 @@ public async Task UploadAttachmentAsync(UploadE { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + } } \ No newline at end of file diff --git a/sync-for-expenses/CodatSyncExpenses/ManageData.cs b/sync-for-expenses/CodatSyncExpenses/ManageData.cs index 325082db0..c968f3a40 100644 --- a/sync-for-expenses/CodatSyncExpenses/ManageData.cs +++ b/sync-for-expenses/CodatSyncExpenses/ManageData.cs @@ -85,18 +85,18 @@ public class ManageData: IManageData { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0"; - private const string _sdkGenVersion = "2.248.6"; + private const string _sdkVersion = "5.1.0"; + private const string _sdkGenVersion = "2.257.2"; private const string _openapiDocVersion = "prealpha"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0 2.248.6 prealpha Codat.Sync.Expenses"; + private const string _userAgent = "speakeasy-sdk/csharp 5.1.0 2.257.2 prealpha Codat.Sync.Expenses"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; - private ISpeakeasyHttpClient _securityClient; + private Func? _securitySource; - public ManageData(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + public ManageData(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) { _defaultClient = defaultClient; - _securityClient = securityClient; + _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; } @@ -111,8 +111,12 @@ public async Task GetAsync(GetDataStatusRequest? request httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -130,7 +134,7 @@ public async Task GetAsync(GetDataStatusRequest? request { response.DataStatuses = JsonConvert.DeserializeObject>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -139,11 +143,12 @@ public async Task GetAsync(GetDataStatusRequest? request { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task GetPullOperationAsync(GetPullOperationRequest? request = null) @@ -155,8 +160,12 @@ public async Task GetPullOperationAsync(GetPullOperati httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -174,7 +183,7 @@ public async Task GetPullOperationAsync(GetPullOperati { response.PullOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -183,11 +192,12 @@ public async Task GetPullOperationAsync(GetPullOperati { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task ListPullOperationsAsync(ListPullOperationsRequest? request = null) @@ -199,8 +209,12 @@ public async Task ListPullOperationsAsync(ListPullOp httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -218,7 +232,7 @@ public async Task ListPullOperationsAsync(ListPullOp { response.PullOperations = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -227,11 +241,12 @@ public async Task ListPullOperationsAsync(ListPullOp { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task RefreshAllDataTypesAsync(RefreshAllDataTypesRequest? request = null) @@ -243,8 +258,12 @@ public async Task RefreshAllDataTypesAsync(RefreshA httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -258,7 +277,7 @@ public async Task RefreshAllDataTypesAsync(RefreshA if((response.StatusCode == 204)) { - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -267,11 +286,12 @@ public async Task RefreshAllDataTypesAsync(RefreshA { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task RefreshDataTypeAsync(RefreshDataTypeRequest? request = null) @@ -283,8 +303,12 @@ public async Task RefreshDataTypeAsync(RefreshDataTypeR httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -302,7 +326,7 @@ public async Task RefreshDataTypeAsync(RefreshDataTypeR { response.PullOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -311,11 +335,12 @@ public async Task RefreshDataTypeAsync(RefreshDataTypeR { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + } } \ No newline at end of file diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorMessage.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorMessage.cs index f446437a9..b1867a9ee 100644 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorMessage.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorMessage.cs @@ -50,5 +50,11 @@ public class ErrorMessage /// [JsonProperty("statusCode")] public long? StatusCode { get; set; } + + /// + /// A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. + /// + [JsonProperty("validation")] + public ErrorValidation? Validation { get; set; } } } \ No newline at end of file diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorValidation.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorValidation.cs new file mode 100644 index 000000000..3869cbca5 --- /dev/null +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorValidation.cs @@ -0,0 +1,28 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Expenses.Models.Shared +{ + using Newtonsoft.Json; + using System.Collections.Generic; + + /// + /// A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. + /// + public class ErrorValidation + { + + [JsonProperty("errors")] + public List? Errors { get; set; } + + [JsonProperty("warnings")] + public List? Warnings { get; set; } + } +} \ No newline at end of file diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorValidationItem.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorValidationItem.cs new file mode 100644 index 000000000..d758d0092 --- /dev/null +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorValidationItem.cs @@ -0,0 +1,36 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Expenses.Models.Shared +{ + using Newtonsoft.Json; + + public class ErrorValidationItem + { + + /// + /// Unique identifier for a validation item. + /// + [JsonProperty("itemId")] + public string? ItemId { get; set; } + + /// + /// A message outlining validation item's issue. + /// + [JsonProperty("message")] + public string? Message { get; set; } + + /// + /// Name of validator. + /// + [JsonProperty("validatorName")] + public string? ValidatorName { get; set; } + } +} \ No newline at end of file diff --git a/sync-for-expenses/CodatSyncExpenses/PushOperations.cs b/sync-for-expenses/CodatSyncExpenses/PushOperations.cs index 37fbfc760..fd5f87954 100644 --- a/sync-for-expenses/CodatSyncExpenses/PushOperations.cs +++ b/sync-for-expenses/CodatSyncExpenses/PushOperations.cs @@ -51,18 +51,18 @@ public class PushOperations: IPushOperations { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0"; - private const string _sdkGenVersion = "2.248.6"; + private const string _sdkVersion = "5.1.0"; + private const string _sdkGenVersion = "2.257.2"; private const string _openapiDocVersion = "prealpha"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0 2.248.6 prealpha Codat.Sync.Expenses"; + private const string _userAgent = "speakeasy-sdk/csharp 5.1.0 2.257.2 prealpha Codat.Sync.Expenses"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; - private ISpeakeasyHttpClient _securityClient; + private Func? _securitySource; - public PushOperations(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + public PushOperations(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) { _defaultClient = defaultClient; - _securityClient = securityClient; + _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; } @@ -77,8 +77,12 @@ public async Task GetAsync(GetPushOperationRequest? re httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -96,7 +100,7 @@ public async Task GetAsync(GetPushOperationRequest? re { response.PushOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -105,11 +109,12 @@ public async Task GetAsync(GetPushOperationRequest? re { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task ListAsync(ListPushOperationsRequest? request = null) @@ -121,8 +126,12 @@ public async Task ListAsync(ListPushOperationsReques httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -140,7 +149,7 @@ public async Task ListAsync(ListPushOperationsReques { response.PushOperations = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -149,11 +158,12 @@ public async Task ListAsync(ListPushOperationsReques { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + } } \ No newline at end of file diff --git a/sync-for-expenses/CodatSyncExpenses/Suppliers.cs b/sync-for-expenses/CodatSyncExpenses/Suppliers.cs index 4aef1181f..a5989669a 100644 --- a/sync-for-expenses/CodatSyncExpenses/Suppliers.cs +++ b/sync-for-expenses/CodatSyncExpenses/Suppliers.cs @@ -99,18 +99,18 @@ public class Suppliers: ISuppliers { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0"; - private const string _sdkGenVersion = "2.248.6"; + private const string _sdkVersion = "5.1.0"; + private const string _sdkGenVersion = "2.257.2"; private const string _openapiDocVersion = "prealpha"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0 2.248.6 prealpha Codat.Sync.Expenses"; + private const string _userAgent = "speakeasy-sdk/csharp 5.1.0 2.257.2 prealpha Codat.Sync.Expenses"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; - private ISpeakeasyHttpClient _securityClient; + private Func? _securitySource; - public Suppliers(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + public Suppliers(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) { _defaultClient = defaultClient; - _securityClient = securityClient; + _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; } @@ -130,8 +130,12 @@ public Suppliers(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securi httpRequest.Content = serializedBody; } - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -149,7 +153,7 @@ public Suppliers(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securi { response.CreateSupplierResponseValue = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -158,11 +162,12 @@ public Suppliers(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securi { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task GetAsync(GetSupplierRequest? request = null) @@ -174,8 +179,12 @@ public async Task GetAsync(GetSupplierRequest? request = nu httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -193,7 +202,7 @@ public async Task GetAsync(GetSupplierRequest? request = nu { response.Supplier = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -202,11 +211,12 @@ public async Task GetAsync(GetSupplierRequest? request = nu { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task ListAsync(ListSuppliersRequest? request = null) @@ -218,8 +228,12 @@ public async Task ListAsync(ListSuppliersRequest? request httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -237,7 +251,7 @@ public async Task ListAsync(ListSuppliersRequest? request { response.Suppliers = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -246,11 +260,12 @@ public async Task ListAsync(ListSuppliersRequest? request { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task UpdateAsync(UpdateSupplierRequest? request = null) @@ -267,8 +282,12 @@ public async Task ListAsync(ListSuppliersRequest? request httpRequest.Content = serializedBody; } - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -286,7 +305,7 @@ public async Task ListAsync(ListSuppliersRequest? request { response.UpdateSupplierResponseValue = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -295,11 +314,12 @@ public async Task ListAsync(ListSuppliersRequest? request { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + } } \ No newline at end of file diff --git a/sync-for-expenses/CodatSyncExpenses/Sync.cs b/sync-for-expenses/CodatSyncExpenses/Sync.cs index 213b5d8ac..05e100317 100644 --- a/sync-for-expenses/CodatSyncExpenses/Sync.cs +++ b/sync-for-expenses/CodatSyncExpenses/Sync.cs @@ -79,18 +79,18 @@ public class Sync: ISync { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0"; - private const string _sdkGenVersion = "2.248.6"; + private const string _sdkVersion = "5.1.0"; + private const string _sdkGenVersion = "2.257.2"; private const string _openapiDocVersion = "prealpha"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0 2.248.6 prealpha Codat.Sync.Expenses"; + private const string _userAgent = "speakeasy-sdk/csharp 5.1.0 2.257.2 prealpha Codat.Sync.Expenses"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; - private ISpeakeasyHttpClient _securityClient; + private Func? _securitySource; - public Sync(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + public Sync(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) { _defaultClient = defaultClient; - _securityClient = securityClient; + _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; } @@ -105,8 +105,12 @@ public async Task GetAsync(GetSyncByIdRequest? request = nu httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -124,7 +128,7 @@ public async Task GetAsync(GetSyncByIdRequest? request = nu { response.CompanySyncStatus = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -133,11 +137,12 @@ public async Task GetAsync(GetSyncByIdRequest? request = nu { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task GetLastSuccessfulSyncAsync(GetLastSuccessfulSyncRequest? request = null) @@ -149,8 +154,12 @@ public async Task GetLastSuccessfulSyncAsync(GetL httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -168,7 +177,7 @@ public async Task GetLastSuccessfulSyncAsync(GetL { response.CompanySyncStatus = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -177,11 +186,12 @@ public async Task GetLastSuccessfulSyncAsync(GetL { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task GetLatestSyncAsync(GetLatestSyncRequest? request = null) @@ -193,8 +203,12 @@ public async Task GetLatestSyncAsync(GetLatestSyncRequest httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -212,7 +226,7 @@ public async Task GetLatestSyncAsync(GetLatestSyncRequest { response.CompanySyncStatus = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -221,11 +235,12 @@ public async Task GetLatestSyncAsync(GetLatestSyncRequest { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task InitiateSyncAsync(InitiateSyncRequest? request = null) @@ -242,8 +257,12 @@ public async Task InitiateSyncAsync(InitiateSyncRequest? r httpRequest.Content = serializedBody; } - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -261,7 +280,7 @@ public async Task InitiateSyncAsync(InitiateSyncRequest? r { response.SyncInitiated = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 422) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -270,11 +289,12 @@ public async Task InitiateSyncAsync(InitiateSyncRequest? r { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task ListAsync(ListSyncsRequest? request = null) @@ -286,8 +306,12 @@ public async Task ListAsync(ListSyncsRequest? request = null) httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -305,7 +329,7 @@ public async Task ListAsync(ListSyncsRequest? request = null) { response.Classes = JsonConvert.DeserializeObject>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -314,11 +338,12 @@ public async Task ListAsync(ListSyncsRequest? request = null) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + } } \ No newline at end of file diff --git a/sync-for-expenses/CodatSyncExpenses/TransactionStatus.cs b/sync-for-expenses/CodatSyncExpenses/TransactionStatus.cs index 01d24cf11..5a2efb516 100644 --- a/sync-for-expenses/CodatSyncExpenses/TransactionStatus.cs +++ b/sync-for-expenses/CodatSyncExpenses/TransactionStatus.cs @@ -51,18 +51,18 @@ public class TransactionStatus: ITransactionStatus { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0"; - private const string _sdkGenVersion = "2.248.6"; + private const string _sdkVersion = "5.1.0"; + private const string _sdkGenVersion = "2.257.2"; private const string _openapiDocVersion = "prealpha"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0 2.248.6 prealpha Codat.Sync.Expenses"; + private const string _userAgent = "speakeasy-sdk/csharp 5.1.0 2.257.2 prealpha Codat.Sync.Expenses"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; - private ISpeakeasyHttpClient _securityClient; + private Func? _securitySource; - public TransactionStatus(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + public TransactionStatus(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) { _defaultClient = defaultClient; - _securityClient = securityClient; + _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; } @@ -77,8 +77,12 @@ public async Task GetAsync(GetSyncTransactionRequest httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -96,7 +100,7 @@ public async Task GetAsync(GetSyncTransactionRequest { response.Transaction = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -105,11 +109,12 @@ public async Task GetAsync(GetSyncTransactionRequest { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + public async Task ListAsync(ListSyncTransactionsRequest? request = null) @@ -121,8 +126,12 @@ public async Task ListAsync(ListSyncTransactionsRe httpRequest.Headers.Add("user-agent", _userAgent); - var client = _securityClient; - + var client = _defaultClient; + if (_securitySource != null) + { + client = SecuritySerializer.Apply(_defaultClient, _securitySource); + } + var httpResponse = await client.SendAsync(httpRequest); var contentType = httpResponse.Content.Headers.ContentType?.MediaType; @@ -140,7 +149,7 @@ public async Task ListAsync(ListSyncTransactionsRe { response.Transactions = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) @@ -149,11 +158,12 @@ public async Task ListAsync(ListSyncTransactionsRe { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); } - + return response; } return response; } + } } \ No newline at end of file diff --git a/sync-for-expenses/CodatSyncExpenses/Utils/RequestBodySerializer.cs b/sync-for-expenses/CodatSyncExpenses/Utils/RequestBodySerializer.cs index f3311e777..12e0aac82 100644 --- a/sync-for-expenses/CodatSyncExpenses/Utils/RequestBodySerializer.cs +++ b/sync-for-expenses/CodatSyncExpenses/Utils/RequestBodySerializer.cs @@ -22,7 +22,8 @@ internal class RequestBodySerializer public static HttpContent? Serialize( object? request, string requestFieldName, - string serializationMethod + string serializationMethod, + string format = "" ) { if (request == null) @@ -56,14 +57,15 @@ string serializationMethod } // Not an object or flattened request - return TrySerialize(request, requestFieldName, serializationMethod); + return TrySerialize(request, requestFieldName, serializationMethod, "", format); } private static HttpContent? TrySerialize( object request, string requestFieldName, string serializationMethod, - string mediaType = "" + string mediaType = "", + string format = "" ) { if (mediaType == "") @@ -81,7 +83,7 @@ string serializationMethod switch (serializationMethod) { case "json": - return SerializeJson(request, mediaType); + return SerializeJson(request, mediaType, format); case "form": return SerializeForm(request, requestFieldName, mediaType); case "multipart": @@ -109,9 +111,9 @@ string serializationMethod } } - private static HttpContent SerializeJson(object request, string mediaType) + private static HttpContent SerializeJson(object request, string mediaType, string format = "") { - return new StringContent(Utilities.SerializeJSON(request), Encoding.UTF8, mediaType); + return new StringContent(Utilities.SerializeJSON(request, format), Encoding.UTF8, mediaType); } private static HttpContent SerializeForm( @@ -482,7 +484,7 @@ ref Dictionary> form { form[fieldName] = new List(); } - + form[fieldName].Add(Utilities.ValueToString(value)); } } @@ -499,4 +501,4 @@ ref Dictionary> form } } } -} \ No newline at end of file +} diff --git a/sync-for-expenses/CodatSyncExpenses/Utils/SecuritySerializer.cs b/sync-for-expenses/CodatSyncExpenses/Utils/SecuritySerializer.cs index 77cd2670b..7c73ed28d 100644 --- a/sync-for-expenses/CodatSyncExpenses/Utils/SecuritySerializer.cs +++ b/sync-for-expenses/CodatSyncExpenses/Utils/SecuritySerializer.cs @@ -16,8 +16,14 @@ namespace Codat.Sync.Expenses.Utils internal static class SecuritySerializer { - public static ISpeakeasyHttpClient Apply(ISpeakeasyHttpClient client, object security) + public static ISpeakeasyHttpClient Apply(ISpeakeasyHttpClient client, Func securitySource) { + if (securitySource == null) + { + return client; + } + + var security = securitySource(); if (security == null) { return client; diff --git a/sync-for-expenses/CodatSyncExpenses/Utils/Utilities.cs b/sync-for-expenses/CodatSyncExpenses/Utils/Utilities.cs index 1e7e4a910..bec32ed65 100644 --- a/sync-for-expenses/CodatSyncExpenses/Utils/Utilities.cs +++ b/sync-for-expenses/CodatSyncExpenses/Utils/Utilities.cs @@ -15,24 +15,52 @@ namespace Codat.Sync.Expenses.Utils using System.Net.Http.Headers; using System.Collections.Generic; using System.Text.RegularExpressions; + using System.Numerics; using Newtonsoft.Json; using NodaTime; using System.Collections; public class Utilities { - public static string SerializeJSON(object obj) + public static JsonConverter[] GetJsonConverters(Type type, string format = "") { + if (format == "string") + { + if (type == typeof(BigInteger)) + { + return new JsonConverter[] { new BigIntSerializer() }; + } + if (type == typeof(Decimal)) + { + return new JsonConverter[] { new DecimalSerializer() }; + } + } + + return new JsonConverter[] + { + new IsoDateTimeSerializer(), + new EnumSerializer(), + }; + } + + public static string SerializeJSON(object obj, string format = "") + { + var type = obj.GetType(); + if (IsList(obj)) + { + type = type.GetGenericArguments().Single(); + } + else if (IsDictionary(obj)) + { + type = type.GetGenericArguments().Last(); + } + return JsonConvert.SerializeObject( obj, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, - Converters = new JsonConverter[] - { - new IsoDateTimeSerializer(), - new EnumSerializer() - } + Converters = GetJsonConverters(type, format) } ); } @@ -238,4 +266,4 @@ public static string TemplateUrl(string template, Dictionary par return template; } } -} \ No newline at end of file +} diff --git a/sync-for-expenses/README.md b/sync-for-expenses/README.md index dd79b8cbe..3b53b9ec8 100644 --- a/sync-for-expenses/README.md +++ b/sync-for-expenses/README.md @@ -31,11 +31,6 @@ var sdk = new CodatSyncExpenses(security: new Security() { CompanyRequestBody req = new CompanyRequestBody() { Description = "Requested early access to the new financing scheme.", - Groups = new List() { - new GroupItems() { - Id = "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - }, Name = "Bank of Dave", }; @@ -167,11 +162,6 @@ var sdk = new CodatSyncExpenses(security: new Security() { CompanyRequestBody req = new CompanyRequestBody() { Description = "Requested early access to the new financing scheme.", - Groups = new List() { - new GroupItems() { - Id = "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - }, Name = "Bank of Dave", }; diff --git a/sync-for-expenses/RELEASES.md b/sync-for-expenses/RELEASES.md index 6503ac980..d59d5b736 100644 --- a/sync-for-expenses/RELEASES.md +++ b/sync-for-expenses/RELEASES.md @@ -130,4 +130,14 @@ Based on: ### Generated - [csharp v5.0.0] sync-for-expenses ### Releases -- [NuGet v5.0.0] https://www.nuget.org/packages/Codat.Sync.Expenses/5.0.0 - sync-for-expenses \ No newline at end of file +- [NuGet v5.0.0] https://www.nuget.org/packages/Codat.Sync.Expenses/5.0.0 - sync-for-expenses + +## 2024-02-14 12:10:11 +### Changes +Based on: +- OpenAPI Doc prealpha https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Expenses.yaml +- Speakeasy CLI 1.179.0 (2.257.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v5.1.0] sync-for-expenses +### Releases +- [NuGet v5.1.0] https://www.nuget.org/packages/Codat.Sync.Expenses/5.1.0 - sync-for-expenses \ No newline at end of file diff --git a/sync-for-expenses/USAGE.md b/sync-for-expenses/USAGE.md index 18be6522b..aef7590a1 100644 --- a/sync-for-expenses/USAGE.md +++ b/sync-for-expenses/USAGE.md @@ -10,11 +10,6 @@ var sdk = new CodatSyncExpenses(security: new Security() { CompanyRequestBody req = new CompanyRequestBody() { Description = "Requested early access to the new financing scheme.", - Groups = new List() { - new GroupItems() { - Id = "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - }, Name = "Bank of Dave", }; diff --git a/sync-for-expenses/docs/Models/Operations/CreateCompanyResponse.md b/sync-for-expenses/docs/Models/Operations/CreateCompanyResponse.md index e24c4e773..05e1bff26 100644 --- a/sync-for-expenses/docs/Models/Operations/CreateCompanyResponse.md +++ b/sync-for-expenses/docs/Models/Operations/CreateCompanyResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | The request made is not valid. | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | {"id":"0498e921-9b53-4396-a412-4f2f5983b0a2","name":"string","platform":"string","redirect":"https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739","lastSync":"2022-01-01T12:00:00.000Z","created":"2022-01-01T12:00:00.000Z","createdByUserName":"string","dataConnections":[{"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"}],"groups":[{"id":"d7a6c4b4-dc87-45f6-b803-62f466398680"}]} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | The request made is not valid. | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/CreateConnectionResponse.md b/sync-for-expenses/docs/Models/Operations/CreateConnectionResponse.md index da5b0f4db..466502b00 100644 --- a/sync-for-expenses/docs/Models/Operations/CreateConnectionResponse.md +++ b/sync-for-expenses/docs/Models/Operations/CreateConnectionResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | {"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/CreatePartnerExpenseConnectionResponse.md b/sync-for-expenses/docs/Models/Operations/CreatePartnerExpenseConnectionResponse.md index 9f99c6c4a..d1bfe4c3d 100644 --- a/sync-for-expenses/docs/Models/Operations/CreatePartnerExpenseConnectionResponse.md +++ b/sync-for-expenses/docs/Models/Operations/CreatePartnerExpenseConnectionResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | Success | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | The request made is not valid. | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | Success | {"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | The request made is not valid. | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/CreateSupplierRequest.md b/sync-for-expenses/docs/Models/Operations/CreateSupplierRequest.md index a9fdad11c..ab211a6ac 100644 --- a/sync-for-expenses/docs/Models/Operations/CreateSupplierRequest.md +++ b/sync-for-expenses/docs/Models/Operations/CreateSupplierRequest.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `Supplier` | [Supplier](../../Models/Shared/Supplier.md) | :heavy_minus_sign: | N/A | | -| `AllowSyncOnPushComplete` | *bool* | :heavy_minus_sign: | Allow a sync upon push completion. | | -| `CompanyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `ConnectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `TimeoutInMinutes` | *int* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Supplier` | [Supplier](../../Models/Shared/Supplier.md) | :heavy_minus_sign: | N/A | {"id":"C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F","supplierName":"Kelly's Industrial Supplies","contactName":"Kelly's Industrial Supplies","emailAddress":"sales@kellysupplies.com","phone":"07999 999999","addresses":[{"type":"Billing","line1":"Unit 51","line2":"Bakersfield Industrial Estate","city":"Bakersfield","region":"California","country":"USA","postalcode":"93308"}],"registrationNumber":"string","taxNumber":"string","status":"Unknown","defaultCurrency":"string","metadata":{"isDeleted":true},"supplementalData":{"content":{"property1":{"property1":null,"property2":null},"property2":{"property1":null,"property2":null}}},"modifiedDate":"2022-10-23T00:00:00Z","sourceModifiedDate":"2022-10-23T00:00:00Z"} | +| `AllowSyncOnPushComplete` | *bool* | :heavy_minus_sign: | Allow a sync upon push completion. | | +| `CompanyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `ConnectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `TimeoutInMinutes` | *int* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/GetCompanyResponse.md b/sync-for-expenses/docs/Models/Operations/GetCompanyResponse.md index 317c59fb3..4185a97cc 100644 --- a/sync-for-expenses/docs/Models/Operations/GetCompanyResponse.md +++ b/sync-for-expenses/docs/Models/Operations/GetCompanyResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | {"id":"0498e921-9b53-4396-a412-4f2f5983b0a2","name":"string","platform":"string","redirect":"https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739","lastSync":"2022-01-01T12:00:00.000Z","created":"2022-01-01T12:00:00.000Z","createdByUserName":"string","dataConnections":[{"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"}],"groups":[{"id":"d7a6c4b4-dc87-45f6-b803-62f466398680"}]} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/GetConnectionResponse.md b/sync-for-expenses/docs/Models/Operations/GetConnectionResponse.md index 4b83a01ac..7ba79531f 100644 --- a/sync-for-expenses/docs/Models/Operations/GetConnectionResponse.md +++ b/sync-for-expenses/docs/Models/Operations/GetConnectionResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | {"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/GetPullOperationResponse.md b/sync-for-expenses/docs/Models/Operations/GetPullOperationResponse.md index a7bd9bbde..7254aff6b 100644 --- a/sync-for-expenses/docs/Models/Operations/GetPullOperationResponse.md +++ b/sync-for-expenses/docs/Models/Operations/GetPullOperationResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `PullOperation` | [PullOperation](../../Models/Shared/PullOperation.md) | :heavy_minus_sign: | OK | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | +| `PullOperation` | [PullOperation](../../Models/Shared/PullOperation.md) | :heavy_minus_sign: | OK | {"id":"97d60846-f07a-4d42-b5a0-0bdcc6ebf56b","companyId":"4645bd78-8988-45bc-ac9e-67ba5df6e4e5","connectionId":"51baa045-4836-4317-a42e-3542e991e581","dataType":"invoices","status":"Initial","statusDescription":"Paused until 2022-10-23T00:00:00.000Z","requested":"2022-11-14T11:18:37.2798351Z","progress":10,"isCompleted":false,"isErrored":false} | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/GetSupplierResponse.md b/sync-for-expenses/docs/Models/Operations/GetSupplierResponse.md index 9d6dd3102..71a8199b5 100644 --- a/sync-for-expenses/docs/Models/Operations/GetSupplierResponse.md +++ b/sync-for-expenses/docs/Models/Operations/GetSupplierResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `Supplier` | [Supplier](../../Models/Shared/Supplier.md) | :heavy_minus_sign: | Success | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | +| `Supplier` | [Supplier](../../Models/Shared/Supplier.md) | :heavy_minus_sign: | Success | {"id":"C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F","supplierName":"Kelly's Industrial Supplies","contactName":"Kelly's Industrial Supplies","emailAddress":"sales@kellysupplies.com","phone":"07999 999999","addresses":[{"type":"Billing","line1":"Unit 51","line2":"Bakersfield Industrial Estate","city":"Bakersfield","region":"California","country":"USA","postalcode":"93308"}],"registrationNumber":"string","taxNumber":"string","status":"Unknown","defaultCurrency":"string","metadata":{"isDeleted":true},"supplementalData":{"content":{"property1":{"property1":null,"property2":null},"property2":{"property1":null,"property2":null}}},"modifiedDate":"2022-10-23T00:00:00Z","sourceModifiedDate":"2022-10-23T00:00:00Z"} | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/ListCompaniesResponse.md b/sync-for-expenses/docs/Models/Operations/ListCompaniesResponse.md index e95f2bff1..f8c5c84c8 100644 --- a/sync-for-expenses/docs/Models/Operations/ListCompaniesResponse.md +++ b/sync-for-expenses/docs/Models/Operations/ListCompaniesResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Companies` | [Models.Shared.Companies](../../Models/Shared/Companies.md) | :heavy_minus_sign: | OK | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `Companies` | [Models.Shared.Companies](../../Models/Shared/Companies.md) | :heavy_minus_sign: | OK | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/ListConnectionsResponse.md b/sync-for-expenses/docs/Models/Operations/ListConnectionsResponse.md index 2ae7cebc9..f7dcdbf03 100644 --- a/sync-for-expenses/docs/Models/Operations/ListConnectionsResponse.md +++ b/sync-for-expenses/docs/Models/Operations/ListConnectionsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Connections` | [Models.Shared.Connections](../../Models/Shared/Connections.md) | :heavy_minus_sign: | OK | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `Connections` | [Models.Shared.Connections](../../Models/Shared/Connections.md) | :heavy_minus_sign: | OK | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/ListCustomersResponse.md b/sync-for-expenses/docs/Models/Operations/ListCustomersResponse.md index 91e434ec9..a651f4bf5 100644 --- a/sync-for-expenses/docs/Models/Operations/ListCustomersResponse.md +++ b/sync-for-expenses/docs/Models/Operations/ListCustomersResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `Customers` | [Models.Shared.Customers](../../Models/Shared/Customers.md) | :heavy_minus_sign: | Success | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `Customers` | [Models.Shared.Customers](../../Models/Shared/Customers.md) | :heavy_minus_sign: | Success | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/ListPullOperationsResponse.md b/sync-for-expenses/docs/Models/Operations/ListPullOperationsResponse.md index be64e7629..e1c074772 100644 --- a/sync-for-expenses/docs/Models/Operations/ListPullOperationsResponse.md +++ b/sync-for-expenses/docs/Models/Operations/ListPullOperationsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | -| `PullOperations` | [PullOperations](../../Models/Shared/PullOperations.md) | :heavy_minus_sign: | OK | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | +| `PullOperations` | [PullOperations](../../Models/Shared/PullOperations.md) | :heavy_minus_sign: | OK | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/ListPushOperationsResponse.md b/sync-for-expenses/docs/Models/Operations/ListPushOperationsResponse.md index f41715ac7..9fd395a6f 100644 --- a/sync-for-expenses/docs/Models/Operations/ListPushOperationsResponse.md +++ b/sync-for-expenses/docs/Models/Operations/ListPushOperationsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | -| `PushOperations` | [Models.Shared.PushOperations](../../Models/Shared/PushOperations.md) | :heavy_minus_sign: | OK | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | +| `PushOperations` | [Models.Shared.PushOperations](../../Models/Shared/PushOperations.md) | :heavy_minus_sign: | OK | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/ListSuppliersResponse.md b/sync-for-expenses/docs/Models/Operations/ListSuppliersResponse.md index 384191f6c..b6f35c270 100644 --- a/sync-for-expenses/docs/Models/Operations/ListSuppliersResponse.md +++ b/sync-for-expenses/docs/Models/Operations/ListSuppliersResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `Suppliers` | [Models.Shared.Suppliers](../../Models/Shared/Suppliers.md) | :heavy_minus_sign: | Success | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | +| `Suppliers` | [Models.Shared.Suppliers](../../Models/Shared/Suppliers.md) | :heavy_minus_sign: | Success | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/ListSyncTransactionsResponse.md b/sync-for-expenses/docs/Models/Operations/ListSyncTransactionsResponse.md index 6e9ae594e..51dd9c571 100644 --- a/sync-for-expenses/docs/Models/Operations/ListSyncTransactionsResponse.md +++ b/sync-for-expenses/docs/Models/Operations/ListSyncTransactionsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `Transactions` | [Transactions](../../Models/Shared/Transactions.md) | :heavy_minus_sign: | Success | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | +| `Transactions` | [Transactions](../../Models/Shared/Transactions.md) | :heavy_minus_sign: | Success | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/RefreshDataTypeResponse.md b/sync-for-expenses/docs/Models/Operations/RefreshDataTypeResponse.md index dd6ec6f08..c2fba417e 100644 --- a/sync-for-expenses/docs/Models/Operations/RefreshDataTypeResponse.md +++ b/sync-for-expenses/docs/Models/Operations/RefreshDataTypeResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `PullOperation` | [PullOperation](../../Models/Shared/PullOperation.md) | :heavy_minus_sign: | OK | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | +| `PullOperation` | [PullOperation](../../Models/Shared/PullOperation.md) | :heavy_minus_sign: | OK | {"id":"97d60846-f07a-4d42-b5a0-0bdcc6ebf56b","companyId":"4645bd78-8988-45bc-ac9e-67ba5df6e4e5","connectionId":"51baa045-4836-4317-a42e-3542e991e581","dataType":"invoices","status":"Initial","statusDescription":"Paused until 2022-10-23T00:00:00.000Z","requested":"2022-11-14T11:18:37.2798351Z","progress":10,"isCompleted":false,"isErrored":false} | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/UnlinkConnectionResponse.md b/sync-for-expenses/docs/Models/Operations/UnlinkConnectionResponse.md index bd0552b7d..c8983f9d4 100644 --- a/sync-for-expenses/docs/Models/Operations/UnlinkConnectionResponse.md +++ b/sync-for-expenses/docs/Models/Operations/UnlinkConnectionResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | {"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/UpdateCompanyResponse.md b/sync-for-expenses/docs/Models/Operations/UpdateCompanyResponse.md index d8d2765fd..4ed75e0b4 100644 --- a/sync-for-expenses/docs/Models/Operations/UpdateCompanyResponse.md +++ b/sync-for-expenses/docs/Models/Operations/UpdateCompanyResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | {"id":"0498e921-9b53-4396-a412-4f2f5983b0a2","name":"string","platform":"string","redirect":"https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739","lastSync":"2022-01-01T12:00:00.000Z","created":"2022-01-01T12:00:00.000Z","createdByUserName":"string","dataConnections":[{"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"}],"groups":[{"id":"d7a6c4b4-dc87-45f6-b803-62f466398680"}]} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Operations/UpdateSupplierRequest.md b/sync-for-expenses/docs/Models/Operations/UpdateSupplierRequest.md index b66b11e5d..85d381aea 100644 --- a/sync-for-expenses/docs/Models/Operations/UpdateSupplierRequest.md +++ b/sync-for-expenses/docs/Models/Operations/UpdateSupplierRequest.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Supplier` | [Supplier](../../Models/Shared/Supplier.md) | :heavy_minus_sign: | N/A | | -| `AllowSyncOnPushComplete` | *bool* | :heavy_minus_sign: | Allow a sync upon push completion. | | -| `CompanyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `ConnectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `ForceUpdate` | *bool* | :heavy_minus_sign: | When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting platform, if they're different Codat will return an error suggesting you should initiate another pull of the data. If this is set to `true` then the update will override this check. | | -| `SupplierId` | *string* | :heavy_check_mark: | Unique identifier for a supplier. | 13d946f0-c5d5-42bc-b092-97ece17923ab | -| `TimeoutInMinutes` | *int* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Supplier` | [Supplier](../../Models/Shared/Supplier.md) | :heavy_minus_sign: | N/A | {"id":"C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F","supplierName":"Kelly's Industrial Supplies","contactName":"Kelly's Industrial Supplies","emailAddress":"sales@kellysupplies.com","phone":"07999 999999","addresses":[{"type":"Billing","line1":"Unit 51","line2":"Bakersfield Industrial Estate","city":"Bakersfield","region":"California","country":"USA","postalcode":"93308"}],"registrationNumber":"string","taxNumber":"string","status":"Unknown","defaultCurrency":"string","metadata":{"isDeleted":true},"supplementalData":{"content":{"property1":{"property1":null,"property2":null},"property2":{"property1":null,"property2":null}}},"modifiedDate":"2022-10-23T00:00:00Z","sourceModifiedDate":"2022-10-23T00:00:00Z"} | +| `AllowSyncOnPushComplete` | *bool* | :heavy_minus_sign: | Allow a sync upon push completion. | | +| `CompanyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `ConnectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `ForceUpdate` | *bool* | :heavy_minus_sign: | When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting platform, if they're different Codat will return an error suggesting you should initiate another pull of the data. If this is set to `true` then the update will override this check. | | +| `SupplierId` | *string* | :heavy_check_mark: | Unique identifier for a supplier. | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `TimeoutInMinutes` | *int* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Shared/Companies.md b/sync-for-expenses/docs/Models/Shared/Companies.md index eed2d4424..85d560ec0 100644 --- a/sync-for-expenses/docs/Models/Shared/Companies.md +++ b/sync-for-expenses/docs/Models/Shared/Companies.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | -| `Results` | List<[Company](../../Models/Shared/Company.md)> | :heavy_minus_sign: | N/A | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[Company](../../Models/Shared/Company.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Shared/Connections.md b/sync-for-expenses/docs/Models/Shared/Connections.md index 93575856d..be0aa0d26 100644 --- a/sync-for-expenses/docs/Models/Shared/Connections.md +++ b/sync-for-expenses/docs/Models/Shared/Connections.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | -| `Results` | List<[Connection](../../Models/Shared/Connection.md)> | :heavy_minus_sign: | N/A | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[Connection](../../Models/Shared/Connection.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Shared/CreateSupplierResponse.md b/sync-for-expenses/docs/Models/Shared/CreateSupplierResponse.md index 0dc54942d..478dc32f5 100644 --- a/sync-for-expenses/docs/Models/Shared/CreateSupplierResponse.md +++ b/sync-for-expenses/docs/Models/Shared/CreateSupplierResponse.md @@ -8,7 +8,7 @@ | `Changes` | List<[PushOperationChange](../../Models/Shared/PushOperationChange.md)> | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | | `CompanyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `CompletedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `Data` | [AccountingSupplier](../../Models/Shared/AccountingSupplier.md) | :heavy_minus_sign: | N/A | | +| `Data` | [AccountingSupplier](../../Models/Shared/AccountingSupplier.md) | :heavy_minus_sign: | N/A | {"id":"C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F","supplierName":"Kelly's Industrial Supplies","contactName":"Kelly's Industrial Supplies","emailAddress":"sales@kellysupplies.com","phone":"07999 999999","addresses":[{"type":"Billing","line1":"Unit 51","line2":"Bakersfield Industrial Estate","city":"Bakersfield","region":"California","country":"USA","postalcode":"93308"}],"registrationNumber":"string","taxNumber":"string","status":"Unknown","defaultCurrency":"string","metadata":{"isDeleted":true},"supplementalData":{"content":{"property1":{"property1":null,"property2":null},"property2":{"property1":null,"property2":null}}},"modifiedDate":"2022-10-23T00:00:00Z","sourceModifiedDate":"2022-10-23T00:00:00Z"} | | `DataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `DataType` | [DataType](../../Models/Shared/DataType.md) | :heavy_minus_sign: | Available Data types | invoices | | `ErrorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | diff --git a/sync-for-expenses/docs/Models/Shared/Customers.md b/sync-for-expenses/docs/Models/Shared/Customers.md index d4a8b1f95..aeecfeb6b 100644 --- a/sync-for-expenses/docs/Models/Shared/Customers.md +++ b/sync-for-expenses/docs/Models/Shared/Customers.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | -| `Results` | List<[Customer](../../Models/Shared/Customer.md)> | :heavy_minus_sign: | N/A | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[Customer](../../Models/Shared/Customer.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Shared/ErrorMessage.md b/sync-for-expenses/docs/Models/Shared/ErrorMessage.md index c1515ef61..b771df488 100644 --- a/sync-for-expenses/docs/Models/Shared/ErrorMessage.md +++ b/sync-for-expenses/docs/Models/Shared/ErrorMessage.md @@ -3,11 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `CanBeRetried` | *string* | :heavy_minus_sign: | `True` if the error occurred transiently and can be retried. | -| `CorrelationId` | *string* | :heavy_minus_sign: | Unique identifier used to propagate to all downstream services and determine the source of the error. | -| `DetailedErrorCode` | *long* | :heavy_minus_sign: | Machine readable error code used to automate processes based on the code returned. | -| `Error` | *string* | :heavy_minus_sign: | A brief description of the error. | -| `Service` | *string* | :heavy_minus_sign: | Codat's service the returned the error. | -| `StatusCode` | *long* | :heavy_minus_sign: | The HTTP status code returned by the error. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `CanBeRetried` | *string* | :heavy_minus_sign: | `True` if the error occurred transiently and can be retried. | +| `CorrelationId` | *string* | :heavy_minus_sign: | Unique identifier used to propagate to all downstream services and determine the source of the error. | +| `DetailedErrorCode` | *long* | :heavy_minus_sign: | Machine readable error code used to automate processes based on the code returned. | +| `Error` | *string* | :heavy_minus_sign: | A brief description of the error. | +| `Service` | *string* | :heavy_minus_sign: | Codat's service the returned the error. | +| `StatusCode` | *long* | :heavy_minus_sign: | The HTTP status code returned by the error. | +| `Validation` | [ErrorValidation](../../Models/Shared/ErrorValidation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Shared/ErrorValidation.md b/sync-for-expenses/docs/Models/Shared/ErrorValidation.md new file mode 100644 index 000000000..359a79460 --- /dev/null +++ b/sync-for-expenses/docs/Models/Shared/ErrorValidation.md @@ -0,0 +1,11 @@ +# ErrorValidation + +A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `Errors` | List<[ErrorValidationItem](../../Models/Shared/ErrorValidationItem.md)> | :heavy_minus_sign: | N/A | +| `Warnings` | List<[ErrorValidationItem](../../Models/Shared/ErrorValidationItem.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Shared/ErrorValidationItem.md b/sync-for-expenses/docs/Models/Shared/ErrorValidationItem.md new file mode 100644 index 000000000..6e0b6e5e3 --- /dev/null +++ b/sync-for-expenses/docs/Models/Shared/ErrorValidationItem.md @@ -0,0 +1,10 @@ +# ErrorValidationItem + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `ItemId` | *string* | :heavy_minus_sign: | Unique identifier for a validation item. | +| `Message` | *string* | :heavy_minus_sign: | A message outlining validation item's issue. | +| `ValidatorName` | *string* | :heavy_minus_sign: | Name of validator. | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Shared/PullOperations.md b/sync-for-expenses/docs/Models/Shared/PullOperations.md index db6dc96cd..9f32a4194 100644 --- a/sync-for-expenses/docs/Models/Shared/PullOperations.md +++ b/sync-for-expenses/docs/Models/Shared/PullOperations.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | -| `Results` | List<[PullOperation](../../Models/Shared/PullOperation.md)> | :heavy_minus_sign: | N/A | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[PullOperation](../../Models/Shared/PullOperation.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Shared/PushOperations.md b/sync-for-expenses/docs/Models/Shared/PushOperations.md index 2254c9a6e..80adf716a 100644 --- a/sync-for-expenses/docs/Models/Shared/PushOperations.md +++ b/sync-for-expenses/docs/Models/Shared/PushOperations.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | -| `Results` | List<[PushOperation](../../Models/Shared/PushOperation.md)> | :heavy_minus_sign: | N/A | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[PushOperation](../../Models/Shared/PushOperation.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Shared/Suppliers.md b/sync-for-expenses/docs/Models/Shared/Suppliers.md index 1c763c9b3..742c861d1 100644 --- a/sync-for-expenses/docs/Models/Shared/Suppliers.md +++ b/sync-for-expenses/docs/Models/Shared/Suppliers.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | -| `Results` | List<[Supplier](../../Models/Shared/Supplier.md)> | :heavy_minus_sign: | N/A | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[Supplier](../../Models/Shared/Supplier.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Shared/Transactions.md b/sync-for-expenses/docs/Models/Shared/Transactions.md index 6670fae6e..da14af871 100644 --- a/sync-for-expenses/docs/Models/Shared/Transactions.md +++ b/sync-for-expenses/docs/Models/Shared/Transactions.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | -| `Results` | List<[Transaction](../../Models/Shared/Transaction.md)> | :heavy_minus_sign: | N/A | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[Transaction](../../Models/Shared/Transaction.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/Models/Shared/UpdateSupplierResponse.md b/sync-for-expenses/docs/Models/Shared/UpdateSupplierResponse.md index 20cab27de..c4ce7eaae 100644 --- a/sync-for-expenses/docs/Models/Shared/UpdateSupplierResponse.md +++ b/sync-for-expenses/docs/Models/Shared/UpdateSupplierResponse.md @@ -8,7 +8,7 @@ | `Changes` | List<[PushOperationChange](../../Models/Shared/PushOperationChange.md)> | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | | `CompanyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `CompletedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `Data` | [UpdateSupplierResponseAccountingSupplier](../../Models/Shared/UpdateSupplierResponseAccountingSupplier.md) | :heavy_minus_sign: | N/A | | +| `Data` | [UpdateSupplierResponseAccountingSupplier](../../Models/Shared/UpdateSupplierResponseAccountingSupplier.md) | :heavy_minus_sign: | N/A | {"id":"C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F","supplierName":"Kelly's Industrial Supplies","contactName":"Kelly's Industrial Supplies","emailAddress":"sales@kellysupplies.com","phone":"07999 999999","addresses":[{"type":"Billing","line1":"Unit 51","line2":"Bakersfield Industrial Estate","city":"Bakersfield","region":"California","country":"USA","postalcode":"93308"}],"registrationNumber":"string","taxNumber":"string","status":"Unknown","defaultCurrency":"string","metadata":{"isDeleted":true},"supplementalData":{"content":{"property1":{"property1":null,"property2":null},"property2":{"property1":null,"property2":null}}},"modifiedDate":"2022-10-23T00:00:00Z","sourceModifiedDate":"2022-10-23T00:00:00Z"} | | `DataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `DataType` | [DataType](../../Models/Shared/DataType.md) | :heavy_minus_sign: | Available Data types | invoices | | `ErrorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | diff --git a/sync-for-expenses/docs/sdks/accounts/README.md b/sync-for-expenses/docs/sdks/accounts/README.md index b634dd168..e9df401cf 100644 --- a/sync-for-expenses/docs/sdks/accounts/README.md +++ b/sync-for-expenses/docs/sdks/accounts/README.md @@ -36,31 +36,6 @@ var sdk = new CodatSyncExpenses(security: new Security() { }); CreateAccountRequest req = new CreateAccountRequest() { - AccountPrototype = new AccountPrototype() { - Currency = "USD", - CurrentBalance = 0M, - Description = "Invoices the business has issued but has not yet collected payment on.", - FullyQualifiedCategory = "Asset.Current", - FullyQualifiedName = "Cash On Hand", - Name = "Accounts Receivable", - NominalCode = "610", - Status = AccountStatus.Active, - SupplementalData = new SupplementalData() { - Content = new Dictionary>() { - { "key", new Dictionary() { - { "key", "string" }, - } }, - }, - }, - Type = AccountType.Asset, - ValidDatatypeLinks = new List() { - new ValidDataTypeLinks() { - Links = new List() { - "string", - }, - }, - }, - }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", }; diff --git a/sync-for-expenses/docs/sdks/companies/README.md b/sync-for-expenses/docs/sdks/companies/README.md index 75c35315e..eaa0f691b 100644 --- a/sync-for-expenses/docs/sdks/companies/README.md +++ b/sync-for-expenses/docs/sdks/companies/README.md @@ -35,11 +35,6 @@ var sdk = new CodatSyncExpenses(security: new Security() { CompanyRequestBody req = new CompanyRequestBody() { Description = "Requested early access to the new financing scheme.", - Groups = new List() { - new GroupItems() { - Id = "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - }, Name = "Bank of Dave", }; @@ -202,15 +197,6 @@ var sdk = new CodatSyncExpenses(security: new Security() { }); UpdateCompanyRequest req = new UpdateCompanyRequest() { - CompanyRequestBody = new CompanyRequestBody() { - Description = "Requested early access to the new financing scheme.", - Groups = new List() { - new GroupItems() { - Id = "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - }, - Name = "Bank of Dave", - }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", }; diff --git a/sync-for-expenses/docs/sdks/configuration/README.md b/sync-for-expenses/docs/sdks/configuration/README.md index 9cf05eb55..d97d25bc8 100644 --- a/sync-for-expenses/docs/sdks/configuration/README.md +++ b/sync-for-expenses/docs/sdks/configuration/README.md @@ -99,13 +99,6 @@ var sdk = new CodatSyncExpenses(security: new Security() { }); SetCompanyConfigurationRequest req = new SetCompanyConfigurationRequest() { - CompanyConfiguration = new CompanyConfiguration() { - BankAccount = new BankAccount() { - Id = "32", - }, - Customer = new CustomerDetails() {}, - Supplier = new SupplierDetails() {}, - }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", }; diff --git a/sync-for-expenses/docs/sdks/connections/README.md b/sync-for-expenses/docs/sdks/connections/README.md index 928e7ad16..771659751 100644 --- a/sync-for-expenses/docs/sdks/connections/README.md +++ b/sync-for-expenses/docs/sdks/connections/README.md @@ -32,9 +32,6 @@ var sdk = new CodatSyncExpenses(security: new Security() { }); CreateConnectionRequest req = new CreateConnectionRequest() { - RequestBody = new CreateConnectionRequestBody() { - PlatformKey = "gbol", - }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", }; @@ -221,7 +218,6 @@ var sdk = new CodatSyncExpenses(security: new Security() { }); UnlinkConnectionRequest req = new UnlinkConnectionRequest() { - RequestBody = new UnlinkConnectionUpdateConnection() {}, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", }; diff --git a/sync-for-expenses/docs/sdks/customers/README.md b/sync-for-expenses/docs/sdks/customers/README.md index 88d45f33b..003e1da42 100644 --- a/sync-for-expenses/docs/sdks/customers/README.md +++ b/sync-for-expenses/docs/sdks/customers/README.md @@ -38,40 +38,6 @@ var sdk = new CodatSyncExpenses(security: new Security() { }); CreateCustomerRequest req = new CreateCustomerRequest() { - Customer = new Customer() { - Addresses = new List() { - new AccountingAddress() { - Type = AccountingAddressType.Billing, - }, - }, - Contacts = new List() { - new Contact() { - Address = new Items() { - Type = AccountingAddressType.Billing, - }, - ModifiedDate = "2022-10-23T00:00:00Z", - Phone = new List() { - new Phone() { - Number = "01224 658 999", - Type = PhoneNumberType.Mobile, - }, - }, - Status = CustomerStatus.Unknown, - }, - }, - DefaultCurrency = "GBP", - Metadata = new Metadata() {}, - ModifiedDate = "2022-10-23T00:00:00Z", - SourceModifiedDate = "2022-10-23T00:00:00Z", - Status = CustomerStatus.Archived, - SupplementalData = new SupplementalData() { - Content = new Dictionary>() { - { "key", new Dictionary() { - { "key", "string" }, - } }, - }, - }, - }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", }; @@ -117,7 +83,7 @@ var sdk = new CodatSyncExpenses(security: new Security() { GetCustomerRequest req = new GetCustomerRequest() { CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", - CustomerId = "string", + CustomerId = "", }; var res = await sdk.Customers.GetAsync(req); @@ -207,43 +173,9 @@ var sdk = new CodatSyncExpenses(security: new Security() { }); UpdateCustomerRequest req = new UpdateCustomerRequest() { - Customer = new Customer() { - Addresses = new List() { - new AccountingAddress() { - Type = AccountingAddressType.Delivery, - }, - }, - Contacts = new List() { - new Contact() { - Address = new Items() { - Type = AccountingAddressType.Unknown, - }, - ModifiedDate = "2022-10-23T00:00:00Z", - Phone = new List() { - new Phone() { - Number = "+44 25691 154789", - Type = PhoneNumberType.Landline, - }, - }, - Status = CustomerStatus.Archived, - }, - }, - DefaultCurrency = "EUR", - Metadata = new Metadata() {}, - ModifiedDate = "2022-10-23T00:00:00Z", - SourceModifiedDate = "2022-10-23T00:00:00Z", - Status = CustomerStatus.Archived, - SupplementalData = new SupplementalData() { - Content = new Dictionary>() { - { "key", new Dictionary() { - { "key", "string" }, - } }, - }, - }, - }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", - CustomerId = "string", + CustomerId = "", }; var res = await sdk.Customers.UpdateAsync(req); diff --git a/sync-for-expenses/docs/sdks/expenses/README.md b/sync-for-expenses/docs/sdks/expenses/README.md index 943bde4cf..e4e37a40c 100644 --- a/sync-for-expenses/docs/sdks/expenses/README.md +++ b/sync-for-expenses/docs/sdks/expenses/README.md @@ -42,47 +42,6 @@ var sdk = new CodatSyncExpenses(security: new Security() { }); CreateExpenseTransactionRequest req = new CreateExpenseTransactionRequest() { - CreateExpenseRequest = new CreateExpenseRequest() { - Items = new List() { - new ExpenseTransaction() { - BankAccountRef = new BankAccountReference() { - Id = "787dfb37-5707-4dc0-8a86-8d74e4cc78ea", - }, - ContactRef = new ContactRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - Type = Type.Supplier, - }, - Currency = "GBP", - Id = "4d7c6929-7770-412b-91bb-44d3bc71d111", - IssueDate = "2022-10-23T00:00:00Z", - Lines = new List() { - new ExpenseTransactionLine() { - AccountRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - InvoiceTo = new InvoiceTo() { - DataType = InvoiceToDataType.Customers, - Id = "80000002-1674552702", - }, - NetAmount = 110.42M, - TaxAmount = 14.43M, - TaxRateRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - TrackingRefs = new List() { - new TrackingRef() { - DataType = TrackingRefDataType.TrackingCategories, - Id = "e9a1b63d-9ff0-40e7-8038-016354b987e6", - }, - }, - }, - }, - MerchantName = "Amazon UK", - Notes = "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", - Type = ExpenseTransactionType.Payment, - }, - }, - }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", }; @@ -127,42 +86,6 @@ var sdk = new CodatSyncExpenses(security: new Security() { }); UpdateExpenseTransactionRequest req = new UpdateExpenseTransactionRequest() { - UpdateExpenseRequest = new UpdateExpenseRequest() { - BankAccountRef = new UpdateExpenseRequestBankAccountReference() { - Id = "787dfb37-5707-4dc0-8a86-8d74e4cc78ea", - }, - ContactRef = new ContactRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - Type = Type.Supplier, - }, - Currency = "GBP", - IssueDate = "2022-06-28T00:00:00.000Z", - Lines = new List() { - new ExpenseTransactionLine() { - AccountRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - InvoiceTo = new InvoiceTo() { - DataType = InvoiceToDataType.Customers, - Id = "80000002-1674552702", - }, - NetAmount = 110.42M, - TaxAmount = 14.43M, - TaxRateRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - TrackingRefs = new List() { - new TrackingRef() { - DataType = TrackingRefDataType.TrackingCategories, - Id = "e9a1b63d-9ff0-40e7-8038-016354b987e6", - }, - }, - }, - }, - MerchantName = "Amazon UK", - Notes = "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", - Type = "string", - }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", TransactionId = "336694d8-2dca-4cb5-a28d-3ccb83e55eee", }; @@ -213,12 +136,6 @@ var sdk = new CodatSyncExpenses(security: new Security() { }); UploadExpenseAttachmentRequest req = new UploadExpenseAttachmentRequest() { - AttachmentUpload = new AttachmentUpload() { - File = new CodatFile() { - Content = "0xE3ABc1980E as bytes <<<>>>", - FileName = "elegant_producer_electric.jpeg", - }, - }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", SyncId = "6fb40d5e-b13e-11ed-afa1-0242ac120002", TransactionId = "336694d8-2dca-4cb5-a28d-3ccb83e55eee", diff --git a/sync-for-expenses/docs/sdks/suppliers/README.md b/sync-for-expenses/docs/sdks/suppliers/README.md index 73b078bbc..4546a9d82 100644 --- a/sync-for-expenses/docs/sdks/suppliers/README.md +++ b/sync-for-expenses/docs/sdks/suppliers/README.md @@ -41,21 +41,40 @@ CreateSupplierRequest req = new CreateSupplierRequest() { Supplier = new Supplier() { Addresses = new List() { new Items() { + City = "Bakersfield", + Country = "USA", + Line1 = "Unit 51", + Line2 = "Bakersfield Industrial Estate", + Region = "California", Type = AccountingAddressType.Billing, }, }, - Metadata = new Metadata() {}, + ContactName = "Kelly's Industrial Supplies", + DefaultCurrency = "string", + EmailAddress = "sales@kellysupplies.com", + Id = "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", + Metadata = new Metadata() { + IsDeleted = true, + }, ModifiedDate = "2022-10-23T00:00:00Z", - Phone = "(877) 492-8687", + Phone = "07999 999999", + RegistrationNumber = "string", SourceModifiedDate = "2022-10-23T00:00:00Z", - Status = SupplierStatus.Active, + Status = SupplierStatus.Unknown, SupplementalData = new SupplementalData() { Content = new Dictionary>() { - { "key", new Dictionary() { - { "key", "string" }, + { "property1", new Dictionary() { + { "property1", null }, + { "property2", null }, + } }, + { "property2", new Dictionary() { + { "property1", null }, + { "property2", null }, } }, }, }, + SupplierName = "Kelly's Industrial Supplies", + TaxNumber = "string", }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", @@ -195,25 +214,44 @@ UpdateSupplierRequest req = new UpdateSupplierRequest() { Supplier = new Supplier() { Addresses = new List() { new Items() { - Type = AccountingAddressType.Delivery, + City = "Bakersfield", + Country = "USA", + Line1 = "Unit 51", + Line2 = "Bakersfield Industrial Estate", + Region = "California", + Type = AccountingAddressType.Billing, }, }, - Metadata = new Metadata() {}, + ContactName = "Kelly's Industrial Supplies", + DefaultCurrency = "string", + EmailAddress = "sales@kellysupplies.com", + Id = "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", + Metadata = new Metadata() { + IsDeleted = true, + }, ModifiedDate = "2022-10-23T00:00:00Z", - Phone = "(877) 492-8687", + Phone = "07999 999999", + RegistrationNumber = "string", SourceModifiedDate = "2022-10-23T00:00:00Z", - Status = SupplierStatus.Active, + Status = SupplierStatus.Unknown, SupplementalData = new SupplementalData() { Content = new Dictionary>() { - { "key", new Dictionary() { - { "key", "string" }, + { "property1", new Dictionary() { + { "property1", null }, + { "property2", null }, + } }, + { "property2", new Dictionary() { + { "property1", null }, + { "property2", null }, } }, }, }, + SupplierName = "Kelly's Industrial Supplies", + TaxNumber = "string", }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", - SupplierId = "7110701885", + SupplierId = "EILBDVJVNUAGVKRQ", }; var res = await sdk.Suppliers.UpdateAsync(req); diff --git a/sync-for-expenses/docs/sdks/sync/README.md b/sync-for-expenses/docs/sdks/sync/README.md index 4446f9c96..2953d9b73 100644 --- a/sync-for-expenses/docs/sdks/sync/README.md +++ b/sync-for-expenses/docs/sdks/sync/README.md @@ -139,11 +139,6 @@ var sdk = new CodatSyncExpenses(security: new Security() { }); InitiateSyncRequest req = new InitiateSyncRequest() { - InitiateSync = new InitiateSync() { - DatasetIds = new List() { - "acce2362-83d6-4e3e-a27f-f4a08e7217d5", - }, - }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", }; diff --git a/sync-for-expenses/gen.yaml b/sync-for-expenses/gen.yaml index 661f39c26..a782870bc 100644 --- a/sync-for-expenses/gen.yaml +++ b/sync-for-expenses/gen.yaml @@ -6,9 +6,10 @@ generation: fixes: nameResolutionDec2023: false parameterOrderingFeb2024: false + requestResponseComponentNamesFeb2024: false telemetryEnabled: true csharp: - version: 5.0.0 + version: 5.1.0 author: Codat description: Push expenses to accounting platforms. dotnetVersion: net6.0