@@ -117,9 +117,10 @@ public class BillCreditNotesSDK: IBillCreditNotesSDK
117
117
{
118
118
public SDKConfig Config { get ; private set ; }
119
119
private const string _language = "csharp" ;
120
- private const string _sdkVersion = "2.1 .0" ;
121
- private const string _sdkGenVersion = "2.129.1 " ;
120
+ private const string _sdkVersion = "2.2 .0" ;
121
+ private const string _sdkGenVersion = "2.159.2 " ;
122
122
private const string _openapiDocVersion = "3.0.0" ;
123
+ private const string _userAgent = "speakeasy-sdk/csharp 2.2.0 2.159.2 3.0.0 Codat.Sync.Payables" ;
123
124
private string _serverUrl = "" ;
124
125
private ISpeakeasyHttpClient _defaultClient ;
125
126
private ISpeakeasyHttpClient _securityClient ;
@@ -144,7 +145,7 @@ public BillCreditNotesSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClie
144
145
145
146
146
147
var httpRequest = new HttpRequestMessage ( HttpMethod . Post , urlString ) ;
147
- httpRequest . Headers . Add ( "user-agent" , $ "speakeasy-sdk/ { _language } { _sdkVersion } { _sdkGenVersion } { _openapiDocVersion } " ) ;
148
+ httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
148
149
149
150
var serializedBody = RequestBodySerializer . Serialize ( request , "BillCreditNote" , "json" ) ;
150
151
if ( serializedBody != null )
@@ -164,9 +165,10 @@ public BillCreditNotesSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClie
164
165
ContentType = contentType ,
165
166
RawResponse = httpResponse
166
167
} ;
168
+
167
169
if ( ( response . StatusCode == 200 ) )
168
170
{
169
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
171
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
170
172
{
171
173
response . CreateBillCreditNoteResponseValue = JsonConvert . DeserializeObject < Models . Shared . CreateBillCreditNoteResponse > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
172
174
}
@@ -175,7 +177,7 @@ public BillCreditNotesSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClie
175
177
}
176
178
if ( ( response . StatusCode == 400 ) || ( response . StatusCode == 401 ) || ( response . StatusCode == 404 ) || ( response . StatusCode == 429 ) )
177
179
{
178
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
180
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
179
181
{
180
182
response . ErrorMessage = JsonConvert . DeserializeObject < ErrorMessage > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
181
183
}
@@ -197,7 +199,7 @@ public async Task<GetBillCreditNoteResponse> GetAsync(GetBillCreditNoteRequest?
197
199
198
200
199
201
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
200
- httpRequest . Headers . Add ( "user-agent" , $ "speakeasy-sdk/ { _language } { _sdkVersion } { _sdkGenVersion } { _openapiDocVersion } " ) ;
202
+ httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
201
203
202
204
203
205
var client = _securityClient ;
@@ -212,9 +214,10 @@ public async Task<GetBillCreditNoteResponse> GetAsync(GetBillCreditNoteRequest?
212
214
ContentType = contentType ,
213
215
RawResponse = httpResponse
214
216
} ;
217
+
215
218
if ( ( response . StatusCode == 200 ) )
216
219
{
217
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
220
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
218
221
{
219
222
response . BillCreditNote = JsonConvert . DeserializeObject < BillCreditNote > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
220
223
}
@@ -223,7 +226,7 @@ public async Task<GetBillCreditNoteResponse> GetAsync(GetBillCreditNoteRequest?
223
226
}
224
227
if ( ( response . StatusCode == 401 ) || ( response . StatusCode == 404 ) || ( response . StatusCode == 409 ) || ( response . StatusCode == 429 ) )
225
228
{
226
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
229
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
227
230
{
228
231
response . ErrorMessage = JsonConvert . DeserializeObject < ErrorMessage > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
229
232
}
@@ -245,7 +248,7 @@ public async Task<GetCreateUpdateBillCreditNoteModelResponse> GetCreateUpdateMod
245
248
246
249
247
250
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
248
- httpRequest . Headers . Add ( "user-agent" , $ "speakeasy-sdk/ { _language } { _sdkVersion } { _sdkGenVersion } { _openapiDocVersion } " ) ;
251
+ httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
249
252
250
253
251
254
var client = _securityClient ;
@@ -260,9 +263,10 @@ public async Task<GetCreateUpdateBillCreditNoteModelResponse> GetCreateUpdateMod
260
263
ContentType = contentType ,
261
264
RawResponse = httpResponse
262
265
} ;
266
+
263
267
if ( ( response . StatusCode == 200 ) )
264
268
{
265
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
269
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
266
270
{
267
271
response . PushOption = JsonConvert . DeserializeObject < PushOption > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
268
272
}
@@ -271,7 +275,7 @@ public async Task<GetCreateUpdateBillCreditNoteModelResponse> GetCreateUpdateMod
271
275
}
272
276
if ( ( response . StatusCode == 401 ) || ( response . StatusCode == 404 ) || ( response . StatusCode == 429 ) )
273
277
{
274
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
278
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
275
279
{
276
280
response . ErrorMessage = JsonConvert . DeserializeObject < ErrorMessage > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
277
281
}
@@ -293,7 +297,7 @@ public async Task<ListBillCreditNotesResponse> ListAsync(ListBillCreditNotesRequ
293
297
294
298
295
299
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
296
- httpRequest . Headers . Add ( "user-agent" , $ "speakeasy-sdk/ { _language } { _sdkVersion } { _sdkGenVersion } { _openapiDocVersion } " ) ;
300
+ httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
297
301
298
302
299
303
var client = _securityClient ;
@@ -308,9 +312,10 @@ public async Task<ListBillCreditNotesResponse> ListAsync(ListBillCreditNotesRequ
308
312
ContentType = contentType ,
309
313
RawResponse = httpResponse
310
314
} ;
315
+
311
316
if ( ( response . StatusCode == 200 ) )
312
317
{
313
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
318
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
314
319
{
315
320
response . BillCreditNotes = JsonConvert . DeserializeObject < BillCreditNotes > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
316
321
}
@@ -319,7 +324,7 @@ public async Task<ListBillCreditNotesResponse> ListAsync(ListBillCreditNotesRequ
319
324
}
320
325
if ( ( response . StatusCode == 400 ) || ( response . StatusCode == 401 ) || ( response . StatusCode == 404 ) || ( response . StatusCode == 409 ) )
321
326
{
322
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
327
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
323
328
{
324
329
response . ErrorMessage = JsonConvert . DeserializeObject < ErrorMessage > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
325
330
}
@@ -341,7 +346,7 @@ public async Task<ListBillCreditNotesResponse> ListAsync(ListBillCreditNotesRequ
341
346
342
347
343
348
var httpRequest = new HttpRequestMessage ( HttpMethod . Put , urlString ) ;
344
- httpRequest . Headers . Add ( "user-agent" , $ "speakeasy-sdk/ { _language } { _sdkVersion } { _sdkGenVersion } { _openapiDocVersion } " ) ;
349
+ httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
345
350
346
351
var serializedBody = RequestBodySerializer . Serialize ( request , "BillCreditNote" , "json" ) ;
347
352
if ( serializedBody != null )
@@ -361,9 +366,10 @@ public async Task<ListBillCreditNotesResponse> ListAsync(ListBillCreditNotesRequ
361
366
ContentType = contentType ,
362
367
RawResponse = httpResponse
363
368
} ;
369
+
364
370
if ( ( response . StatusCode == 200 ) )
365
371
{
366
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
372
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
367
373
{
368
374
response . UpdateBillCreditNoteResponseValue = JsonConvert . DeserializeObject < Models . Shared . UpdateBillCreditNoteResponse > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
369
375
}
@@ -372,7 +378,7 @@ public async Task<ListBillCreditNotesResponse> ListAsync(ListBillCreditNotesRequ
372
378
}
373
379
if ( ( response . StatusCode == 400 ) || ( response . StatusCode == 401 ) || ( response . StatusCode == 404 ) || ( response . StatusCode == 429 ) )
374
380
{
375
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
381
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
376
382
{
377
383
response . ErrorMessage = JsonConvert . DeserializeObject < ErrorMessage > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
378
384
}
0 commit comments