Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 3.0.0, Speakeasy CLI 1.121.3 (#199)
Browse files Browse the repository at this point in the history
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
  • Loading branch information
github-actions[bot] and speakeasybot committed Nov 21, 2023
1 parent a6e1f18 commit 9740466
Show file tree
Hide file tree
Showing 193 changed files with 752 additions and 798 deletions.
Empty file modified bank-feeds/.gitattributes
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion bank-feeds/CodatBankFeeds.sln
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodatBankFeeds", "CodatBankFeeds\CodatBankFeeds.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Codat.BankFeeds", "CodatBankFeeds\CodatBankFeeds.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}"
EndProject

Global
Expand Down
40 changes: 15 additions & 25 deletions bank-feeds/CodatBankFeeds/AccountMapping.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace CodatBankFeeds
namespace Codat.BankFeeds
{
using CodatBankFeeds.Models.Operations;
using CodatBankFeeds.Models.Shared;
using CodatBankFeeds.Utils;
using Codat.BankFeeds.Models.Operations;
using Codat.BankFeeds.Models.Shared;
using Codat.BankFeeds.Utils;
using Newtonsoft.Json;
using System.Net.Http.Headers;
using System.Net.Http;
Expand All @@ -22,7 +22,7 @@ namespace CodatBankFeeds
/// <summary>
/// Bank feed bank account mapping.
/// </summary>
public interface IAccountMappingSDK
public interface IAccountMapping
{

/// <summary>
Expand Down Expand Up @@ -57,19 +57,19 @@ public interface IAccountMappingSDK
/// <summary>
/// Bank feed bank account mapping.
/// </summary>
public class AccountMappingSDK: IAccountMappingSDK
public class AccountMapping: IAccountMapping
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "2.2.0";
private const string _sdkGenVersion = "2.159.2";
private const string _sdkVersion = "3.0.0";
private const string _sdkGenVersion = "2.195.2";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 2.2.0 2.159.2 3.0.0 Codat.BankFeeds";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.195.2 3.0.0 Codat.BankFeeds";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;

public AccountMappingSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config)
public AccountMapping(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config)
{
_defaultClient = defaultClient;
_securityClient = securityClient;
Expand All @@ -80,18 +80,13 @@ public AccountMappingSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClien

public async Task<CreateBankAccountMappingResponse> CreateAsync(CreateBankAccountMappingRequest? request = null)
{
string baseUrl = _serverUrl;
if (baseUrl.EndsWith("/"))
{
baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
}
string baseUrl = this.Config.GetTemplatedServerDetails();
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping", request);


var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
httpRequest.Headers.Add("user-agent", _userAgent);

var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "json");
var serializedBody = RequestBodySerializer.Serialize(request, "Zero", "json");
if (serializedBody != null)
{
httpRequest.Content = serializedBody;
Expand Down Expand Up @@ -119,7 +114,7 @@ public async Task<CreateBankAccountMappingResponse> CreateAsync(CreateBankAccoun

return response;
}
if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429))
if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503))
{
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
{
Expand All @@ -134,14 +129,9 @@ public async Task<CreateBankAccountMappingResponse> CreateAsync(CreateBankAccoun

public async Task<GetBankAccountMappingResponse> GetAsync(GetBankAccountMappingRequest? request = null)
{
string baseUrl = _serverUrl;
if (baseUrl.EndsWith("/"))
{
baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
}
string baseUrl = this.Config.GetTemplatedServerDetails();
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping", request);


var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
httpRequest.Headers.Add("user-agent", _userAgent);

Expand All @@ -168,7 +158,7 @@ public async Task<GetBankAccountMappingResponse> GetAsync(GetBankAccountMappingR

return response;
}
if((response.StatusCode == 401) || (response.StatusCode == 429))
if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503))
{
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
{
Expand Down
84 changes: 52 additions & 32 deletions ...feeds/CodatBankFeeds/CodatBankFeedsSDK.cs → bank-feeds/CodatBankFeeds/CodatBankFeeds.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace CodatBankFeeds
namespace Codat.BankFeeds
{
using CodatBankFeeds.Models.Shared;
using CodatBankFeeds.Utils;
using Codat.BankFeeds.Models.Shared;
using Codat.BankFeeds.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using System;



/// <summary>
/// Bank Feeds API: Bank Feeds API enables your SMB users to set up bank feeds from accounts in your application to supported accounting platforms.<br/>
///
Expand All @@ -39,37 +41,53 @@ namespace CodatBankFeeds
/// | Account mapping | Extra functionality for building an account management UI |
/// </remarks>
/// </summary>
public interface ICodatBankFeedsSDK
public interface ICodatBankFeeds
{

/// <summary>
/// Bank feed bank account mapping.
/// Create and manage your Codat companies.
/// </summary>
public IAccountMappingSDK AccountMapping { get; }
public ICompanies Companies { get; }

/// <summary>
/// Create and manage your Codat companies.
/// Manage your companies&apos; data connections.
/// </summary>
public ICompaniesSDK Companies { get; }
public IConnections Connections { get; }

/// <summary>
/// Manage your companies&apos; data connections.
/// Bank feed bank account mapping.
/// </summary>
public IConnectionsSDK Connections { get; }
public IAccountMapping AccountMapping { get; }

/// <summary>
/// Source accounts act as a bridge to bank accounts in accounting software.
/// </summary>
public ISourceAccountsSDK SourceAccounts { get; }
public ISourceAccounts SourceAccounts { get; }

/// <summary>
/// Transactions represent debits and credits from a source account.
/// </summary>
public ITransactionsSDK Transactions { get; }
public ITransactions Transactions { get; }
}

public class SDKConfig
{
public static string[] ServerList = new string[]
{
"https://api.codat.io",
};
/// Contains the list of servers available to the SDK
public string serverUrl = "";
public int serverIndex = 0;

public string GetTemplatedServerDetails()
{
if (!String.IsNullOrEmpty(this.serverUrl))
{
return Utilities.TemplateUrl(Utilities.RemoveSuffix(this.serverUrl, "/"), new Dictionary<string, string>());
}
return Utilities.TemplateUrl(SDKConfig.ServerList[this.serverIndex], new Dictionary<string, string>());
}
}

/// <summary>
Expand All @@ -94,31 +112,32 @@ public class SDKConfig
/// | Account mapping | Extra functionality for building an account management UI |
/// </remarks>
/// </summary>
public class CodatBankFeedsSDK: ICodatBankFeedsSDK
public class CodatBankFeeds: ICodatBankFeeds
{
public SDKConfig Config { get; private set; }
public static List<string> ServerList = new List<string>()
{
"https://api.codat.io",
};

private const string _language = "csharp";
private const string _sdkVersion = "2.2.0";
private const string _sdkGenVersion = "2.159.2";
private const string _sdkVersion = "3.0.0";
private const string _sdkGenVersion = "2.195.2";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 2.2.0 2.159.2 3.0.0 Codat.BankFeeds";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.195.2 3.0.0 Codat.BankFeeds";
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 ICompanies Companies { get; private set; }
public IConnections Connections { get; private set; }
public IAccountMapping AccountMapping { get; private set; }
public ISourceAccounts SourceAccounts { get; private set; }
public ITransactions Transactions { get; private set; }

public CodatBankFeedsSDK(Security? security = null, string? serverUrl = null, ISpeakeasyHttpClient? client = null)
public CodatBankFeeds(Security? security = null, int? serverIndex = null, string? serverUrl = null, Dictionary<string, string>? urlParams = null, ISpeakeasyHttpClient? client = null)
{
_serverUrl = serverUrl ?? CodatBankFeedsSDK.ServerList[0];
if (serverUrl != null) {
if (urlParams != null) {
serverUrl = Utilities.TemplateUrl(serverUrl, urlParams);
}
_serverUrl = serverUrl;
}

_defaultClient = new SpeakeasyHttpClient(client);
_securityClient = _defaultClient;
Expand All @@ -130,13 +149,14 @@ public CodatBankFeedsSDK(Security? security = null, string? serverUrl = null, IS

Config = new SDKConfig()
{
serverUrl = _serverUrl
};

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);
Companies = new Companies(_defaultClient, _securityClient, _serverUrl, Config);
Connections = new Connections(_defaultClient, _securityClient, _serverUrl, Config);
AccountMapping = new AccountMapping(_defaultClient, _securityClient, _serverUrl, Config);
SourceAccounts = new SourceAccounts(_defaultClient, _securityClient, _serverUrl, Config);
Transactions = new Transactions(_defaultClient, _securityClient, _serverUrl, Config);
}
}
}
3 changes: 2 additions & 1 deletion bank-feeds/CodatBankFeeds/CodatBankFeeds.csproj
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>Codat.BankFeeds</PackageId>
<Version>2.2.0</Version>
<Version>3.0.0</Version>
<Authors>Codat</Authors>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<PackageReadmeFile>README.md</PackageReadmeFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>1591</NoWarn>
<RepositoryUrl>https://github.com/codatio/client-sdk-csharp</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 9740466

Please sign in to comment.