Skip to content

Commit 427f1b4

Browse files
ci: regenerated with OpenAPI Doc 3.0.0, Speakeasy CLI 1.393.0 (#285)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
1 parent 59f0d5e commit 427f1b4

File tree

197 files changed

+2414
-2024
lines changed

Some content is hidden

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

197 files changed

+2414
-2024
lines changed

sync-for-payables/.speakeasy/gen.lock

Lines changed: 138 additions & 141 deletions
Large diffs are not rendered by default.

sync-for-payables/.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ csharp:
1515
version: 4.0.0
1616
additionalDependencies: []
1717
author: Codat
18-
description: Streamline your customers' accounts payable workflow.
1918
clientServerStatusCodesAsErrors: true
19+
description: Streamline your customers' accounts payable workflow.
2020
disableNamespacePascalCasingApr2024: true
2121
dotnetVersion: net8.0
2222
enableSourceLink: false

sync-for-payables/Openapi.sln renamed to sync-for-payables/Codat.Sync.Payables.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Openapi", "Openapi\Openapi.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}"
3+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Codat.Sync.Payables", "Codat\Sync\Payables\Codat.Sync.Payables.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}"
44
EndProject
55

66
Global

sync-for-payables/Openapi/BankAccounts.cs renamed to sync-for-payables/Codat/Sync/Payables/BankAccounts.cs

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
// </auto-generated>
88
//------------------------------------------------------------------------------
99
#nullable enable
10-
namespace Openapi
10+
namespace Codat.Sync.Payables
1111
{
12+
using Codat.Sync.Payables.Hooks;
13+
using Codat.Sync.Payables.Models.Components;
14+
using Codat.Sync.Payables.Models.Errors;
15+
using Codat.Sync.Payables.Models.Requests;
16+
using Codat.Sync.Payables.Utils.Retries;
17+
using Codat.Sync.Payables.Utils;
1218
using Newtonsoft.Json;
13-
using Openapi.Hooks;
14-
using Openapi.Models.Components;
15-
using Openapi.Models.Errors;
16-
using Openapi.Models.Requests;
17-
using Openapi.Utils.Retries;
18-
using Openapi.Utils;
1919
using System.Collections.Generic;
2020
using System.Net.Http.Headers;
2121
using System.Net.Http;
@@ -37,7 +37,7 @@ public interface IBankAccounts
3737
/// <a href="https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount">Bank accounts</a> are financial accounts maintained by a bank or other financial institution.
3838
/// </remarks>
3939
/// </summary>
40-
Task<CreateBankAccountResponse> CreateAsync(string companyId, string connectionId, string? idempotencyKey = null, BankAccountPrototype? bankAccountPrototype = null, RetryConfig? retryConfig = null);
40+
Task<CreateBankAccountResponse> CreateAsync(CreateBankAccountRequest request, RetryConfig? retryConfig = null);
4141
}
4242

4343
/// <summary>
@@ -47,31 +47,24 @@ public class BankAccounts: IBankAccounts
4747
{
4848
public SDKConfig SDKConfiguration { get; private set; }
4949
private const string _language = "csharp";
50-
private const string _sdkVersion = "0.0.10";
51-
private const string _sdkGenVersion = "2.411.9";
50+
private const string _sdkVersion = "4.0.0";
51+
private const string _sdkGenVersion = "2.413.0";
5252
private const string _openapiDocVersion = "3.0.0";
53-
private const string _userAgent = "speakeasy-sdk/csharp 0.0.10 2.411.9 3.0.0 Openapi";
53+
private const string _userAgent = "speakeasy-sdk/csharp 4.0.0 2.413.0 3.0.0 Codat.Sync.Payables";
5454
private string _serverUrl = "";
5555
private ISpeakeasyHttpClient _client;
56-
private Func<Openapi.Models.Components.Security>? _securitySource;
56+
private Func<Codat.Sync.Payables.Models.Components.Security>? _securitySource;
5757

58-
public BankAccounts(ISpeakeasyHttpClient client, Func<Openapi.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
58+
public BankAccounts(ISpeakeasyHttpClient client, Func<Codat.Sync.Payables.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
5959
{
6060
_client = client;
6161
_securitySource = securitySource;
6262
_serverUrl = serverUrl;
6363
SDKConfiguration = config;
6464
}
6565

66-
public async Task<CreateBankAccountResponse> CreateAsync(string companyId, string connectionId, string? idempotencyKey = null, BankAccountPrototype? bankAccountPrototype = null, RetryConfig? retryConfig = null)
66+
public async Task<CreateBankAccountResponse> CreateAsync(CreateBankAccountRequest request, RetryConfig? retryConfig = null)
6767
{
68-
var request = new CreateBankAccountRequest()
69-
{
70-
CompanyId = companyId,
71-
ConnectionId = connectionId,
72-
IdempotencyKey = idempotencyKey,
73-
BankAccountPrototype = bankAccountPrototype,
74-
};
7568
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
7669
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/payables/bankAccounts", request);
7770

@@ -127,7 +120,7 @@ public async Task<CreateBankAccountResponse> CreateAsync(string companyId, strin
127120
var _httpRequest = await _client.CloneAsync(httpRequest);
128121
return await _client.SendAsync(_httpRequest);
129122
};
130-
var retries = new Openapi.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
123+
var retries = new Codat.Sync.Payables.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
131124

132125
HttpResponseMessage httpResponse;
133126
try
@@ -168,18 +161,16 @@ public async Task<CreateBankAccountResponse> CreateAsync(string companyId, strin
168161
var obj = ResponseBodyDeserializer.Deserialize<BankAccount>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
169162
var response = new CreateBankAccountResponse()
170163
{
171-
HttpMeta = new Models.Components.HTTPMetadata()
172-
{
173-
Response = httpResponse,
174-
Request = httpRequest
175-
}
164+
StatusCode = responseStatusCode,
165+
ContentType = contentType,
166+
RawResponse = httpResponse
176167
};
177168
response.BankAccount = obj;
178169
return response;
179170
}
180171
else
181172
{
182-
throw new SDKException("Unknown content type received", httpRequest, httpResponse);
173+
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
183174
}
184175
}
185176
else if(new List<int>{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode))
@@ -191,16 +182,16 @@ public async Task<CreateBankAccountResponse> CreateAsync(string companyId, strin
191182
}
192183
else
193184
{
194-
throw new SDKException("Unknown content type received", httpRequest, httpResponse);
185+
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
195186
}
196187
}
197188
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
198189
{
199-
throw new SDKException("API error occurred", httpRequest, httpResponse);
190+
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
200191
}
201192
else
202193
{
203-
throw new SDKException("Unknown status code received", httpRequest, httpResponse);
194+
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
204195
}
205196
}
206197
}

