Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 3.0.0, Speakeasy CLI 1.277.6 (#265)
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 May 2, 2024
1 parent 08e84e6 commit 0f09780
Show file tree
Hide file tree
Showing 267 changed files with 6,183 additions and 3,546 deletions.
392 changes: 203 additions & 189 deletions sync-for-payroll/.speakeasy/gen.lock

Large diffs are not rendered by default.

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}") = "Codat.Sync.Payroll", "CodatSyncPayroll\CodatSyncPayroll.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Codat.Sync.Payroll", "Codat\Sync\Payroll\Codat.Sync.Payroll.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}"
EndProject

Global
Expand Down
482 changes: 482 additions & 0 deletions sync-for-payroll/Codat/Sync/Payroll/Accounts.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>Codat.Sync.Payroll</PackageId>
<Version>3.0.0</Version>
<Version>3.1.0</Version>
<Authors>Codat</Authors>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#nullable enable
namespace Codat.Sync.Payroll
{
using Codat.Sync.Payroll.Hooks;
using Codat.Sync.Payroll.Models.Errors;
using Codat.Sync.Payroll.Models.Shared;
using Codat.Sync.Payroll.Utils;
using Newtonsoft.Json;
Expand All @@ -18,8 +20,6 @@ namespace Codat.Sync.Payroll
using System.Threading.Tasks;
using System;



/// <summary>
/// Sync for Payroll: The API for Sync for Payroll. <br/>
///
Expand All @@ -31,81 +31,97 @@ namespace Codat.Sync.Payroll
/// <br/>
/// ---<br/>
/// <br/>
/// &lt;!-- Start Codat Tags Table --&gt;<br/>
/// ## Endpoints<br/>
/// <br/>
/// | Endpoints | Description |<br/>
/// |:---------------------|:-----------------------------------------------------------------------------------------------------------|<br/>
/// | Companies | Create and manage your SMB users&apos; companies. |<br/>
/// | Connections | Create new and manage existing data connections for a company. |<br/>
/// | Accounts | Get, create, and update Accounts. |<br/>
/// | Journal entries | Get, create, and update Journal entries. |<br/>
/// | Journals | Get, create, and update Journals. |<br/>
/// | Tracking categories | Get, create, and update Tracking Categories for additional categorization of payroll components. |<br/>
/// | Company info | View company profile from the source platform. |<br/>
/// | Manage data | Control how data is retrieved from an integration. |
/// | Endpoints | Description |<br/>
/// | :- |:- |<br/>
/// | Companies | Create and manage your SMB users&apos; companies. |<br/>
/// | Connections | Create new and manage existing data connections for a company. |<br/>
/// | Accounts | Get, create, and update Accounts. |<br/>
/// | Journal entries | Get, create, and update Journal entries. |<br/>
/// | Journals | Get, create, and update Journals. |<br/>
/// | Tracking categories | Get, create, and update Tracking Categories for additional categorization of payroll components. |<br/>
/// | Company info | View company profile from the source platform. |<br/>
/// | Manage data | Control how data is retrieved from an integration. |<br/>
/// &lt;!-- End Codat Tags Table --&gt;
/// </remarks>
/// </summary>
public interface ICodatSyncPayroll
{

/// <summary>
/// Create and manage your Codat companies.
/// Create and manage your SMB users&apos; companies.
/// </summary>
public ICompanies Companies { get; }

/// <summary>
/// Manage your companies&apos; data connections.
/// Create new and manage existing data connections for a company.
/// </summary>
public IConnections Connections { get; }

/// <summary>
/// Accounts
/// Get, create, and update Accounts.
/// </summary>
public IAccounts Accounts { get; }

/// <summary>
/// Journal entries
/// Get, create, and update Journal entries.
/// </summary>
public IJournalEntries JournalEntries { get; }

/// <summary>
/// Journals
/// Get, create, and update Journals.
/// </summary>
public IJournals Journals { get; }

/// <summary>
/// Asynchronously retrieve data from an integration to refresh data in Codat.
/// Control how data is retrieved from an integration.
/// </summary>
public IManageData ManageData { get; }

/// <summary>
/// View company information fetched from the source platform.
/// View company profile from the source platform.
/// </summary>
public ICompanyInfo CompanyInfo { get; }

/// <summary>
/// Tracking categories
/// Get, create, and update Tracking Categories for additional categorization of payroll components.
/// </summary>
public ITrackingCategories TrackingCategories { get; }
}

public class SDKConfig
{
public static string[] ServerList = new string[]
{
/// <summary>
/// List of server URLs available to the SDK.
/// </summary>
public static readonly string[] ServerList = {
"https://api.codat.io",
};
/// Contains the list of servers available to the SDK
public string serverUrl = "";
public int serverIndex = 0;

public string GetTemplatedServerDetails()
public string ServerUrl = "";
public int ServerIndex = 0;
public SDKHooks hooks = new SDKHooks();

public string GetTemplatedServerUrl()
{
if (!String.IsNullOrEmpty(this.ServerUrl))
{
return Utilities.TemplateUrl(Utilities.RemoveSuffix(this.ServerUrl, "/"), new Dictionary<string, string>());
}
return Utilities.TemplateUrl(SDKConfig.ServerList[this.ServerIndex], new Dictionary<string, string>());
}

public ISpeakeasyHttpClient InitHooks(ISpeakeasyHttpClient client)
{
if (!String.IsNullOrEmpty(this.serverUrl))
string preHooksUrl = GetTemplatedServerUrl();
var (postHooksUrl, postHooksClient) = this.hooks.SDKInit(preHooksUrl, client);
if (preHooksUrl != postHooksUrl)
{
return Utilities.TemplateUrl(Utilities.RemoveSuffix(this.serverUrl, "/"), new Dictionary<string, string>());
this.ServerUrl = postHooksUrl;
}
return Utilities.TemplateUrl(SDKConfig.ServerList[this.serverIndex], new Dictionary<string, string>());
return postHooksClient;
}
}

Expand All @@ -120,29 +136,31 @@ public string GetTemplatedServerDetails()
/// <br/>
/// ---<br/>
/// <br/>
/// &lt;!-- Start Codat Tags Table --&gt;<br/>
/// ## Endpoints<br/>
/// <br/>
/// | Endpoints | Description |<br/>
/// |:---------------------|:-----------------------------------------------------------------------------------------------------------|<br/>
/// | Companies | Create and manage your SMB users&apos; companies. |<br/>
/// | Connections | Create new and manage existing data connections for a company. |<br/>
/// | Accounts | Get, create, and update Accounts. |<br/>
/// | Journal entries | Get, create, and update Journal entries. |<br/>
/// | Journals | Get, create, and update Journals. |<br/>
/// | Tracking categories | Get, create, and update Tracking Categories for additional categorization of payroll components. |<br/>
/// | Company info | View company profile from the source platform. |<br/>
/// | Manage data | Control how data is retrieved from an integration. |
/// | Endpoints | Description |<br/>
/// | :- |:- |<br/>
/// | Companies | Create and manage your SMB users&apos; companies. |<br/>
/// | Connections | Create new and manage existing data connections for a company. |<br/>
/// | Accounts | Get, create, and update Accounts. |<br/>
/// | Journal entries | Get, create, and update Journal entries. |<br/>
/// | Journals | Get, create, and update Journals. |<br/>
/// | Tracking categories | Get, create, and update Tracking Categories for additional categorization of payroll components. |<br/>
/// | Company info | View company profile from the source platform. |<br/>
/// | Manage data | Control how data is retrieved from an integration. |<br/>
/// &lt;!-- End Codat Tags Table --&gt;
/// </remarks>
/// </summary>
public class CodatSyncPayroll: ICodatSyncPayroll
{
public SDKConfig SDKConfiguration { get; private set; }

private const string _language = "csharp";
private const string _sdkVersion = "3.0.0";
private const string _sdkGenVersion = "2.257.2";
private const string _sdkVersion = "3.1.0";
private const string _sdkGenVersion = "2.319.7";
private const string _openapiDocVersion = "3.0.0";
private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.257.2 3.0.0 Codat.Sync.Payroll";
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.319.7 3.0.0 Codat.Sync.Payroll";
private string _serverUrl = "";
private int _serverIndex = 0;
private ISpeakeasyHttpClient _defaultClient;
Expand All @@ -160,6 +178,10 @@ public CodatSyncPayroll(Security? security = null, Func<Security>? securitySourc
{
if (serverIndex != null)
{
if (serverIndex.Value < 0 || serverIndex.Value >= SDKConfig.ServerList.Length)
{
throw new Exception($"Invalid server index {serverIndex.Value}");
}
_serverIndex = serverIndex.Value;
}

Expand All @@ -182,21 +204,42 @@ public CodatSyncPayroll(Security? security = null, Func<Security>? securitySourc
{
_securitySource = () => security;
}
else
{
throw new Exception("security and securitySource cannot both be null");
}

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

_defaultClient = SDKConfiguration.InitHooks(_defaultClient);


Companies = new Companies(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);


Connections = new Connections(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);


Accounts = new Accounts(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);


JournalEntries = new JournalEntries(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);


Journals = new Journals(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);


ManageData = new ManageData(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);


CompanyInfo = new CompanyInfo(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);


TrackingCategories = new TrackingCategories(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
}
}
}
}
Loading

0 comments on commit 0f09780

Please sign in to comment.