Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.6 (#299)
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 authored Sep 13, 2024
1 parent 787559f commit 9869ac5
Show file tree
Hide file tree
Showing 1,464 changed files with 34,966 additions and 18,477 deletions.
14 changes: 14 additions & 0 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,24 @@ sources:
tags:
- latest
- main
lending-source:
sourceNamespace: lending-source
sourceRevisionDigest: sha256:430975ebcb3efb3647bd8b8cf76e07f0219c0f0866403526b038486843c34455
sourceBlobDigest: sha256:11ae523963780dcf6d5f3e5d617b7d4f809c94c11f59f95202727916e51510f4
tags:
- latest
- main
targets:
bank-feeds-library:
source: bank-feeds-source
sourceNamespace: bank-feeds-source
sourceRevisionDigest: sha256:ccef85376bbc987ea49cd61be000ea911639ec530399e528922e09062c02fa5f
sourceBlobDigest: sha256:24d837ec7ccccb55559e6de16951a64c09874b48e5ca92b7af36ea0b95b0eac2
lending-library:
source: lending-source
sourceNamespace: lending-source
sourceRevisionDigest: sha256:430975ebcb3efb3647bd8b8cf76e07f0219c0f0866403526b038486843c34455
sourceBlobDigest: sha256:11ae523963780dcf6d5f3e5d617b7d4f809c94c11f59f95202727916e51510f4
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand All @@ -25,6 +37,8 @@ workflow:
lending-source:
inputs:
- location: https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Lending.yaml
registry:
location: registry.speakeasyapi.dev/codat/codat/lending-source
platform-source:
inputs:
- location: https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Platform.yaml
Expand Down
2 changes: 2 additions & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ sources:
lending-source:
inputs:
- location: https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Lending.yaml
registry:
location: registry.speakeasyapi.dev/codat/codat/lending-source
platform-source:
inputs:
- location: https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Platform.yaml
Expand Down
13,143 changes: 11,789 additions & 1,354 deletions lending/.speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lending/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ csharp:
outputModelSuffix: output
packageName: Codat.Lending
packageTags: ""
responseFormat: envelope
responseFormat: envelope
26 changes: 26 additions & 0 deletions lending/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Contributing to This Repository

Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements.

## How to Report Issues

If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes:

- A clear and descriptive title
- Steps to reproduce the issue
- Expected and actual behavior
- Any relevant logs, screenshots, or error messages
- Information about your environment (e.g., operating system, software versions)
- For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed

## Issue Triage and Upstream Fixes

We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code.

## Contact

If you have any questions or need further assistance, please feel free to reach out by opening an issue.

Thank you for your understanding and cooperation!

The Maintainers
72 changes: 54 additions & 18 deletions lending/Codat/Lending/AccountBalances.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
Expand All @@ -11,9 +10,10 @@
namespace Codat.Lending
{
using Codat.Lending.Hooks;
using Codat.Lending.Models.Components;
using Codat.Lending.Models.Errors;
using Codat.Lending.Models.Operations;
using Codat.Lending.Models.Shared;
using Codat.Lending.Models.Requests;
using Codat.Lending.Utils.Retries;
using Codat.Lending.Utils;
using Newtonsoft.Json;
using System.Collections.Generic;
Expand All @@ -37,30 +37,30 @@ public interface IAccountBalances
///
/// </remarks>
/// </summary>
Task<ListBankingAccountBalancesResponse> ListAsync(ListBankingAccountBalancesRequest request);
Task<ListBankingAccountBalancesResponse> ListAsync(ListBankingAccountBalancesRequest request, RetryConfig? retryConfig = null);
}

public class AccountBalances: IAccountBalances
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "5.4.0";
private const string _sdkGenVersion = "2.319.7";
private const string _sdkVersion = "6.0.0";
private const string _sdkGenVersion = "2.415.6";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 5.4.0 2.319.7 3.0.0 Codat.Lending";
private const string _userAgent = "speakeasy-sdk/csharp 6.0.0 2.415.6 3.0.0 Codat.Lending";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private Func<Security>? _securitySource;
private ISpeakeasyHttpClient _client;
private Func<Codat.Lending.Models.Components.Security>? _securitySource;

public AccountBalances(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySource, string serverUrl, SDKConfig config)
public AccountBalances(ISpeakeasyHttpClient client, Func<Codat.Lending.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
{
_defaultClient = defaultClient;
_client = client;
_securitySource = securitySource;
_serverUrl = serverUrl;
SDKConfiguration = config;
}

public async Task<ListBankingAccountBalancesResponse> ListAsync(ListBankingAccountBalancesRequest request)
public async Task<ListBankingAccountBalancesResponse> ListAsync(ListBankingAccountBalancesRequest request, RetryConfig? retryConfig = null)
{
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/data/banking-accountBalances", request);
Expand All @@ -75,16 +75,52 @@ public async Task<ListBankingAccountBalancesResponse> ListAsync(ListBankingAccou

var hookCtx = new HookContext("list-banking-account-balances", null, _securitySource);

httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
if (retryConfig == null)
{
if (this.SDKConfiguration.RetryConfig != null)
{
retryConfig = this.SDKConfiguration.RetryConfig;
}
else
{
var backoff = new BackoffStrategy(
initialIntervalMs: 500L,
maxIntervalMs: 60000L,
maxElapsedTimeMs: 3600000L,
exponent: 1.5
);
retryConfig = new RetryConfig(
strategy: RetryConfig.RetryStrategy.BACKOFF,
backoff: backoff,
retryConnectionErrors: true
);
}
}

List<string> statusCodes = new List<string>
{
"408",
"429",
"5XX",
};

Func<Task<HttpResponseMessage>> retrySend = async () =>
{
var _httpRequest = await _client.CloneAsync(httpRequest);
return await _client.SendAsync(_httpRequest);
};
var retries = new Codat.Lending.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);

HttpResponseMessage httpResponse;
try
{
httpResponse = await _defaultClient.SendAsync(httpRequest);
httpResponse = await retries.Run();
int _statusCode = (int)httpResponse.StatusCode;

if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 409 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600)
{
var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
if (_httpResponse != null)
{
httpResponse = _httpResponse;
Expand All @@ -93,7 +129,7 @@ public async Task<ListBankingAccountBalancesResponse> ListAsync(ListBankingAccou
}
catch (Exception error)
{
var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
if (_httpResponse != null)
{
httpResponse = _httpResponse;
Expand All @@ -104,7 +140,7 @@ public async Task<ListBankingAccountBalancesResponse> ListAsync(ListBankingAccou
}
}

httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);

var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
int responseStatusCode = (int)httpResponse.StatusCode;
Expand Down
Loading

0 comments on commit 9869ac5

Please sign in to comment.