sync-for-payables/Openapi/BillPayments.cs renamed to sync-for-payables/Codat/Sync/Payables/BillPayments.cs

Lines changed: 30 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
// </auto-generated>
88
//------------------------------------------------------------------------------
99
#nullable enable
10-
namespace Openapi
10+
namespace Codat.Sync.Payables
1111
{
12+
using Codat.Sync.Payables.Hooks;
13+
using Codat.Sync.Payables.Models.Components;
14+
using Codat.Sync.Payables.Models.Errors;
15+
using Codat.Sync.Payables.Models.Requests;
16+
using Codat.Sync.Payables.Utils.Retries;
17+
using Codat.Sync.Payables.Utils;
1218
using Newtonsoft.Json;
13-
using Openapi.Hooks;
14-
using Openapi.Models.Components;
15-
using Openapi.Models.Errors;
16-
using Openapi.Models.Requests;
17-
using Openapi.Utils.Retries;
18-
using Openapi.Utils;
1919
using System.Collections.Generic;
2020
using System.Net.Http.Headers;
2121
using System.Net.Http;
@@ -39,7 +39,7 @@ public interface IBillPayments
3939
/// Mapping options are a set of bank accounts used to configure the SMB&apos;s payables integration.
4040
/// </remarks>
4141
/// </summary>
42-
Task<GetMappingOptionsPaymentsResponse> GetPaymentOptionsAsync(string companyId, string connectionId, string? continuationToken = null, string? statusQuery = null, RetryConfig? retryConfig = null);
42+
Task<GetMappingOptionsPaymentsResponse> GetPaymentOptionsAsync(GetMappingOptionsPaymentsRequest request, RetryConfig? retryConfig = null);
4343

4444
/// <summary>
4545
/// Create bill payment
@@ -60,31 +60,24 @@ public class BillPayments: IBillPayments
6060
{
6161
public SDKConfig SDKConfiguration { get; private set; }
6262
private const string _language = "csharp";
63-
private const string _sdkVersion = "0.0.10";
64-
private const string _sdkGenVersion = "2.411.9";
63+
private const string _sdkVersion = "4.0.0";
64+
private const string _sdkGenVersion = "2.413.0";
6565
private const string _openapiDocVersion = "3.0.0";
66-
private const string _userAgent = "speakeasy-sdk/csharp 0.0.10 2.411.9 3.0.0 Openapi";
66+
private const string _userAgent = "speakeasy-sdk/csharp 4.0.0 2.413.0 3.0.0 Codat.Sync.Payables";
6767
private string _serverUrl = "";
6868
private ISpeakeasyHttpClient _client;
69-
private Func<Openapi.Models.Components.Security>? _securitySource;
69+
private Func<Codat.Sync.Payables.Models.Components.Security>? _securitySource;
7070

71-
public BillPayments(ISpeakeasyHttpClient client, Func<Openapi.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
71+
public BillPayments(ISpeakeasyHttpClient client, Func<Codat.Sync.Payables.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
7272
{
7373
_client = client;
7474
_securitySource = securitySource;
7575
_serverUrl = serverUrl;
7676
SDKConfiguration = config;
7777
}
7878

79-
public async Task<GetMappingOptionsPaymentsResponse> GetPaymentOptionsAsync(string companyId, string connectionId, string? continuationToken = null, string? statusQuery = null, RetryConfig? retryConfig = null)
79+
public async Task<GetMappingOptionsPaymentsResponse> GetPaymentOptionsAsync(GetMappingOptionsPaymentsRequest request, RetryConfig? retryConfig = null)
8080
{
81-
var request = new GetMappingOptionsPaymentsRequest()
82-
{
83-
CompanyId = companyId,
84-
ConnectionId = connectionId,
85-
ContinuationToken = continuationToken,
86-
StatusQuery = statusQuery,
87-
};
8881
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
8982
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/payables/mappingOptions/payments", request);
9083

@@ -133,7 +126,7 @@ public async Task<GetMappingOptionsPaymentsResponse> GetPaymentOptionsAsync(stri
133126
var _httpRequest = await _client.CloneAsync(httpRequest);
134127
return await _client.SendAsync(_httpRequest);
135128
};
136-
var retries = new Openapi.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
129+
var retries = new Codat.Sync.Payables.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
137130

138131
HttpResponseMessage httpResponse;
139132
try
@@ -174,18 +167,16 @@ public async Task<GetMappingOptionsPaymentsResponse> GetPaymentOptionsAsync(stri
174167
var obj = ResponseBodyDeserializer.Deserialize<PaymentMappingOptions>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
175168
var response = new GetMappingOptionsPaymentsResponse()
176169
{
177-
HttpMeta = new Models.Components.HTTPMetadata()
178-
{
179-
Response = httpResponse,
180-
Request = httpRequest
181-
}
170+
StatusCode = responseStatusCode,
171+
ContentType = contentType,
172+
RawResponse = httpResponse
182173
};
183174
response.PaymentMappingOptions = obj;
184175
return response;
185176
}
186177
else
187178
{
188-
throw new SDKException("Unknown content type received", httpRequest, httpResponse);
179+
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
189180
}
190181
}
191182
else if(new List<int>{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode))
@@ -197,16 +188,16 @@ public async Task<GetMappingOptionsPaymentsResponse> GetPaymentOptionsAsync(stri
197188
}
198189
else
199190
{
200-
throw new SDKException("Unknown content type received", httpRequest, httpResponse);
191+
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
201192
}
202193
}
203194
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
204195
{
205-
throw new SDKException("API error occurred", httpRequest, httpResponse);
196+
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
206197
}
207198
else
208199
{
209-
throw new SDKException("Unknown status code received", httpRequest, httpResponse);
200+
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
210201
}
211202
}
212203

@@ -267,7 +258,7 @@ public async Task<CreateBillPaymentResponse> CreateAsync(CreateBillPaymentReques
267258
var _httpRequest = await _client.CloneAsync(httpRequest);
268259
return await _client.SendAsync(_httpRequest);
269260
};
270-
var retries = new Openapi.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
261+
var retries = new Codat.Sync.Payables.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
271262

272263
HttpResponseMessage httpResponse;
273264
try
@@ -308,18 +299,16 @@ public async Task<CreateBillPaymentResponse> CreateAsync(CreateBillPaymentReques
308299
var obj = ResponseBodyDeserializer.Deserialize<BillPayment>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
309300
var response = new CreateBillPaymentResponse()
310301
{
311-
HttpMeta = new Models.Components.HTTPMetadata()
312-
{
313-
Response = httpResponse,
314-
Request = httpRequest
315-
}
302+
StatusCode = responseStatusCode,
303+
ContentType = contentType,
304+
RawResponse = httpResponse
316305
};
317306
response.BillPayment = obj;
318307
return response;
319308
}
320309
else
321310
{
322-
throw new SDKException("Unknown content type received", httpRequest, httpResponse);
311+
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
323312
}
324313
}
325314
else if(new List<int>{400, 401, 402, 403, 404, 409, 429, 500, 503}.Contains(responseStatusCode))
@@ -331,16 +320,16 @@ public async Task<CreateBillPaymentResponse> CreateAsync(CreateBillPaymentReques
331320
}
332321
else
333322
{
334-
throw new SDKException("Unknown content type received", httpRequest, httpResponse);
323+
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
335324
}
336325
}
337326
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
338327
{
339-
throw new SDKException("API error occurred", httpRequest, httpResponse);
328+
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
340329
}
341330
else
342331
{
343-
throw new SDKException("Unknown status code received", httpRequest, httpResponse);
332+
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
344333
}
345334
}
346335
}

0 commit comments

Comments
 (0)