Skip to content

Commit 58ee039

Browse files
ci: regenerated with OpenAPI Doc prealpha, Speakeay CLI 1.93.3 (#153)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
1 parent 8d64598 commit 58ee039

File tree

250 files changed

+1837
-1184
lines changed

Some content is hidden

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

250 files changed

+1837
-1184
lines changed

sync-for-expenses/CodatSyncExpenses/Accounts.cs

Lines changed: 75 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,37 @@ public interface IAccountsSDK
2929
/// Create account
3030
///
3131
/// <remarks>
32-
/// The *Create account* endpoint creates a new <a href="https://docs.codat.io/accounting-api#/schemas/Account">account</a> for a given company&apos;s connection.<br/>
32+
/// The *Create account* endpoint creates a new <a href="https://docs.codat.io/sync-for-expenses-api#/schemas/Account">account</a> for a given company&apos;s connection.<br/>
3333
/// <br/>
34-
/// <a href="https://docs.codat.io/accounting-api#/schemas/Account">Accounts</a> are the categories a business uses to record accounting transactions.<br/>
34+
/// <a href="https://docs.codat.io/sync-for-expenses-api#/schemas/Account">Accounts</a> are the categories a business uses to record accounting transactions.<br/>
3535
/// <br/>
3636
/// **Integration-specific behaviour**<br/>
3737
/// <br/>
38-
/// Required data may vary by integration. To see what data to post, first call <a href="https://docs.codat.io/accounting-api#/operations/get-create-chartOfAccounts-model">Get create account model</a>.<br/>
38+
/// Required data may vary by integration. To see what data to post, first call <a href="https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model">Get create account model</a>.<br/>
3939
/// <br/>
4040
/// Check out our <a href="https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&amp;dataType=chartOfAccounts">coverage explorer</a> for integrations that support creating an account.<br/>
4141
///
4242
/// </remarks>
4343
/// </summary>
4444
Task<Models.Operations.CreateAccountResponse> CreateAsync(CreateAccountRequest? request = null);
45+
46+
/// <summary>
47+
/// Get create account model
48+
///
49+
/// <remarks>
50+
/// 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-expenses-api#/schemas/Account">account</a> for a given company and integration.<br/>
51+
/// <br/>
52+
/// <a href="https://docs.codat.io/sync-for-expenses-api#/schemas/Account">Accounts</a> are the categories a business uses to record accounting transactions.<br/>
53+
/// <br/>
54+
/// **Integration-specific behaviour**<br/>
55+
/// <br/>
56+
/// See the *response examples* for integration-specific indicative models.<br/>
57+
/// <br/>
58+
/// Check out our <a href="https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&amp;dataType=chartOfAccounts">coverage explorer</a> for integrations that support creating an account.<br/>
59+
///
60+
/// </remarks>
61+
/// </summary>
62+
Task<GetCreateChartOfAccountsModelResponse> GetCreateModelAsync(GetCreateChartOfAccountsModelRequest? request = null);
4563
}
4664

4765
/// <summary>
@@ -51,9 +69,10 @@ public class AccountsSDK: IAccountsSDK
5169
{
5270
public SDKConfig Config { get; private set; }
5371
private const string _language = "csharp";
54-
private const string _sdkVersion = "2.1.0";
55-
private const string _sdkGenVersion = "2.129.1";
72+
private const string _sdkVersion = "3.1.0";
73+
private const string _sdkGenVersion = "2.146.1";
5674
private const string _openapiDocVersion = "prealpha";
75+
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.146.1 prealpha Codat.Sync.Expenses";
5776
private string _serverUrl = "";
5877
private ISpeakeasyHttpClient _defaultClient;
5978
private ISpeakeasyHttpClient _securityClient;
@@ -78,7 +97,7 @@ public AccountsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient secu
7897

7998

8099
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
81-
httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}");
100+
httpRequest.Headers.Add("user-agent", _userAgent);
82101

