@@ -63,15 +63,15 @@ public interface IAccountsSDK
63
63
/// Get create account model
64
64
///
65
65
/// <remarks>
66
- /// The *Get create account model* endpoint returns the expected data for the request payload when creating an <a href="https://docs.codat.io/sync-for-payroll-api#/schemas/Account">account</a> for a given company and integration.<br/>
66
+ /// The *Get create account model* endpoint returns the expected data for the request payload when creating an <a href="https://docs.codat.io/sync-for-payroll-api#/schemas/Account">account</a> for a given company and integration.<br/>
67
67
/// <br/>
68
- /// <a href="https://docs.codat.io/sync-for-payroll-api#/schemas/Account">Accounts</a> are the categories a business uses to record accounting transactions.<br/>
68
+ /// <a href="https://docs.codat.io/sync-for-payroll-api#/schemas/Account">Accounts</a> are the categories a business uses to record accounting transactions.<br/>
69
69
/// <br/>
70
- /// **Integration-specific behaviour**<br/>
70
+ /// **Integration-specific behaviour**<br/>
71
71
/// <br/>
72
- /// See the *response examples* for integration-specific indicative models.<br/>
72
+ /// See the *response examples* for integration-specific indicative models.<br/>
73
73
/// <br/>
74
- /// Check out our <a href="https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts">coverage explorer</a> for integrations that support creating an account.<br/>
74
+ /// Check out our <a href="https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts">coverage explorer</a> for integrations that support creating an account.<br/>
75
75
///
76
76
/// </remarks>
77
77
/// </summary>
@@ -98,9 +98,10 @@ public class AccountsSDK: IAccountsSDK
98
98
{
99
99
public SDKConfig Config { get ; private set ; }
100
100
private const string _language = "csharp" ;
101
- private const string _sdkVersion = "2.1 .0" ;
102
- private const string _sdkGenVersion = "2.129.1 " ;
101
+ private const string _sdkVersion = "2.2 .0" ;
102
+ private const string _sdkGenVersion = "2.159.2 " ;
103
103
private const string _openapiDocVersion = "3.0.0" ;
104
+ private const string _userAgent = "speakeasy-sdk/csharp 2.2.0 2.159.2 3.0.0 Codat.Sync.Payroll" ;
104
105
private string _serverUrl = "" ;
105
106
private ISpeakeasyHttpClient _defaultClient ;
106
107
private ISpeakeasyHttpClient _securityClient ;
@@ -125,7 +126,7 @@ public AccountsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient secu
125
126
126
127
127
128
var httpRequest = new HttpRequestMessage ( HttpMethod . Post , urlString ) ;
128
- httpRequest . Headers . Add ( "user-agent" , $ "speakeasy-sdk/ { _language } { _sdkVersion } { _sdkGenVersion } { _openapiDocVersion } " ) ;
129
+ httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
129
130
130
131
var serializedBody = RequestBodySerializer . Serialize ( request , "Account" , "json" ) ;
131
132
if ( serializedBody != null )
@@ -145,9 +146,10 @@ public AccountsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient secu
145
146
ContentType = contentType ,
146
147
RawResponse = httpResponse
147
148
} ;
149
+
148
150
if ( ( response . StatusCode == 200 ) )
149
151
{
150
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
152
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
151
153
{
152
154
response . CreateAccountResponseValue = JsonConvert . DeserializeObject < Models . Shared . CreateAccountResponse > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
153
155
}
@@ -156,7 +158,7 @@ public AccountsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient secu
156
158
}
157
159
if ( ( response . StatusCode == 400 ) || ( response . StatusCode == 401 ) || ( response . StatusCode == 404 ) || ( response . StatusCode == 429 ) )
158
160
{
159
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
161
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
160
162
{
161
163
response . ErrorMessage = JsonConvert . DeserializeObject < ErrorMessage > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
162
164
}
@@ -178,7 +180,7 @@ public async Task<GetAccountResponse> GetAsync(GetAccountRequest? request = null
178
180
179
181
180
182
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
181
- httpRequest . Headers . Add ( "user-agent" , $ "speakeasy-sdk/ { _language } { _sdkVersion } { _sdkGenVersion } { _openapiDocVersion } " ) ;
183
+ httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
182
184
183
185
184
186
var client = _securityClient ;
@@ -193,9 +195,10 @@ public async Task<GetAccountResponse> GetAsync(GetAccountRequest? request = null
193
195
ContentType = contentType ,
194
196
RawResponse = httpResponse
195
197
} ;
198
+
196
199
if ( ( response . StatusCode == 200 ) )
197
200
{
198
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
201
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
199
202
{
200
203
response . Account = JsonConvert . DeserializeObject < Account > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
201
204
}
@@ -204,7 +207,7 @@ public async Task<GetAccountResponse> GetAsync(GetAccountRequest? request = null
204
207
}
205
208
if ( ( response . StatusCode == 401 ) || ( response . StatusCode == 404 ) || ( response . StatusCode == 409 ) || ( response . StatusCode == 429 ) )
206
209
{
207
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
210
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
208
211
{
209
212
response . ErrorMessage = JsonConvert . DeserializeObject < ErrorMessage > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
210
213
}
@@ -226,7 +229,7 @@ public async Task<GetCreateAccountsModelResponse> GetCreateModelAsync(GetCreateA
226
229
227
230
228
231
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
229
- httpRequest . Headers . Add ( "user-agent" , $ "speakeasy-sdk/ { _language } { _sdkVersion } { _sdkGenVersion } { _openapiDocVersion } " ) ;
232
+ httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
230
233
231
234
232
235
var client = _securityClient ;
@@ -241,9 +244,10 @@ public async Task<GetCreateAccountsModelResponse> GetCreateModelAsync(GetCreateA
241
244
ContentType = contentType ,
242
245
RawResponse = httpResponse
243
246
} ;
247
+
244
248
if ( ( response . StatusCode == 200 ) )
245
249
{
246
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
250
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
247
251
{
248
252
response . PushOption = JsonConvert . DeserializeObject < PushOption > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
249
253
}
@@ -252,7 +256,7 @@ public async Task<GetCreateAccountsModelResponse> GetCreateModelAsync(GetCreateA
252
256
}
253
257
if ( ( response . StatusCode == 401 ) || ( response . StatusCode == 404 ) || ( response . StatusCode == 429 ) )
254
258
{
255
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
259
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
256
260
{
257
261
response . ErrorMessage = JsonConvert . DeserializeObject < ErrorMessage > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
258
262
}
@@ -274,7 +278,7 @@ public async Task<ListAccountsResponse> ListAsync(ListAccountsRequest? request =
274
278
275
279
276
280
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
277
- httpRequest . Headers . Add ( "user-agent" , $ "speakeasy-sdk/ { _language } { _sdkVersion } { _sdkGenVersion } { _openapiDocVersion } " ) ;
281
+ httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
278
282
279
283
280
284
var client = _securityClient ;
@@ -289,9 +293,10 @@ public async Task<ListAccountsResponse> ListAsync(ListAccountsRequest? request =
289
293
ContentType = contentType ,
290
294
RawResponse = httpResponse
291
295
} ;
296
+
292
297
if ( ( response . StatusCode == 200 ) )
293
298
{
294
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
299
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
295
300
{
296
301
response . Accounts = JsonConvert . DeserializeObject < Accounts > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
297
302
}
@@ -300,7 +305,7 @@ public async Task<ListAccountsResponse> ListAsync(ListAccountsRequest? request =
300
305
}
301
306
if ( ( response . StatusCode == 400 ) || ( response . StatusCode == 401 ) || ( response . StatusCode == 404 ) || ( response . StatusCode == 409 ) )
302
307
{
303
- if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
308
+ if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
304
309
{
305
310
response . ErrorMessage = JsonConvert . DeserializeObject < ErrorMessage > ( await httpResponse . Content . ReadAsStringAsync ( ) , new JsonSerializerSettings ( ) { NullValueHandling = NullValueHandling . Ignore , Converters = new JsonConverter [ ] { new FlexibleObjectDeserializer ( ) , new EnumSerializer ( ) } } ) ;
306
311
}
0 commit comments