Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 3.0.0, Speakeasy CLI 1.179.0 (#246)
Browse files Browse the repository at this point in the history
Co-authored-by: speakeasybot <[email protected]>
  • Loading branch information
github-actions[bot] and speakeasybot authored Feb 14, 2024
1 parent 567d730 commit 60d304f
Show file tree
Hide file tree
Showing 51 changed files with 715 additions and 487 deletions.
16 changes: 10 additions & 6 deletions bank-feeds/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
lockVersion: 2.0.0
id: 0e14a69b-dba1-4c0f-85f5-3b5d7f7f7731
management:
docChecksum: d8a3c846c6e6c943937af494c3623e4f
docChecksum: 4dc8263ccdcfe623fbd51a2f54a06f5d
docVersion: 3.0.0
speakeasyVersion: internal
generationVersion: 2.231.0
releaseVersion: 4.1.0
configChecksum: c8523722d6a3d25e87ba781150e508bb
generationVersion: 2.257.2
releaseVersion: 4.2.0
configChecksum: 18858f1ad996dc3cbd0f95bd1b84ef6b
repoURL: https://github.com/codatio/client-sdk-csharp.git
repoSubDirectory: bank-feeds
published: true
features:
csharp:
core: 3.3.0
core: 3.3.2
deprecations: 2.81.2
examples: 2.81.3
globalSecurity: 2.81.2
globalSecurity: 2.83.0
globalServerURLs: 2.82.2
inputOutputModels: 2.83.0
nameOverrides: 2.81.1
Expand Down Expand Up @@ -97,6 +97,8 @@ generatedFiles:
- CodatBankFeeds/Models/Operations/SetConfigurationResponse.cs
- CodatBankFeeds/Models/Shared/Zero.cs
- CodatBankFeeds/Models/Shared/ErrorMessage.cs
- CodatBankFeeds/Models/Shared/ErrorValidation.cs
- CodatBankFeeds/Models/Shared/ErrorValidationItem.cs
- CodatBankFeeds/Models/Shared/GroupReference.cs
- CodatBankFeeds/Models/Shared/Company.cs
- CodatBankFeeds/Models/Shared/SourceType.cs
Expand Down Expand Up @@ -216,6 +218,8 @@ generatedFiles:
- docs/Models/Operations/SetConfigurationResponse.md
- docs/Models/Shared/Zero.md
- docs/Models/Shared/ErrorMessage.md
- docs/Models/Shared/ErrorValidation.md
- docs/Models/Shared/ErrorValidationItem.md
- docs/Models/Shared/GroupReference.md
- docs/Models/Shared/Company.md
- docs/Models/Shared/SourceType.md
Expand Down
38 changes: 24 additions & 14 deletions bank-feeds/CodatBankFeeds/AccountMapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@ public class AccountMapping: IAccountMapping
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "4.1.0";
private const string _sdkGenVersion = "2.231.0";
private const string _sdkVersion = "4.2.0";
private const string _sdkGenVersion = "2.257.2";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 4.1.0 2.231.0 3.0.0 Codat.BankFeeds";
private const string _userAgent = "speakeasy-sdk/csharp 4.2.0 2.257.2 3.0.0 Codat.BankFeeds";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
private Func<Security>? _securitySource;

public AccountMapping(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config)
public AccountMapping(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySource, string serverUrl, SDKConfig config)
{
_defaultClient = defaultClient;
_securityClient = securityClient;
_securitySource = securitySource;
_serverUrl = serverUrl;
SDKConfiguration = config;
}
Expand All @@ -92,8 +92,12 @@ public async Task<CreateBankAccountMappingResponse> CreateAsync(CreateBankAccoun
httpRequest.Content = serializedBody;
}

var client = _securityClient;

var client = _defaultClient;
if (_securitySource != null)
{
client = SecuritySerializer.Apply(_defaultClient, _securitySource);
}

var httpResponse = await client.SendAsync(httpRequest);

var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
Expand All @@ -111,7 +115,7 @@ public async Task<CreateBankAccountMappingResponse> CreateAsync(CreateBankAccoun
{
response.BankFeedAccountMappingResponse = JsonConvert.DeserializeObject<BankFeedAccountMappingResponse>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
}

return response;
}
if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503))
Expand All @@ -120,11 +124,12 @@ public async Task<CreateBankAccountMappingResponse> CreateAsync(CreateBankAccoun
{
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
}

return response;
}
return response;
}