83102
var serializedBody = RequestBodySerializer.Serialize(request, "Account", "json");
84103
if (serializedBody != null)
@@ -100,7 +119,7 @@ public AccountsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient secu
100119
};
101120
if((response.StatusCode == 200))
102121
{
103-
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
122+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
104123
{
105124
response.CreateAccountResponseValue = JsonConvert.DeserializeObject<Models.Shared.CreateAccountResponse>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
106125
}
@@ -109,7 +128,55 @@ public AccountsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient secu
109128
}
110129
if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429))
111130
{
112-
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
131+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
132+
{
133+
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
134+
}
135+
136+
return response;
137+
}
138+
return response;
139+
}
140+
141+
142+
public async Task<GetCreateChartOfAccountsModelResponse> GetCreateModelAsync(GetCreateChartOfAccountsModelRequest? request = null)
143+
{
144+
string baseUrl = _serverUrl;
145+
if (baseUrl.EndsWith("/"))
146+
{
147+
baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
148+
}
149+
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts", request);
150+
151+
152+
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
153+
httpRequest.Headers.Add("user-agent", _userAgent);
154+
155+
156+
var client = _securityClient;
157+
158+
var httpResponse = await client.SendAsync(httpRequest);
159+
160+
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
161+
162+
var response = new GetCreateChartOfAccountsModelResponse
163+
{
164+
StatusCode = (int)httpResponse.StatusCode,
165+
ContentType = contentType,
166+
RawResponse = httpResponse
167+
};
168+
if((response.StatusCode == 200))
169+
{
170+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
171+
{
172+
response.PushOption = JsonConvert.DeserializeObject<PushOption>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
173+
}
174+
175+
return response;
176+
}
177+
if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429))
178+
{
179+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
113180
{
114181
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
115182
}

sync-for-expenses/CodatSyncExpenses/CodatSyncExpenses.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.Sync.Expenses</PackageId>
5-
<Version>2.1.0</Version>
5+
<Version>3.1.0</Version>
66
<Authors>Codat</Authors>
77
<TargetFramework>net6.0</TargetFramework>
88
<Nullable>enable</Nullable>

sync-for-expenses/CodatSyncExpenses/CodatSyncExpensesSDK.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace CodatSyncExpenses
1818
using System;
1919

2020
/// <summary>
21-
/// Sync for Expenses: The API for Sync for Expenses.&lt;br/&gt;
21+
/// Sync for Expenses: The API for Sync for Expenses.<br/>
2222
///
2323
/// <remarks>
2424
/// <br/>
@@ -72,7 +72,7 @@ public interface ICodatSyncExpensesSDK
7272
public IManageDataSDK ManageData { get; }
7373

7474
/// <summary>
75-
/// Access create, update and delete operations made to an SMB&amp;apos;s data connection.
75+
/// Access create, update and delete operations made to an SMB&apos;s data connection.
7676
/// </summary>
7777
public IPushOperationsSDK PushOperations { get; }
7878

@@ -97,7 +97,7 @@ public class SDKConfig
9797
}
9898

9999
/// <summary>
100-
/// Sync for Expenses: The API for Sync for Expenses.&lt;br/&gt;
100+
/// Sync for Expenses: The API for Sync for Expenses.<br/>
101101
///
102102
/// <remarks>
103103
/// <br/>
@@ -121,9 +121,10 @@ public class CodatSyncExpensesSDK: ICodatSyncExpensesSDK
121121
};
122122

123123
private const string _language = "csharp";
124-
private const string _sdkVersion = "2.1.0";
125-
private const string _sdkGenVersion = "2.129.1";
124+
private const string _sdkVersion = "3.1.0";
125+
private const string _sdkGenVersion = "2.146.1";
126126
private const string _openapiDocVersion = "prealpha";
127+
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.146.1 prealpha Codat.Sync.Expenses";
127128
private string _serverUrl = "";
128129
private ISpeakeasyHttpClient _defaultClient;
129130
private ISpeakeasyHttpClient _securityClient;

