Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 3.0.0, Speakeasy CLI 1.179.0 (#249)
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 Feb 14, 2024
1 parent cbe891c commit 95a8e04
Show file tree
Hide file tree
Showing 377 changed files with 4,188 additions and 2,174 deletions.
Empty file modified sync-for-payroll/.gitattributes
100755 → 100644
Empty file.
362 changes: 362 additions & 0 deletions sync-for-payroll/.speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sync-for-payroll/CodatSyncPayroll.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}") = "CodatSyncPayroll", "CodatSyncPayroll\CodatSyncPayroll.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Codat.Sync.Payroll", "CodatSyncPayroll\CodatSyncPayroll.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}"
EndProject

Global
Expand Down
120 changes: 60 additions & 60 deletions sync-for-payroll/CodatSyncPayroll/Accounts.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace CodatSyncPayroll
namespace Codat.Sync.Payroll
{
using CodatSyncPayroll.Models.Operations;
using CodatSyncPayroll.Models.Shared;
using CodatSyncPayroll.Utils;
using Codat.Sync.Payroll.Models.Operations;
using Codat.Sync.Payroll.Models.Shared;
using Codat.Sync.Payroll.Utils;
using Newtonsoft.Json;
using System.Net.Http.Headers;
using System.Net.Http;
Expand All @@ -22,7 +22,7 @@ namespace CodatSyncPayroll
/// <summary>
/// Accounts
/// </summary>
public interface IAccountsSDK
public interface IAccounts
{

/// <summary>
Expand Down Expand Up @@ -94,48 +94,47 @@ public interface IAccountsSDK
/// <summary>
/// Accounts
/// </summary>
public class AccountsSDK: IAccountsSDK
public class Accounts: IAccounts
{
public SDKConfig Config { get; private set; }
public SDKConfig SDKConfiguration { 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.257.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.Sync.Payroll";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.257.2 3.0.0 Codat.Sync.Payroll";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
private Func<Security>? _securitySource;

public AccountsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config)
public Accounts(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySource, string serverUrl, SDKConfig config)
{
_defaultClient = defaultClient;
_securityClient = securityClient;
_securitySource = securitySource;
_serverUrl = serverUrl;
Config = config;
SDKConfiguration = config;
}


public async Task<Models.Operations.CreateAccountResponse> CreateAsync(CreateAccountRequest? request = null)
{
string baseUrl = _serverUrl;
if (baseUrl.EndsWith("/"))
{
baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
}
string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails();
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/accounts", request);


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

var serializedBody = RequestBodySerializer.Serialize(request, "Account", "json");
var serializedBody = RequestBodySerializer.Serialize(request, "AccountPrototype", "json");
if (serializedBody != null)
{
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 @@ -153,38 +152,38 @@ public AccountsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient secu
{
response.CreateAccountResponseValue = JsonConvert.DeserializeObject<Models.Shared.CreateAccountResponse>(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 == 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))
{
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<GetAccountResponse> GetAsync(GetAccountRequest? request = null)
{
string baseUrl = _serverUrl;
if (baseUrl.EndsWith("/"))
{
baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
}
string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails();
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/accounts/{accountId}", request);


var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
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 @@ -202,38 +201,38 @@ public async Task<GetAccountResponse> GetAsync(GetAccountRequest? request = null
{
response.Account = JsonConvert.DeserializeObject<Account>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
}

return response;
}
if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429))
if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503))
{
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
{
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<GetCreateAccountsModelResponse> GetCreateModelAsync(GetCreateAccountsModelRequest? request = null)
{
string baseUrl = _serverUrl;
if (baseUrl.EndsWith("/"))
{
baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
}
string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails();
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts", request);


var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
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 @@ -251,38 +250,38 @@ public async Task<GetCreateAccountsModelResponse> GetCreateModelAsync(GetCreateA
{
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 == 404) || (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))
{
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<ListAccountsResponse> ListAsync(ListAccountsRequest? request = null)
{
string baseUrl = _serverUrl;
if (baseUrl.EndsWith("/"))
{
baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
}
string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails();
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/accounts", request);


var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
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 @@ -298,22 +297,23 @@ public async Task<ListAccountsResponse> ListAsync(ListAccountsRequest? request =
{
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
{
response.Accounts = JsonConvert.DeserializeObject<Accounts>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
response.Accounts = JsonConvert.DeserializeObject<Models.Shared.Accounts>(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 == 404) || (response.StatusCode == 409))
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))
{
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
{
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;
}


}
}
Loading

0 comments on commit 95a8e04

Please sign in to comment.