public async Task<GetBankAccountMappingResponse> GetAsync(GetBankAccountMappingRequest? request = null)
Expand All @@ -136,8 +141,12 @@ public async Task<GetBankAccountMappingResponse> GetAsync(GetBankAccountMappingR
httpRequest.Headers.Add("user-agent", _userAgent);


var client = _securityClient;

var client = _defaultClient;
if (_securitySource != null)
{
client = SecuritySerializer.Apply(_defaultClient, _securitySource);
}

var httpResponse = await client.SendAsync(httpRequest);

var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
Expand All @@ -155,7 +164,7 @@ public async Task<GetBankAccountMappingResponse> GetAsync(GetBankAccountMappingR
{
response.BankFeedMapping = JsonConvert.DeserializeObject<BankFeedMapping>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
}

return response;
}
if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503))
Expand All @@ -164,11 +173,12 @@ public async Task<GetBankAccountMappingResponse> GetAsync(GetBankAccountMappingR
{
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
}

return response;
}
return response;
}


}
}
51 changes: 33 additions & 18 deletions bank-feeds/CodatBankFeeds/BankAccounts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,18 @@ public class BankAccounts: IBankAccounts
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "4.1.0";
private const string _sdkGenVersion = "2.231.0";
private const string _sdkVersion = "4.2.0";
private const string _sdkGenVersion = "2.257.2";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 4.1.0 2.231.0 3.0.0 Codat.BankFeeds";
private const string _userAgent = "speakeasy-sdk/csharp 4.2.0 2.257.2 3.0.0 Codat.BankFeeds";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
private Func<Security>? _securitySource;

public BankAccounts(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config)
public BankAccounts(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySource, string serverUrl, SDKConfig config)
{
_defaultClient = defaultClient;
_securityClient = securityClient;
_securitySource = securitySource;
_serverUrl = serverUrl;
SDKConfiguration = config;
}
Expand All @@ -113,8 +113,12 @@ public async Task<CreateBankAccountResponse> CreateAsync(CreateBankAccountReques
httpRequest.Content = serializedBody;
}

var client = _securityClient;

var client = _defaultClient;
if (_securitySource != null)
{
client = SecuritySerializer.Apply(_defaultClient, _securitySource);
}

var httpResponse = await client.SendAsync(httpRequest);

var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
Expand All @@ -132,7 +136,7 @@ public async Task<CreateBankAccountResponse> CreateAsync(CreateBankAccountReques
{
response.BankAccountCreateResponse = JsonConvert.DeserializeObject<BankAccountCreateResponse>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
}

return response;
}
if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503))
Expand All @@ -141,11 +145,12 @@ public async Task<CreateBankAccountResponse> CreateAsync(CreateBankAccountReques
{
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
}

return response;
}
return response;
}



public async Task<GetCreateBankAccountsModelResponse> GetCreateModelAsync(GetCreateBankAccountsModelRequest? request = null)
Expand All @@ -157,8 +162,12 @@ public async Task<GetCreateBankAccountsModelResponse> GetCreateModelAsync(GetCre
httpRequest.Headers.Add("user-agent", _userAgent);


var client = _securityClient;

var client = _defaultClient;
if (_securitySource != null)
{
client = SecuritySerializer.Apply(_defaultClient, _securitySource);
}

var httpResponse = await client.SendAsync(httpRequest);

var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
Expand All @@ -176,7 +185,7 @@ public async Task<GetCreateBankAccountsModelResponse> GetCreateModelAsync(GetCre
{
response.PushOption = JsonConvert.DeserializeObject<PushOption>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
}

return response;
}
if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503))
Expand All @@ -185,11 +194,12 @@ public async Task<GetCreateBankAccountsModelResponse> GetCreateModelAsync(GetCre
{
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
}

return response;
}
return response;
}