sync-for-expenses/CodatSyncExpenses/Companies.cs

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ public class CompaniesSDK: ICompaniesSDK
8383
{
8484
public SDKConfig Config { get; private set; }
8585
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 = "3.1.0";
87+
private const string _sdkGenVersion = "2.146.1";
8888
private const string _openapiDocVersion = "prealpha";
89+
private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.146.1 prealpha Codat.Sync.Expenses";
8990
private string _serverUrl = "";
9091
private ISpeakeasyHttpClient _defaultClient;
9192
private ISpeakeasyHttpClient _securityClient;
@@ -110,7 +111,7 @@ public async Task<CreateCompanyResponse> CreateAsync(CompanyRequestBody? request
110111

111112

112113
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);
114115

115116
var serializedBody = RequestBodySerializer.Serialize(request, "Request", "json");
116117
if (serializedBody != null)
@@ -132,7 +133,7 @@ public async Task<CreateCompanyResponse> CreateAsync(CompanyRequestBody? request
132133
};
133134
if((response.StatusCode == 200))
134135
{
135-
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
136+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
136137
{
137138
response.Company = JsonConvert.DeserializeObject<Company>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
138139
}
@@ -141,7 +142,7 @@ public async Task<CreateCompanyResponse> CreateAsync(CompanyRequestBody? request
141142
}
142143
if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 429))
143144
{
144-
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
145+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
145146
{
146147
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
147148
}
@@ -163,7 +164,7 @@ public async Task<DeleteCompanyResponse> DeleteAsync(DeleteCompanyRequest? reque
163164

164165

165166
var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString);
166-
httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}");
167+
httpRequest.Headers.Add("user-agent", _userAgent);
167168

168169

169170
var client = _securityClient;
@@ -185,7 +186,7 @@ public async Task<DeleteCompanyResponse> DeleteAsync(DeleteCompanyRequest? reque
185186
}
186187
if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429))
187188
{
188-
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
189+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
189190
{
190191
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
191192
}
@@ -207,7 +208,7 @@ public async Task<GetCompanyResponse> GetAsync(GetCompanyRequest? request = null
207208

208209

209210
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
210-
httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}");
211+
httpRequest.Headers.Add("user-agent", _userAgent);
211212

212213

213214
var client = _securityClient;
@@ -224,7 +225,7 @@ public async Task<GetCompanyResponse> GetAsync(GetCompanyRequest? request = null
224225
};
225226
if((response.StatusCode == 200))
226227
{
227-
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
228+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
228229
{
229230
response.Company = JsonConvert.DeserializeObject<Company>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
230231
}
@@ -233,7 +234,7 @@ public async Task<GetCompanyResponse> GetAsync(GetCompanyRequest? request = null
233234
}
234235
if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429))
235236
{
236-
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
237+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
237238
{
238239
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
239240
}
@@ -255,7 +256,7 @@ public async Task<ListCompaniesResponse> ListAsync(ListCompaniesRequest? request
255256

256257

257258
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
258-
httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}");
259+
httpRequest.Headers.Add("user-agent", _userAgent);
259260

260261

261262
var client = _securityClient;
@@ -272,7 +273,7 @@ public async Task<ListCompaniesResponse> ListAsync(ListCompaniesRequest? request
272273
};
273274
if((response.StatusCode == 200))
274275
{
275-
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
276+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
276277
{
277278
response.Companies = JsonConvert.DeserializeObject<Companies>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
278279
}
@@ -281,7 +282,7 @@ public async Task<ListCompaniesResponse> ListAsync(ListCompaniesRequest? request
281282
}
282283
if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 429))
283284
{
284-
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
285+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
285286
{
286287
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
287288
}
@@ -303,7 +304,7 @@ public async Task<UpdateCompanyResponse> UpdateAsync(UpdateCompanyRequest? reque
303304

304305

305306
var httpRequest = new HttpRequestMessage(HttpMethod.Put, urlString);
306-
httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}");
307+
httpRequest.Headers.Add("user-agent", _userAgent);
307308

308309
var serializedBody = RequestBodySerializer.Serialize(request, "CompanyRequestBody", "json");
309310
if (serializedBody != null)
@@ -325,7 +326,7 @@ public async Task<UpdateCompanyResponse> UpdateAsync(UpdateCompanyRequest? reque
325326
};
326327
if((response.StatusCode == 200))
327328
{
328-
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
329+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
329330
{
330331
response.Company = JsonConvert.DeserializeObject<Company>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
331332
}
@@ -334,7 +335,7 @@ public async Task<UpdateCompanyResponse> UpdateAsync(UpdateCompanyRequest? reque
334335
}
335336
if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429))
336337
{
337-
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
338+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
338339
{
339340
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
340341
}

0 commit comments

Comments
 (0)