@@ -41,7 +41,7 @@ public interface IAccounts
41
41
///
42
42
/// </remarks>
43
43
/// </summary>
44
- Task < Models . Operations . CreateAccountResponse > CreateAsync ( CreateAccountRequest ? request = null ) ;
44
+ Task < Models . Operations . CreateAccountResponse > CreateAsync ( CreateAccountRequest request ) ;
45
45
46
46
/// <summary>
47
47
/// Get create account model
@@ -59,7 +59,7 @@ public interface IAccounts
59
59
///
60
60
/// </remarks>
61
61
/// </summary>
62
- Task < GetCreateChartOfAccountsModelResponse > GetCreateModelAsync ( GetCreateChartOfAccountsModelRequest ? request = null ) ;
62
+ Task < GetCreateChartOfAccountsModelResponse > GetCreateModelAsync ( GetCreateChartOfAccountsModelRequest request ) ;
63
63
}
64
64
65
65
/// <summary>
@@ -69,10 +69,10 @@ public class Accounts: IAccounts
69
69
{
70
70
public SDKConfig SDKConfiguration { get ; private set ; }
71
71
private const string _language = "csharp" ;
72
- private const string _sdkVersion = "5.1 .0" ;
73
- private const string _sdkGenVersion = "2.257 .2" ;
72
+ private const string _sdkVersion = "5.2 .0" ;
73
+ private const string _sdkGenVersion = "2.286 .2" ;
74
74
private const string _openapiDocVersion = "prealpha" ;
75
- private const string _userAgent = "speakeasy-sdk/csharp 5.1 .0 2.257 .2 prealpha Codat.Sync.Expenses" ;
75
+ private const string _userAgent = "speakeasy-sdk/csharp 5.2 .0 2.286 .2 prealpha Codat.Sync.Expenses" ;
76
76
private string _serverUrl = "" ;
77
77
private ISpeakeasyHttpClient _defaultClient ;
78
78
private Func < Security > ? _securitySource ;
@@ -84,22 +84,21 @@ public Accounts(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySour
84
84
_serverUrl = serverUrl ;
85
85
SDKConfiguration = config ;
86
86
}
87
-
88
87
89
- public async Task < Models . Operations . CreateAccountResponse > CreateAsync ( CreateAccountRequest ? request = null )
88
+ public async Task < Models . Operations . CreateAccountResponse > CreateAsync ( CreateAccountRequest request )
90
89
{
91
90
string baseUrl = this . SDKConfiguration . GetTemplatedServerDetails ( ) ;
92
91
var urlString = URLBuilder . Build ( baseUrl , "/companies/{companyId}/connections/{connectionId}/push/accounts" , request ) ;
93
-
92
+
94
93
var httpRequest = new HttpRequestMessage ( HttpMethod . Post , urlString ) ;
95
94
httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
96
-
97
- var serializedBody = RequestBodySerializer . Serialize ( request , "AccountPrototype" , "json" ) ;
95
+
96
+ var serializedBody = RequestBodySerializer . Serialize ( request , "AccountPrototype" , "json" , false , true ) ;
98
97
if ( serializedBody != null )
99
98
{
100
99
httpRequest . Content = serializedBody ;
101
100
}
102
-
101
+
103
102
var client = _defaultClient ;
104
103
if ( _securitySource != null )
105
104
{
@@ -109,14 +108,14 @@ public Accounts(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySour
109
108
var httpResponse = await client . SendAsync ( httpRequest ) ;
110
109
111
110
var contentType = httpResponse . Content . Headers . ContentType ? . MediaType ;
112
-
111
+
113
112
var response = new Models . Operations . CreateAccountResponse
114
113
{
115
114
StatusCode = ( int ) httpResponse . StatusCode ,
116
115
ContentType = contentType ,
117
116
RawResponse = httpResponse
118
117
} ;
119
-
118
+
120
119
if ( ( response . StatusCode == 200 ) )
121
120
{
122
121
if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
@@ -126,6 +125,7 @@ public Accounts(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySour
126
125
127
126
return response ;
128
127
}
128
+
129
129
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 ) )
130
130
{
131
131
if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
@@ -138,17 +138,15 @@ public Accounts(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySour
138
138
return response ;
139
139
}
140
140
141
-
142
141
143
- public async Task < GetCreateChartOfAccountsModelResponse > GetCreateModelAsync ( GetCreateChartOfAccountsModelRequest ? request = null )
142
+ public async Task < GetCreateChartOfAccountsModelResponse > GetCreateModelAsync ( GetCreateChartOfAccountsModelRequest request )
144
143
{
145
144
string baseUrl = this . SDKConfiguration . GetTemplatedServerDetails ( ) ;
146
145
var urlString = URLBuilder . Build ( baseUrl , "/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts" , request ) ;
147
-
146
+
148
147
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
149
148
httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
150
-
151
-
149
+
152
150
var client = _defaultClient ;
153
151
if ( _securitySource != null )
154
152
{
@@ -158,14 +156,14 @@ public async Task<GetCreateChartOfAccountsModelResponse> GetCreateModelAsync(Get
158
156
var httpResponse = await client . SendAsync ( httpRequest ) ;
159
157
160
158
var contentType = httpResponse . Content . Headers . ContentType ? . MediaType ;
161
-
159
+
162
160
var response = new GetCreateChartOfAccountsModelResponse
163
161
{
164
162
StatusCode = ( int ) httpResponse . StatusCode ,
165
163
ContentType = contentType ,
166
164
RawResponse = httpResponse
167
165
} ;
168
-
166
+
169
167
if ( ( response . StatusCode == 200 ) )
170
168
{
171
169
if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
@@ -175,6 +173,7 @@ public async Task<GetCreateChartOfAccountsModelResponse> GetCreateModelAsync(Get
175
173
176
174
return response ;
177
175
}
176
+
178
177
if ( ( response . StatusCode == 401 ) || ( response . StatusCode == 402 ) || ( response . StatusCode == 403 ) || ( response . StatusCode == 404 ) || ( response . StatusCode == 429 ) || ( response . StatusCode == 500 ) || ( response . StatusCode == 503 ) )
179
178
{
180
179
if ( Utilities . IsContentTypeMatch ( "application/json" , response . ContentType ) )
@@ -187,6 +186,5 @@ public async Task<GetCreateChartOfAccountsModelResponse> GetCreateModelAsync(Get
187
186
return response ;
188
187
}
189
188
190
-
191
189
}
192
190
}
0 commit comments