public async Task<ListBankAccountsResponse> ListAsync(ListBankAccountsRequest? request = null)
Expand All @@ -201,8 +211,12 @@ public async Task<ListBankAccountsResponse> ListAsync(ListBankAccountsRequest? r
httpRequest.Headers.Add("user-agent", _userAgent);


var client = _securityClient;

var client = _defaultClient;
if (_securitySource != null)
{
client = SecuritySerializer.Apply(_defaultClient, _securitySource);
}

var httpResponse = await client.SendAsync(httpRequest);

var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
Expand All @@ -220,7 +234,7 @@ public async Task<ListBankAccountsResponse> ListAsync(ListBankAccountsRequest? r
{
response.BankAccounts = JsonConvert.DeserializeObject<Models.Shared.BankAccounts>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
}

return response;
}
if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503))
Expand All @@ -229,11 +243,12 @@ public async Task<ListBankAccountsResponse> ListAsync(ListBankAccountsRequest? r
{
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
}

return response;
}
return response;
}


}
}
52 changes: 32 additions & 20 deletions bank-feeds/CodatBankFeeds/CodatBankFeeds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,14 @@ public class CodatBankFeeds: ICodatBankFeeds
public SDKConfig SDKConfiguration { get; private set; }

private const string _language = "csharp";
private const string _sdkVersion = "4.1.0";
private const string _sdkGenVersion = "2.231.0";
private const string _sdkVersion = "4.2.0";
private const string _sdkGenVersion = "2.257.2";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 4.1.0 2.231.0 3.0.0 Codat.BankFeeds";
private const string _userAgent = "speakeasy-sdk/csharp 4.2.0 2.257.2 3.0.0 Codat.BankFeeds";
private string _serverUrl = "";
private int _serverIndex = 0;
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
private Func<Security>? _securitySource;
public ICompanies Companies { get; private set; }
public IConnections Connections { get; private set; }
public IAccountMapping AccountMapping { get; private set; }
Expand All @@ -143,35 +144,46 @@ public class CodatBankFeeds: ICodatBankFeeds
public ITransactions Transactions { get; private set; }
public IConfiguration Configuration { get; private set; }

public CodatBankFeeds(Security? security = null, int? serverIndex = null, string? serverUrl = null, Dictionary<string, string>? urlParams = null, ISpeakeasyHttpClient? client = null)
public CodatBankFeeds(Security? security = null, Func<Security>? securitySource = null, int? serverIndex = null, string? serverUrl = null, Dictionary<string, string>? urlParams = null, ISpeakeasyHttpClient? client = null)
{
if (serverUrl != null) {
if (urlParams != null) {
if (serverIndex != null)
{
_serverIndex = serverIndex.Value;
}

if (serverUrl != null)
{
if (urlParams != null)
{
serverUrl = Utilities.TemplateUrl(serverUrl, urlParams);
}
_serverUrl = serverUrl;
}

_defaultClient = new SpeakeasyHttpClient(client);
_securityClient = _defaultClient;

if(security != null)

if(securitySource != null)
{
_securitySource = securitySource;
}
else if(security != null)
{
_securityClient = SecuritySerializer.Apply(_defaultClient, security);
_securitySource = () => security;
}

SDKConfiguration = new SDKConfig()
{
serverIndex = _serverIndex,
serverUrl = _serverUrl
};

Companies = new Companies(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Connections = new Connections(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
AccountMapping = new AccountMapping(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
SourceAccounts = new SourceAccounts(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
BankAccounts = new BankAccounts(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Transactions = new Transactions(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Configuration = new Configuration(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Companies = new Companies(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
Connections = new Connections(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
AccountMapping = new AccountMapping(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
SourceAccounts = new SourceAccounts(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
BankAccounts = new BankAccounts(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
Transactions = new Transactions(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
Configuration = new Configuration(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
}
}
}
}
2 changes: 1 addition & 1 deletion bank-feeds/CodatBankFeeds/CodatBankFeeds.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>Codat.BankFeeds</PackageId>
<Version>4.1.0</Version>
<Version>4.2.0</Version>
<Authors>Codat</Authors>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
Expand Down
Loading

0 comments on commit 60d304f

Please sign in to comment.