Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 3.0.0, Speakeasy CLI 1.126.3 (#223)
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 Dec 14, 2023
1 parent fc2725e commit fafa2b0
Show file tree
Hide file tree
Showing 92 changed files with 1,527 additions and 256 deletions.
6 changes: 3 additions & 3 deletions sync-for-payables/CodatSyncPayables/Accounts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ public class Accounts: IAccounts
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "3.0.0";
private const string _sdkGenVersion = "2.210.6";
private const string _sdkVersion = "3.1.0";
private const string _sdkGenVersion = "2.214.3";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.210.6 3.0.0 Codat.Sync.Payables";
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.214.3 3.0.0 Codat.Sync.Payables";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
Expand Down
181 changes: 181 additions & 0 deletions sync-for-payables/CodatSyncPayables/BankAccounts.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace Codat.Sync.Payables
{
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;
using System.Threading.Tasks;
using System;

/// <summary>
/// Bank accounts
/// </summary>
public interface IBankAccounts
{

/// <summary>
/// Create bank account
///
/// <remarks>
/// The *Create bank account* endpoint creates a new <a href="https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount">bank account</a> for a given company&apos;s connection.<br/>
/// <br/>
/// <a href="https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount">Bank accounts</a> are financial accounts maintained by a bank or other financial institution.<br/>
/// <br/>
/// **Integration-specific behaviour**<br/>
/// <br/>
/// Required data may vary by integration. To see what data to post, first call <a href="https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-bankAccounts-model">Get create/update bank account model</a>.<br/>
/// <br/>
/// Check out our <a href="https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&amp;dataType=bankAccounts">coverage explorer</a> for integrations that support creating an account.
/// </remarks>
/// </summary>
Task<CreateBankAccountResponse> CreateAsync(CreateBankAccountRequest? request = null);

/// <summary>
/// Get create/update bank account model
///
/// <remarks>
/// The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a <a href="https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount">bank account</a> for a given company and integration.<br/>
/// <br/>
/// <a href="https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount">Bank accounts</a> are financial accounts maintained by a bank or other financial institution.<br/>
/// <br/>
/// **Integration-specific behaviour**<br/>
/// <br/>
/// See the *response examples* for integration-specific indicative models.<br/>
/// <br/>
/// Check out our <a href="https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&amp;dataType=bankAccounts">coverage explorer</a> for integrations that support creating and updating a bank account.<br/>
///
/// </remarks>
/// </summary>
Task<GetCreateBankAccountsModelResponse> GetCreateModelAsync(GetCreateBankAccountsModelRequest? request = null);
}

/// <summary>
/// Bank accounts
/// </summary>
public class BankAccounts: IBankAccounts
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "3.1.0";
private const string _sdkGenVersion = "2.214.3";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.214.3 3.0.0 Codat.Sync.Payables";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;

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


public async Task<CreateBankAccountResponse> CreateAsync(CreateBankAccountRequest? request = null)
{
string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails();
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/bankAccounts", request);

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

var serializedBody = RequestBodySerializer.Serialize(request, "BankAccountPrototype", "json");
if (serializedBody != null)
{
httpRequest.Content = serializedBody;
}

var client = _securityClient;

var httpResponse = await client.SendAsync(httpRequest);

var contentType = httpResponse.Content.Headers.ContentType?.MediaType;

var response = new CreateBankAccountResponse
{
StatusCode = (int)httpResponse.StatusCode,
ContentType = contentType,
RawResponse = httpResponse
};

if((response.StatusCode == 200))
{
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
{
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))
{
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<GetCreateBankAccountsModelResponse> GetCreateModelAsync(GetCreateBankAccountsModelRequest? request = null)
{
string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails();
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/options/bankAccounts", request);

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


var client = _securityClient;

var httpResponse = await client.SendAsync(httpRequest);

var contentType = httpResponse.Content.Headers.ContentType?.MediaType;

var response = new GetCreateBankAccountsModelResponse
{
StatusCode = (int)httpResponse.StatusCode,
ContentType = contentType,
RawResponse = httpResponse
};

if((response.StatusCode == 200))
{
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
{
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))
{
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;
}

}
}
6 changes: 3 additions & 3 deletions sync-for-payables/CodatSyncPayables/BillCreditNotes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ public class BillCreditNotes: IBillCreditNotes
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "3.0.0";
private const string _sdkGenVersion = "2.210.6";
private const string _sdkVersion = "3.1.0";
private const string _sdkGenVersion = "2.214.3";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.210.6 3.0.0 Codat.Sync.Payables";
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.214.3 3.0.0 Codat.Sync.Payables";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
Expand Down
6 changes: 3 additions & 3 deletions sync-for-payables/CodatSyncPayables/BillPayments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ public class BillPayments: IBillPayments
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "3.0.0";
private const string _sdkGenVersion = "2.210.6";
private const string _sdkVersion = "3.1.0";
private const string _sdkGenVersion = "2.214.3";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.210.6 3.0.0 Codat.Sync.Payables";
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.214.3 3.0.0 Codat.Sync.Payables";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
Expand Down
6 changes: 3 additions & 3 deletions sync-for-payables/CodatSyncPayables/Bills.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,10 @@ public class Bills: IBills
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "3.0.0";
private const string _sdkGenVersion = "2.210.6";
private const string _sdkVersion = "3.1.0";
private const string _sdkGenVersion = "2.214.3";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.210.6 3.0.0 Codat.Sync.Payables";
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.214.3 3.0.0 Codat.Sync.Payables";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
Expand Down
13 changes: 10 additions & 3 deletions sync-for-payables/CodatSyncPayables/CodatSyncPayables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ public interface ICodatSyncPayables
/// </summary>
public IBills Bills { get; }

/// <summary>
/// Bank accounts
/// </summary>
public IBankAccounts BankAccounts { get; }

/// <summary>
/// Bill credit notes
/// </summary>
Expand Down Expand Up @@ -188,16 +193,17 @@ public class CodatSyncPayables: ICodatSyncPayables
public SDKConfig SDKConfiguration { get; private set; }

private const string _language = "csharp";
private const string _sdkVersion = "3.0.0";
private const string _sdkGenVersion = "2.210.6";
private const string _sdkVersion = "3.1.0";
private const string _sdkGenVersion = "2.214.3";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.210.6 3.0.0 Codat.Sync.Payables";
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.214.3 3.0.0 Codat.Sync.Payables";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
public ICompanies Companies { get; private set; }
public IConnections Connections { get; private set; }
public IBills Bills { get; private set; }
public IBankAccounts BankAccounts { get; private set; }
public IBillCreditNotes BillCreditNotes { get; private set; }
public IBillPayments BillPayments { get; private set; }
public IAccounts Accounts { get; private set; }
Expand Down Expand Up @@ -236,6 +242,7 @@ public CodatSyncPayables(Security? security = null, int? serverIndex = null, str
Companies = new Companies(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Connections = new Connections(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Bills = new Bills(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
BankAccounts = new BankAccounts(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
BillCreditNotes = new BillCreditNotes(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
BillPayments = new BillPayments(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Accounts = new Accounts(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>Codat.Sync.Payables</PackageId>
<Version>3.0.0</Version>
<Version>3.1.0</Version>
<Authors>Codat</Authors>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
Expand Down
6 changes: 3 additions & 3 deletions sync-for-payables/CodatSyncPayables/Companies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ public class Companies: ICompanies
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "3.0.0";
private const string _sdkGenVersion = "2.210.6";
private const string _sdkVersion = "3.1.0";
private const string _sdkGenVersion = "2.214.3";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.210.6 3.0.0 Codat.Sync.Payables";
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.214.3 3.0.0 Codat.Sync.Payables";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
Expand Down
6 changes: 3 additions & 3 deletions sync-for-payables/CodatSyncPayables/CompanyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ public class CompanyInfo: ICompanyInfo
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "3.0.0";
private const string _sdkGenVersion = "2.210.6";
private const string _sdkVersion = "3.1.0";
private const string _sdkGenVersion = "2.214.3";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.210.6 3.0.0 Codat.Sync.Payables";
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.214.3 3.0.0 Codat.Sync.Payables";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
Expand Down
6 changes: 3 additions & 3 deletions sync-for-payables/CodatSyncPayables/Connections.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ public class Connections: IConnections
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "3.0.0";
private const string _sdkGenVersion = "2.210.6";
private const string _sdkVersion = "3.1.0";
private const string _sdkGenVersion = "2.214.3";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.210.6 3.0.0 Codat.Sync.Payables";
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.214.3 3.0.0 Codat.Sync.Payables";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
Expand Down
6 changes: 3 additions & 3 deletions sync-for-payables/CodatSyncPayables/JournalEntries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ public class JournalEntries: IJournalEntries
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "3.0.0";
private const string _sdkGenVersion = "2.210.6";
private const string _sdkVersion = "3.1.0";
private const string _sdkGenVersion = "2.214.3";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.210.6 3.0.0 Codat.Sync.Payables";
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.214.3 3.0.0 Codat.Sync.Payables";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
Expand Down
6 changes: 3 additions & 3 deletions sync-for-payables/CodatSyncPayables/Journals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ public class Journals: IJournals
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "3.0.0";
private const string _sdkGenVersion = "2.210.6";
private const string _sdkVersion = "3.1.0";
private const string _sdkGenVersion = "2.214.3";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.210.6 3.0.0 Codat.Sync.Payables";
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.214.3 3.0.0 Codat.Sync.Payables";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
Expand Down
6 changes: 3 additions & 3 deletions sync-for-payables/CodatSyncPayables/ManageData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ public class ManageData: IManageData
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "3.0.0";
private const string _sdkGenVersion = "2.210.6";
private const string _sdkVersion = "3.1.0";
private const string _sdkGenVersion = "2.214.3";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.210.6 3.0.0 Codat.Sync.Payables";
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.214.3 3.0.0 Codat.Sync.Payables";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
Expand Down
Loading

0 comments on commit fafa2b0

Please sign in to comment.