diff --git a/bank-feeds/.gitattributes b/bank-feeds/.gitattributes new file mode 100755 index 000000000..c094dba67 --- /dev/null +++ b/bank-feeds/.gitattributes @@ -0,0 +1,2 @@ +# This allows generated code to be indexed correctly +*.cs linguist-generated=false \ No newline at end of file diff --git a/bank-feeds/.gitignore b/bank-feeds/.gitignore new file mode 100755 index 000000000..b004ecedd --- /dev/null +++ b/bank-feeds/.gitignore @@ -0,0 +1,3 @@ +obj/ +bin/ +debug/ diff --git a/bank-feeds/CodatBankFeeds.sln b/bank-feeds/CodatBankFeeds.sln new file mode 100755 index 000000000..70876d588 --- /dev/null +++ b/bank-feeds/CodatBankFeeds.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodatBankFeeds", "CodatBankFeeds\CodatBankFeeds.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}" +EndProject + +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F0CE92B5-F3CC-45A2-AA83-118C38724EB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F0CE92B5-F3CC-45A2-AA83-118C38724EB1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F0CE92B5-F3CC-45A2-AA83-118C38724EB1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F0CE92B5-F3CC-45A2-AA83-118C38724EB1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/AccountMapping.cs b/bank-feeds/CodatBankFeeds/AccountMapping.cs new file mode 100755 index 000000000..4633d38a2 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/AccountMapping.cs @@ -0,0 +1,173 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds +{ + using CodatBankFeeds.Models.Operations; + using CodatBankFeeds.Models.Shared; + using CodatBankFeeds.Utils; + using Newtonsoft.Json; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + public interface IAccountMappingSDK + { + Task CreateAsync(CreateBankAccountMappingRequest? request = null); + Task GetAsync(GetBankAccountMappingRequest? request = null); + } + + public class AccountMappingSDK: IAccountMappingSDK + { + public SDKConfig Config { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "0.1.0"; + private const string _sdkGenVersion = "2.91.4"; + private const string _openapiDocVersion = "3.0.0"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _securityClient; + + public AccountMappingSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securityClient = securityClient; + _serverUrl = serverUrl; + Config = config; + } + + + /// + /// Create bank feed bank account mapping + /// + /// + /// The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting platform (target account). + /// + /// A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end users account in the underlying platform). + /// + /// To find valid target account options, first call list bank feed account mappings. + /// + /// This endpoint is only needed if building an account management UI. + /// + /// + public async Task CreateAsync(CreateBankAccountMappingRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + var serializedBody = RequestBodySerializer.Serialize(request, "BankFeedAccountMapping", "json"); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new CreateBankAccountMappingResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.BankFeedAccountMappingResponse = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// List bank feed account mappings + /// + /// + /// The *List bank account mappings* endpoint returns information about a source bank account and any current or potential target mapping accounts. + /// + /// A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end users account in the underlying platform). + /// + /// This endpoint is only needed if building an account management UI. + /// + /// + public async Task GetAsync(GetBankAccountMappingRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new GetBankAccountMappingResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.BankFeedMapping = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + } +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/CodatBankFeeds.csproj b/bank-feeds/CodatBankFeeds/CodatBankFeeds.csproj new file mode 100755 index 000000000..fa8f2c608 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/CodatBankFeeds.csproj @@ -0,0 +1,19 @@ + + + true + Codat.BankFeeds + 0.1.0 + Codat + net5.0 + enable + README.md + + + + + + + + + + diff --git a/bank-feeds/CodatBankFeeds/CodatBankFeedsSDK.cs b/bank-feeds/CodatBankFeeds/CodatBankFeedsSDK.cs new file mode 100755 index 000000000..d2b9350d3 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/CodatBankFeedsSDK.cs @@ -0,0 +1,77 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds +{ + using CodatBankFeeds.Models.Shared; + using CodatBankFeeds.Utils; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + public interface ICodatBankFeedsSDK + { + public IAccountMappingSDK AccountMapping { get; } + public ICompaniesSDK Companies { get; } + public IConnectionsSDK Connections { get; } + public ISourceAccountsSDK SourceAccounts { get; } + public ITransactionsSDK Transactions { get; } + } + + public class SDKConfig + { + } + + public class CodatBankFeedsSDK: ICodatBankFeedsSDK + { + public SDKConfig Config { get; private set; } + public static List ServerList = new List() + { + "https://api.codat.io", + }; + + private const string _language = "csharp"; + private const string _sdkVersion = "0.1.0"; + private const string _sdkGenVersion = "2.91.4"; + private const string _openapiDocVersion = "3.0.0"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _securityClient; + public IAccountMappingSDK AccountMapping { get; private set; } + public ICompaniesSDK Companies { get; private set; } + public IConnectionsSDK Connections { get; private set; } + public ISourceAccountsSDK SourceAccounts { get; private set; } + public ITransactionsSDK Transactions { get; private set; } + + public CodatBankFeedsSDK(Security? security = null, string? serverUrl = null, ISpeakeasyHttpClient? client = null) + { + _serverUrl = serverUrl ?? CodatBankFeedsSDK.ServerList[0]; + + _defaultClient = new SpeakeasyHttpClient(client); + _securityClient = _defaultClient; + + if(security != null) + { + _securityClient = SecuritySerializer.Apply(_defaultClient, security); + } + + Config = new SDKConfig() + { + }; + + AccountMapping = new AccountMappingSDK(_defaultClient, _securityClient, _serverUrl, Config); + Companies = new CompaniesSDK(_defaultClient, _securityClient, _serverUrl, Config); + Connections = new ConnectionsSDK(_defaultClient, _securityClient, _serverUrl, Config); + SourceAccounts = new SourceAccountsSDK(_defaultClient, _securityClient, _serverUrl, Config); + Transactions = new TransactionsSDK(_defaultClient, _securityClient, _serverUrl, Config); + } + } +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Companies.cs b/bank-feeds/CodatBankFeeds/Companies.cs new file mode 100755 index 000000000..a5eeba594 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Companies.cs @@ -0,0 +1,337 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds +{ + using CodatBankFeeds.Models.Operations; + using CodatBankFeeds.Models.Shared; + using CodatBankFeeds.Utils; + using Newtonsoft.Json; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + public interface ICompaniesSDK + { + Task CreateAsync(CompanyRequestBody? request = null); + Task DeleteAsync(DeleteCompanyRequest? request = null); + Task GetAsync(GetCompanyRequest? request = null); + Task ListAsync(ListCompaniesRequest? request = null); + Task UpdateAsync(UpdateCompanyRequest? request = null); + } + + public class CompaniesSDK: ICompaniesSDK + { + public SDKConfig Config { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "0.1.0"; + private const string _sdkGenVersion = "2.91.4"; + private const string _openapiDocVersion = "3.0.0"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _securityClient; + + public CompaniesSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securityClient = securityClient; + _serverUrl = serverUrl; + Config = config; + } + + + /// + /// Create company + /// + /// + /// Creates a new company that can be used to assign connections to. + /// + /// If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`. + /// + /// + /// + /// + public async Task CreateAsync(CompanyRequestBody? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = baseUrl + "/companies"; + + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + var serializedBody = RequestBodySerializer.Serialize(request, "Request", "json"); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new CreateCompanyResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// Delete a company + /// + /// + /// + /// Permanently deletes a company, its connections and any cached data. This operation is irreversible. If the company ID does not exist an error is returned. + /// + /// + public async Task DeleteAsync(DeleteCompanyRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new DeleteCompanyResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 204)) + { + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// Get company + /// + /// + /// Returns the company for a valid identifier. If the identifier is for a deleted company, a not found response is returned. + /// + /// + public async Task GetAsync(GetCompanyRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new GetCompanyResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// List companies + /// + /// + /// Returns a list of your companies. The company schema contains a list of [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) related to the company. + /// + /// + public async Task ListAsync(ListCompaniesRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new ListCompaniesResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.Companies = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// Update company + /// + /// + /// Updates both the name and description of the company. + /// + /// + public async Task UpdateAsync(UpdateCompanyRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Put, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + var serializedBody = RequestBodySerializer.Serialize(request, "CompanyRequestBody", "json"); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new UpdateCompanyResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + } +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Connections.cs b/bank-feeds/CodatBankFeeds/Connections.cs new file mode 100755 index 000000000..f29463435 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Connections.cs @@ -0,0 +1,335 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds +{ + using CodatBankFeeds.Models.Operations; + using CodatBankFeeds.Models.Shared; + using CodatBankFeeds.Utils; + using Newtonsoft.Json; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + public interface IConnectionsSDK + { + Task CreateAsync(CreateConnectionRequest? request = null); + Task DeleteAsync(DeleteConnectionRequest? request = null); + Task GetAsync(GetConnectionRequest? request = null); + Task ListAsync(ListConnectionsRequest? request = null); + Task UnlinkAsync(UnlinkConnectionRequest? request = null); + } + + public class ConnectionsSDK: IConnectionsSDK + { + public SDKConfig Config { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "0.1.0"; + private const string _sdkGenVersion = "2.91.4"; + private const string _openapiDocVersion = "3.0.0"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _securityClient; + + public ConnectionsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securityClient = securityClient; + _serverUrl = serverUrl; + Config = config; + } + + + /// + /// Create connection + /// + /// + /// Creates a connection for the company by providing a valid `platformKey`. + /// + /// Use the [List Integrations](https://docs.codat.io/bank-feeds-api#/operations/list-integrations) endpoint to access valid platform keys. + /// + /// + public async Task CreateAsync(CreateConnectionRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "json"); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new CreateConnectionResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// Delete connection + /// + /// + /// Revoke and remove a connection from a company. + /// This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company. + /// + /// + public async Task DeleteAsync(DeleteConnectionRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new DeleteConnectionResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// Get connection + /// + /// + /// Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned. + /// + /// + public async Task GetAsync(GetConnectionRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new GetConnectionResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// List connections + /// + /// + /// List the connections for a company. + /// + /// + public async Task ListAsync(ListConnectionsRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new ListConnectionsResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.Connections = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// Unlink connection + /// + /// + /// This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data. + /// + /// + public async Task UnlinkAsync(UnlinkConnectionRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "json"); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new UnlinkConnectionResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + } +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankAccountMappingRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankAccountMappingRequest.cs new file mode 100755 index 000000000..bac072d01 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankAccountMappingRequest.cs @@ -0,0 +1,30 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using CodatBankFeeds.Utils; + + + public class CreateBankAccountMappingRequest + { + [SpeakeasyMetadata("request:mediaType=application/json")] + public BankFeedAccountMapping? BankFeedAccountMapping { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] + public string ConnectionId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankAccountMappingResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankAccountMappingResponse.cs new file mode 100755 index 000000000..709f8c5b7 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankAccountMappingResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class CreateBankAccountMappingResponse + { + /// + /// Success + /// + + public BankFeedAccountMappingResponse? BankFeedAccountMappingResponse { get; set; } + + + public string? ContentType { get; set; } + + /// + /// The request made is not valid. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankFeedRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankFeedRequest.cs new file mode 100755 index 000000000..889f6ccaa --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankFeedRequest.cs @@ -0,0 +1,30 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using CodatBankFeeds.Utils; + + + public class CreateBankFeedRequest + { + [SpeakeasyMetadata("request:mediaType=application/json")] + public BankFeedAccount? BankFeedAccount { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] + public string ConnectionId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankFeedResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankFeedResponse.cs new file mode 100755 index 000000000..8cd73a0f0 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankFeedResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class CreateBankFeedResponse + { + /// + /// Success + /// + + public BankFeedAccount? BankFeedAccount { get; set; } + + + public string? ContentType { get; set; } + + /// + /// The request made is not valid. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankTransactionsRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankTransactionsRequest.cs new file mode 100755 index 000000000..b9815baeb --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankTransactionsRequest.cs @@ -0,0 +1,42 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using CodatBankFeeds.Utils; + + + public class CreateBankTransactionsRequest + { + [SpeakeasyMetadata("request:mediaType=application/json")] + public CreateBankTransactions? CreateBankTransactions { get; set; } + + /// + /// Unique identifier for an account + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=accountId")] + public string AccountId { get; set; } + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=allowSyncOnPushComplete")] + public bool? AllowSyncOnPushComplete { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] + public string ConnectionId { get; set; } + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=timeoutInMinutes")] + public int? TimeoutInMinutes { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankTransactionsResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankTransactionsResponse.cs new file mode 100755 index 000000000..ed134f65a --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/CreateBankTransactionsResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class CreateBankTransactionsResponse + { + + public string? ContentType { get; set; } + + /// + /// Success + /// + + public Models.Shared.CreateBankTransactionsResponse? CreateBankTransactionsResponseValue { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/CreateCompanyResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/CreateCompanyResponse.cs new file mode 100755 index 000000000..9b9679433 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/CreateCompanyResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class CreateCompanyResponse + { + /// + /// OK + /// + + public Company? Company { get; set; } + + + public string? ContentType { get; set; } + + /// + /// The request made is not valid. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/CreateConnectionRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/CreateConnectionRequest.cs new file mode 100755 index 000000000..6aff20632 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/CreateConnectionRequest.cs @@ -0,0 +1,26 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class CreateConnectionRequest + { + [SpeakeasyMetadata("request:mediaType=application/json")] + public CreateConnectionRequestBody? RequestBody { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/CreateConnectionRequestBody.cs b/bank-feeds/CodatBankFeeds/Models/Operations/CreateConnectionRequestBody.cs new file mode 100755 index 000000000..57901ff3e --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/CreateConnectionRequestBody.cs @@ -0,0 +1,23 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using Newtonsoft.Json; + + + public class CreateConnectionRequestBody + { + [JsonProperty("platformKey")] + public string? PlatformKey { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/CreateConnectionResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/CreateConnectionResponse.cs new file mode 100755 index 000000000..250bbc25b --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/CreateConnectionResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class CreateConnectionResponse + { + /// + /// OK + /// + + public Connection? Connection { get; set; } + + + public string? ContentType { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/DeleteBankFeedBankAccountRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteBankFeedBankAccountRequest.cs new file mode 100755 index 000000000..85d784ef8 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteBankFeedBankAccountRequest.cs @@ -0,0 +1,32 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class DeleteBankFeedBankAccountRequest + { + /// + /// Unique identifier for an account + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=accountId")] + public string AccountId { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] + public string ConnectionId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/DeleteBankFeedBankAccountResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteBankFeedBankAccountResponse.cs new file mode 100755 index 000000000..04d4962f2 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteBankFeedBankAccountResponse.cs @@ -0,0 +1,37 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class DeleteBankFeedBankAccountResponse + { + + public string? ContentType { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/DeleteBankFeedCredentialsRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteBankFeedCredentialsRequest.cs new file mode 100755 index 000000000..442ac078d --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteBankFeedCredentialsRequest.cs @@ -0,0 +1,26 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class DeleteBankFeedCredentialsRequest + { + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] + public string ConnectionId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/DeleteBankFeedCredentialsResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteBankFeedCredentialsResponse.cs new file mode 100755 index 000000000..298b5bccb --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteBankFeedCredentialsResponse.cs @@ -0,0 +1,37 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class DeleteBankFeedCredentialsResponse + { + + public string? ContentType { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/DeleteCompanyRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteCompanyRequest.cs new file mode 100755 index 000000000..0f66db702 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteCompanyRequest.cs @@ -0,0 +1,23 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class DeleteCompanyRequest + { + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/DeleteCompanyResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteCompanyResponse.cs new file mode 100755 index 000000000..f8eaf6b40 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteCompanyResponse.cs @@ -0,0 +1,37 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class DeleteCompanyResponse + { + + public string? ContentType { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/DeleteConnectionRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteConnectionRequest.cs new file mode 100755 index 000000000..a29655f4a --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteConnectionRequest.cs @@ -0,0 +1,26 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class DeleteConnectionRequest + { + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] + public string ConnectionId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/DeleteConnectionResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteConnectionResponse.cs new file mode 100755 index 000000000..69c13c212 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/DeleteConnectionResponse.cs @@ -0,0 +1,37 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class DeleteConnectionResponse + { + + public string? ContentType { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/GenerateCredentialsRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/GenerateCredentialsRequest.cs new file mode 100755 index 000000000..97f856ec4 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/GenerateCredentialsRequest.cs @@ -0,0 +1,29 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class GenerateCredentialsRequest + { + [SpeakeasyMetadata("request:mediaType=application/json")] + public byte[] RequestBody { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] + public string ConnectionId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/GenerateCredentialsResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/GenerateCredentialsResponse.cs new file mode 100755 index 000000000..7c9b8b9f7 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/GenerateCredentialsResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class GenerateCredentialsResponse + { + /// + /// Success + /// + + public BankAccountCredentials? BankAccountCredentials { get; set; } + + + public string? ContentType { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/GetBankAccountMappingRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/GetBankAccountMappingRequest.cs new file mode 100755 index 000000000..60e7651c6 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/GetBankAccountMappingRequest.cs @@ -0,0 +1,26 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class GetBankAccountMappingRequest + { + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] + public string ConnectionId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/GetBankAccountMappingResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/GetBankAccountMappingResponse.cs new file mode 100755 index 000000000..5bbfb8037 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/GetBankAccountMappingResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class GetBankAccountMappingResponse + { + /// + /// Success + /// + + public BankFeedMapping? BankFeedMapping { get; set; } + + + public string? ContentType { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/GetCompanyRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/GetCompanyRequest.cs new file mode 100755 index 000000000..1425b7d45 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/GetCompanyRequest.cs @@ -0,0 +1,23 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class GetCompanyRequest + { + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/GetCompanyResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/GetCompanyResponse.cs new file mode 100755 index 000000000..3057a9914 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/GetCompanyResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class GetCompanyResponse + { + /// + /// OK + /// + + public Company? Company { get; set; } + + + public string? ContentType { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/GetConnectionRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/GetConnectionRequest.cs new file mode 100755 index 000000000..2f230e9fa --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/GetConnectionRequest.cs @@ -0,0 +1,26 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class GetConnectionRequest + { + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] + public string ConnectionId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/GetConnectionResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/GetConnectionResponse.cs new file mode 100755 index 000000000..c3292edb3 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/GetConnectionResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class GetConnectionResponse + { + /// + /// OK + /// + + public Connection? Connection { get; set; } + + + public string? ContentType { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/GetCreateOperationRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/GetCreateOperationRequest.cs new file mode 100755 index 000000000..a80722902 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/GetCreateOperationRequest.cs @@ -0,0 +1,29 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class GetCreateOperationRequest + { + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + /// + /// Push operation key. + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=pushOperationKey")] + public string PushOperationKey { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/GetCreateOperationResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/GetCreateOperationResponse.cs new file mode 100755 index 000000000..26e318ab6 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/GetCreateOperationResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class GetCreateOperationResponse + { + + public string? ContentType { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + /// + /// OK + /// + + public PushOperation? PushOperation { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/ListBankFeedsRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/ListBankFeedsRequest.cs new file mode 100755 index 000000000..b3be4492f --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/ListBankFeedsRequest.cs @@ -0,0 +1,26 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class ListBankFeedsRequest + { + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] + public string ConnectionId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/ListBankFeedsResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/ListBankFeedsResponse.cs new file mode 100755 index 000000000..992612dfb --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/ListBankFeedsResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class ListBankFeedsResponse + { + /// + /// Success + /// + + public BankFeedAccount? BankFeedAccount { get; set; } + + + public string? ContentType { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/ListCompaniesRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/ListCompaniesRequest.cs new file mode 100755 index 000000000..4c534d98d --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/ListCompaniesRequest.cs @@ -0,0 +1,44 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class ListCompaniesRequest + { + /// + /// Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=orderBy")] + public string? OrderBy { get; set; } + + /// + /// Page number. [Read more](https://docs.codat.io/using-the-api/paging). + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] + public int? Page { get; set; } + + /// + /// Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] + public int? PageSize { get; set; } + + /// + /// Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=query")] + public string? Query { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/ListCompaniesResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/ListCompaniesResponse.cs new file mode 100755 index 000000000..dee66029e --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/ListCompaniesResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class ListCompaniesResponse + { + /// + /// OK + /// + + public Companies? Companies { get; set; } + + + public string? ContentType { get; set; } + + /// + /// Your `query` parameter was not correctly formed + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/ListConnectionsRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/ListConnectionsRequest.cs new file mode 100755 index 000000000..0f5a95cea --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/ListConnectionsRequest.cs @@ -0,0 +1,47 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class ListConnectionsRequest + { + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + /// + /// Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=orderBy")] + public string? OrderBy { get; set; } + + /// + /// Page number. [Read more](https://docs.codat.io/using-the-api/paging). + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] + public int? Page { get; set; } + + /// + /// Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] + public int? PageSize { get; set; } + + /// + /// Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=query")] + public string? Query { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/ListConnectionsResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/ListConnectionsResponse.cs new file mode 100755 index 000000000..fb06af142 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/ListConnectionsResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class ListConnectionsResponse + { + /// + /// OK + /// + + public Connections? Connections { get; set; } + + + public string? ContentType { get; set; } + + /// + /// Your `query` parameter was not correctly formed + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/ListCreateOperationsRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/ListCreateOperationsRequest.cs new file mode 100755 index 000000000..5ab3fa496 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/ListCreateOperationsRequest.cs @@ -0,0 +1,47 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class ListCreateOperationsRequest + { + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + /// + /// Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=orderBy")] + public string? OrderBy { get; set; } + + /// + /// Page number. [Read more](https://docs.codat.io/using-the-api/paging). + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] + public int? Page { get; set; } + + /// + /// Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] + public int? PageSize { get; set; } + + /// + /// Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=query")] + public string? Query { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/ListCreateOperationsResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/ListCreateOperationsResponse.cs new file mode 100755 index 000000000..8d39e0fe0 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/ListCreateOperationsResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class ListCreateOperationsResponse + { + + public string? ContentType { get; set; } + + /// + /// Your `query` parameter was not correctly formed + /// + + public ErrorMessage? ErrorMessage { get; set; } + + /// + /// OK + /// + + public ListPushOperations? ListPushOperations { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/UnlinkConnectionRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/UnlinkConnectionRequest.cs new file mode 100755 index 000000000..e1f4b0b12 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/UnlinkConnectionRequest.cs @@ -0,0 +1,29 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Utils; + + + public class UnlinkConnectionRequest + { + [SpeakeasyMetadata("request:mediaType=application/json")] + public UnlinkConnectionRequestBody? RequestBody { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] + public string ConnectionId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/UnlinkConnectionRequestBody.cs b/bank-feeds/CodatBankFeeds/Models/Operations/UnlinkConnectionRequestBody.cs new file mode 100755 index 000000000..5f26edaee --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/UnlinkConnectionRequestBody.cs @@ -0,0 +1,23 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using Newtonsoft.Json; + + + public class UnlinkConnectionRequestBody + { + [JsonProperty("status")] + public string? Status { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/UnlinkConnectionResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/UnlinkConnectionResponse.cs new file mode 100755 index 000000000..9c9ab3c2e --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/UnlinkConnectionResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class UnlinkConnectionResponse + { + /// + /// OK + /// + + public Connection? Connection { get; set; } + + + public string? ContentType { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/UpdateBankFeedRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/UpdateBankFeedRequest.cs new file mode 100755 index 000000000..867cd8b3a --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/UpdateBankFeedRequest.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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using CodatBankFeeds.Utils; + + + public class UpdateBankFeedRequest + { + [SpeakeasyMetadata("request:mediaType=application/json")] + public BankFeedAccount? BankFeedAccount { get; set; } + + /// + /// Unique identifier for an account + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=accountId")] + public string AccountId { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] + public string ConnectionId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/UpdateBankFeedResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/UpdateBankFeedResponse.cs new file mode 100755 index 000000000..e5be28a3d --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/UpdateBankFeedResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class UpdateBankFeedResponse + { + /// + /// Success + /// + + public BankFeedAccount? BankFeedAccount { get; set; } + + + public string? ContentType { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/UpdateCompanyRequest.cs b/bank-feeds/CodatBankFeeds/Models/Operations/UpdateCompanyRequest.cs new file mode 100755 index 000000000..20f0a086b --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/UpdateCompanyRequest.cs @@ -0,0 +1,27 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using CodatBankFeeds.Utils; + + + public class UpdateCompanyRequest + { + [SpeakeasyMetadata("request:mediaType=application/json")] + public CompanyRequestBody? CompanyRequestBody { get; set; } + + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] + public string CompanyId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Operations/UpdateCompanyResponse.cs b/bank-feeds/CodatBankFeeds/Models/Operations/UpdateCompanyResponse.cs new file mode 100755 index 000000000..94033802d --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Operations/UpdateCompanyResponse.cs @@ -0,0 +1,43 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Operations +{ + using CodatBankFeeds.Models.Shared; + using System.Net.Http; + using System; + + + public class UpdateCompanyResponse + { + /// + /// OK + /// + + public Company? Company { get; set; } + + + public string? ContentType { get; set; } + + /// + /// Your API request was not properly authorized. + /// + + public ErrorMessage? ErrorMessage { get; set; } + + + public int StatusCode { get; set; } + + + public HttpResponseMessage? RawResponse { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/BankAccountCredentials.cs b/bank-feeds/CodatBankFeeds/Models/Shared/BankAccountCredentials.cs new file mode 100755 index 000000000..080d63446 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/BankAccountCredentials.cs @@ -0,0 +1,35 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + + + /// + /// Result of generate credentials + /// + public class BankAccountCredentials + { + /// + /// Password to enable the bank feeds platform to securely retrieve transactions. + /// + [JsonProperty("password")] + public string? Password { get; set; } + + /// + /// Username used by the bank feeds platform to retrieve transactions + /// + [JsonProperty("username")] + public string? Username { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/BankFeedAccount.cs b/bank-feeds/CodatBankFeeds/Models/Shared/BankFeedAccount.cs new file mode 100755 index 000000000..3b4eb1179 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/BankFeedAccount.cs @@ -0,0 +1,131 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + + + /// + /// The target bank account in a supported accounting package for ingestion into a bank feed. + /// + public class BankFeedAccount + { + /// + /// The bank account name + /// + [JsonProperty("accountName")] + public string? AccountName { get; set; } + + /// + /// The account number + /// + [JsonProperty("accountNumber")] + public string? AccountNumber { get; set; } + + /// + /// The type of bank account e.g. Credit + /// + [JsonProperty("accountType")] + public string? AccountType { get; set; } + + /// + /// The latest balance for the bank account + /// + [JsonProperty("balance")] + public float? Balance { get; set; } + + /// + /// The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + /// + /// + /// + /// ## Unknown currencies + /// + /// In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. + /// + /// There are only a very small number of edge cases where this currency code is returned by the Codat system. + /// + /// + [JsonProperty("currency")] + public string? Currency { get; set; } + + /// + /// 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. + /// + /// + [JsonProperty("feedStartDate")] + public string? FeedStartDate { get; set; } + + /// + /// Unique ID for the bank feed account + /// + [JsonProperty("id")] + public string Id { get; set; } + + /// + /// 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. + /// + /// + [JsonProperty("modifiedDate")] + public string? ModifiedDate { get; set; } + + /// + /// The sort code + /// + [JsonProperty("sortCode")] + public string? SortCode { get; set; } + + [JsonProperty("status")] + public string? Status { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/BankFeedAccountMapping.cs b/bank-feeds/CodatBankFeeds/Models/Shared/BankFeedAccountMapping.cs new file mode 100755 index 000000000..d7d90e78a --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/BankFeedAccountMapping.cs @@ -0,0 +1,62 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + + + /// + /// A bank feed connection between a source account and a target account. + /// + public class BankFeedAccountMapping + { + /// + /// 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. + /// + /// + [JsonProperty("feedStartDate")] + public string? FeedStartDate { get; set; } + + /// + /// Unique ID for the source account + /// + [JsonProperty("sourceAccountId")] + public string? SourceAccountId { get; set; } + + /// + /// Unique ID for the target account + /// + [JsonProperty("targetAccountId")] + public string? TargetAccountId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/BankFeedAccountMappingResponse.cs b/bank-feeds/CodatBankFeeds/Models/Shared/BankFeedAccountMappingResponse.cs new file mode 100755 index 000000000..a155de385 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/BankFeedAccountMappingResponse.cs @@ -0,0 +1,47 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + + + /// + /// The result from POSTing a Bank Account mapping. + /// + public class BankFeedAccountMappingResponse + { + /// + /// Error returned during the post request + /// + [JsonProperty("Error")] + public string? Error { get; set; } + + /// + /// Status of the POST request. + /// + [JsonProperty("Status")] + public string? Status { get; set; } + + /// + /// Unique ID for the source account. + /// + [JsonProperty("sourceAccountId")] + public string? SourceAccountId { get; set; } + + /// + /// Unique ID for the target account. + /// + [JsonProperty("targetAccountId")] + public string? TargetAccountId { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/BankFeedMapping.cs b/bank-feeds/CodatBankFeeds/Models/Shared/BankFeedMapping.cs new file mode 100755 index 000000000..fad168fe2 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/BankFeedMapping.cs @@ -0,0 +1,111 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System.Collections.Generic; + + + /// + /// A bank feed connection between a source account and a target account, including potential target accounts. + /// + public class BankFeedMapping + { + /// + /// 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. + /// + /// + [JsonProperty("feedStartDate")] + public string? FeedStartDate { get; set; } + + /// + /// Unique ID for the source account. + /// + [JsonProperty("sourceAccountId")] + public string? SourceAccountId { get; set; } + + /// + /// Name for the source account. + /// + [JsonProperty("sourceAccountName")] + public string? SourceAccountName { get; set; } + + /// + /// Account number for the source account. + /// + [JsonProperty("sourceAccountNumber")] + public string? SourceAccountNumber { get; set; } + + /// + /// Balance for the source account. + /// + [JsonProperty("sourceBalance")] + public string? SourceBalance { get; set; } + + /// + /// The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + /// + /// + /// + /// ## Unknown currencies + /// + /// In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. + /// + /// There are only a very small number of edge cases where this currency code is returned by the Codat system. + /// + /// + [JsonProperty("sourceCurrency")] + public string? SourceCurrency { get; set; } + + [JsonProperty("status")] + public string? Status { get; set; } + + /// + /// Unique ID for the target account in the accounting platform. + /// + [JsonProperty("targetAccountId")] + public string? TargetAccountId { get; set; } + + /// + /// Name for the target account in the accounting platform. + /// + [JsonProperty("targetAccountName")] + public string? TargetAccountName { get; set; } + + /// + /// An array of potential target accounts. + /// + [JsonProperty("targetAccountOptions")] + public List? TargetAccountOptions { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/Companies.cs b/bank-feeds/CodatBankFeeds/Models/Shared/Companies.cs new file mode 100755 index 000000000..c01a423d7 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/Companies.cs @@ -0,0 +1,39 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System.Collections.Generic; + + + /// + /// OK + /// + public class Companies + { + [JsonProperty("_links")] + public Links Links { get; set; } + + [JsonProperty("pageNumber")] + public int PageNumber { get; set; } + + [JsonProperty("pageSize")] + public int PageSize { get; set; } + + [JsonProperty("results")] + public List? Results { get; set; } + + [JsonProperty("totalResults")] + public int TotalResults { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/Company.cs b/bank-feeds/CodatBankFeeds/Models/Shared/Company.cs new file mode 100755 index 000000000..cd36c77e5 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/Company.cs @@ -0,0 +1,120 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System.Collections.Generic; + using System; + + + /// + /// In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data. + /// + /// + /// + /// Typically each company is one of your customers. + /// + /// When you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company. + /// + /// + public class Company + { + /// + /// 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. + /// + /// + [JsonProperty("created")] + public string? Created { get; set; } + + [JsonProperty("createdByUserName")] + public string? CreatedByUserName { get; set; } + + [JsonProperty("dataConnections")] + public List? DataConnections { get; set; } + + /// + /// Additional information about the company. This can be used to store foreign IDs, references, etc. + /// + [JsonProperty("description")] + public string? Description { get; set; } + + /// + /// Unique identifier for your SMB in Codat. + /// + [JsonProperty("id")] + public string Id { get; set; } + + /// + /// 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. + /// + /// + [JsonProperty("lastSync")] + public string? LastSync { get; set; } + + /// + /// The name of the company + /// + [JsonProperty("name")] + public string Name { get; set; } + + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] + [JsonProperty("platform")] + public string? Platform { get; set; } + + /// + /// The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. + /// + [JsonProperty("redirect")] + public string Redirect { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/CompanyRequestBody.cs b/bank-feeds/CodatBankFeeds/Models/Shared/CompanyRequestBody.cs new file mode 100755 index 000000000..a293e8313 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/CompanyRequestBody.cs @@ -0,0 +1,32 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + + + public class CompanyRequestBody + { + /// + /// Additional information about the company. This can be used to store foreign IDs, references, etc. + /// + [JsonProperty("description")] + public string? Description { get; set; } + + /// + /// Name of company being connected. + /// + [JsonProperty("name")] + public string Name { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/Connection.cs b/bank-feeds/CodatBankFeeds/Models/Shared/Connection.cs new file mode 100755 index 000000000..5924478c0 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/Connection.cs @@ -0,0 +1,141 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System.Collections.Generic; + + + /// + /// A connection represents a [company's](https://docs.codat.io/bank-feeds-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source. + /// + /// + /// + /// A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to: + /// + /// - [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection. + /// - [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections. + /// - [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections. + /// Any combination of accounting, banking, and commerce data connections is allowed. + /// + /// Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview). + /// + /// + public class Connection + { + [JsonProperty("additionalProperties")] + public object? AdditionalProperties { get; set; } + + [JsonProperty("connectionInfo")] + public Dictionary? ConnectionInfo { get; set; } + + /// + /// 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. + /// + /// + [JsonProperty("created")] + public string Created { get; set; } + + [JsonProperty("dataConnectionErrors")] + public List? DataConnectionErrors { get; set; } + + /// + /// Unique identifier for a company's data connection. + /// + [JsonProperty("id")] + public string Id { get; set; } + + /// + /// A Codat ID representing the integration. + /// + [JsonProperty("integrationId")] + public string IntegrationId { get; set; } + + /// + /// A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + /// + [JsonProperty("integrationKey")] + public string IntegrationKey { get; set; } + + /// + /// 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. + /// + /// + [JsonProperty("lastSync")] + public string? LastSync { get; set; } + + [JsonProperty("linkUrl")] + public string LinkUrl { get; set; } + + [JsonProperty("platformName")] + public string PlatformName { get; set; } + + /// + /// A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. + /// + [JsonProperty("sourceId")] + public string SourceId { get; set; } + + /// + /// The type of platform of the connection. + /// + [JsonProperty("sourceType")] + public ConnectionSourceType SourceType { get; set; } + + /// + /// The current authorization status of the data connection. + /// + [JsonProperty("status")] + public DataConnectionStatus Status { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/ConnectionSourceType.cs b/bank-feeds/CodatBankFeeds/Models/Shared/ConnectionSourceType.cs new file mode 100755 index 000000000..24b7265c5 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/ConnectionSourceType.cs @@ -0,0 +1,56 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System; + + + /// + /// The type of platform of the connection. + /// + public enum ConnectionSourceType + { + [JsonProperty("Accounting")] + Accounting, + [JsonProperty("Banking")] + Banking, + [JsonProperty("Commerce")] + Commerce, + [JsonProperty("Other")] + Other, + [JsonProperty("Unknown")] + Unknown, + } + + public static class ConnectionSourceTypeExtension + { + public static string Value(this ConnectionSourceType value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static ConnectionSourceType ToEnum(this string value) + { + foreach(var field in typeof(ConnectionSourceType).GetFields()) + { + var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + return (ConnectionSourceType)field.GetValue(null); + } + } + + throw new Exception($"Unknown value {value} for enum ConnectionSourceType"); + } + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/Connections.cs b/bank-feeds/CodatBankFeeds/Models/Shared/Connections.cs new file mode 100755 index 000000000..2ade35bf6 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/Connections.cs @@ -0,0 +1,39 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System.Collections.Generic; + + + /// + /// OK + /// + public class Connections + { + [JsonProperty("_links")] + public Links Links { get; set; } + + [JsonProperty("pageNumber")] + public int PageNumber { get; set; } + + [JsonProperty("pageSize")] + public int PageSize { get; set; } + + [JsonProperty("results")] + public List? Results { get; set; } + + [JsonProperty("totalResults")] + public int TotalResults { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/CreateBankAccountTransaction.cs b/bank-feeds/CodatBankFeeds/Models/Shared/CreateBankAccountTransaction.cs new file mode 100755 index 000000000..b9f4ff3d6 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/CreateBankAccountTransaction.cs @@ -0,0 +1,59 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + + + public class CreateBankAccountTransaction + { + [JsonProperty("amount")] + public float? Amount { get; set; } + + [JsonProperty("balance")] + public float? Balance { get; set; } + + /// + /// 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. + /// + /// + [JsonProperty("date")] + public string? Date { get; set; } + + [JsonProperty("description")] + public string? Description { get; set; } + + [JsonProperty("id")] + public string? Id { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/CreateBankTransactions.cs b/bank-feeds/CodatBankFeeds/Models/Shared/CreateBankTransactions.cs new file mode 100755 index 000000000..9930f5c34 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/CreateBankTransactions.cs @@ -0,0 +1,27 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System.Collections.Generic; + + + public class CreateBankTransactions + { + [JsonProperty("accountId")] + public string? AccountId { get; set; } + + [JsonProperty("transactions")] + public List? Transactions { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/CreateBankTransactionsResponse.cs b/bank-feeds/CodatBankFeeds/Models/Shared/CreateBankTransactionsResponse.cs new file mode 100755 index 000000000..389d0f04d --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/CreateBankTransactionsResponse.cs @@ -0,0 +1,137 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System.Collections.Generic; + using System; + + + /// + /// Success + /// + public class CreateBankTransactionsResponse + { + /// + /// Contains a single entry that communicates which record has changed and the manner in which it changed. + /// + [JsonProperty("changes")] + public List? Changes { get; set; } + + /// + /// Unique identifier for your SMB in Codat. + /// + [JsonProperty("companyId")] + public string CompanyId { get; set; } + + /// + /// 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. + /// + /// + [JsonProperty("completedOnUtc")] + public string? CompletedOnUtc { get; set; } + + [JsonProperty("data")] + public CreateBankTransactions? Data { get; set; } + + /// + /// Unique identifier for a company's data connection. + /// + [JsonProperty("dataConnectionKey")] + public string DataConnectionKey { get; set; } + + /// + /// Available Data types + /// + [JsonProperty("dataType")] + public DataType? DataType { get; set; } + + [JsonProperty("errorMessage")] + public string? ErrorMessage { get; set; } + + /// + /// A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. + /// + [JsonProperty("pushOperationKey")] + public string PushOperationKey { get; set; } + + /// + /// 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. + /// + /// + [JsonProperty("requestedOnUtc")] + public string RequestedOnUtc { get; set; } + + /// + /// The status of the push operation. + /// + [JsonProperty("status")] + public PushOperationStatus Status { get; set; } + + [JsonProperty("statusCode")] + public int StatusCode { get; set; } + + [JsonProperty("timeoutInMinutes")] + public int? TimeoutInMinutes { get; set; } + + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] + [JsonProperty("timeoutInSeconds")] + public int? TimeoutInSeconds { get; set; } + + /// + /// A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + /// + [JsonProperty("validation")] + public Validation? Validation { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/DataConnectionError.cs b/bank-feeds/CodatBankFeeds/Models/Shared/DataConnectionError.cs new file mode 100755 index 000000000..6309aefdb --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/DataConnectionError.cs @@ -0,0 +1,56 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + + + public class DataConnectionError + { + [JsonProperty("errorMessage")] + public string? ErrorMessage { get; set; } + + /// + /// 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. + /// + /// + [JsonProperty("erroredOnUtc")] + public string? ErroredOnUtc { get; set; } + + [JsonProperty("statusCode")] + public string? StatusCode { get; set; } + + [JsonProperty("statusText")] + public string? StatusText { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/DataConnectionStatus.cs b/bank-feeds/CodatBankFeeds/Models/Shared/DataConnectionStatus.cs new file mode 100755 index 000000000..a38461b39 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/DataConnectionStatus.cs @@ -0,0 +1,54 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System; + + + /// + /// The current authorization status of the data connection. + /// + public enum DataConnectionStatus + { + [JsonProperty("PendingAuth")] + PendingAuth, + [JsonProperty("Linked")] + Linked, + [JsonProperty("Unlinked")] + Unlinked, + [JsonProperty("Deauthorized")] + Deauthorized, + } + + public static class DataConnectionStatusExtension + { + public static string Value(this DataConnectionStatus value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static DataConnectionStatus ToEnum(this string value) + { + foreach(var field in typeof(DataConnectionStatus).GetFields()) + { + var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + return (DataConnectionStatus)field.GetValue(null); + } + } + + throw new Exception($"Unknown value {value} for enum DataConnectionStatus"); + } + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/DataType.cs b/bank-feeds/CodatBankFeeds/Models/Shared/DataType.cs new file mode 100755 index 000000000..c8229d6fe --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/DataType.cs @@ -0,0 +1,130 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System; + + + /// + /// Available Data types + /// + public enum DataType + { + [JsonProperty("accountTransactions")] + AccountTransactions, + [JsonProperty("balanceSheet")] + BalanceSheet, + [JsonProperty("bankAccounts")] + BankAccounts, + [JsonProperty("bankTransactions")] + BankTransactions, + [JsonProperty("billCreditNotes")] + BillCreditNotes, + [JsonProperty("billPayments")] + BillPayments, + [JsonProperty("bills")] + Bills, + [JsonProperty("cashFlowStatement")] + CashFlowStatement, + [JsonProperty("chartOfAccounts")] + ChartOfAccounts, + [JsonProperty("company")] + Company, + [JsonProperty("creditNotes")] + CreditNotes, + [JsonProperty("customers")] + Customers, + [JsonProperty("directCosts")] + DirectCosts, + [JsonProperty("directIncomes")] + DirectIncomes, + [JsonProperty("invoices")] + Invoices, + [JsonProperty("items")] + Items, + [JsonProperty("journalEntries")] + JournalEntries, + [JsonProperty("journals")] + Journals, + [JsonProperty("paymentMethods")] + PaymentMethods, + [JsonProperty("payments")] + Payments, + [JsonProperty("profitAndLoss")] + ProfitAndLoss, + [JsonProperty("purchaseOrders")] + PurchaseOrders, + [JsonProperty("salesOrders")] + SalesOrders, + [JsonProperty("suppliers")] + Suppliers, + [JsonProperty("taxRates")] + TaxRates, + [JsonProperty("trackingCategories")] + TrackingCategories, + [JsonProperty("transfers")] + Transfers, + [JsonProperty("banking-accountBalances")] + BankingAccountBalances, + [JsonProperty("banking-accounts")] + BankingAccounts, + [JsonProperty("banking-transactionCategories")] + BankingTransactionCategories, + [JsonProperty("banking-transactions")] + BankingTransactions, + [JsonProperty("commerce-companyInfo")] + CommerceCompanyInfo, + [JsonProperty("commerce-customers")] + CommerceCustomers, + [JsonProperty("commerce-disputes")] + CommerceDisputes, + [JsonProperty("commerce-locations")] + CommerceLocations, + [JsonProperty("commerce-orders")] + CommerceOrders, + [JsonProperty("commerce-paymentMethods")] + CommercePaymentMethods, + [JsonProperty("commerce-payments")] + CommercePayments, + [JsonProperty("commerce-productCategories")] + CommerceProductCategories, + [JsonProperty("commerce-products")] + CommerceProducts, + [JsonProperty("commerce-taxComponents")] + CommerceTaxComponents, + [JsonProperty("commerce-transactions")] + CommerceTransactions, + } + + public static class DataTypeExtension + { + public static string Value(this DataType value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static DataType ToEnum(this string value) + { + foreach(var field in typeof(DataType).GetFields()) + { + var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + return (DataType)field.GetValue(null); + } + } + + throw new Exception($"Unknown value {value} for enum DataType"); + } + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/ErrorMessage.cs b/bank-feeds/CodatBankFeeds/Models/Shared/ErrorMessage.cs new file mode 100755 index 000000000..0b726cfec --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/ErrorMessage.cs @@ -0,0 +1,41 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + + + /// + /// Your `query` parameter was not correctly formed + /// + public class ErrorMessage + { + [JsonProperty("canBeRetried")] + public string? CanBeRetried { get; set; } + + [JsonProperty("correlationId")] + public string? CorrelationId { get; set; } + + [JsonProperty("detailedErrorCode")] + public int? DetailedErrorCode { get; set; } + + [JsonProperty("error")] + public string? Error { get; set; } + + [JsonProperty("service")] + public string? Service { get; set; } + + [JsonProperty("statusCode")] + public int? StatusCode { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/HalRef.cs b/bank-feeds/CodatBankFeeds/Models/Shared/HalRef.cs new file mode 100755 index 000000000..b70f31d97 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/HalRef.cs @@ -0,0 +1,23 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + + + public class HalRef + { + [JsonProperty("href")] + public string? Href { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/Links.cs b/bank-feeds/CodatBankFeeds/Models/Shared/Links.cs new file mode 100755 index 000000000..3da55f8f4 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/Links.cs @@ -0,0 +1,32 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + + + public class Links + { + [JsonProperty("current")] + public HalRef Current { get; set; } + + [JsonProperty("next")] + public HalRef? Next { get; set; } + + [JsonProperty("previous")] + public HalRef? Previous { get; set; } + + [JsonProperty("self")] + public HalRef Self { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/ListPushOperations.cs b/bank-feeds/CodatBankFeeds/Models/Shared/ListPushOperations.cs new file mode 100755 index 000000000..a2fea1f9a --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/ListPushOperations.cs @@ -0,0 +1,39 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System.Collections.Generic; + + + /// + /// OK + /// + public class ListPushOperations + { + [JsonProperty("_links")] + public Links Links { get; set; } + + [JsonProperty("pageNumber")] + public int PageNumber { get; set; } + + [JsonProperty("pageSize")] + public int PageSize { get; set; } + + [JsonProperty("results")] + public List? Results { get; set; } + + [JsonProperty("totalResults")] + public int TotalResults { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/PushChangeType.cs b/bank-feeds/CodatBankFeeds/Models/Shared/PushChangeType.cs new file mode 100755 index 000000000..8416057c9 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/PushChangeType.cs @@ -0,0 +1,53 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System; + + + public enum PushChangeType + { + [JsonProperty("Unknown")] + Unknown, + [JsonProperty("Created")] + Created, + [JsonProperty("Modified")] + Modified, + [JsonProperty("Deleted")] + Deleted, + [JsonProperty("AttachmentUploaded")] + AttachmentUploaded, + } + + public static class PushChangeTypeExtension + { + public static string Value(this PushChangeType value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static PushChangeType ToEnum(this string value) + { + foreach(var field in typeof(PushChangeType).GetFields()) + { + var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + return (PushChangeType)field.GetValue(null); + } + } + + throw new Exception($"Unknown value {value} for enum PushChangeType"); + } + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/PushOperation.cs b/bank-feeds/CodatBankFeeds/Models/Shared/PushOperation.cs new file mode 100755 index 000000000..f15efb8ab --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/PushOperation.cs @@ -0,0 +1,134 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System.Collections.Generic; + using System; + + + /// + /// OK + /// + public class PushOperation + { + /// + /// Contains a single entry that communicates which record has changed and the manner in which it changed. + /// + [JsonProperty("changes")] + public List? Changes { get; set; } + + /// + /// Unique identifier for your SMB in Codat. + /// + [JsonProperty("companyId")] + public string CompanyId { get; set; } + + /// + /// 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. + /// + /// + [JsonProperty("completedOnUtc")] + public string? CompletedOnUtc { get; set; } + + /// + /// Unique identifier for a company's data connection. + /// + [JsonProperty("dataConnectionKey")] + public string DataConnectionKey { get; set; } + + /// + /// Available Data types + /// + [JsonProperty("dataType")] + public DataType? DataType { get; set; } + + [JsonProperty("errorMessage")] + public string? ErrorMessage { get; set; } + + /// + /// A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. + /// + [JsonProperty("pushOperationKey")] + public string PushOperationKey { get; set; } + + /// + /// 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. + /// + /// + [JsonProperty("requestedOnUtc")] + public string RequestedOnUtc { get; set; } + + /// + /// The status of the push operation. + /// + [JsonProperty("status")] + public PushOperationStatus Status { get; set; } + + [JsonProperty("statusCode")] + public int StatusCode { get; set; } + + [JsonProperty("timeoutInMinutes")] + public int? TimeoutInMinutes { get; set; } + + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] + [JsonProperty("timeoutInSeconds")] + public int? TimeoutInSeconds { get; set; } + + /// + /// A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + /// + [JsonProperty("validation")] + public Validation? Validation { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/PushOperationChange.cs b/bank-feeds/CodatBankFeeds/Models/Shared/PushOperationChange.cs new file mode 100755 index 000000000..a6db81a34 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/PushOperationChange.cs @@ -0,0 +1,29 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + + + public class PushOperationChange + { + [JsonProperty("attachmentId")] + public string? AttachmentId { get; set; } + + [JsonProperty("recordRef")] + public PushOperationRef? RecordRef { get; set; } + + [JsonProperty("type")] + public PushChangeType? Type { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/PushOperationRef.cs b/bank-feeds/CodatBankFeeds/Models/Shared/PushOperationRef.cs new file mode 100755 index 000000000..978682624 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/PushOperationRef.cs @@ -0,0 +1,29 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + + + public class PushOperationRef + { + /// + /// Available Data types + /// + [JsonProperty("dataType")] + public DataType? DataType { get; set; } + + [JsonProperty("id")] + public string? Id { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/PushOperationStatus.cs b/bank-feeds/CodatBankFeeds/Models/Shared/PushOperationStatus.cs new file mode 100755 index 000000000..0633a61c3 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/PushOperationStatus.cs @@ -0,0 +1,54 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System; + + + /// + /// The status of the push operation. + /// + public enum PushOperationStatus + { + [JsonProperty("Pending")] + Pending, + [JsonProperty("Failed")] + Failed, + [JsonProperty("Success")] + Success, + [JsonProperty("TimedOut")] + TimedOut, + } + + public static class PushOperationStatusExtension + { + public static string Value(this PushOperationStatus value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static PushOperationStatus ToEnum(this string value) + { + foreach(var field in typeof(PushOperationStatus).GetFields()) + { + var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + return (PushOperationStatus)field.GetValue(null); + } + } + + throw new Exception($"Unknown value {value} for enum PushOperationStatus"); + } + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/Security.cs b/bank-feeds/CodatBankFeeds/Models/Shared/Security.cs new file mode 100755 index 000000000..5942b28a0 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/Security.cs @@ -0,0 +1,23 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using CodatBankFeeds.Utils; + + + public class Security + { + [SpeakeasyMetadata("security:scheme=true,type=apiKey,subType=header,name=Authorization")] + public string AuthHeader { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/TargetAccountOption.cs b/bank-feeds/CodatBankFeeds/Models/Shared/TargetAccountOption.cs new file mode 100755 index 000000000..a5e37cfa7 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/TargetAccountOption.cs @@ -0,0 +1,50 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + + + public class TargetAccountOption + { + /// + /// The account number of the account. + /// + [JsonProperty("accountNumber")] + public string? AccountNumber { get; set; } + + /// + /// The balance of the account. + /// + [JsonProperty("balance")] + public float? Balance { get; set; } + + /// + /// Id of the target account. + /// + [JsonProperty("id")] + public string? Id { get; set; } + + /// + /// Name of the target account. + /// + [JsonProperty("name")] + public string? Name { get; set; } + + /// + /// The sort code of the account. + /// + [JsonProperty("sortCode")] + public string? SortCode { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/Validation.cs b/bank-feeds/CodatBankFeeds/Models/Shared/Validation.cs new file mode 100755 index 000000000..98c33d52e --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/Validation.cs @@ -0,0 +1,30 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + using System.Collections.Generic; + + + /// + /// A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + /// + public class Validation + { + [JsonProperty("errors")] + public List? Errors { get; set; } + + [JsonProperty("warnings")] + public List? Warnings { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Models/Shared/ValidationItem.cs b/bank-feeds/CodatBankFeeds/Models/Shared/ValidationItem.cs new file mode 100755 index 000000000..75148c348 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Models/Shared/ValidationItem.cs @@ -0,0 +1,29 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Models.Shared +{ + using Newtonsoft.Json; + + + public class ValidationItem + { + [JsonProperty("itemId")] + public string? ItemId { get; set; } + + [JsonProperty("message")] + public string? Message { get; set; } + + [JsonProperty("validatorName")] + public string? ValidatorName { get; set; } + + } + +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/SourceAccounts.cs b/bank-feeds/CodatBankFeeds/SourceAccounts.cs new file mode 100755 index 000000000..3caf19d04 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/SourceAccounts.cs @@ -0,0 +1,404 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds +{ + using CodatBankFeeds.Models.Operations; + using CodatBankFeeds.Models.Shared; + using CodatBankFeeds.Utils; + using Newtonsoft.Json; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + public interface ISourceAccountsSDK + { + Task CreateAsync(CreateBankFeedRequest? request = null); + Task DeleteAsync(DeleteBankFeedBankAccountRequest? request = null); + Task DeleteCredentialsAsync(DeleteBankFeedCredentialsRequest? request = null); + Task GenerateCredentialsAsync(GenerateCredentialsRequest request); + Task ListAsync(ListBankFeedsRequest? request = null); + Task UpdateAsync(UpdateBankFeedRequest? request = null); + } + + public class SourceAccountsSDK: ISourceAccountsSDK + { + public SDKConfig Config { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "0.1.0"; + private const string _sdkGenVersion = "2.91.4"; + private const string _openapiDocVersion = "3.0.0"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _securityClient; + + public SourceAccountsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securityClient = securityClient; + _serverUrl = serverUrl; + Config = config; + } + + + /// + /// Create a bank feed bank account + /// + /// + /// Post a BankFeed BankAccount for a single data source connected. to a single company. + /// + /// + public async Task CreateAsync(CreateBankFeedRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + var serializedBody = RequestBodySerializer.Serialize(request, "BankFeedAccount", "json"); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new CreateBankFeedResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.BankFeedAccount = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// Delete bank feed bank account + /// + /// + /// The *delete bank feed bank account* endpoint enables you to remove a source account. + /// + /// Removing a source account will also remove any mapping between the source bank feed bank accounts and the target bankfeed bank account. + /// + /// + public async Task DeleteAsync(DeleteBankFeedBankAccountRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new DeleteBankFeedBankAccountResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 204)) + { + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// Delete all source account credentials + /// + /// + /// The _Delete Bank Account Credentials_ endpoint serves as a comprehensive mechanism for revoking all existing authorization credentials that a company employs to establish its Bank Feed connection. + /// + /// In cases where multiple credential sets have been generated, a single API call to this endpoint revokes all of them. + /// + /// + public async Task DeleteCredentialsAsync(DeleteBankFeedCredentialsRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/credentials", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new DeleteBankFeedCredentialsResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 204)) + { + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// Generate source account credentials + /// + /// + /// The _Generate Bank Account Credentials_ endpoint can be used to generate credentials for QuickBooks Online to use for authentication of the Bank Feed in their portal, each time this is used a new set of credentials will be generated. + /// + /// The old credentials will still be valid until the revoke credentials endpoint is used, which will revoke all credentials associated to the data connection. + /// + /// + /// + public async Task GenerateCredentialsAsync(GenerateCredentialsRequest request) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/credentials", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "json"); + if (serializedBody == null) + { + throw new ArgumentNullException("request body is required"); + } + else + { + httpRequest.Content = serializedBody; + } + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new GenerateCredentialsResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.BankAccountCredentials = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// List bank feed bank accounts + /// + /// + /// The *List bank feed bank accounts* endpoint returns a list of [bank feed accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) for a given company's connection. + /// + /// [Bank feed accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) are the bank's bank account from which transactions are synced into the accounting platform. + /// + /// + /// + /// + public async Task ListAsync(ListBankFeedsRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new ListBankFeedsResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.BankFeedAccount = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// Update bank feed bank account + /// + /// + /// The *Update bank feed bank account* endpoint updates a single bank feed bank account for a single data source connected to a single company. + /// + /// + public async Task UpdateAsync(UpdateBankFeedRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + var serializedBody = RequestBodySerializer.Serialize(request, "BankFeedAccount", "json"); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new UpdateBankFeedResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.BankFeedAccount = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + } +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Transactions.cs b/bank-feeds/CodatBankFeeds/Transactions.cs new file mode 100755 index 000000000..b9f9f8598 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Transactions.cs @@ -0,0 +1,228 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds +{ + using CodatBankFeeds.Models.Operations; + using CodatBankFeeds.Models.Shared; + using CodatBankFeeds.Utils; + using Newtonsoft.Json; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + public interface ITransactionsSDK + { + Task CreateAsync(CreateBankTransactionsRequest? request = null); + Task GetCreateOperationAsync(GetCreateOperationRequest? request = null); + Task ListCreateOperationsAsync(ListCreateOperationsRequest? request = null); + } + + public class TransactionsSDK: ITransactionsSDK + { + public SDKConfig Config { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "0.1.0"; + private const string _sdkGenVersion = "2.91.4"; + private const string _openapiDocVersion = "3.0.0"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _securityClient; + + public TransactionsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securityClient = securityClient; + _serverUrl = serverUrl; + Config = config; + } + + + /// + /// Create bank account transactions + /// + /// + /// The *Create bank account transactions* endpoint creates new [bank account transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) for a given company's connection. + /// + /// [Bank account transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) are records of monetary amounts that have moved in and out of an SMB's bank account. + /// + /// **Integration-specific behaviour** + /// + /// Required data may vary by integration. To see what data to post, first call [Get create bank transaction model](https://docs.codat.io/bank-feeds-api#/operations/get-create-bankTransactions-model). + /// + /// Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support creating a bank account transactions. + /// + /// + /// + public async Task CreateAsync(CreateBankTransactionsRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/bankAccounts/{accountId}/bankTransactions", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + var serializedBody = RequestBodySerializer.Serialize(request, "CreateBankTransactions", "json"); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new Models.Operations.CreateBankTransactionsResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.CreateBankTransactionsResponseValue = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// Get create operation + /// + /// + /// Retrieve push operation. + /// + /// + public async Task GetCreateOperationAsync(GetCreateOperationRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/push/{pushOperationKey}", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new GetCreateOperationResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.PushOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + + /// + /// List create operations + /// + /// + /// List create operations. + /// + /// + public async Task ListCreateOperationsAsync(ListCreateOperationsRequest? request = null) + { + string baseUrl = _serverUrl; + if (baseUrl.EndsWith("/")) + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/push", request); + + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}"); + + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new ListCreateOperationsResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ListPushOperations = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); + } + + return response; + } + return response; + } + + } +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Utils/EnumSerializer.cs b/bank-feeds/CodatBankFeeds/Utils/EnumSerializer.cs new file mode 100755 index 000000000..feef68c0b --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Utils/EnumSerializer.cs @@ -0,0 +1,50 @@ + +//------------------------------------------------------------------------------ +// +// 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 +using System; +using System.Linq; +using Newtonsoft.Json; + +namespace CodatBankFeeds.Utils +{ + internal class EnumSerializer: JsonConverter + { + public override bool CanConvert(Type objectType) => + objectType.IsEnum; + + public override bool CanRead => false; + + public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) => + throw new NotImplementedException(); + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + if (value == null) + { + writer.WriteValue("null"); + return; + } + + var isInt = false; + var attributes = value.GetType().GetMember(value.ToString()).First().CustomAttributes; + if(attributes.Count() == 0 || attributes.First().ConstructorArguments.Count() == 0) + { + isInt = true; + } + var parsedValue = Utilities.ToString(value); + if(isInt) + { + writer.WriteValue(int.Parse(parsedValue)); + return; + } + writer.WriteValue(parsedValue); + } + } +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Utils/FlexibleObjectDeserializer.cs b/bank-feeds/CodatBankFeeds/Utils/FlexibleObjectDeserializer.cs new file mode 100755 index 000000000..6a7aa12ba --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Utils/FlexibleObjectDeserializer.cs @@ -0,0 +1,44 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Utils +{ + using System; + using System.Linq; + using System.Collections.Generic; + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + + internal class FlexibleObjectDeserializer: JsonConverter + { + public override bool CanConvert(Type objectType) => + objectType == typeof(object); + + public override bool CanWrite => false; + + public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) + { + var token = JToken.ReadFrom(reader); + + if (token is JArray) + { + return new List(token.Select(t => + { + return t.ToString(); + })); + } + + return token.ToObject(objectType); + } + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) => + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Utils/HeaderSerializer.cs b/bank-feeds/CodatBankFeeds/Utils/HeaderSerializer.cs new file mode 100755 index 000000000..0dd75dd43 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Utils/HeaderSerializer.cs @@ -0,0 +1,117 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Utils +{ + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Reflection; + + internal static class HeaderSerializer + { + public static void PopulateHeaders(ref HttpRequestMessage httpRequest, object request) + { + var props = request.GetType().GetProperties(); + + foreach (var prop in props) + { + var val = prop.GetValue(request); + if (val == null) + { + continue; + } + + var metadata = prop.GetCustomAttribute().GetHeaderMetadata(); + if (metadata == null) + { + continue; + } + + var headerValue = SerializeHeader(val, metadata.Explode); + if (headerValue != "") + { + httpRequest.Headers.Add(metadata.Name, headerValue); + } + } + } + + private static string SerializeHeader(object value, bool explode) + { + if (Utilities.IsClass(value)) + { + var items = new List(); + + var props = value.GetType().GetProperties(); + + foreach (var prop in props) + { + var val = prop.GetValue(value); + if (val == null) + { + continue; + } + + var metadata = prop.GetCustomAttribute().GetHeaderMetadata(); + if (metadata == null || metadata.Name == null) + { + continue; + } + + if (explode) + { + items.Add($"{metadata.Name}={Utilities.ValueToString(val)}"); + } + else + { + items.Add(metadata.Name); + items.Add(Utilities.ValueToString(val)); + } + } + + return string.Join(",", items); + } + else if (Utilities.IsDictionary(value)) + { + var items = new List(); + + foreach (DictionaryEntry entry in (IDictionary)value) + { + if (explode) + { + items.Add($"{entry.Key}={Utilities.ValueToString(entry.Value)}"); + } + else + { + items.Add(entry.Key.ToString()); + items.Add(Utilities.ValueToString(entry.Value)); + } + } + + return string.Join(",", items); + } + else if (Utilities.IsList(value)) + { + var items = new List(); + + foreach (var item in (IList)value) + { + items.Add(Utilities.ValueToString(item)); + } + + return string.Join(",", items); + } + else + { + return Utilities.ValueToString(value); + } + } + } +} diff --git a/bank-feeds/CodatBankFeeds/Utils/IsoDateTimeSerializer.cs b/bank-feeds/CodatBankFeeds/Utils/IsoDateTimeSerializer.cs new file mode 100755 index 000000000..4b1045222 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Utils/IsoDateTimeSerializer.cs @@ -0,0 +1,41 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Utils +{ + using System; + using System.Globalization; + using Newtonsoft.Json; + + internal class IsoDateTimeSerializer: JsonConverter + { + public override bool CanConvert(Type objectType) => + objectType == typeof(DateTime); + + public override bool CanRead => false; + + public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) => + throw new NotImplementedException(); + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + if (value == null) + { + writer.WriteValue("null"); + return; + } + + DateTime time = (DateTime)value; + // The built-in Iso converter coerces to local time; + // This standardizes to UTC. + writer.WriteValue(time.ToUniversalTime().ToString("o", CultureInfo.InvariantCulture)); + } + } +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Utils/RequestBodySerializer.cs b/bank-feeds/CodatBankFeeds/Utils/RequestBodySerializer.cs new file mode 100755 index 000000000..23f3eada3 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Utils/RequestBodySerializer.cs @@ -0,0 +1,489 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Utils +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Reflection; + using System.Text; + + internal class RequestBodySerializer + { + public static HttpContent? Serialize( + object? request, + string requestFieldName, + string serializationMethod + ) + { + if (request == null) + { + return null; + } + + if (Utilities.IsClass(request)) + { + var prop = GetPropertyInfo(request, requestFieldName); + + if (prop != null) + { + var metadata = prop.GetCustomAttribute() + ?.GetRequestMetadata(); + if (metadata != null) + { + var fieldValue = prop.GetValue(request); + if (fieldValue == null) + { + return null; + } + + return TrySerialize( + fieldValue, + requestFieldName, + serializationMethod, + metadata.MediaType ?? "" + ); + } + } + } + + // Not an object or flattened request + return TrySerialize(request, requestFieldName, serializationMethod); + } + + private static HttpContent? TrySerialize( + object request, + string requestFieldName, + string serializationMethod, + string mediaType = "" + ) + { + if (mediaType == "") + { + mediaType = new Dictionary() + { + { "json", "application/json" }, + { "form", "application/x-www-form-urlencoded" }, + { "multipart", "multipart/form-data" }, + { "raw", "application/octet-stream" }, + { "string", "text/plain" }, + }[serializationMethod]; + } + + switch (serializationMethod) + { + case "json": + return SerializeJson(request, mediaType); + case "form": + return SerializeForm(request, requestFieldName, mediaType); + case "multipart": + return SerializeMultipart(request, mediaType); + default: + // if request is a byte array, use it directly otherwise encode + if (request.GetType() == typeof(byte[])) + { + return SerializeRaw((byte[])request, mediaType); + } + else if (request.GetType() == typeof(string)) + { + return SerializeString((string)request, mediaType); + } + else + { + throw new Exception( + "Cannot serialize request body of type " + + request.GetType().Name + + " with serialization method " + + serializationMethod + + "" + ); + } + } + } + + private static HttpContent SerializeJson(object request, string mediaType) + { + return new StringContent(Utilities.SerializeJSON(request), Encoding.UTF8, mediaType); + } + + private static HttpContent SerializeForm( + object request, + string requestFieldName, + string mediaType + ) + { + Dictionary> form = new Dictionary>(); + + if (Utilities.IsClass(request)) + { + var props = request.GetType().GetProperties(); + + foreach (var prop in props) + { + var val = prop.GetValue(request); + if (val == null) + { + continue; + } + + var metadata = prop.GetCustomAttribute()?.GetFormMetadata(); + if (metadata == null) + { + continue; + } + + var keyName = metadata.Name ?? prop.Name; + + if (metadata.Json) + { + if (!form.ContainsKey(keyName)) + { + form.Add(keyName, new List()); + } + + form[keyName].Add(Utilities.SerializeJSON(val)); + } + else + { + switch (metadata.Style) + { + case "form": + SerializeFormValue( + metadata.Name ?? prop.Name, + metadata.Explode, + val, + ref form + ); + break; + default: + throw new Exception("Unsupported form style " + metadata.Style); + } + } + } + } + else if (Utilities.IsDictionary(request)) + { + foreach (var key in ((IDictionary)request).Keys) + { + var keyName = key.ToString(); + + if (!form.ContainsKey(keyName)) + { + form.Add(keyName, new List()); + } + + form[keyName].Add(Utilities.ValueToString(((IDictionary)request)[key])); + } + } + else if (Utilities.IsList(request)) + { + foreach (var item in (IList)request) + { + if (!form.ContainsKey(requestFieldName)) + { + form.Add(requestFieldName, new List()); + } + + form[requestFieldName].Add(Utilities.ValueToString(item)); + } + } + else + { + throw new Exception( + "Cannot serialize form data from type " + request.GetType().Name + ); + } + + var formData = new List>(); + + foreach (var key in form.Keys) + { + foreach (var val in form[key]) + { + formData.Add( + new KeyValuePair( + key + (form[key].Count > 1 ? "[]" : ""), + val + ) + ); + } + } + + return new FormUrlEncodedContent(formData); + } + + private static HttpContent SerializeMultipart(object request, string mediaType) + { + var formData = new MultipartFormDataContent(); + + var properties = request.GetType().GetProperties(); + + foreach (var prop in properties) + { + var value = prop.GetValue(request); + if (value == null) + { + continue; + } + + var metadata = prop.GetCustomAttribute() + ?.GetMultipartFormMetadata(); + if (metadata == null) + { + continue; + } + + if (metadata.File) + { + if (!Utilities.IsClass(value)) + { + throw new Exception( + "Cannot serialize multipart file from type " + value.GetType().Name + ); + } + + var fileProps = value.GetType().GetProperties(); + + byte[]? content = null; + string fileName = ""; + string fieldName = ""; + + foreach (var fileProp in fileProps) + { + var fileMetadata = fileProp + .GetCustomAttribute() + ?.GetMultipartFormMetadata(); + if ( + fileMetadata == null + || (!fileMetadata.Content && fileMetadata.Name == "") + ) + { + continue; + } + + if (fileMetadata.Content) + { + content = (byte[])fileProp.GetValue(value); + } + else + { + fieldName = fileMetadata.Name ?? fileProp.Name; + fileName = fileProp.GetValue(value).ToString(); + } + } + + if (fieldName == "" || fileName == "" || content == null) + { + throw new Exception("Invalid multipart/form-data file"); + } + + formData.Add(new ByteArrayContent(content), fieldName, fileName); + } + else if (metadata.Json) + { + formData.Add( + new StringContent(Utilities.SerializeJSON(value)), + metadata.Name ?? prop.Name + ); + } + else if (Utilities.IsList(value)) + { + var values = new List(); + + foreach (var item in (IList)value) + { + values.Add(Utilities.ValueToString(item)); + } + + foreach (var val in values) + { + formData.Add(new StringContent(val), metadata.Name ?? prop.Name); + } + } + else + { + formData.Add( + new StringContent(Utilities.ValueToString(value)), + metadata.Name ?? prop.Name + ); + } + } + + return formData; + } + + private static HttpContent SerializeRaw(byte[] request, string mediaType) + { + var content = new ByteArrayContent(request); + content.Headers.Add("Content-Type", mediaType); + return content; + } + + private static HttpContent SerializeString(string request, string mediaType) + { + return new StringContent(request, Encoding.UTF8, mediaType); + } + + private static void SerializeFormValue( + string fieldName, + bool explode, + object value, + ref Dictionary> form + ) + { + if (Utilities.IsClass(value)) + { + if (Utilities.IsDate(value)) + { + if (!form.ContainsKey(fieldName)) + { + form[fieldName] = new List(); + } + + form[fieldName].Add(Utilities.ValueToString(value)); + } + else + { + var props = value.GetType().GetProperties(); + + var items = new List(); + + foreach (var prop in props) + { + var val = prop.GetValue(value); + if (val == null) + { + continue; + } + + var metadata = prop.GetCustomAttribute() + ?.GetFormMetadata(); + if (metadata == null || metadata.Name == null) + { + continue; + } + + if (explode) + { + if (!form.ContainsKey(metadata.Name)) + { + form[metadata.Name] = new List(); + } + + form[metadata.Name].Add(Utilities.ValueToString(val)); + } + else + { + items.Add($"{metadata.Name},{Utilities.ValueToString(val)}"); + } + } + + if (items.Count > 0) + { + if (!form.ContainsKey(fieldName)) + { + form[fieldName] = new List(); + } + + form[fieldName].Add(string.Join(",", items)); + } + } + } + else if (Utilities.IsDictionary(value)) + { + var items = new List(); + + foreach (var key in ((IDictionary)value).Keys) + { + if (explode) + { + if (!form.ContainsKey(key.ToString())) + { + form[key.ToString()] = new List(); + } + + form[key.ToString()].Add( + Utilities.ValueToString(((IDictionary)value)[key]) + ); + } + else + { + items.Add($"{key},{Utilities.ValueToString(((IDictionary)value)[key])}"); + } + } + + if (items.Count > 0) + { + if (!form.ContainsKey(fieldName)) + { + form[fieldName] = new List(); + } + + form[fieldName].Add(string.Join(",", items)); + } + } + else if (Utilities.IsList(value)) + { + var values = new List(); + var items = new List(); + + foreach (var item in (IList)value) + { + if (explode) + { + values.Add(Utilities.ValueToString(item)); + } + else + { + items.Add(Utilities.ValueToString(item)); + } + } + + if (items.Count > 0) + { + values.Add(string.Join(",", items)); + } + + foreach (var val in values) + { + if (!form.ContainsKey(fieldName)) + { + form[fieldName] = new List(); + } + + form[fieldName].Add(val); + } + } + else + { + if (!form.ContainsKey(fieldName)) + { + form[fieldName] = new List(); + } + + form[fieldName].Add(Utilities.ValueToString(value)); + } + } + + private static PropertyInfo? GetPropertyInfo(object value, string propertyName) + { + try + { + return value.GetType().GetProperty(propertyName); + } + catch (Exception) + { + return null; + } + } + } +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Utils/SecuritySerializer.cs b/bank-feeds/CodatBankFeeds/Utils/SecuritySerializer.cs new file mode 100755 index 000000000..c4c178456 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Utils/SecuritySerializer.cs @@ -0,0 +1,227 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Utils +{ + using System; + using System.Reflection; + using System.Text; + + internal static class SecuritySerializer + { + public static ISpeakeasyHttpClient Apply(ISpeakeasyHttpClient client, object security) + { + if (security == null) + { + return client; + } + + client = new SpeakeasyHttpClient(client); + + var props = security.GetType().GetProperties(); + + foreach (var prop in props) + { + var value = prop.GetValue(security, null); + + if (value == null) + { + continue; + } + + var metadata = prop.GetCustomAttribute().GetSecurityMetadata(); + + if (metadata == null) + { + continue; + } + + if (metadata.Option) + { + ApplyOption(ref client, value); + } + else if (metadata.Scheme) + { + if (metadata.SubType == "basic" && !Utilities.IsClass(value)) + { + ApplyScheme(ref client, metadata, security); + return client; + } + else + { + ApplyScheme(ref client, metadata, value); + } + } + } + + return client; + } + + private static void ApplyOption(ref ISpeakeasyHttpClient client, object option) + { + var props = option.GetType().GetProperties(); + + foreach (var prop in props) + { + var value = prop.GetValue(option, null); + + if (value == null) + { + continue; + } + + var metadata = prop.GetCustomAttribute().GetSecurityMetadata(); + + if (metadata == null || !metadata.Scheme) + { + continue; + } + + ApplyScheme(ref client, metadata, value); + } + } + + private static void ApplyScheme( + ref ISpeakeasyHttpClient client, + SpeakeasyMetadata.SecurityMetadata schemeMetadata, + object scheme + ) + { + if (Utilities.IsClass(scheme)) + { + if (schemeMetadata.Type == "http" && schemeMetadata.SubType == "basic") + { + ApplyBasicAuthScheme(ref client, scheme); + return; + } + + var props = scheme.GetType().GetProperties(); + + foreach (var prop in props) + { + var value = prop.GetValue(scheme, null); + + if (value == null) + { + continue; + } + + var metadata = prop.GetCustomAttribute() + .GetSecurityMetadata(); + + if (metadata == null || metadata.Name == "") + { + continue; + } + + ApplySchemeValue(ref client, schemeMetadata, metadata, value); + } + } + else + { + ApplySchemeValue(ref client, schemeMetadata, schemeMetadata, scheme); + } + } + + private static void ApplySchemeValue( + ref ISpeakeasyHttpClient client, + SpeakeasyMetadata.SecurityMetadata schemeMetadata, + SpeakeasyMetadata.SecurityMetadata valueMetadata, + object value + ) + { + switch (schemeMetadata.Type) + { + case "apiKey": + switch (schemeMetadata.SubType) + { + case "header": + client.AddHeader(valueMetadata.Name, Utilities.ValueToString(value)); + break; + case "query": + client.AddQueryParam( + valueMetadata.Name, + Utilities.ValueToString(value) + ); + break; + case "cookie": + client.AddHeader( + "cookie", + $"{valueMetadata.Name}={Utilities.ValueToString(value)}" + ); + break; + default: + throw new Exception( + $"Unknown apiKey subType: {schemeMetadata.SubType}" + ); + } + break; + case "openIdConnect": + client.AddHeader(valueMetadata.Name, Utilities.ValueToString(value)); + break; + case "oauth2": + client.AddHeader(valueMetadata.Name, Utilities.ValueToString(value)); + break; + case "http": + switch (schemeMetadata.SubType) + { + case "bearer": + client.AddHeader( + valueMetadata.Name, + Utilities.PrefixBearer(Utilities.ValueToString(value)) + ); + break; + default: + throw new Exception($"Unknown http subType: {schemeMetadata.SubType}"); + } + break; + default: + throw new Exception($"Unknown security type: {schemeMetadata.Type}"); + } + } + + private static void ApplyBasicAuthScheme(ref ISpeakeasyHttpClient client, object scheme) + { + var props = scheme.GetType().GetProperties(); + + string username = ""; + string password = ""; + + foreach (var prop in props) + { + var value = prop.GetValue(scheme, null); + + if (value == null) + { + continue; + } + + var metadata = prop.GetCustomAttribute().GetSecurityMetadata(); + + if (metadata == null || metadata.Name == "") + { + continue; + } + + if (metadata.Name == "username") + { + username = Utilities.ValueToString(value); + } + else if (metadata.Name == "password") + { + password = Utilities.ValueToString(value); + } + } + + var auth = Convert.ToBase64String(Encoding.UTF8.GetBytes($"{username}:{password}")); + client.AddHeader("Authorization", $"Basic {auth}"); + } + } +} diff --git a/bank-feeds/CodatBankFeeds/Utils/SpeakeasyHttpClient.cs b/bank-feeds/CodatBankFeeds/Utils/SpeakeasyHttpClient.cs new file mode 100755 index 000000000..9da4e391d --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Utils/SpeakeasyHttpClient.cs @@ -0,0 +1,96 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Utils +{ + using System; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading.Tasks; + + public interface ISpeakeasyHttpClient + { + void AddHeader(string key, string value); + void AddQueryParam(string key, string value); + Task SendAsync(HttpRequestMessage message); + } + + public class SpeakeasyHttpClient : ISpeakeasyHttpClient + { + private ISpeakeasyHttpClient? client; + + private Dictionary> headers { get; } = + new Dictionary>(); + + private Dictionary> queryParams { get; } = + new Dictionary>(); + + internal SpeakeasyHttpClient(ISpeakeasyHttpClient? client = null) + { + this.client = client; + } + + public void AddHeader(string key, string value) + { + if (headers.ContainsKey(key)) + { + headers[key].Add(value); + } + else + { + headers.Add(key, new List { value }); + } + } + + public void AddQueryParam(string key, string value) + { + if (queryParams.ContainsKey(key)) + { + queryParams[key].Add(value); + } + else + { + queryParams.Add(key, new List { value }); + } + } + + public async Task SendAsync(HttpRequestMessage message) + { + foreach(var hh in headers) + { + foreach(var hv in hh.Value) + { + message.Headers.Add(hh.Key, hv); + } + } + + /*var qp = URLBuilder.SerializeQueryParams(queryParams); + + if (qp != "") + { + if (message.uri.Query == "") + { + message.url += "?" + qp; + } + else + { + message.url += "&" + qp; + } + }*/ + + if (client != null) + { + return await client.SendAsync(message); + } + + return await new HttpClient().SendAsync(message); + } + } +} \ No newline at end of file diff --git a/bank-feeds/CodatBankFeeds/Utils/SpeakeasyMetadata.cs b/bank-feeds/CodatBankFeeds/Utils/SpeakeasyMetadata.cs new file mode 100755 index 000000000..060407e8f --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Utils/SpeakeasyMetadata.cs @@ -0,0 +1,243 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Utils +{ + using System; + using System.Collections.Generic; + + [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] + internal class SpeakeasyMetadata : Attribute + { + internal class RequestMetadata + { + public string? MediaType { get; set; } = null; + } + + internal class FormMetadata + { + public string Style { get; set; } = "form"; + public bool Explode { get; set; } = true; + public bool Json { get; set; } = false; + public string? Name { get; set; } = null; + } + + internal class MultipartFormMetadata + { + public bool File { get; set; } = false; + public bool Content { get; set; } = false; + public bool Json { get; set; } = false; + public string? Name { get; set; } = null; + } + + internal class PathParamMetadata + { + public string Style { get; set; } = "simple"; + public bool Explode { get; set; } = false; + public string? Name { get; set; } = null; + public string? Serialization { get; set; } = null; + } + + internal class QueryParamMetadata + { + public string Style { get; set; } = "form"; + public bool Explode { get; set; } = true; + public string? Name { get; set; } = null; + public string? Serialization { get; set; } = null; + } + + internal class HeaderMetadata + { + public string Style { get; set; } = "simple"; + public bool Explode { get; set; } = false; + public string? Name { get; set; } = null; + } + + internal class SecurityMetadata + { + public string? Type { get; set; } = null; + public string? SubType { get; set; } = null; + public bool Option { get; set; } = false; + public bool Scheme { get; set; } = false; + public string? Name { get; set; } = null; + } + + public string Value { get; set; } + private Dictionary? metadata; + + public SpeakeasyMetadata(string value) + { + Value = value; + } + + public RequestMetadata? GetRequestMetadata() + { + if (GetMetadata().TryGetValue("request", out var value)) + { + var metadata = new RequestMetadata(); + + ParseMetadata(value, ref metadata); + + return metadata; + } + + return null; + } + + public FormMetadata? GetFormMetadata() + { + if (GetMetadata().TryGetValue("form", out var value)) + { + var metadata = new FormMetadata(); + + ParseMetadata(value, ref metadata); + + return metadata; + } + + return null; + } + + public MultipartFormMetadata? GetMultipartFormMetadata() + { + if (GetMetadata().TryGetValue("multipartForm", out var value)) + { + var metadata = new MultipartFormMetadata(); + + ParseMetadata(value, ref metadata); + + return metadata; + } + + return null; + } + + public PathParamMetadata? GetPathParamMetadata() + { + if (GetMetadata().TryGetValue("pathParam", out var value)) + { + var metadata = new PathParamMetadata(); + ParseMetadata(value, ref metadata); + return metadata; + } + + return null; + } + + public QueryParamMetadata? GetQueryParamMetadata() + { + if (GetMetadata().TryGetValue("queryParam", out var value)) + { + var metadata = new QueryParamMetadata(); + + ParseMetadata(value, ref metadata); + + return metadata; + } + + return null; + } + + public HeaderMetadata? GetHeaderMetadata() + { + if (GetMetadata().TryGetValue("header", out var value)) + { + var metadata = new HeaderMetadata(); + + ParseMetadata(value, ref metadata); + + return metadata; + } + + return null; + } + + public SecurityMetadata? GetSecurityMetadata() + { + if (GetMetadata().TryGetValue("security", out var value)) + { + var metadata = new SecurityMetadata(); + + ParseMetadata(value, ref metadata); + + return metadata; + } + + return null; + } + + private Dictionary GetMetadata() + { + if (metadata != null) + { + return metadata; + } + + metadata = new Dictionary(); + + var groups = Value.Split(" "); + + foreach (var group in groups) + { + var parts = group.Split(":"); + + if (parts.Length != 2) + { + continue; + } + + metadata.Add(parts[0], parts[1]); + } + + return metadata; + } + + private void ParseMetadata(string raw, ref T metadata) + { + Dictionary values = new Dictionary(); + + var groups = raw.Split(","); + + foreach (var group in groups) + { + var parts = group.Split("="); + var val = ""; + if (parts.Length == 2) + { + val = parts[1]; + } + + values.Add(parts[0], val); + } + + var props = typeof(T).GetProperties(); + + foreach (var prop in props) + { + if ( + values.TryGetValue( + char.ToLower(prop.Name[0]) + prop.Name.Substring(1), + out var value + ) + ) + { + if (prop.PropertyType == typeof(bool) || prop.PropertyType == typeof(Boolean)) + { + prop.SetValue(metadata, value == "true" || value == ""); + } + else + { + prop.SetValue(metadata, value); + } + } + } + } + } +} diff --git a/bank-feeds/CodatBankFeeds/Utils/URLBuilder.cs b/bank-feeds/CodatBankFeeds/Utils/URLBuilder.cs new file mode 100755 index 000000000..24e043cba --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Utils/URLBuilder.cs @@ -0,0 +1,579 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Utils +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Net; + using System.Reflection; + + internal static class URLBuilder + { + public static string Build(string baseUrl, string path, object request) + { + var url = baseUrl; + + if (url.EndsWith("/")) + { + url = url.Substring(0, url.Length - 1); + } + + url += path; + + var parameters = GetPathParameters(request); + + url = ReplaceParameters(url, parameters); + + var queryParams = SerializeQueryParams(TrySerializeQueryParams(request)); + + if (queryParams != "") + { + url += $"?{queryParams}"; + } + + return url; + } + + public static string ReplaceParameters(string url, Dictionary parameters) + { + foreach (var key in parameters.Keys) + { + url = url.Replace($"{{{key}}}", parameters[key]); + } + + return url; + } + + public static string SerializeQueryParams(Dictionary> queryParams) { + var queries = new List(); + + foreach (var key in queryParams.Keys) + { + foreach (var value in queryParams[key]) + { + queries.Add($"{key}={value}"); + } + } + + return string.Join("&", queries); + } + + private static Dictionary GetPathParameters(object request) + { + var parameters = new Dictionary(); + + if (request == null) + { + return parameters; + } + + var props = request.GetType().GetProperties(); + + foreach (var prop in props) + { + var val = prop.GetValue(request); + + if (val == null) + { + continue; + } + + if (prop.GetCustomAttribute()?.GetRequestMetadata() != null) + { + continue; + } + + var metadata = prop.GetCustomAttribute()?.GetPathParamMetadata(); + + if (metadata == null) + { + continue; + } + + if (metadata.Serialization != null) + { + switch (metadata.Serialization) + { + case "json": + parameters.Add( + metadata.Name ?? prop.Name, + WebUtility.UrlEncode(Utilities.SerializeJSON(val)) + ); + break; + default: + throw new Exception( + $"Unknown serialization type: {metadata.Serialization}" + ); + } + } + else + { + switch (metadata.Style) + { + case "simple": + var simpleParams = SerializeSimplePathParams( + metadata.Name ?? prop.Name, + val, + metadata.Explode + ); + foreach (var key in simpleParams.Keys) + { + parameters.Add(key, simpleParams[key]); + } + break; + default: + throw new Exception($"Unsupported path param style: {metadata.Style}"); + } + } + } + + return parameters; + } + + private static Dictionary> TrySerializeQueryParams(object request) + { + var parameters = new Dictionary>(); + + if (request == null) + { + return parameters; + } + + var props = request.GetType().GetProperties(); + + foreach (var prop in props) + { + var val = prop.GetValue(request); + + if (val == null) + { + continue; + } + + if (prop.GetCustomAttribute()?.GetRequestMetadata() != null) + { + continue; + } + + var metadata = prop.GetCustomAttribute() + ?.GetQueryParamMetadata(); + + if (metadata == null) + { + continue; + } + + if (metadata.Serialization != null) + { + switch (metadata.Serialization) + { + case "json": + if (!parameters.ContainsKey(metadata.Name ?? prop.Name)) + { + parameters.Add(metadata.Name ?? prop.Name, new List()); + } + + parameters[metadata.Name ?? prop.Name].Add( + Utilities.SerializeJSON(val) + ); + break; + default: + throw new Exception( + $"Unknown serialization type: {metadata.Serialization}" + ); + } + } + else + { + switch (metadata.Style) + { + case "form": + var formParams = SerializeFormQueryParams( + metadata.Name ?? prop.Name, + val, + metadata.Explode, + "," + ); + foreach (var key in formParams.Keys) + { + if (!parameters.ContainsKey(key)) + { + parameters.Add(key, new List()); + } + + foreach (var v in formParams[key]) + { + parameters[key].Add(v); + } + } + break; + case "deepObject": + var deepObjParams = SerializeDeepObjectQueryParams( + metadata.Name ?? prop.Name, + val + ); + foreach (var key in deepObjParams.Keys) + { + if (!parameters.ContainsKey(key)) + { + parameters.Add(key, new List()); + } + + foreach (var v in deepObjParams[key]) + { + parameters[key].Add(v); + } + } + break; + case "pipeDelimited": + var pipeParams = SerializeFormQueryParams( + metadata.Name ?? prop.Name, + val, + metadata.Explode, + "|" + ); + foreach (var key in pipeParams.Keys) + { + if (!parameters.ContainsKey(key)) + { + parameters.Add(key, new List()); + } + + foreach (var v in pipeParams[key]) + { + parameters[key].Add(v); + } + } + break; + default: + throw new Exception($"Unsupported query param style: {metadata.Style}"); + } + } + } + + return parameters; + } + + private static Dictionary SerializeSimplePathParams( + string parentName, + object value, + bool explode + ) + { + var parameters = new Dictionary(); + + if (Utilities.IsClass(value)) + { + var vals = new List(); + + var props = value.GetType().GetProperties(); + + foreach (var prop in props) + { + var val = prop.GetValue(value); + + if (val == null) + { + continue; + } + + var metadata = prop.GetCustomAttribute() + ?.GetPathParamMetadata(); + + if (metadata == null) + { + continue; + } + + if (explode) + { + vals.Add($"{metadata.Name}={Utilities.ToString(val)}"); + } + else + { + vals.Add($"{metadata.Name},{Utilities.ToString(val)}"); + } + } + + parameters.Add(parentName, string.Join(",", vals)); + } + else if (Utilities.IsDictionary(value)) + { + var vals = new List(); + + foreach (var key in ((IDictionary)value).Keys) + { + var val = ((IDictionary)value)[key]; + + if (explode) + { + vals.Add($"{key}={Utilities.ToString(val)}"); + } + else + { + vals.Add($"{key},{Utilities.ToString(val)}"); + } + } + + parameters.Add(parentName, string.Join(",", vals)); + } + else if (Utilities.IsList(value)) + { + var vals = new List(); + + foreach (var val in (IEnumerable)value) + { + vals.Add(Utilities.ToString(val)); + } + + parameters.Add(parentName, string.Join(",", vals)); + } + else + { + parameters.Add(parentName, Utilities.ToString(value)); + } + + return parameters; + } + + private static Dictionary> SerializeFormQueryParams( + string parentName, + object value, + bool explode, + string delimiter + ) + { + var parameters = new Dictionary>(); + + if (Utilities.IsClass(value) && !Utilities.IsDate(value)) + { + var props = value.GetType().GetProperties(); + + var items = new List(); + + foreach (var prop in props) + { + var val = prop.GetValue(value); + if (val == null) + { + continue; + } + + var metadata = prop.GetCustomAttribute() + ?.GetQueryParamMetadata(); + if (metadata == null || metadata.Name == null) + { + continue; + } + + if (explode) + { + if (!parameters.ContainsKey(metadata.Name)) + { + parameters.Add(metadata.Name, new List()); + } + + parameters[metadata.Name].Add( + Utilities.ToString(val) + ); + } + else + { + items.Add( + $"{metadata.Name}{delimiter}{Utilities.ValueToString(val)}" + ); + } + } + + if (items.Count > 0) + { + if (!parameters.ContainsKey(parentName)) + { + parameters.Add(parentName, new List()); + } + + parameters[parentName].Add(string.Join(delimiter, items)); + } + } + else if (Utilities.IsDictionary(value)) + { + var items = new List(); + + foreach (var key in ((IDictionary)value).Keys) + { + if (explode) + { + if (!parameters.ContainsKey(key.ToString())) + { + parameters.Add(key.ToString(), new List()); + } + + parameters[key.ToString()].Add( + Utilities.ValueToString(((IDictionary)value)[key]) + ); + } + else + { + items.Add( + $"{key.ToString()}{delimiter}{Utilities.ValueToString(((IDictionary)value)[key])}" + ); + } + } + + if (items.Count > 0) + { + if (!parameters.ContainsKey(parentName)) + { + parameters.Add(parentName, new List()); + } + + parameters[parentName].Add(string.Join(delimiter, items)); + } + } + else if (Utilities.IsList(value)) + { + var values = new List(); + var items = new List(); + + foreach (var item in (IList)value) + { + if (explode) + { + values.Add(Utilities.ValueToString(item)); + } + else + { + items.Add(Utilities.ValueToString(item)); + } + } + + if (items.Count > 0) + { + values.Add(string.Join(delimiter, items)); + } + + foreach (var val in values) + { + if (!parameters.ContainsKey(parentName)) + { + parameters.Add(parentName, new List()); + } + + parameters[parentName].Add(val); + } + } + else + { + if (!parameters.ContainsKey(parentName)) + { + parameters.Add(parentName, new List()); + } + + parameters[parentName].Add(Utilities.ValueToString(value)); + } + + return parameters; + } + + private static Dictionary> SerializeDeepObjectQueryParams( + string parentName, + object value + ) + { + var parameters = new Dictionary>(); + + if (Utilities.IsClass(value)) + { + var props = value.GetType().GetProperties(); + + foreach (var prop in props) + { + var val = prop.GetValue(value); + + if (val == null) + { + continue; + } + + var metadata = prop.GetCustomAttribute() + ?.GetQueryParamMetadata(); + + if (metadata == null || metadata.Name == null) + { + continue; + } + + var keyName = $"{parentName}[{metadata.Name}]"; + + if (Utilities.IsList(val)) + { + foreach (var v in (IList)val) + { + if (!parameters.ContainsKey(keyName)) + { + parameters.Add(keyName, new List()); + } + + parameters[keyName].Add( + Utilities.ValueToString(v) + ); + } + } + else + { + if (!parameters.ContainsKey(keyName)) + { + parameters.Add(keyName, new List()); + } + + parameters[keyName].Add(Utilities.ValueToString(val)); + } + } + } + else if (Utilities.IsDictionary(value)) + { + foreach (var key in ((IDictionary)value).Keys) + { + var val = ((IDictionary)value)[key]; + + var keyName = $"{parentName}[{key}]"; + + if (Utilities.IsList(val)) + { + foreach (var v in (IList)val) + { + if (!parameters.ContainsKey(keyName)) + { + parameters.Add(keyName, new List()); + } + + parameters[keyName].Add( + Utilities.ValueToString(v) + ); + } + } + else + { + if (!parameters.ContainsKey(keyName)) + { + parameters.Add(keyName, new List()); + } + + parameters[keyName].Add(Utilities.ValueToString(val)); + } + } + } + + return parameters; + } + } +} diff --git a/bank-feeds/CodatBankFeeds/Utils/Utilities.cs b/bank-feeds/CodatBankFeeds/Utils/Utilities.cs new file mode 100755 index 000000000..279daf456 --- /dev/null +++ b/bank-feeds/CodatBankFeeds/Utils/Utilities.cs @@ -0,0 +1,215 @@ + +//------------------------------------------------------------------------------ +// +// 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 CodatBankFeeds.Utils +{ + using System; + using System.Linq; + using System.Net.Http.Headers; + using System.Collections.Generic; + using System.Text.RegularExpressions; + using Newtonsoft.Json; + using NodaTime; + using System.Collections; + + public class Utilities + { + public static string SerializeJSON(object obj) + { + return JsonConvert.SerializeObject( + obj, + new JsonSerializerSettings() + { + NullValueHandling = NullValueHandling.Ignore, + Converters = new JsonConverter[] + { + new IsoDateTimeSerializer(), + new EnumSerializer() + } + } + ); + } + + public static bool IsDictionary(object o) + { + if (o == null) + return false; + return o is IDictionary + && o.GetType().IsGenericType + && o.GetType().GetGenericTypeDefinition().IsAssignableFrom(typeof(Dictionary<,>)); + } + + public static bool IsList(object o) + { + if (o == null) + return false; + return o is IList + && o.GetType().IsGenericType + && o.GetType().GetGenericTypeDefinition().IsAssignableFrom(typeof(List<>)); + } + + public static bool IsClass(object o) + { + if (o == null) + return false; + return o.GetType().IsClass && o.GetType().FullName.StartsWith("SDK.Models"); + } + + // TODO: code review polyfilled for IsAssignableTo + public static bool IsSameOrSubclass(Type potentialBase, Type potentialDescendant) + { + return potentialDescendant.IsSubclassOf(potentialBase) + || potentialDescendant == potentialBase; + } + + public static bool IsString(object obj) + { + if (obj != null) + { + var type = obj.GetType(); + return IsSameOrSubclass(type, typeof(string)); + } + else + { + return false; + } + } + + public static bool IsPrimitive(object obj) => obj != null && obj.GetType().IsPrimitive; + + public static bool IsEnum(object obj) => obj != null && obj.GetType().IsEnum; + + public static bool IsDate(object obj) => + obj != null && (obj.GetType() == typeof(DateTime) || obj.GetType() == typeof(LocalDate)); + + private static string StripSurroundingQuotes(string input) + { + Regex surroundingQuotesRegex = new Regex("^\"(.*)\"$"); + var match = surroundingQuotesRegex.Match(input); + if(match.Groups.Values.Count() == 2) + { + return match.Groups.Values.Last().ToString(); + } + return input; + } + + public static string ValueToString(object value) + { + if (value.GetType() == typeof(DateTime)) + { + return ((DateTime)value) + .ToUniversalTime() + .ToString("o", System.Globalization.CultureInfo.InvariantCulture); + } + else if (value.GetType() == typeof(LocalDate)) + { + return ((LocalDate)value) + .ToDateTimeUnspecified() + .ToString("yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture); + } + else if (value.GetType() == typeof(bool)) + { + return (bool)value ? "true" : "false"; + } + else if (IsEnum(value)) + { + var method = Type.GetType(value.GetType().FullName + "Extension") + ?.GetMethod("Value"); + if (method == null) + { + return Convert.ChangeType(value, Enum.GetUnderlyingType(value.GetType())).ToString(); + } + return (string)method.Invoke(null, new[] { value }); + } + + return value.ToString(); + } + + public static string ToString(object obj) + { + if(obj == null) + { + return null; + } + + if(IsString(obj)) + { + return obj.ToString(); + } + + if(IsPrimitive(obj)) + { + return JsonConvert.SerializeObject(obj); + } + + if(IsEnum(obj)) + { + var attributes = obj.GetType().GetMember(obj.ToString()).First().CustomAttributes; + if(attributes.Count() == 0) + { + return JsonConvert.SerializeObject(obj); + } + + var args = attributes.First().ConstructorArguments; + if(args.Count() == 0) + { + return JsonConvert.SerializeObject(obj); + } + return StripSurroundingQuotes(args.First().ToString()); + } + + if(IsDate(obj)) + { + return StripSurroundingQuotes(JsonConvert.SerializeObject(obj, new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new IsoDateTimeSerializer(), new EnumSerializer() }})); + } + return JsonConvert.SerializeObject(obj, new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new IsoDateTimeSerializer(), new EnumSerializer() }}); + } + + public static bool IsContentTypeMatch(string expected, string actual) + { + if (expected == actual || expected == "*" || expected == "*/*") + { + return true; + } + + try + { + var mediaType = MediaTypeHeaderValue.Parse(actual).MediaType; + + if (expected == mediaType) + { + return true; + } + + var parts = mediaType.Split('/'); + if (parts.Length == 2) + { + if (parts[0] + "/*" == expected || "*/" + parts[1] == expected) + { + return true; + } + } + } + catch (Exception) { } + + return false; + } + + public static string PrefixBearer(string authHeaderValue) + { + if (authHeaderValue.StartsWith("bearer ", StringComparison.InvariantCultureIgnoreCase)) + { + return authHeaderValue; + } + + return $"Bearer {authHeaderValue}"; + } + } +} \ No newline at end of file diff --git a/bank-feeds/RELEASES.md b/bank-feeds/RELEASES.md new file mode 100644 index 000000000..80a448723 --- /dev/null +++ b/bank-feeds/RELEASES.md @@ -0,0 +1,9 @@ + + +## 2023-09-01 12:54:18 +### Changes +Based on: +- OpenAPI Doc 3.0.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Bank-Feeds.yaml +- Speakeasy CLI 1.77.1 (2.91.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v0.1.0] bank-feeds \ No newline at end of file diff --git a/bank-feeds/USAGE.md b/bank-feeds/USAGE.md new file mode 100755 index 000000000..2b701a1b4 --- /dev/null +++ b/bank-feeds/USAGE.md @@ -0,0 +1,27 @@ + + + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.AccountMapping.CreateAsync(new CreateBankAccountMappingRequest() { + BankFeedAccountMapping = new BankFeedAccountMapping() { + FeedStartDate = "2022-10-23T00:00:00.000Z", + SourceAccountId = "provident", + TargetAccountId = "distinctio", + }, + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}); + +// handle response +``` + \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/CreateBankAccountMappingRequest.md b/bank-feeds/docs/models/operations/CreateBankAccountMappingRequest.md new file mode 100755 index 000000000..02428a90e --- /dev/null +++ b/bank-feeds/docs/models/operations/CreateBankAccountMappingRequest.md @@ -0,0 +1,10 @@ +# CreateBankAccountMappingRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `bankFeedAccountMapping` | [BankFeedAccountMapping](../../models/shared/BankFeedAccountMapping.md) | :heavy_minus_sign: | N/A | | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/CreateBankAccountMappingResponse.md b/bank-feeds/docs/models/operations/CreateBankAccountMappingResponse.md new file mode 100755 index 000000000..f7a0e4a1d --- /dev/null +++ b/bank-feeds/docs/models/operations/CreateBankAccountMappingResponse.md @@ -0,0 +1,12 @@ +# CreateBankAccountMappingResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `bankFeedAccountMappingResponse` | [BankFeedAccountMappingResponse](../../models/shared/BankFeedAccountMappingResponse.md) | :heavy_minus_sign: | Success | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | The request made is not valid. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/CreateBankFeedRequest.md b/bank-feeds/docs/models/operations/CreateBankFeedRequest.md new file mode 100755 index 000000000..f65dec0eb --- /dev/null +++ b/bank-feeds/docs/models/operations/CreateBankFeedRequest.md @@ -0,0 +1,10 @@ +# CreateBankFeedRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `bankFeedAccount` | [BankFeedAccount](../../models/shared/BankFeedAccount.md) | :heavy_minus_sign: | N/A | | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/CreateBankFeedResponse.md b/bank-feeds/docs/models/operations/CreateBankFeedResponse.md new file mode 100755 index 000000000..a7e343a01 --- /dev/null +++ b/bank-feeds/docs/models/operations/CreateBankFeedResponse.md @@ -0,0 +1,12 @@ +# CreateBankFeedResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `bankFeedAccount` | [BankFeedAccount](../../models/shared/BankFeedAccount.md) | :heavy_minus_sign: | Success | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | The request made is not valid. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/CreateBankTransactionsRequest.md b/bank-feeds/docs/models/operations/CreateBankTransactionsRequest.md new file mode 100755 index 000000000..debd6a9ec --- /dev/null +++ b/bank-feeds/docs/models/operations/CreateBankTransactionsRequest.md @@ -0,0 +1,13 @@ +# CreateBankTransactionsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `createBankTransactions` | [CreateBankTransactions](../../models/shared/CreateBankTransactions.md) | :heavy_minus_sign: | N/A | | +| `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `allowSyncOnPushComplete` | *bool* | :heavy_minus_sign: | N/A | | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `timeoutInMinutes` | *int* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/CreateBankTransactionsResponse.md b/bank-feeds/docs/models/operations/CreateBankTransactionsResponse.md new file mode 100755 index 000000000..a9e141c97 --- /dev/null +++ b/bank-feeds/docs/models/operations/CreateBankTransactionsResponse.md @@ -0,0 +1,12 @@ +# CreateBankTransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `createBankTransactionsResponse` | [Models.Shared.CreateBankTransactionsResponse](../../models/shared/CreateBankTransactionsResponse.md) | :heavy_minus_sign: | Success | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/CreateCompanyResponse.md b/bank-feeds/docs/models/operations/CreateCompanyResponse.md new file mode 100755 index 000000000..ac3bf49f5 --- /dev/null +++ b/bank-feeds/docs/models/operations/CreateCompanyResponse.md @@ -0,0 +1,12 @@ +# CreateCompanyResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `company` | [Company](../../models/shared/Company.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | The request made is not valid. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/CreateConnectionRequest.md b/bank-feeds/docs/models/operations/CreateConnectionRequest.md new file mode 100755 index 000000000..39ccb26af --- /dev/null +++ b/bank-feeds/docs/models/operations/CreateConnectionRequest.md @@ -0,0 +1,9 @@ +# CreateConnectionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `requestBody` | [CreateConnectionRequestBody](../../models/operations/CreateConnectionRequestBody.md) | :heavy_minus_sign: | N/A | | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/CreateConnectionRequestBody.md b/bank-feeds/docs/models/operations/CreateConnectionRequestBody.md new file mode 100755 index 000000000..eeac22694 --- /dev/null +++ b/bank-feeds/docs/models/operations/CreateConnectionRequestBody.md @@ -0,0 +1,8 @@ +# CreateConnectionRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `platformKey` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/CreateConnectionResponse.md b/bank-feeds/docs/models/operations/CreateConnectionResponse.md new file mode 100755 index 000000000..936578c89 --- /dev/null +++ b/bank-feeds/docs/models/operations/CreateConnectionResponse.md @@ -0,0 +1,12 @@ +# CreateConnectionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `connection` | [Connection](../../models/shared/Connection.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/DeleteBankFeedBankAccountRequest.md b/bank-feeds/docs/models/operations/DeleteBankFeedBankAccountRequest.md new file mode 100755 index 000000000..769c8766f --- /dev/null +++ b/bank-feeds/docs/models/operations/DeleteBankFeedBankAccountRequest.md @@ -0,0 +1,10 @@ +# DeleteBankFeedBankAccountRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/DeleteBankFeedBankAccountResponse.md b/bank-feeds/docs/models/operations/DeleteBankFeedBankAccountResponse.md new file mode 100755 index 000000000..ed660dd5c --- /dev/null +++ b/bank-feeds/docs/models/operations/DeleteBankFeedBankAccountResponse.md @@ -0,0 +1,11 @@ +# DeleteBankFeedBankAccountResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/DeleteBankFeedCredentialsRequest.md b/bank-feeds/docs/models/operations/DeleteBankFeedCredentialsRequest.md new file mode 100755 index 000000000..18216e007 --- /dev/null +++ b/bank-feeds/docs/models/operations/DeleteBankFeedCredentialsRequest.md @@ -0,0 +1,9 @@ +# DeleteBankFeedCredentialsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/DeleteBankFeedCredentialsResponse.md b/bank-feeds/docs/models/operations/DeleteBankFeedCredentialsResponse.md new file mode 100755 index 000000000..63e1e5fe5 --- /dev/null +++ b/bank-feeds/docs/models/operations/DeleteBankFeedCredentialsResponse.md @@ -0,0 +1,11 @@ +# DeleteBankFeedCredentialsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/DeleteCompanyRequest.md b/bank-feeds/docs/models/operations/DeleteCompanyRequest.md new file mode 100755 index 000000000..1bdbce512 --- /dev/null +++ b/bank-feeds/docs/models/operations/DeleteCompanyRequest.md @@ -0,0 +1,8 @@ +# DeleteCompanyRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/DeleteCompanyResponse.md b/bank-feeds/docs/models/operations/DeleteCompanyResponse.md new file mode 100755 index 000000000..14efe1a7f --- /dev/null +++ b/bank-feeds/docs/models/operations/DeleteCompanyResponse.md @@ -0,0 +1,11 @@ +# DeleteCompanyResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/DeleteConnectionRequest.md b/bank-feeds/docs/models/operations/DeleteConnectionRequest.md new file mode 100755 index 000000000..cfe904cdb --- /dev/null +++ b/bank-feeds/docs/models/operations/DeleteConnectionRequest.md @@ -0,0 +1,9 @@ +# DeleteConnectionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/DeleteConnectionResponse.md b/bank-feeds/docs/models/operations/DeleteConnectionResponse.md new file mode 100755 index 000000000..fa097756f --- /dev/null +++ b/bank-feeds/docs/models/operations/DeleteConnectionResponse.md @@ -0,0 +1,11 @@ +# DeleteConnectionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/GenerateCredentialsRequest.md b/bank-feeds/docs/models/operations/GenerateCredentialsRequest.md new file mode 100755 index 000000000..587dfe4f1 --- /dev/null +++ b/bank-feeds/docs/models/operations/GenerateCredentialsRequest.md @@ -0,0 +1,10 @@ +# GenerateCredentialsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `requestBody` | *byte[]* | :heavy_check_mark: | N/A | | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/GenerateCredentialsResponse.md b/bank-feeds/docs/models/operations/GenerateCredentialsResponse.md new file mode 100755 index 000000000..f23484b11 --- /dev/null +++ b/bank-feeds/docs/models/operations/GenerateCredentialsResponse.md @@ -0,0 +1,12 @@ +# GenerateCredentialsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `bankAccountCredentials` | [BankAccountCredentials](../../models/shared/BankAccountCredentials.md) | :heavy_minus_sign: | Success | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/GetBankAccountMappingRequest.md b/bank-feeds/docs/models/operations/GetBankAccountMappingRequest.md new file mode 100755 index 000000000..54618f239 --- /dev/null +++ b/bank-feeds/docs/models/operations/GetBankAccountMappingRequest.md @@ -0,0 +1,9 @@ +# GetBankAccountMappingRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/GetBankAccountMappingResponse.md b/bank-feeds/docs/models/operations/GetBankAccountMappingResponse.md new file mode 100755 index 000000000..e40b33ce0 --- /dev/null +++ b/bank-feeds/docs/models/operations/GetBankAccountMappingResponse.md @@ -0,0 +1,12 @@ +# GetBankAccountMappingResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `bankFeedMapping` | [BankFeedMapping](../../models/shared/BankFeedMapping.md) | :heavy_minus_sign: | Success | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/GetCompanyRequest.md b/bank-feeds/docs/models/operations/GetCompanyRequest.md new file mode 100755 index 000000000..125430571 --- /dev/null +++ b/bank-feeds/docs/models/operations/GetCompanyRequest.md @@ -0,0 +1,8 @@ +# GetCompanyRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/GetCompanyResponse.md b/bank-feeds/docs/models/operations/GetCompanyResponse.md new file mode 100755 index 000000000..c3c7bbea9 --- /dev/null +++ b/bank-feeds/docs/models/operations/GetCompanyResponse.md @@ -0,0 +1,12 @@ +# GetCompanyResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `company` | [Company](../../models/shared/Company.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/GetConnectionRequest.md b/bank-feeds/docs/models/operations/GetConnectionRequest.md new file mode 100755 index 000000000..99068c884 --- /dev/null +++ b/bank-feeds/docs/models/operations/GetConnectionRequest.md @@ -0,0 +1,9 @@ +# GetConnectionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/GetConnectionResponse.md b/bank-feeds/docs/models/operations/GetConnectionResponse.md new file mode 100755 index 000000000..786574b55 --- /dev/null +++ b/bank-feeds/docs/models/operations/GetConnectionResponse.md @@ -0,0 +1,12 @@ +# GetConnectionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `connection` | [Connection](../../models/shared/Connection.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/GetCreateOperationRequest.md b/bank-feeds/docs/models/operations/GetCreateOperationRequest.md new file mode 100755 index 000000000..670b514bf --- /dev/null +++ b/bank-feeds/docs/models/operations/GetCreateOperationRequest.md @@ -0,0 +1,9 @@ +# GetCreateOperationRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `pushOperationKey` | *string* | :heavy_check_mark: | Push operation key. | | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/GetCreateOperationResponse.md b/bank-feeds/docs/models/operations/GetCreateOperationResponse.md new file mode 100755 index 000000000..4db2c6984 --- /dev/null +++ b/bank-feeds/docs/models/operations/GetCreateOperationResponse.md @@ -0,0 +1,12 @@ +# GetCreateOperationResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `pushOperation` | [PushOperation](../../models/shared/PushOperation.md) | :heavy_minus_sign: | OK | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/ListBankFeedsRequest.md b/bank-feeds/docs/models/operations/ListBankFeedsRequest.md new file mode 100755 index 000000000..77f213840 --- /dev/null +++ b/bank-feeds/docs/models/operations/ListBankFeedsRequest.md @@ -0,0 +1,9 @@ +# ListBankFeedsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/ListBankFeedsResponse.md b/bank-feeds/docs/models/operations/ListBankFeedsResponse.md new file mode 100755 index 000000000..436949964 --- /dev/null +++ b/bank-feeds/docs/models/operations/ListBankFeedsResponse.md @@ -0,0 +1,12 @@ +# ListBankFeedsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `bankFeedAccount` | [BankFeedAccount](../../models/shared/BankFeedAccount.md) | :heavy_minus_sign: | Success | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/ListCompaniesRequest.md b/bank-feeds/docs/models/operations/ListCompaniesRequest.md new file mode 100755 index 000000000..2e835bd4f --- /dev/null +++ b/bank-feeds/docs/models/operations/ListCompaniesRequest.md @@ -0,0 +1,11 @@ +# ListCompaniesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | +| `page` | *int* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *int* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/ListCompaniesResponse.md b/bank-feeds/docs/models/operations/ListCompaniesResponse.md new file mode 100755 index 000000000..e1b882fc1 --- /dev/null +++ b/bank-feeds/docs/models/operations/ListCompaniesResponse.md @@ -0,0 +1,12 @@ +# ListCompaniesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `companies` | [Companies](../../models/shared/Companies.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/ListConnectionsRequest.md b/bank-feeds/docs/models/operations/ListConnectionsRequest.md new file mode 100755 index 000000000..dd04a1fa1 --- /dev/null +++ b/bank-feeds/docs/models/operations/ListConnectionsRequest.md @@ -0,0 +1,12 @@ +# ListConnectionsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | +| `page` | *int* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *int* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/ListConnectionsResponse.md b/bank-feeds/docs/models/operations/ListConnectionsResponse.md new file mode 100755 index 000000000..f469c5f66 --- /dev/null +++ b/bank-feeds/docs/models/operations/ListConnectionsResponse.md @@ -0,0 +1,12 @@ +# ListConnectionsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `connections` | [Connections](../../models/shared/Connections.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/ListCreateOperationsRequest.md b/bank-feeds/docs/models/operations/ListCreateOperationsRequest.md new file mode 100755 index 000000000..619aeed03 --- /dev/null +++ b/bank-feeds/docs/models/operations/ListCreateOperationsRequest.md @@ -0,0 +1,12 @@ +# ListCreateOperationsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | +| `page` | *int* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *int* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/ListCreateOperationsResponse.md b/bank-feeds/docs/models/operations/ListCreateOperationsResponse.md new file mode 100755 index 000000000..5d6c5bd14 --- /dev/null +++ b/bank-feeds/docs/models/operations/ListCreateOperationsResponse.md @@ -0,0 +1,12 @@ +# ListCreateOperationsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `listPushOperations` | [ListPushOperations](../../models/shared/ListPushOperations.md) | :heavy_minus_sign: | OK | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/UnlinkConnectionRequest.md b/bank-feeds/docs/models/operations/UnlinkConnectionRequest.md new file mode 100755 index 000000000..374cc24cd --- /dev/null +++ b/bank-feeds/docs/models/operations/UnlinkConnectionRequest.md @@ -0,0 +1,10 @@ +# UnlinkConnectionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `requestBody` | [UnlinkConnectionRequestBody](../../models/operations/UnlinkConnectionRequestBody.md) | :heavy_minus_sign: | N/A | | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/UnlinkConnectionRequestBody.md b/bank-feeds/docs/models/operations/UnlinkConnectionRequestBody.md new file mode 100755 index 000000000..734319719 --- /dev/null +++ b/bank-feeds/docs/models/operations/UnlinkConnectionRequestBody.md @@ -0,0 +1,8 @@ +# UnlinkConnectionRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `status` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/UnlinkConnectionResponse.md b/bank-feeds/docs/models/operations/UnlinkConnectionResponse.md new file mode 100755 index 000000000..bd47b0cc4 --- /dev/null +++ b/bank-feeds/docs/models/operations/UnlinkConnectionResponse.md @@ -0,0 +1,12 @@ +# UnlinkConnectionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `connection` | [Connection](../../models/shared/Connection.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/UpdateBankFeedRequest.md b/bank-feeds/docs/models/operations/UpdateBankFeedRequest.md new file mode 100755 index 000000000..4b38db82f --- /dev/null +++ b/bank-feeds/docs/models/operations/UpdateBankFeedRequest.md @@ -0,0 +1,11 @@ +# UpdateBankFeedRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `bankFeedAccount` | [BankFeedAccount](../../models/shared/BankFeedAccount.md) | :heavy_minus_sign: | N/A | | +| `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/UpdateBankFeedResponse.md b/bank-feeds/docs/models/operations/UpdateBankFeedResponse.md new file mode 100755 index 000000000..0758fc3a6 --- /dev/null +++ b/bank-feeds/docs/models/operations/UpdateBankFeedResponse.md @@ -0,0 +1,12 @@ +# UpdateBankFeedResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `bankFeedAccount` | [BankFeedAccount](../../models/shared/BankFeedAccount.md) | :heavy_minus_sign: | Success | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/UpdateCompanyRequest.md b/bank-feeds/docs/models/operations/UpdateCompanyRequest.md new file mode 100755 index 000000000..dc485cb84 --- /dev/null +++ b/bank-feeds/docs/models/operations/UpdateCompanyRequest.md @@ -0,0 +1,9 @@ +# UpdateCompanyRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `companyRequestBody` | [CompanyRequestBody](../../models/shared/CompanyRequestBody.md) | :heavy_minus_sign: | N/A | | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/UpdateCompanyResponse.md b/bank-feeds/docs/models/operations/UpdateCompanyResponse.md new file mode 100755 index 000000000..e4bae50cb --- /dev/null +++ b/bank-feeds/docs/models/operations/UpdateCompanyResponse.md @@ -0,0 +1,12 @@ +# UpdateCompanyResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `company` | [Company](../../models/shared/Company.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | N/A | +| `errorMessage` | [ErrorMessage](../../models/shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *int* | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/BankAccountCredentials.md b/bank-feeds/docs/models/shared/BankAccountCredentials.md new file mode 100755 index 000000000..8cd2277df --- /dev/null +++ b/bank-feeds/docs/models/shared/BankAccountCredentials.md @@ -0,0 +1,11 @@ +# BankAccountCredentials + +Result of generate credentials + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `password` | *string* | :heavy_minus_sign: | Password to enable the bank feeds platform to securely retrieve transactions. | cO0ajh0uGyTN0Pwh | +| `username` | *string* | :heavy_minus_sign: | Username used by the bank feeds platform to retrieve transactions | S0MW-TR0P-7DS0 | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/BankFeedAccount.md b/bank-feeds/docs/models/shared/BankFeedAccount.md new file mode 100755 index 000000000..56ab7e8ab --- /dev/null +++ b/bank-feeds/docs/models/shared/BankFeedAccount.md @@ -0,0 +1,19 @@ +# BankFeedAccount + +The target bank account in a supported accounting package for ingestion into a bank feed. + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accountName` | *string* | :heavy_minus_sign: | The bank account name | | +| `accountNumber` | *string* | :heavy_minus_sign: | The account number | | +| `accountType` | *string* | :heavy_minus_sign: | The type of bank account e.g. Credit | | +| `balance` | *float* | :heavy_minus_sign: | The latest balance for the bank account | | +| `currency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | +| `feedStartDate` | *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-23T00:00:00.000Z | +| `id` | *string* | :heavy_check_mark: | Unique ID for the bank feed account | | +| `modifiedDate` | *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-23T00:00:00.000Z | +| `sortCode` | *string* | :heavy_minus_sign: | The sort code | | +| `status` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/BankFeedAccountMapping.md b/bank-feeds/docs/models/shared/BankFeedAccountMapping.md new file mode 100755 index 000000000..dd8c993ce --- /dev/null +++ b/bank-feeds/docs/models/shared/BankFeedAccountMapping.md @@ -0,0 +1,12 @@ +# BankFeedAccountMapping + +A bank feed connection between a source account and a target account. + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `feedStartDate` | *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-23T00:00:00.000Z | +| `sourceAccountId` | *string* | :heavy_minus_sign: | Unique ID for the source account | | +| `targetAccountId` | *string* | :heavy_minus_sign: | Unique ID for the target account | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/BankFeedAccountMappingResponse.md b/bank-feeds/docs/models/shared/BankFeedAccountMappingResponse.md new file mode 100755 index 000000000..ea9dc5520 --- /dev/null +++ b/bank-feeds/docs/models/shared/BankFeedAccountMappingResponse.md @@ -0,0 +1,13 @@ +# BankFeedAccountMappingResponse + +The result from POSTing a Bank Account mapping. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `error` | *string* | :heavy_minus_sign: | Error returned during the post request | +| `status` | *string* | :heavy_minus_sign: | Status of the POST request. | +| `sourceAccountId` | *string* | :heavy_minus_sign: | Unique ID for the source account. | +| `targetAccountId` | *string* | :heavy_minus_sign: | Unique ID for the target account. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/BankFeedMapping.md b/bank-feeds/docs/models/shared/BankFeedMapping.md new file mode 100755 index 000000000..ebae8ff05 --- /dev/null +++ b/bank-feeds/docs/models/shared/BankFeedMapping.md @@ -0,0 +1,19 @@ +# BankFeedMapping + +A bank feed connection between a source account and a target account, including potential target accounts. + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `feedStartDate` | *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-23T00:00:00.000Z | +| `sourceAccountId` | *string* | :heavy_minus_sign: | Unique ID for the source account. | | +| `sourceAccountName` | *string* | :heavy_minus_sign: | Name for the source account. | | +| `sourceAccountNumber` | *string* | :heavy_minus_sign: | Account number for the source account. | | +| `sourceBalance` | *string* | :heavy_minus_sign: | Balance for the source account. | | +| `sourceCurrency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | +| `status` | *string* | :heavy_minus_sign: | N/A | | +| `targetAccountId` | *string* | :heavy_minus_sign: | Unique ID for the target account in the accounting platform. | | +| `targetAccountName` | *string* | :heavy_minus_sign: | Name for the target account in the accounting platform. | | +| `targetAccountOptions` | List<[TargetAccountOption](../../models/shared/TargetAccountOption.md)> | :heavy_minus_sign: | An array of potential target accounts. | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/Companies.md b/bank-feeds/docs/models/shared/Companies.md new file mode 100755 index 000000000..4ea8b507c --- /dev/null +++ b/bank-feeds/docs/models/shared/Companies.md @@ -0,0 +1,14 @@ +# Companies + +OK + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `links` | [Links](../../models/shared/Links.md) | :heavy_check_mark: | N/A | +| `pageNumber` | *int* | :heavy_check_mark: | N/A | +| `pageSize` | *int* | :heavy_check_mark: | N/A | +| `results` | List<[Company](../../models/shared/Company.md)> | :heavy_minus_sign: | N/A | +| `totalResults` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/Company.md b/bank-feeds/docs/models/shared/Company.md new file mode 100755 index 000000000..db448e40a --- /dev/null +++ b/bank-feeds/docs/models/shared/Company.md @@ -0,0 +1,22 @@ +# Company + +In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data. + +Typically each company is one of your customers. + +When you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company. + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `created` | *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-23T00:00:00.000Z | +| `createdByUserName` | *string* | :heavy_minus_sign: | N/A | | +| `dataConnections` | List<[Connection](../../models/shared/Connection.md)> | :heavy_minus_sign: | N/A | | +| `description` | *string* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | +| `id` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `lastSync` | *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-23T00:00:00.000Z | +| `name` | *string* | :heavy_check_mark: | The name of the company | Codat Ltd. | +| ~~`platform`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | Xero | +| `redirect` | *string* | :heavy_check_mark: | The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. | https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739 | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/CompanyRequestBody.md b/bank-feeds/docs/models/shared/CompanyRequestBody.md new file mode 100755 index 000000000..61085ece8 --- /dev/null +++ b/bank-feeds/docs/models/shared/CompanyRequestBody.md @@ -0,0 +1,9 @@ +# CompanyRequestBody + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | +| `name` | *string* | :heavy_check_mark: | Name of company being connected. | Bank of Dave | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/Connection.md b/bank-feeds/docs/models/shared/Connection.md new file mode 100755 index 000000000..9417e0852 --- /dev/null +++ b/bank-feeds/docs/models/shared/Connection.md @@ -0,0 +1,31 @@ +# Connection + +A connection represents a [company's](https://docs.codat.io/bank-feeds-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source. + +A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to: + +- [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection. +- [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections. +- [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections. +Any combination of accounting, banking, and commerce data connections is allowed. + +Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview). + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `additionalProperties` | *object* | :heavy_minus_sign: | N/A | | +| `connectionInfo` | Dictionary | :heavy_minus_sign: | N/A | | +| `created` | *string* | :heavy_check_mark: | 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-23T00:00:00.000Z | +| `dataConnectionErrors` | List<[DataConnectionError](../../models/shared/DataConnectionError.md)> | :heavy_minus_sign: | N/A | | +| `id` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `integrationId` | *string* | :heavy_check_mark: | A Codat ID representing the integration. | fd321cb6-7963-4506-b873-e99593a45e30 | +| `integrationKey` | *string* | :heavy_check_mark: | A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. | | +| `lastSync` | *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-23T00:00:00.000Z | +| `linkUrl` | *string* | :heavy_check_mark: | N/A | https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start | +| `platformName` | *string* | :heavy_check_mark: | N/A | | +| `sourceId` | *string* | :heavy_check_mark: | A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. | 35b92968-9851-4095-ad60-395c95cbcba4 | +| `sourceType` | [ConnectionSourceType](../../models/shared/ConnectionSourceType.md) | :heavy_check_mark: | The type of platform of the connection. | Accounting | +| `status` | [DataConnectionStatus](../../models/shared/DataConnectionStatus.md) | :heavy_check_mark: | The current authorization status of the data connection. | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/ConnectionSourceType.md b/bank-feeds/docs/models/shared/ConnectionSourceType.md new file mode 100755 index 000000000..97a69b075 --- /dev/null +++ b/bank-feeds/docs/models/shared/ConnectionSourceType.md @@ -0,0 +1,14 @@ +# ConnectionSourceType + +The type of platform of the connection. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Accounting` | Accounting | +| `Banking` | Banking | +| `Commerce` | Commerce | +| `Other` | Other | +| `Unknown` | Unknown | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/Connections.md b/bank-feeds/docs/models/shared/Connections.md new file mode 100755 index 000000000..cfc06dd0c --- /dev/null +++ b/bank-feeds/docs/models/shared/Connections.md @@ -0,0 +1,14 @@ +# Connections + +OK + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `links` | [Links](../../models/shared/Links.md) | :heavy_check_mark: | N/A | +| `pageNumber` | *int* | :heavy_check_mark: | N/A | +| `pageSize` | *int* | :heavy_check_mark: | N/A | +| `results` | List<[Connection](../../models/shared/Connection.md)> | :heavy_minus_sign: | N/A | +| `totalResults` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/CreateBankAccountTransaction.md b/bank-feeds/docs/models/shared/CreateBankAccountTransaction.md new file mode 100755 index 000000000..c6f2a4b8a --- /dev/null +++ b/bank-feeds/docs/models/shared/CreateBankAccountTransaction.md @@ -0,0 +1,12 @@ +# CreateBankAccountTransaction + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `amount` | *float* | :heavy_minus_sign: | N/A | | +| `balance` | *float* | :heavy_minus_sign: | N/A | | +| `date` | *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-23T00:00:00.000Z | +| `description` | *string* | :heavy_minus_sign: | N/A | | +| `id` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/CreateBankTransactions.md b/bank-feeds/docs/models/shared/CreateBankTransactions.md new file mode 100755 index 000000000..44d084843 --- /dev/null +++ b/bank-feeds/docs/models/shared/CreateBankTransactions.md @@ -0,0 +1,9 @@ +# CreateBankTransactions + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `accountId` | *string* | :heavy_minus_sign: | N/A | +| `transactions` | List<[CreateBankAccountTransaction](../../models/shared/CreateBankAccountTransaction.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/CreateBankTransactionsResponse.md b/bank-feeds/docs/models/shared/CreateBankTransactionsResponse.md new file mode 100755 index 000000000..c14406d73 --- /dev/null +++ b/bank-feeds/docs/models/shared/CreateBankTransactionsResponse.md @@ -0,0 +1,23 @@ +# CreateBankTransactionsResponse + +Success + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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-23T00:00:00.000Z | +| `data` | [CreateBankTransactions](../../models/shared/CreateBankTransactions.md) | :heavy_minus_sign: | N/A | | +| `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: | N/A | | +| `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | +| `requestedOnUtc` | *string* | :heavy_check_mark: | 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-23T00:00:00.000Z | +| `status` | [PushOperationStatus](../../models/shared/PushOperationStatus.md) | :heavy_check_mark: | The status of the push operation. | | +| `statusCode` | *int* | :heavy_check_mark: | N/A | | +| `timeoutInMinutes` | *int* | :heavy_minus_sign: | N/A | | +| ~~`timeoutInSeconds`~~ | *int* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | +| `validation` | [Validation](../../models/shared/Validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/DataConnectionError.md b/bank-feeds/docs/models/shared/DataConnectionError.md new file mode 100755 index 000000000..1cb39bf0f --- /dev/null +++ b/bank-feeds/docs/models/shared/DataConnectionError.md @@ -0,0 +1,11 @@ +# DataConnectionError + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `errorMessage` | *string* | :heavy_minus_sign: | N/A | | +| `erroredOnUtc` | *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-23T00:00:00.000Z | +| `statusCode` | *string* | :heavy_minus_sign: | N/A | | +| `statusText` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/DataConnectionStatus.md b/bank-feeds/docs/models/shared/DataConnectionStatus.md new file mode 100755 index 000000000..5d13bea51 --- /dev/null +++ b/bank-feeds/docs/models/shared/DataConnectionStatus.md @@ -0,0 +1,13 @@ +# DataConnectionStatus + +The current authorization status of the data connection. + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `PendingAuth` | PendingAuth | +| `Linked` | Linked | +| `Unlinked` | Unlinked | +| `Deauthorized` | Deauthorized | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/DataType.md b/bank-feeds/docs/models/shared/DataType.md new file mode 100755 index 000000000..80fff98f4 --- /dev/null +++ b/bank-feeds/docs/models/shared/DataType.md @@ -0,0 +1,51 @@ +# DataType + +Available Data types + + +## Values + +| Name | Value | +| ------------------------------ | ------------------------------ | +| `AccountTransactions` | accountTransactions | +| `BalanceSheet` | balanceSheet | +| `BankAccounts` | bankAccounts | +| `BankTransactions` | bankTransactions | +| `BillCreditNotes` | billCreditNotes | +| `BillPayments` | billPayments | +| `Bills` | bills | +| `CashFlowStatement` | cashFlowStatement | +| `ChartOfAccounts` | chartOfAccounts | +| `Company` | company | +| `CreditNotes` | creditNotes | +| `Customers` | customers | +| `DirectCosts` | directCosts | +| `DirectIncomes` | directIncomes | +| `Invoices` | invoices | +| `Items` | items | +| `JournalEntries` | journalEntries | +| `Journals` | journals | +| `PaymentMethods` | paymentMethods | +| `Payments` | payments | +| `ProfitAndLoss` | profitAndLoss | +| `PurchaseOrders` | purchaseOrders | +| `SalesOrders` | salesOrders | +| `Suppliers` | suppliers | +| `TaxRates` | taxRates | +| `TrackingCategories` | trackingCategories | +| `Transfers` | transfers | +| `BankingAccountBalances` | banking-accountBalances | +| `BankingAccounts` | banking-accounts | +| `BankingTransactionCategories` | banking-transactionCategories | +| `BankingTransactions` | banking-transactions | +| `CommerceCompanyInfo` | commerce-companyInfo | +| `CommerceCustomers` | commerce-customers | +| `CommerceDisputes` | commerce-disputes | +| `CommerceLocations` | commerce-locations | +| `CommerceOrders` | commerce-orders | +| `CommercePaymentMethods` | commerce-paymentMethods | +| `CommercePayments` | commerce-payments | +| `CommerceProductCategories` | commerce-productCategories | +| `CommerceProducts` | commerce-products | +| `CommerceTaxComponents` | commerce-taxComponents | +| `CommerceTransactions` | commerce-transactions | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/ErrorMessage.md b/bank-feeds/docs/models/shared/ErrorMessage.md new file mode 100755 index 000000000..29bd5d372 --- /dev/null +++ b/bank-feeds/docs/models/shared/ErrorMessage.md @@ -0,0 +1,15 @@ +# ErrorMessage + +Your `query` parameter was not correctly formed + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `canBeRetried` | *string* | :heavy_minus_sign: | N/A | +| `correlationId` | *string* | :heavy_minus_sign: | N/A | +| `detailedErrorCode` | *int* | :heavy_minus_sign: | N/A | +| `error` | *string* | :heavy_minus_sign: | N/A | +| `service` | *string* | :heavy_minus_sign: | N/A | +| `statusCode` | *int* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/HalRef.md b/bank-feeds/docs/models/shared/HalRef.md new file mode 100755 index 000000000..e31d9646b --- /dev/null +++ b/bank-feeds/docs/models/shared/HalRef.md @@ -0,0 +1,8 @@ +# HalRef + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `href` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/Links.md b/bank-feeds/docs/models/shared/Links.md new file mode 100755 index 000000000..28cee786c --- /dev/null +++ b/bank-feeds/docs/models/shared/Links.md @@ -0,0 +1,11 @@ +# Links + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `current` | [HalRef](../../models/shared/HalRef.md) | :heavy_check_mark: | N/A | +| `next` | [HalRef](../../models/shared/HalRef.md) | :heavy_minus_sign: | N/A | +| `previous` | [HalRef](../../models/shared/HalRef.md) | :heavy_minus_sign: | N/A | +| `self` | [HalRef](../../models/shared/HalRef.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/ListPushOperations.md b/bank-feeds/docs/models/shared/ListPushOperations.md new file mode 100755 index 000000000..6741b7885 --- /dev/null +++ b/bank-feeds/docs/models/shared/ListPushOperations.md @@ -0,0 +1,14 @@ +# ListPushOperations + +OK + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `links` | [Links](../../models/shared/Links.md) | :heavy_check_mark: | N/A | +| `pageNumber` | *int* | :heavy_check_mark: | N/A | +| `pageSize` | *int* | :heavy_check_mark: | N/A | +| `results` | List<[PushOperation](../../models/shared/PushOperation.md)> | :heavy_minus_sign: | N/A | +| `totalResults` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/PushChangeType.md b/bank-feeds/docs/models/shared/PushChangeType.md new file mode 100755 index 000000000..87b354b8a --- /dev/null +++ b/bank-feeds/docs/models/shared/PushChangeType.md @@ -0,0 +1,12 @@ +# PushChangeType + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `Unknown` | Unknown | +| `Created` | Created | +| `Modified` | Modified | +| `Deleted` | Deleted | +| `AttachmentUploaded` | AttachmentUploaded | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/PushOperation.md b/bank-feeds/docs/models/shared/PushOperation.md new file mode 100755 index 000000000..02de6e870 --- /dev/null +++ b/bank-feeds/docs/models/shared/PushOperation.md @@ -0,0 +1,22 @@ +# PushOperation + +OK + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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-23T00:00:00.000Z | +| `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: | N/A | | +| `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | +| `requestedOnUtc` | *string* | :heavy_check_mark: | 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-23T00:00:00.000Z | +| `status` | [PushOperationStatus](../../models/shared/PushOperationStatus.md) | :heavy_check_mark: | The status of the push operation. | | +| `statusCode` | *int* | :heavy_check_mark: | N/A | | +| `timeoutInMinutes` | *int* | :heavy_minus_sign: | N/A | | +| ~~`timeoutInSeconds`~~ | *int* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | +| `validation` | [Validation](../../models/shared/Validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/PushOperationChange.md b/bank-feeds/docs/models/shared/PushOperationChange.md new file mode 100755 index 000000000..e21a45a07 --- /dev/null +++ b/bank-feeds/docs/models/shared/PushOperationChange.md @@ -0,0 +1,10 @@ +# PushOperationChange + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `attachmentId` | *string* | :heavy_minus_sign: | N/A | +| `recordRef` | [PushOperationRef](../../models/shared/PushOperationRef.md) | :heavy_minus_sign: | N/A | +| `type` | [PushChangeType](../../models/shared/PushChangeType.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/PushOperationRef.md b/bank-feeds/docs/models/shared/PushOperationRef.md new file mode 100755 index 000000000..c56ba798d --- /dev/null +++ b/bank-feeds/docs/models/shared/PushOperationRef.md @@ -0,0 +1,9 @@ +# PushOperationRef + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `dataType` | [DataType](../../models/shared/DataType.md) | :heavy_minus_sign: | Available Data types | invoices | +| `id` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/PushOperationStatus.md b/bank-feeds/docs/models/shared/PushOperationStatus.md new file mode 100755 index 000000000..3adf5a3ae --- /dev/null +++ b/bank-feeds/docs/models/shared/PushOperationStatus.md @@ -0,0 +1,13 @@ +# PushOperationStatus + +The status of the push operation. + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Pending` | Pending | +| `Failed` | Failed | +| `Success` | Success | +| `TimedOut` | TimedOut | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/Security.md b/bank-feeds/docs/models/shared/Security.md new file mode 100755 index 000000000..30160fe18 --- /dev/null +++ b/bank-feeds/docs/models/shared/Security.md @@ -0,0 +1,8 @@ +# Security + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `authHeader` | *string* | :heavy_check_mark: | N/A | Basic BASE_64_ENCODED(API_KEY) | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/TargetAccountOption.md b/bank-feeds/docs/models/shared/TargetAccountOption.md new file mode 100755 index 000000000..a58e2dce6 --- /dev/null +++ b/bank-feeds/docs/models/shared/TargetAccountOption.md @@ -0,0 +1,12 @@ +# TargetAccountOption + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `accountNumber` | *string* | :heavy_minus_sign: | The account number of the account. | +| `balance` | *float* | :heavy_minus_sign: | The balance of the account. | +| `id` | *string* | :heavy_minus_sign: | Id of the target account. | +| `name` | *string* | :heavy_minus_sign: | Name of the target account. | +| `sortCode` | *string* | :heavy_minus_sign: | The sort code of the account. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/Validation.md b/bank-feeds/docs/models/shared/Validation.md new file mode 100755 index 000000000..3320ac88d --- /dev/null +++ b/bank-feeds/docs/models/shared/Validation.md @@ -0,0 +1,11 @@ +# Validation + +A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `errors` | List<[ValidationItem](../../models/shared/ValidationItem.md)> | :heavy_minus_sign: | N/A | +| `warnings` | List<[ValidationItem](../../models/shared/ValidationItem.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/ValidationItem.md b/bank-feeds/docs/models/shared/ValidationItem.md new file mode 100755 index 000000000..dbfd8be3b --- /dev/null +++ b/bank-feeds/docs/models/shared/ValidationItem.md @@ -0,0 +1,10 @@ +# ValidationItem + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `itemId` | *string* | :heavy_minus_sign: | N/A | +| `message` | *string* | :heavy_minus_sign: | N/A | +| `validatorName` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/sdks/accountmapping/README.md b/bank-feeds/docs/sdks/accountmapping/README.md new file mode 100755 index 000000000..6f5bf3249 --- /dev/null +++ b/bank-feeds/docs/sdks/accountmapping/README.md @@ -0,0 +1,99 @@ +# accountMapping + +## Overview + +Bank feed bank account mapping. + +### Available Operations + +* [Create](#create) - Create bank feed bank account mapping +* [Get](#get) - List bank feed account mappings + +## Create + +The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting platform (target account). + +A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end users account in the underlying platform). + +To find valid target account options, first call list bank feed account mappings. + +This endpoint is only needed if building an account management UI. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.AccountMapping.CreateAsync(new CreateBankAccountMappingRequest() { + BankFeedAccountMapping = new BankFeedAccountMapping() { + FeedStartDate = "2022-10-23T00:00:00.000Z", + SourceAccountId = "unde", + TargetAccountId = "nulla", + }, + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `request` | [CreateBankAccountMappingRequest](../../models/operations/CreateBankAccountMappingRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[CreateBankAccountMappingResponse](../../models/operations/CreateBankAccountMappingResponse.md)** + + +## Get + +The *List bank account mappings* endpoint returns information about a source bank account and any current or potential target mapping accounts. + +A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end users account in the underlying platform). + +This endpoint is only needed if building an account management UI. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.AccountMapping.GetAsync(new GetBankAccountMappingRequest() { + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `request` | [GetBankAccountMappingRequest](../../models/operations/GetBankAccountMappingRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[GetBankAccountMappingResponse](../../models/operations/GetBankAccountMappingResponse.md)** + diff --git a/bank-feeds/docs/sdks/codatbankfeeds/README.md b/bank-feeds/docs/sdks/codatbankfeeds/README.md new file mode 100755 index 000000000..4fbba8c2b --- /dev/null +++ b/bank-feeds/docs/sdks/codatbankfeeds/README.md @@ -0,0 +1,14 @@ +# CodatBankFeeds SDK + +## Overview + +Bank Feeds API: Bank Feeds API enables your SMB users to set up bank feeds from accounts in your application to supported accounting platforms. + +A bank feed is a connection between a source bank account in your application and a target bank account in a supported accounting package. + +[Read more...](https://docs.codat.io/bank-feeds-api/overview) + +[See our OpenAPI spec](https://github.com/codatio/oas) + +### Available Operations + diff --git a/bank-feeds/docs/sdks/companies/README.md b/bank-feeds/docs/sdks/companies/README.md new file mode 100755 index 000000000..d64ebce3f --- /dev/null +++ b/bank-feeds/docs/sdks/companies/README.md @@ -0,0 +1,205 @@ +# companies + +## Overview + +Create and manage your Codat companies. + +### Available Operations + +* [Create](#create) - Create company +* [Delete](#delete) - Delete a company +* [Get](#get) - Get company +* [List](#list) - List companies +* [Update](#update) - Update company + +## Create + +Creates a new company that can be used to assign connections to. + +If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`. + + + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.Companies.CreateAsync(new CompanyRequestBody() { + Description = "Requested early access to the new financing scheme.", + Name = "Bank of Dave", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `request` | [CompanyRequestBody](../../models/shared/CompanyRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[CreateCompanyResponse](../../models/operations/CreateCompanyResponse.md)** + + +## Delete + + +Permanently deletes a company, its connections and any cached data. This operation is irreversible. If the company ID does not exist an error is returned. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.Companies.DeleteAsync(new DeleteCompanyRequest() { + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [DeleteCompanyRequest](../../models/operations/DeleteCompanyRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[DeleteCompanyResponse](../../models/operations/DeleteCompanyResponse.md)** + + +## Get + +Returns the company for a valid identifier. If the identifier is for a deleted company, a not found response is returned. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.Companies.GetAsync(new GetCompanyRequest() { + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `request` | [GetCompanyRequest](../../models/operations/GetCompanyRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[GetCompanyResponse](../../models/operations/GetCompanyResponse.md)** + + +## List + +Returns a list of your companies. The company schema contains a list of [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) related to the company. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.Companies.ListAsync(new ListCompaniesRequest() { + OrderBy = "-modifiedDate", + Page = 1, + PageSize = 100, + Query = "corrupti", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [ListCompaniesRequest](../../models/operations/ListCompaniesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[ListCompaniesResponse](../../models/operations/ListCompaniesResponse.md)** + + +## Update + +Updates both the name and description of the company. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.Companies.UpdateAsync(new UpdateCompanyRequest() { + CompanyRequestBody = new CompanyRequestBody() { + Description = "Requested early access to the new financing scheme.", + Name = "Bank of Dave", + }, + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [UpdateCompanyRequest](../../models/operations/UpdateCompanyRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[UpdateCompanyResponse](../../models/operations/UpdateCompanyResponse.md)** + diff --git a/bank-feeds/docs/sdks/connections/README.md b/bank-feeds/docs/sdks/connections/README.md new file mode 100755 index 000000000..5d62cc364 --- /dev/null +++ b/bank-feeds/docs/sdks/connections/README.md @@ -0,0 +1,209 @@ +# connections + +## Overview + +Manage your companies' data connections. + +### Available Operations + +* [Create](#create) - Create connection +* [Delete](#delete) - Delete connection +* [Get](#get) - Get connection +* [List](#list) - List connections +* [Unlink](#unlink) - Unlink connection + +## Create + +Creates a connection for the company by providing a valid `platformKey`. + +Use the [List Integrations](https://docs.codat.io/bank-feeds-api#/operations/list-integrations) endpoint to access valid platform keys. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.Connections.CreateAsync(new CreateConnectionRequest() { + RequestBody = new CreateConnectionRequestBody() { + PlatformKey = "illum", + }, + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [CreateConnectionRequest](../../models/operations/CreateConnectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[CreateConnectionResponse](../../models/operations/CreateConnectionResponse.md)** + + +## Delete + +Revoke and remove a connection from a company. +This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.Connections.DeleteAsync(new DeleteConnectionRequest() { + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [DeleteConnectionRequest](../../models/operations/DeleteConnectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[DeleteConnectionResponse](../../models/operations/DeleteConnectionResponse.md)** + + +## Get + +Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.Connections.GetAsync(new GetConnectionRequest() { + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [GetConnectionRequest](../../models/operations/GetConnectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[GetConnectionResponse](../../models/operations/GetConnectionResponse.md)** + + +## List + +List the connections for a company. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.Connections.ListAsync(new ListConnectionsRequest() { + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + OrderBy = "-modifiedDate", + Page = 1, + PageSize = 100, + Query = "vel", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [ListConnectionsRequest](../../models/operations/ListConnectionsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[ListConnectionsResponse](../../models/operations/ListConnectionsResponse.md)** + + +## Unlink + +This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.Connections.UnlinkAsync(new UnlinkConnectionRequest() { + RequestBody = new UnlinkConnectionRequestBody() { + Status = "error", + }, + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [UnlinkConnectionRequest](../../models/operations/UnlinkConnectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[UnlinkConnectionResponse](../../models/operations/UnlinkConnectionResponse.md)** + diff --git a/bank-feeds/docs/sdks/sourceaccounts/README.md b/bank-feeds/docs/sdks/sourceaccounts/README.md new file mode 100755 index 000000000..68ae97464 --- /dev/null +++ b/bank-feeds/docs/sdks/sourceaccounts/README.md @@ -0,0 +1,274 @@ +# sourceAccounts + +## Overview + +Source accounts act as a bridge to bank accounts in accounting software. + +### Available Operations + +* [Create](#create) - Create a bank feed bank account +* [Delete](#delete) - Delete bank feed bank account +* [DeleteCredentials](#deletecredentials) - Delete all source account credentials +* [GenerateCredentials](#generatecredentials) - Generate source account credentials +* [List](#list) - List bank feed bank accounts +* [Update](#update) - Update bank feed bank account + +## Create + +Post a BankFeed BankAccount for a single data source connected. to a single company. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.SourceAccounts.CreateAsync(new CreateBankFeedRequest() { + BankFeedAccount = new BankFeedAccount() { + AccountName = "deserunt", + AccountNumber = "suscipit", + AccountType = "iure", + Balance = 2975.34F, + Currency = "EUR", + FeedStartDate = "2022-10-23T00:00:00.000Z", + Id = "f467cc87-96ed-4151-a05d-fc2ddf7cc78c", + ModifiedDate = "2022-10-23T00:00:00.000Z", + SortCode = "dicta", + Status = "nam", + }, + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [CreateBankFeedRequest](../../models/operations/CreateBankFeedRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[CreateBankFeedResponse](../../models/operations/CreateBankFeedResponse.md)** + + +## Delete + +The *delete bank feed bank account* endpoint enables you to remove a source account. + +Removing a source account will also remove any mapping between the source bank feed bank accounts and the target bankfeed bank account. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.SourceAccounts.DeleteAsync(new DeleteBankFeedBankAccountRequest() { + AccountId = "7110701885", + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `request` | [DeleteBankFeedBankAccountRequest](../../models/operations/DeleteBankFeedBankAccountRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[DeleteBankFeedBankAccountResponse](../../models/operations/DeleteBankFeedBankAccountResponse.md)** + + +## DeleteCredentials + +The _Delete Bank Account Credentials_ endpoint serves as a comprehensive mechanism for revoking all existing authorization credentials that a company employs to establish its Bank Feed connection. + +In cases where multiple credential sets have been generated, a single API call to this endpoint revokes all of them. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.SourceAccounts.DeleteCredentialsAsync(new DeleteBankFeedCredentialsRequest() { + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `request` | [DeleteBankFeedCredentialsRequest](../../models/operations/DeleteBankFeedCredentialsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[DeleteBankFeedCredentialsResponse](../../models/operations/DeleteBankFeedCredentialsResponse.md)** + + +## GenerateCredentials + +The _Generate Bank Account Credentials_ endpoint can be used to generate credentials for QuickBooks Online to use for authentication of the Bank Feed in their portal, each time this is used a new set of credentials will be generated. + +The old credentials will still be valid until the revoke credentials endpoint is used, which will revoke all credentials associated to the data connection. + + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.SourceAccounts.GenerateCredentialsAsync(new GenerateCredentialsRequest() { + RequestBody = "occaecati as bytes <<<>>>", + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [GenerateCredentialsRequest](../../models/operations/GenerateCredentialsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[GenerateCredentialsResponse](../../models/operations/GenerateCredentialsResponse.md)** + + +## List + +The *List bank feed bank accounts* endpoint returns a list of [bank feed accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) for a given company's connection. + +[Bank feed accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) are the bank's bank account from which transactions are synced into the accounting platform. + + + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.SourceAccounts.ListAsync(new ListBankFeedsRequest() { + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [ListBankFeedsRequest](../../models/operations/ListBankFeedsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[ListBankFeedsResponse](../../models/operations/ListBankFeedsResponse.md)** + + +## Update + +The *Update bank feed bank account* endpoint updates a single bank feed bank account for a single data source connected to a single company. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.SourceAccounts.UpdateAsync(new UpdateBankFeedRequest() { + BankFeedAccount = new BankFeedAccount() { + AccountName = "fugit", + AccountNumber = "deleniti", + AccountType = "hic", + Balance = 7586.16F, + Currency = "USD", + FeedStartDate = "2022-10-23T00:00:00.000Z", + Id = "6742cb73-9205-4929-b96f-ea7596eb10fa", + ModifiedDate = "2022-10-23T00:00:00.000Z", + SortCode = "laborum", + Status = "dolores", + }, + AccountId = "13d946f0-c5d5-42bc-b092-97ece17923ab", + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `request` | [UpdateBankFeedRequest](../../models/operations/UpdateBankFeedRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[UpdateBankFeedResponse](../../models/operations/UpdateBankFeedResponse.md)** + diff --git a/bank-feeds/docs/sdks/transactions/README.md b/bank-feeds/docs/sdks/transactions/README.md new file mode 100755 index 000000000..de8142167 --- /dev/null +++ b/bank-feeds/docs/sdks/transactions/README.md @@ -0,0 +1,149 @@ +# transactions + +## Overview + +Transactions represent debits and credits from a source account. + +### Available Operations + +* [Create](#create) - Create bank account transactions +* [GetCreateOperation](#getcreateoperation) - Get create operation +* [ListCreateOperations](#listcreateoperations) - List create operations + +## Create + +The *Create bank account transactions* endpoint creates new [bank account transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) for a given company's connection. + +[Bank account transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) are records of monetary amounts that have moved in and out of an SMB's bank account. + +**Integration-specific behaviour** + +Required data may vary by integration. To see what data to post, first call [Get create bank transaction model](https://docs.codat.io/bank-feeds-api#/operations/get-create-bankTransactions-model). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support creating a bank account transactions. + + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.Transactions.CreateAsync(new CreateBankTransactionsRequest() { + CreateBankTransactions = new CreateBankTransactions() { + AccountId = "corporis", + Transactions = new List() { + new CreateBankAccountTransaction() { + Amount = 7506.86F, + Balance = 3154.28F, + Date = "2022-10-23T00:00:00.000Z", + Description = "nemo", + Id = "5907aff1-a3a2-4fa9-8677-39251aa52c3f", + }, + }, + }, + AccountId = "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2", + AllowSyncOnPushComplete = false, + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", + TimeoutInMinutes = 662527, +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `request` | [CreateBankTransactionsRequest](../../models/operations/CreateBankTransactionsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[Models.Operations.CreateBankTransactionsResponse](../../models/operations/CreateBankTransactionsResponse.md)** + + +## GetCreateOperation + +Retrieve push operation. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.Transactions.GetCreateOperationAsync(new GetCreateOperationRequest() { + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + PushOperationKey = "d019da1f-fe78-4f09-bb00-74f15471b5e6", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [GetCreateOperationRequest](../../models/operations/GetCreateOperationRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[GetCreateOperationResponse](../../models/operations/GetCreateOperationResponse.md)** + + +## ListCreateOperations + +List create operations. + +### Example Usage + +```csharp +using CodatBankFeeds; +using CodatBankFeeds.Models.Shared; +using CodatBankFeeds.Models.Operations; + +var sdk = new CodatBankFeedsSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.Transactions.ListCreateOperationsAsync(new ListCreateOperationsRequest() { + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + OrderBy = "-modifiedDate", + Page = 1, + PageSize = 100, + Query = "repudiandae", +}); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [ListCreateOperationsRequest](../../models/operations/ListCreateOperationsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[ListCreateOperationsResponse](../../models/operations/ListCreateOperationsResponse.md)** + diff --git a/bank-feeds/files.gen b/bank-feeds/files.gen new file mode 100755 index 000000000..ebdcc13ac --- /dev/null +++ b/bank-feeds/files.gen @@ -0,0 +1,172 @@ +CodatBankFeeds/AccountMapping.cs +CodatBankFeeds/Companies.cs +CodatBankFeeds/Connections.cs +CodatBankFeeds/SourceAccounts.cs +CodatBankFeeds/Transactions.cs +CodatBankFeeds/CodatBankFeedsSDK.cs +CodatBankFeeds/Utils/EnumSerializer.cs +CodatBankFeeds/Utils/FlexibleObjectDeserializer.cs +CodatBankFeeds/Utils/HeaderSerializer.cs +CodatBankFeeds/Utils/IsoDateTimeSerializer.cs +CodatBankFeeds/Utils/RequestBodySerializer.cs +CodatBankFeeds/Utils/SecuritySerializer.cs +CodatBankFeeds/Utils/SpeakeasyHttpClient.cs +CodatBankFeeds/Utils/SpeakeasyMetadata.cs +CodatBankFeeds/Utils/URLBuilder.cs +CodatBankFeeds/Utils/Utilities.cs +CodatBankFeeds/CodatBankFeeds.csproj +CodatBankFeeds.sln +CodatBankFeeds/Models/Operations/CreateBankAccountMappingRequest.cs +CodatBankFeeds/Models/Operations/CreateBankAccountMappingResponse.cs +CodatBankFeeds/Models/Operations/GetBankAccountMappingRequest.cs +CodatBankFeeds/Models/Operations/GetBankAccountMappingResponse.cs +CodatBankFeeds/Models/Operations/CreateCompanyResponse.cs +CodatBankFeeds/Models/Operations/DeleteCompanyRequest.cs +CodatBankFeeds/Models/Operations/DeleteCompanyResponse.cs +CodatBankFeeds/Models/Operations/GetCompanyRequest.cs +CodatBankFeeds/Models/Operations/GetCompanyResponse.cs +CodatBankFeeds/Models/Operations/ListCompaniesRequest.cs +CodatBankFeeds/Models/Operations/ListCompaniesResponse.cs +CodatBankFeeds/Models/Operations/UpdateCompanyRequest.cs +CodatBankFeeds/Models/Operations/UpdateCompanyResponse.cs +CodatBankFeeds/Models/Operations/CreateConnectionRequestBody.cs +CodatBankFeeds/Models/Operations/CreateConnectionRequest.cs +CodatBankFeeds/Models/Operations/CreateConnectionResponse.cs +CodatBankFeeds/Models/Operations/DeleteConnectionRequest.cs +CodatBankFeeds/Models/Operations/DeleteConnectionResponse.cs +CodatBankFeeds/Models/Operations/GetConnectionRequest.cs +CodatBankFeeds/Models/Operations/GetConnectionResponse.cs +CodatBankFeeds/Models/Operations/ListConnectionsRequest.cs +CodatBankFeeds/Models/Operations/ListConnectionsResponse.cs +CodatBankFeeds/Models/Operations/UnlinkConnectionRequestBody.cs +CodatBankFeeds/Models/Operations/UnlinkConnectionRequest.cs +CodatBankFeeds/Models/Operations/UnlinkConnectionResponse.cs +CodatBankFeeds/Models/Operations/CreateBankFeedRequest.cs +CodatBankFeeds/Models/Operations/CreateBankFeedResponse.cs +CodatBankFeeds/Models/Operations/DeleteBankFeedBankAccountRequest.cs +CodatBankFeeds/Models/Operations/DeleteBankFeedBankAccountResponse.cs +CodatBankFeeds/Models/Operations/DeleteBankFeedCredentialsRequest.cs +CodatBankFeeds/Models/Operations/DeleteBankFeedCredentialsResponse.cs +CodatBankFeeds/Models/Operations/GenerateCredentialsRequest.cs +CodatBankFeeds/Models/Operations/GenerateCredentialsResponse.cs +CodatBankFeeds/Models/Operations/ListBankFeedsRequest.cs +CodatBankFeeds/Models/Operations/ListBankFeedsResponse.cs +CodatBankFeeds/Models/Operations/UpdateBankFeedRequest.cs +CodatBankFeeds/Models/Operations/UpdateBankFeedResponse.cs +CodatBankFeeds/Models/Operations/CreateBankTransactionsRequest.cs +CodatBankFeeds/Models/Operations/CreateBankTransactionsResponse.cs +CodatBankFeeds/Models/Operations/GetCreateOperationRequest.cs +CodatBankFeeds/Models/Operations/GetCreateOperationResponse.cs +CodatBankFeeds/Models/Operations/ListCreateOperationsRequest.cs +CodatBankFeeds/Models/Operations/ListCreateOperationsResponse.cs +CodatBankFeeds/Models/Shared/ErrorMessage.cs +CodatBankFeeds/Models/Shared/BankFeedAccountMappingResponse.cs +CodatBankFeeds/Models/Shared/BankFeedAccountMapping.cs +CodatBankFeeds/Models/Shared/BankFeedMapping.cs +CodatBankFeeds/Models/Shared/TargetAccountOption.cs +CodatBankFeeds/Models/Shared/Company.cs +CodatBankFeeds/Models/Shared/ConnectionSourceType.cs +CodatBankFeeds/Models/Shared/Connection.cs +CodatBankFeeds/Models/Shared/DataConnectionStatus.cs +CodatBankFeeds/Models/Shared/DataConnectionError.cs +CodatBankFeeds/Models/Shared/CompanyRequestBody.cs +CodatBankFeeds/Models/Shared/Companies.cs +CodatBankFeeds/Models/Shared/Links.cs +CodatBankFeeds/Models/Shared/HalRef.cs +CodatBankFeeds/Models/Shared/Connections.cs +CodatBankFeeds/Models/Shared/BankFeedAccount.cs +CodatBankFeeds/Models/Shared/BankAccountCredentials.cs +CodatBankFeeds/Models/Shared/CreateBankTransactionsResponse.cs +CodatBankFeeds/Models/Shared/Validation.cs +CodatBankFeeds/Models/Shared/ValidationItem.cs +CodatBankFeeds/Models/Shared/PushOperationStatus.cs +CodatBankFeeds/Models/Shared/DataType.cs +CodatBankFeeds/Models/Shared/CreateBankTransactions.cs +CodatBankFeeds/Models/Shared/CreateBankAccountTransaction.cs +CodatBankFeeds/Models/Shared/PushOperationChange.cs +CodatBankFeeds/Models/Shared/PushChangeType.cs +CodatBankFeeds/Models/Shared/PushOperationRef.cs +CodatBankFeeds/Models/Shared/PushOperation.cs +CodatBankFeeds/Models/Shared/ListPushOperations.cs +CodatBankFeeds/Models/Shared/Security.cs +docs/sdks/codatbankfeeds/README.md +docs/sdks/accountmapping/README.md +docs/sdks/companies/README.md +docs/sdks/connections/README.md +docs/sdks/sourceaccounts/README.md +docs/sdks/transactions/README.md +USAGE.md +docs/models/operations/CreateBankAccountMappingRequest.md +docs/models/operations/CreateBankAccountMappingResponse.md +docs/models/operations/GetBankAccountMappingRequest.md +docs/models/operations/GetBankAccountMappingResponse.md +docs/models/operations/CreateCompanyResponse.md +docs/models/operations/DeleteCompanyRequest.md +docs/models/operations/DeleteCompanyResponse.md +docs/models/operations/GetCompanyRequest.md +docs/models/operations/GetCompanyResponse.md +docs/models/operations/ListCompaniesRequest.md +docs/models/operations/ListCompaniesResponse.md +docs/models/operations/UpdateCompanyRequest.md +docs/models/operations/UpdateCompanyResponse.md +docs/models/operations/CreateConnectionRequestBody.md +docs/models/operations/CreateConnectionRequest.md +docs/models/operations/CreateConnectionResponse.md +docs/models/operations/DeleteConnectionRequest.md +docs/models/operations/DeleteConnectionResponse.md +docs/models/operations/GetConnectionRequest.md +docs/models/operations/GetConnectionResponse.md +docs/models/operations/ListConnectionsRequest.md +docs/models/operations/ListConnectionsResponse.md +docs/models/operations/UnlinkConnectionRequestBody.md +docs/models/operations/UnlinkConnectionRequest.md +docs/models/operations/UnlinkConnectionResponse.md +docs/models/operations/CreateBankFeedRequest.md +docs/models/operations/CreateBankFeedResponse.md +docs/models/operations/DeleteBankFeedBankAccountRequest.md +docs/models/operations/DeleteBankFeedBankAccountResponse.md +docs/models/operations/DeleteBankFeedCredentialsRequest.md +docs/models/operations/DeleteBankFeedCredentialsResponse.md +docs/models/operations/GenerateCredentialsRequest.md +docs/models/operations/GenerateCredentialsResponse.md +docs/models/operations/ListBankFeedsRequest.md +docs/models/operations/ListBankFeedsResponse.md +docs/models/operations/UpdateBankFeedRequest.md +docs/models/operations/UpdateBankFeedResponse.md +docs/models/operations/CreateBankTransactionsRequest.md +docs/models/operations/CreateBankTransactionsResponse.md +docs/models/operations/GetCreateOperationRequest.md +docs/models/operations/GetCreateOperationResponse.md +docs/models/operations/ListCreateOperationsRequest.md +docs/models/operations/ListCreateOperationsResponse.md +docs/models/shared/ErrorMessage.md +docs/models/shared/BankFeedAccountMappingResponse.md +docs/models/shared/BankFeedAccountMapping.md +docs/models/shared/BankFeedMapping.md +docs/models/shared/TargetAccountOption.md +docs/models/shared/Company.md +docs/models/shared/ConnectionSourceType.md +docs/models/shared/Connection.md +docs/models/shared/DataConnectionStatus.md +docs/models/shared/DataConnectionError.md +docs/models/shared/CompanyRequestBody.md +docs/models/shared/Companies.md +docs/models/shared/Links.md +docs/models/shared/HalRef.md +docs/models/shared/Connections.md +docs/models/shared/BankFeedAccount.md +docs/models/shared/BankAccountCredentials.md +docs/models/shared/CreateBankTransactionsResponse.md +docs/models/shared/Validation.md +docs/models/shared/ValidationItem.md +docs/models/shared/PushOperationStatus.md +docs/models/shared/DataType.md +docs/models/shared/CreateBankTransactions.md +docs/models/shared/CreateBankAccountTransaction.md +docs/models/shared/PushOperationChange.md +docs/models/shared/PushChangeType.md +docs/models/shared/PushOperationRef.md +docs/models/shared/PushOperation.md +docs/models/shared/ListPushOperations.md +docs/models/shared/Security.md +.gitattributes \ No newline at end of file diff --git a/bank-feeds/gen.yaml b/bank-feeds/gen.yaml index 9f70bc614..4bee9b97e 100644 --- a/bank-feeds/gen.yaml +++ b/bank-feeds/gen.yaml @@ -1,17 +1,24 @@ configVersion: 1.0.0 management: - docChecksum: 853aebc76021ec17db9b1abb7a33f340 - docVersion: 2.1.0 - speakeasyVersion: 1.53.0 - generationVersion: 2.58.0 + docChecksum: ac231ce0874ff5d34780886a1dd4e053 + docVersion: 3.0.0 + speakeasyVersion: 1.77.1 + generationVersion: 2.91.4 generation: sdkClassName: Codat.BankFeeds singleTagPerOp: false telemetryEnabled: true +features: + csharp: + core: 2.85.2 + deprecations: 2.81.1 + examples: 2.81.1 + globalSecurity: 2.81.1 + globalServerURLs: 2.82.0 + nameOverrides: 2.81.1 csharp: - version: 0.0.0 + version: 0.1.0 author: Codat - description: Set up bank feeds from accounts in your application to supported accounting - platforms. + description: Set up bank feeds from accounts in your application to supported accounting platforms. maxMethodParams: 0 packageName: Codat.BankFeeds