Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 3.0.0, Speakeasy CLI 1.125.2 (#211)
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 Dec 6, 2023
1 parent ad02fdb commit c5faec7
Show file tree
Hide file tree
Showing 563 changed files with 3,475 additions and 3,058 deletions.
Empty file modified sync-for-payables/.gitattributes
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion sync-for-payables/CodatSyncPayables.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}") = "CodatSyncPayables", "CodatSyncPayables\CodatSyncPayables.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Codat.Sync.Payables", "CodatSyncPayables\CodatSyncPayables.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}"
EndProject

Global
Expand Down
64 changes: 22 additions & 42 deletions sync-for-payables/CodatSyncPayables/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 CodatSyncPayables
namespace Codat.Sync.Payables
{
using CodatSyncPayables.Models.Operations;
using CodatSyncPayables.Models.Shared;
using CodatSyncPayables.Utils;
using Codat.Sync.Payables.Models.Operations;
using Codat.Sync.Payables.Models.Shared;
using Codat.Sync.Payables.Utils;
using Newtonsoft.Json;
using System.Net.Http.Headers;
using System.Net.Http;
Expand All @@ -22,7 +22,7 @@ namespace CodatSyncPayables
/// <summary>
/// Accounts
/// </summary>
public interface IAccountsSDK
public interface IAccounts
{

/// <summary>
Expand Down Expand Up @@ -94,41 +94,36 @@ 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.210.6";
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.Payables";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.210.6 3.0.0 Codat.Sync.Payables";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;

public AccountsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config)
public Accounts(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config)
{
_defaultClient = defaultClient;
_securityClient = securityClient;
_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;
Expand Down Expand Up @@ -156,7 +151,7 @@ public AccountsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient secu

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 @@ -171,14 +166,9 @@ public AccountsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient secu

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);

Expand All @@ -205,7 +195,7 @@ public async Task<GetAccountResponse> GetAsync(GetAccountRequest? request = null

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))
{
Expand All @@ -220,14 +210,9 @@ public async Task<GetAccountResponse> GetAsync(GetAccountRequest? request = null

public async Task<GetCreateAccountModelResponse> GetCreateModelAsync(GetCreateAccountModelRequest? 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);

Expand All @@ -254,7 +239,7 @@ public async Task<GetCreateAccountModelResponse> GetCreateModelAsync(GetCreateAc

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))
{
Expand All @@ -269,14 +254,9 @@ public async Task<GetCreateAccountModelResponse> GetCreateModelAsync(GetCreateAc

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);

Expand All @@ -298,12 +278,12 @@ 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))
{
Expand Down
71 changes: 23 additions & 48 deletions sync-for-payables/CodatSyncPayables/BillCreditNotes.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace CodatSyncPayables
namespace Codat.Sync.Payables
{
using CodatSyncPayables.Models.Operations;
using CodatSyncPayables.Models.Shared;
using CodatSyncPayables.Utils;
using Codat.Sync.Payables.Models.Operations;
using Codat.Sync.Payables.Models.Shared;
using Codat.Sync.Payables.Utils;
using Newtonsoft.Json;
using System.Net.Http.Headers;
using System.Net.Http;
Expand All @@ -22,7 +22,7 @@ namespace CodatSyncPayables
/// <summary>
/// Bill credit notes
/// </summary>
public interface IBillCreditNotesSDK
public interface IBillCreditNotes
{

/// <summary>
Expand Down Expand Up @@ -113,37 +113,32 @@ public interface IBillCreditNotesSDK
/// <summary>
/// Bill credit notes
/// </summary>
public class BillCreditNotesSDK: IBillCreditNotesSDK
public class BillCreditNotes: IBillCreditNotes
{
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.210.6";
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.Payables";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.210.6 3.0.0 Codat.Sync.Payables";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;

public BillCreditNotesSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config)
public BillCreditNotes(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config)
{
_defaultClient = defaultClient;
_securityClient = securityClient;
_serverUrl = serverUrl;
Config = config;
SDKConfiguration = config;
}


public async Task<Models.Operations.CreateBillCreditNoteResponse> CreateAsync(CreateBillCreditNoteRequest? 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/billCreditNotes", request);


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

Expand Down Expand Up @@ -175,7 +170,7 @@ public BillCreditNotesSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClie

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 @@ -190,14 +185,9 @@ public BillCreditNotesSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClie

public async Task<GetBillCreditNoteResponse> GetAsync(GetBillCreditNoteRequest? 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/billCreditNotes/{billCreditNoteId}", request);


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

Expand All @@ -224,7 +214,7 @@ public async Task<GetBillCreditNoteResponse> GetAsync(GetBillCreditNoteRequest?

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))
{
Expand All @@ -239,14 +229,9 @@ public async Task<GetBillCreditNoteResponse> GetAsync(GetBillCreditNoteRequest?

public async Task<GetCreateUpdateBillCreditNoteModelResponse> GetCreateUpdateModelAsync(GetCreateUpdateBillCreditNoteModelRequest? 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/billCreditNotes", request);


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

Expand All @@ -273,7 +258,7 @@ public async Task<GetCreateUpdateBillCreditNoteModelResponse> GetCreateUpdateMod

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))
{
Expand All @@ -288,14 +273,9 @@ public async Task<GetCreateUpdateBillCreditNoteModelResponse> GetCreateUpdateMod

public async Task<ListBillCreditNotesResponse> ListAsync(ListBillCreditNotesRequest? 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/billCreditNotes", request);


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

Expand All @@ -317,12 +297,12 @@ public async Task<ListBillCreditNotesResponse> ListAsync(ListBillCreditNotesRequ
{
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
{
response.BillCreditNotes = JsonConvert.DeserializeObject<BillCreditNotes>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
response.BillCreditNotes = JsonConvert.DeserializeObject<Models.Shared.BillCreditNotes>(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))
{
Expand All @@ -337,14 +317,9 @@ public async Task<ListBillCreditNotesResponse> ListAsync(ListBillCreditNotesRequ

public async Task<Models.Operations.UpdateBillCreditNoteResponse> UpdateAsync(UpdateBillCreditNoteRequest? 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/billCreditNotes/{billCreditNoteId}", request);


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

Expand Down Expand Up @@ -376,7 +351,7 @@ public async Task<ListBillCreditNotesResponse> ListAsync(ListBillCreditNotesRequ

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 Down
Loading

0 comments on commit c5faec7

Please sign in to comment.