Skip to content

Commit 46ccce5

Browse files
ci: regenerated with OpenAPI Doc 3.0.0, Speakeasy CLI 1.179.0 (#252)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
1 parent 60d304f commit 46ccce5

File tree

84 files changed

+1387
-648
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1387
-648
lines changed

platform/.speakeasy/gen.lock

Lines changed: 408 additions & 0 deletions
Large diffs are not rendered by default.

platform/CodatPlatform/CodatPlatform.cs

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,14 @@ public class CodatPlatform: ICodatPlatform
125125
public SDKConfig SDKConfiguration { get; private set; }
126126

127127
private const string _language = "csharp";
128-
private const string _sdkVersion = "3.3.0";
129-
private const string _sdkGenVersion = "2.223.0";
128+
private const string _sdkVersion = "3.4.0";
129+
private const string _sdkGenVersion = "2.257.2";
130130
private const string _openapiDocVersion = "3.0.0";
131-
private const string _userAgent = "speakeasy-sdk/csharp 3.3.0 2.223.0 3.0.0 Codat.Platform";
131+
private const string _userAgent = "speakeasy-sdk/csharp 3.4.0 2.257.2 3.0.0 Codat.Platform";
132132
private string _serverUrl = "";
133+
private int _serverIndex = 0;
133134
private ISpeakeasyHttpClient _defaultClient;
134-
private ISpeakeasyHttpClient _securityClient;
135+
private Func<Security>? _securitySource;
135136
public ISettings Settings { get; private set; }
136137
public ICompanies Companies { get; private set; }
137138
public IConnections Connections { get; private set; }
@@ -143,38 +144,49 @@ public class CodatPlatform: ICodatPlatform
143144
public ISupplementalData SupplementalData { get; private set; }
144145
public IWebhooks Webhooks { get; private set; }
145146

146-
public CodatPlatform(Security? security = null, int? serverIndex = null, string? serverUrl = null, Dictionary<string, string>? urlParams = null, ISpeakeasyHttpClient? client = null)
147+
public CodatPlatform(Security? security = null, Func<Security>? securitySource = null, int? serverIndex = null, string? serverUrl = null, Dictionary<string, string>? urlParams = null, ISpeakeasyHttpClient? client = null)
147148
{
148-
if (serverUrl != null) {
149-
if (urlParams != null) {
149+
if (serverIndex != null)
150+
{
151+
_serverIndex = serverIndex.Value;
152+
}
153+
154+
if (serverUrl != null)
155+
{
156+
if (urlParams != null)
157+
{
150158
serverUrl = Utilities.TemplateUrl(serverUrl, urlParams);
151159
}
152160
_serverUrl = serverUrl;
153161
}
154162

155163
_defaultClient = new SpeakeasyHttpClient(client);
156-
_securityClient = _defaultClient;
157-
158-
if(security != null)
164+
165+
if(securitySource != null)
166+
{
167+
_securitySource = securitySource;
168+
}
169+
else if(security != null)
159170
{
160-
_securityClient = SecuritySerializer.Apply(_defaultClient, security);
171+
_securitySource = () => security;
161172
}
162-
173+
163174
SDKConfiguration = new SDKConfig()
164175
{
176+
serverIndex = _serverIndex,
165177
serverUrl = _serverUrl
166178
};
167179

168-
Settings = new Settings(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
169-
Companies = new Companies(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
170-
Connections = new Connections(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
171-
CustomDataType = new CustomDataType(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
172-
PushData = new PushData(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
173-
RefreshData = new RefreshData(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
174-
Groups = new Groups(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
175-
Integrations = new Integrations(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
176-
SupplementalData = new SupplementalData(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
177-
Webhooks = new Webhooks(_defaultClient, _securityClient, _serverUrl, SDKConfiguration);
180+
Settings = new Settings(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
181+
Companies = new Companies(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
182+
Connections = new Connections(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
183+
CustomDataType = new CustomDataType(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
184+
PushData = new PushData(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
185+
RefreshData = new RefreshData(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
186+
Groups = new Groups(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
187+
Integrations = new Integrations(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
188+
SupplementalData = new SupplementalData(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
189+
Webhooks = new Webhooks(_defaultClient, _securitySource, _serverUrl, SDKConfiguration);
178190
}
179191
}
180-
}
192+
}

platform/CodatPlatform/CodatPlatform.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<IsPackable>true</IsPackable>
44
<PackageId>Codat.Platform</PackageId>
5-
<Version>3.3.0</Version>
5+
<Version>3.4.0</Version>
66
<Authors>Codat</Authors>
77
<TargetFramework>net6.0</TargetFramework>
88
<Nullable>enable</Nullable>

platform/CodatPlatform/Companies.cs

Lines changed: 51 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,18 @@ public class Companies: ICompanies
9898
{
9999
public SDKConfig SDKConfiguration { get; private set; }
100100
private const string _language = "csharp";
101-
private const string _sdkVersion = "3.3.0";
102-
private const string _sdkGenVersion = "2.223.0";
101+
private const string _sdkVersion = "3.4.0";
102+
private const string _sdkGenVersion = "2.257.2";
103103
private const string _openapiDocVersion = "3.0.0";
104-
private const string _userAgent = "speakeasy-sdk/csharp 3.3.0 2.223.0 3.0.0 Codat.Platform";
104+
private const string _userAgent = "speakeasy-sdk/csharp 3.4.0 2.257.2 3.0.0 Codat.Platform";
105105
private string _serverUrl = "";
106106
private ISpeakeasyHttpClient _defaultClient;
107-
private ISpeakeasyHttpClient _securityClient;
107+
private Func<Security>? _securitySource;
108108

109-
public Companies(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient securityClient, string serverUrl, SDKConfig config)
109+
public Companies(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySource, string serverUrl, SDKConfig config)
110110
{
111111
_defaultClient = defaultClient;
112-
_securityClient = securityClient;
112+
_securitySource = securitySource;
113113
_serverUrl = serverUrl;
114114
SDKConfiguration = config;
115115
}
@@ -129,8 +129,12 @@ public async Task<CreateCompanyResponse> CreateAsync(CompanyRequestBody? request
129129
httpRequest.Content = serializedBody;
130130
}
131131

132-
var client = _securityClient;
133-
132+
var client = _defaultClient;
133+
if (_securitySource != null)
134+
{
135+
client = SecuritySerializer.Apply(_defaultClient, _securitySource);
136+
}
137+
134138
var httpResponse = await client.SendAsync(httpRequest);
135139

136140
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
@@ -148,7 +152,7 @@ public async Task<CreateCompanyResponse> CreateAsync(CompanyRequestBody? request
148152
{
149153
response.Company = JsonConvert.DeserializeObject<Company>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
150154
}
151-
155+
152156
return response;
153157
}
154158
if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503))
@@ -157,11 +161,12 @@ public async Task<CreateCompanyResponse> CreateAsync(CompanyRequestBody? request
157161
{
158162
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
159163
}
160-
164+
161165
return response;
162166
}
163167
return response;
164168
}
169+
165170

166171

167172
public async Task<DeleteCompanyResponse> DeleteAsync(DeleteCompanyRequest? request = null)
@@ -173,8 +178,12 @@ public async Task<DeleteCompanyResponse> DeleteAsync(DeleteCompanyRequest? reque
173178
httpRequest.Headers.Add("user-agent", _userAgent);
174179

175180

176-
var client = _securityClient;
177-
181+
var client = _defaultClient;
182+
if (_securitySource != null)
183+
{
184+
client = SecuritySerializer.Apply(_defaultClient, _securitySource);
185+
}
186+
178187
var httpResponse = await client.SendAsync(httpRequest);
179188

180189
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
@@ -188,7 +197,7 @@ public async Task<DeleteCompanyResponse> DeleteAsync(DeleteCompanyRequest? reque
188197

189198
if((response.StatusCode == 204))
190199
{
191-
200+
192201
return response;
193202
}
194203
if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503))
@@ -197,11 +206,12 @@ public async Task<DeleteCompanyResponse> DeleteAsync(DeleteCompanyRequest? reque
197206
{
198207
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
199208
}
200-
209+
201210
return response;
202211
}
203212
return response;
204213
}
214+
205215

206216

207217
public async Task<GetCompanyResponse> GetAsync(GetCompanyRequest? request = null)
@@ -213,8 +223,12 @@ public async Task<GetCompanyResponse> GetAsync(GetCompanyRequest? request = null
213223
httpRequest.Headers.Add("user-agent", _userAgent);
214224

215225

216-
var client = _securityClient;
217-
226+
var client = _defaultClient;
227+
if (_securitySource != null)
228+
{
229+
client = SecuritySerializer.Apply(_defaultClient, _securitySource);
230+
}
231+
218232
var httpResponse = await client.SendAsync(httpRequest);
219233

220234
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
@@ -232,7 +246,7 @@ public async Task<GetCompanyResponse> GetAsync(GetCompanyRequest? request = null
232246
{
233247
response.Company = JsonConvert.DeserializeObject<Company>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
234248
}
235-
249+
236250
return response;
237251
}
238252
if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503))
@@ -241,11 +255,12 @@ public async Task<GetCompanyResponse> GetAsync(GetCompanyRequest? request = null
241255
{
242256
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
243257
}
244-
258+
245259
return response;
246260
}
247261
return response;
248262
}
263+
249264

250265

251266
public async Task<ListCompaniesResponse> ListAsync(ListCompaniesRequest? request = null)
@@ -257,8 +272,12 @@ public async Task<ListCompaniesResponse> ListAsync(ListCompaniesRequest? request
257272
httpRequest.Headers.Add("user-agent", _userAgent);
258273

259274

260-
var client = _securityClient;
261-
275+
var client = _defaultClient;
276+
if (_securitySource != null)
277+
{
278+
client = SecuritySerializer.Apply(_defaultClient, _securitySource);
279+
}
280+
262281
var httpResponse = await client.SendAsync(httpRequest);
263282

264283
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
@@ -276,7 +295,7 @@ public async Task<ListCompaniesResponse> ListAsync(ListCompaniesRequest? request
276295
{
277296
response.Companies = JsonConvert.DeserializeObject<Models.Shared.Companies>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
278297
}
279-
298+
280299
return response;
281300
}
282301
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))
@@ -285,11 +304,12 @@ public async Task<ListCompaniesResponse> ListAsync(ListCompaniesRequest? request
285304
{
286305
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
287306
}
288-
307+
289308
return response;
290309
}
291310
return response;
292311
}
312+
293313

294314

295315
public async Task<UpdateCompanyResponse> UpdateAsync(UpdateCompanyRequest? request = null)
@@ -306,8 +326,12 @@ public async Task<UpdateCompanyResponse> UpdateAsync(UpdateCompanyRequest? reque
306326
httpRequest.Content = serializedBody;
307327
}
308328

309-
var client = _securityClient;
310-
329+
var client = _defaultClient;
330+
if (_securitySource != null)
331+
{
332+
client = SecuritySerializer.Apply(_defaultClient, _securitySource);
333+
}
334+
311335
var httpResponse = await client.SendAsync(httpRequest);
312336

313337
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
@@ -325,7 +349,7 @@ public async Task<UpdateCompanyResponse> UpdateAsync(UpdateCompanyRequest? reque
325349
{
326350
response.Company = JsonConvert.DeserializeObject<Company>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
327351
}
328-
352+
329353
return response;
330354
}
331355
if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503))
@@ -334,11 +358,12 @@ public async Task<UpdateCompanyResponse> UpdateAsync(UpdateCompanyRequest? reque
334358
{
335359
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
336360
}
337-
361+
338362
return response;
339363
}
340364
return response;
341365
}
366+
342367

343368
}
344369
}

0 commit comments

Comments
 (0)