@@ -61,7 +61,7 @@ public interface ICompaniesSDK
61
61
/// List companies
62
62
///
63
63
/// <remarks>
64
- /// Returns a list of your companies. The company schema contains a list of <a href="https://docs.codat.io/codat -api#/schemas/Connection">connections</a> related to the company.
64
+ /// Returns a list of your companies. The company schema contains a list of <a href="https://docs.codat.io/platform -api#/schemas/Connection">connections</a> related to the company.
65
65
/// </remarks>
66
66
/// </summary>
67
67
Task < ListCompaniesResponse > ListAsync ( ListCompaniesRequest ? request = null ) ;
@@ -83,9 +83,10 @@ public class CompaniesSDK: ICompaniesSDK
83
83
{
84
84
public SDKConfig Config { get ; private set ; }
85
85
private const string _language = "csharp" ;
86
- private const string _sdkVersion = "2.1 .0" ;
87
- private const string _sdkGenVersion = "2.129.1 " ;
86
+ private const string _sdkVersion = "2.2 .0" ;
87
+ private const string _sdkGenVersion = "2.159.2 " ;
88
88
private const string _openapiDocVersion = "3.0.0" ;
89
+ private const string _userAgent = "speakeasy-sdk/csharp 2.2.0 2.159.2 3.0.0 Codat.Platform" ;
89
90
private string _serverUrl = "" ;
90
91
private ISpeakeasyHttpClient _defaultClient ;
91
92
private ISpeakeasyHttpClient _securityClient ;
@@ -110,7 +111,7 @@ public async Task<CreateCompanyResponse> CreateAsync(CompanyRequestBody? request
110
111
111
112
112
113
var httpRequest = new HttpRequestMessage ( HttpMethod . Post , urlString ) ;
113
- httpRequest . Headers . Add ( "user-agent" , $ "speakeasy-sdk/ { _language } { _sdkVersion } { _sdkGenVersion } { _openapiDocVersion } " ) ;
114
+ httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
114
115
115
116
var serializedBody = RequestBodySerializer . Serialize ( request , "Request" , "json" ) ;
116
117
if ( serializedBody != null )
@@ -130,9 +131,10 @@ public async Task<CreateCompanyResponse> CreateAsync(CompanyRequestBody? request
130
131
ContentType = contentType ,
131
132
RawResponse = httpResponse
132
133
} ;
134
+
133
135
if ( ( response . StatusCode == 200 ) )
134
136
{
135
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
137
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
136
138
{
137
139
response . Company = JsonConvert . DeserializeObject < Company > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
138
140
}
@@ -141,7 +143,7 @@ public async Task<CreateCompanyResponse> CreateAsync(CompanyRequestBody? request
141
143
}
142
144
if ( ( response . StatusCode == 400 ) || ( response . StatusCode == 401 ) || ( response . StatusCode == 429 ) )
143
145
{
144
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
146
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
145
147
{
146
148
response . ErrorMessage = JsonConvert . DeserializeObject < ErrorMessage > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
147
149
}
@@ -163,7 +165,7 @@ public async Task<DeleteCompanyResponse> DeleteAsync(DeleteCompanyRequest? reque
163
165
164
166
165
167
var httpRequest = new HttpRequestMessage ( HttpMethod . Delete , urlString ) ;
166
- httpRequest . Headers . Add ( "user-agent" , $ "speakeasy-sdk/ { _language } { _sdkVersion } { _sdkGenVersion } { _openapiDocVersion } " ) ;
168
+ httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
167
169
168
170
169
171
var client = _securityClient ;
@@ -178,14 +180,15 @@ public async Task<DeleteCompanyResponse> DeleteAsync(DeleteCompanyRequest? reque
178
180
ContentType = contentType ,
179
181
RawResponse = httpResponse
180
182
} ;
183
+
181
184
if ( ( response . StatusCode == 204 ) )
182
185
{
183
186
184
187
return response ;
185
188
}
186
189
if ( ( response . StatusCode == 401 ) || ( response . StatusCode == 404 ) || ( response . StatusCode == 429 ) )
187
190
{
188
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
191
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
189
192
{
190
193
response . ErrorMessage = JsonConvert . DeserializeObject < ErrorMessage > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
191
194
}
@@ -207,7 +210,7 @@ public async Task<GetCompanyResponse> GetAsync(GetCompanyRequest? request = null
207
210
208
211
209
212
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
210
- httpRequest . Headers . Add ( "user-agent" , $ "speakeasy-sdk/ { _language } { _sdkVersion } { _sdkGenVersion } { _openapiDocVersion } " ) ;
213
+ httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
211
214
212
215
213
216
var client = _securityClient ;
@@ -222,9 +225,10 @@ public async Task<GetCompanyResponse> GetAsync(GetCompanyRequest? request = null
222
225
ContentType = contentType ,
223
226
RawResponse = httpResponse
224
227
} ;
228
+
225
229
if ( ( response . StatusCode == 200 ) )
226
230
{
227
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
231
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
228
232
{
229
233
response . Company = JsonConvert . DeserializeObject < Company > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
230
234
}
@@ -233,7 +237,7 @@ public async Task<GetCompanyResponse> GetAsync(GetCompanyRequest? request = null
233
237
}
234
238
if ( ( response . StatusCode == 401 ) || ( response . StatusCode == 404 ) || ( response . StatusCode == 429 ) )
235
239
{
236
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
240
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
237
241
{
238
242
response . ErrorMessage = JsonConvert . DeserializeObject < ErrorMessage > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
239
243
}
@@ -255,7 +259,7 @@ public async Task<ListCompaniesResponse> ListAsync(ListCompaniesRequest? request
255
259
256
260
257
261
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
258
- httpRequest . Headers . Add ( "user-agent" , $ "speakeasy-sdk/ { _language } { _sdkVersion } { _sdkGenVersion } { _openapiDocVersion } " ) ;
262
+ httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
259
263
260
264
261
265
var client = _securityClient ;
@@ -270,9 +274,10 @@ public async Task<ListCompaniesResponse> ListAsync(ListCompaniesRequest? request
270
274
ContentType = contentType ,
271
275
RawResponse = httpResponse
272
276
} ;
277
+
273
278
if ( ( response . StatusCode == 200 ) )
274
279
{
275
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
280
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
276
281
{
277
282
response . Companies = JsonConvert . DeserializeObject < Companies > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
278
283
}
@@ -281,7 +286,7 @@ public async Task<ListCompaniesResponse> ListAsync(ListCompaniesRequest? request
281
286
}
282
287
if ( ( response . StatusCode == 400 ) || ( response . StatusCode == 401 ) || ( response . StatusCode == 429 ) )
283
288
{
284
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
289
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
285
290
{
286
291
response . ErrorMessage = JsonConvert . DeserializeObject < ErrorMessage > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
287
292
}
@@ -303,7 +308,7 @@ public async Task<UpdateCompanyResponse> UpdateAsync(UpdateCompanyRequest? reque
303
308
304
309
305
310
var httpRequest = new HttpRequestMessage ( HttpMethod . Put , urlString ) ;
306
- httpRequest . Headers . Add ( "user-agent" , $ "speakeasy-sdk/ { _language } { _sdkVersion } { _sdkGenVersion } { _openapiDocVersion } " ) ;
311
+ httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
307
312
308
313
var serializedBody = RequestBodySerializer . Serialize ( request , "CompanyRequestBody" , "json" ) ;
309
314
if ( serializedBody != null )
@@ -323,9 +328,10 @@ public async Task<UpdateCompanyResponse> UpdateAsync(UpdateCompanyRequest? reque
323
328
ContentType = contentType ,
324
329
RawResponse = httpResponse
325
330
} ;
331
+
326
332
if ( ( response . StatusCode == 200 ) )
327
333
{
328
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
334
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
329
335
{
330
336
response . Company = JsonConvert . DeserializeObject < Company > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
331
337
}
@@ -334,7 +340,7 @@ public async Task<UpdateCompanyResponse> UpdateAsync(UpdateCompanyRequest? reque
334
340
}
335
341
if ( ( response . StatusCode == 401 ) || ( response . StatusCode == 404 ) || ( response . StatusCode == 429 ) )
336
342
{
337
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
343
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
338
344
{
339
345
response . ErrorMessage = JsonConvert . DeserializeObject < ErrorMessage > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
340
346
}
0 commit comments