Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc prealpha, Speakeasy CLI 1.179.0 (#251)
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 Feb 14, 2024
1 parent 46ccce5 commit ddeb836
Show file tree
Hide file tree
Showing 63 changed files with 871 additions and 703 deletions.
16 changes: 10 additions & 6 deletions sync-for-expenses/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
lockVersion: 2.0.0
id: 18b9d064-aee3-46b6-b773-6d0ab95e296c
management:
docChecksum: fdc7285c8f3a9d1b51e0ac7f1c98ee14
docChecksum: cd6fa6671764b38bed9a8592c0f117ad
docVersion: prealpha
speakeasyVersion: internal
generationVersion: 2.248.6
releaseVersion: 5.0.0
configChecksum: bd15d9cec6d935b0b22be299083653f4
generationVersion: 2.257.2
releaseVersion: 5.1.0
configChecksum: bf2e9b4d2b7342b0024cf499f9ef09f6
repoURL: https://github.com/codatio/client-sdk-csharp.git
repoSubDirectory: sync-for-expenses
published: true
features:
csharp:
core: 3.3.1
core: 3.3.2
deprecations: 2.81.2
examples: 2.81.3
globalSecurity: 2.82.0
globalSecurity: 2.83.0
globalServerURLs: 2.82.2
inputOutputModels: 2.83.0
nameOverrides: 2.81.1
Expand Down Expand Up @@ -130,6 +130,8 @@ generatedFiles:
- CodatSyncExpenses/Models/Operations/ListSyncTransactionsRequest.cs
- CodatSyncExpenses/Models/Operations/ListSyncTransactionsResponse.cs
- CodatSyncExpenses/Models/Shared/ErrorMessage.cs
- CodatSyncExpenses/Models/Shared/ErrorValidation.cs
- CodatSyncExpenses/Models/Shared/ErrorValidationItem.cs
- CodatSyncExpenses/Models/Shared/GroupReference.cs
- CodatSyncExpenses/Models/Shared/Company.cs
- CodatSyncExpenses/Models/Shared/SourceType.cs
Expand Down Expand Up @@ -332,6 +334,8 @@ generatedFiles:
- docs/Models/Operations/ListSyncTransactionsRequest.md
- docs/Models/Operations/ListSyncTransactionsResponse.md
- docs/Models/Shared/ErrorMessage.md
- docs/Models/Shared/ErrorValidation.md
- docs/Models/Shared/ErrorValidationItem.md
- docs/Models/Shared/GroupReference.md
- docs/Models/Shared/Company.md
- docs/Models/Shared/SourceType.md
Expand Down
38 changes: 24 additions & 14 deletions sync-for-expenses/CodatSyncExpenses/Accounts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ public class Accounts: IAccounts
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "5.0.0";
private const string _sdkGenVersion = "2.248.6";
private const string _sdkVersion = "5.1.0";
private const string _sdkGenVersion = "2.257.2";
private const string _openapiDocVersion = "prealpha";
private const string _userAgent = "speakeasy-sdk/csharp 5.0.0 2.248.6 prealpha Codat.Sync.Expenses";
private const string _userAgent = "speakeasy-sdk/csharp 5.1.0 2.257.2 prealpha Codat.Sync.Expenses";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
private Func<Security>? _securitySource;

public Accounts(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;
SDKConfiguration = config;
}
Expand All @@ -100,8 +100,12 @@ public Accounts(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securit
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 @@ -119,7 +123,7 @@ public Accounts(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securit
{
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 == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503))
Expand All @@ -128,11 +132,12 @@ public Accounts(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securit
{
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<GetCreateChartOfAccountsModelResponse> GetCreateModelAsync(GetCreateChartOfAccountsModelRequest? request = null)
Expand All @@ -144,8 +149,12 @@ public async Task<GetCreateChartOfAccountsModelResponse> GetCreateModelAsync(Get
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 @@ -163,7 +172,7 @@ public async Task<GetCreateChartOfAccountsModelResponse> GetCreateModelAsync(Get
{
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))
Expand All @@ -172,11 +181,12 @@ public async Task<GetCreateChartOfAccountsModelResponse> GetCreateModelAsync(Get
{
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;
}


}
}
41 changes: 22 additions & 19 deletions sync-for-expenses/CodatSyncExpenses/CodatSyncExpenses.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ public class CodatSyncExpenses: ICodatSyncExpenses
public SDKConfig SDKConfiguration { get; private set; }

private const string _language = "csharp";
private const string _sdkVersion = "5.0.0";
private const string _sdkGenVersion = "2.248.6";
private const string _sdkVersion = "5.1.0";
private const string _sdkGenVersion = "2.257.2";
private const string _openapiDocVersion = "prealpha";
private const string _userAgent = "speakeasy-sdk/csharp 5.0.0 2.248.6 prealpha Codat.Sync.Expenses";
private const string _userAgent = "speakeasy-sdk/csharp 5.1.0 2.257.2 prealpha Codat.Sync.Expenses";
private string _serverUrl = "";
private int _serverIndex = 0;
private ISpeakeasyHttpClient _defaultClient;
private ISpeakeasyHttpClient _securityClient;
private Func<Security>? _securitySource;
public ICompanies Companies { get; private set; }
public IConnections Connections { get; private set; }
public IAccounts Accounts { get; private set; }
Expand All @@ -156,7 +156,7 @@ public class CodatSyncExpenses: ICodatSyncExpenses
public ISync Sync { get; private set; }
public ITransactionStatus TransactionStatus { get; private set; }

public CodatSyncExpenses(Security? security = null, int? serverIndex = null, string? serverUrl = null, Dictionary<string, string>? urlParams = null, ISpeakeasyHttpClient? client = null)
public CodatSyncExpenses(Security? security = null, Func<Security>? securitySource = null, int? serverIndex = null, string? serverUrl = null, Dictionary<string, string>? urlParams = null, ISpeakeasyHttpClient? client = null)
{
if (serverIndex != null)
{
Expand All @@ -173,11 +173,14 @@ public CodatSyncExpenses(Security? security = null, int? serverIndex = null, str
}

_defaultClient = new SpeakeasyHttpClient(client);
_securityClient = _defaultClient;

if(security != null)
if(securitySource != null)
{
_securityClient = SecuritySerializer.Apply(_defaultClient, security);
_securitySource = securitySource;
}
else if(security != null)
{
_securitySource = () => security;
}

SDKConfiguration = new SDKConfig()
Expand All @@ -186,17 +189,17 @@ public CodatSyncExpenses(Security? security = null, int? serverIndex = null, str
serverUrl = _serverUrl
};

Companies = new Companies(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Connections = new Connections(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Accounts = new Accounts(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Customers = new Customers(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Suppliers = new Suppliers(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
ManageData = new ManageData(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
PushOperations = new PushOperations(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Configuration = new Configuration(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Expenses = new Expenses(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Sync = new Sync(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
TransactionStatus = new TransactionStatus(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
Companies = new Companies(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
Connections = new Connections(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
Accounts = new Accounts(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
Customers = new Customers(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
Suppliers = new Suppliers(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
ManageData = new ManageData(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
PushOperations = new PushOperations(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
Configuration = new Configuration(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
Expenses = new Expenses(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
Sync = new Sync(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
TransactionStatus = new TransactionStatus(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>Codat.Sync.Expenses</PackageId>
<Version>5.0.0</Version>
<Version>5.1.0</Version>
<Authors>Codat</Authors>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
Expand Down
Loading

0 comments on commit ddeb836

Please sign in to comment.