Skip to content

Commit 54c071c

Browse files
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.6 (#303)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
1 parent b7d8379 commit 54c071c

File tree

671 files changed

+8401
-8325
lines changed

Some content is hidden

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

671 files changed

+8401
-8325
lines changed

.speakeasy/workflow.lock

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ sources:
3535
tags:
3636
- latest
3737
- main
38+
sync-for-payables-version-1-source:
39+
sourceNamespace: sync-for-payables-version-1-source
40+
sourceRevisionDigest: sha256:ab5650b5c0dfbe48558138381e9a3ca6930965548c7bc14a3f5e21e90fa746b1
41+
sourceBlobDigest: sha256:e1fb1fe0af40cf137b8b320fd75e913c83e54e0a2bb2e80a5af69e0bce409e71
42+
tags:
43+
- latest
44+
- main
3845
targets:
3946
bank-feeds-library:
4047
source: bank-feeds-source
@@ -61,6 +68,11 @@ targets:
6168
sourceNamespace: sync-for-expenses-source
6269
sourceRevisionDigest: sha256:ce40190cfe78e3f220050ea0830074c03d674b25d5760a37c9263161fc97e292
6370
sourceBlobDigest: sha256:7f399328e7bf537a3e5ee884667234673d34c00e889182df4e2b0500bb91dcfd
71+
sync-for-payables-version-1-library:
72+
source: sync-for-payables-version-1-source
73+
sourceNamespace: sync-for-payables-version-1-source
74+
sourceRevisionDigest: sha256:ab5650b5c0dfbe48558138381e9a3ca6930965548c7bc14a3f5e21e90fa746b1
75+
sourceBlobDigest: sha256:e1fb1fe0af40cf137b8b320fd75e913c83e54e0a2bb2e80a5af69e0bce409e71
6476
workflow:
6577
workflowVersion: 1.0.0
6678
speakeasyVersion: latest
@@ -96,6 +108,8 @@ workflow:
96108
sync-for-payables-version-1-source:
97109
inputs:
98110
- location: https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Payables-v1.yaml
111+
registry:
112+
location: registry.speakeasyapi.dev/codat/codat/sync-for-payables-version-1-source
99113
sync-for-payroll-source:
100114
inputs:
101115
- location: https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Payroll.yaml

.speakeasy/workflow.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ sources:
3232
sync-for-payables-version-1-source:
3333
inputs:
3434
- location: https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Payables-v1.yaml
35+
registry:
36+
location: registry.speakeasyapi.dev/codat/codat/sync-for-payables-version-1-source
3537
sync-for-payroll-source:
3638
inputs:
3739
- location: https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Payroll.yaml

previous-versions/sync-for-payables-version-1/.speakeasy/gen.lock

Lines changed: 1072 additions & 1064 deletions
Large diffs are not rendered by default.

previous-versions/sync-for-payables-version-1/Codat/Sync/Payables/V1/Accounts.cs

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
namespace Codat.Sync.Payables.V1
1111
{
1212
using Codat.Sync.Payables.V1.Hooks;
13+
using Codat.Sync.Payables.V1.Models.Components;
1314
using Codat.Sync.Payables.V1.Models.Errors;
14-
using Codat.Sync.Payables.V1.Models.Operations;
15-
using Codat.Sync.Payables.V1.Models.Shared;
15+
using Codat.Sync.Payables.V1.Models.Requests;
1616
using Codat.Sync.Payables.V1.Utils.Retries;
1717
using Codat.Sync.Payables.V1.Utils;
1818
using Newtonsoft.Json;
@@ -29,22 +29,17 @@ public interface IAccounts
2929
{
3030

3131
/// <summary>
32-
/// Create account
32+
/// List accounts
3333
///
3434
/// <remarks>
35-
/// The *Create account* endpoint creates a new <a href="https://docs.codat.io/sync-for-payables-api#/schemas/Account">account</a> for a given company&apos;s connection.<br/>
35+
/// The *List accounts* endpoint returns a list of <a href="https://docs.codat.io/sync-for-payables-api#/schemas/Account">accounts</a> for a given company&apos;s connection.<br/>
3636
/// <br/>
3737
/// <a href="https://docs.codat.io/sync-for-payables-api#/schemas/Account">Accounts</a> are the categories a business uses to record accounting transactions.<br/>
3838
/// <br/>
39-
/// **Integration-specific behaviour**<br/>
40-
/// <br/>
41-
/// Required data may vary by integration. To see what data to post, first call <a href="https://docs.codat.io/sync-for-payables-api#/operations/get-create-chartOfAccounts-model">Get create account model</a>.<br/>
42-
/// <br/>
43-
/// 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/>
44-
///
39+
/// Before using this endpoint, you must have <a href="https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data">retrieved data for the company</a>.
4540
/// </remarks>
4641
/// </summary>
47-
Task<Models.Operations.CreateAccountResponse> CreateAsync(CreateAccountRequest request, RetryConfig? retryConfig = null);
42+
Task<ListAccountsResponse> ListAsync(ListAccountsRequest request, RetryConfig? retryConfig = null);
4843

4944
/// <summary>
5045
/// Get account
@@ -81,17 +76,22 @@ public interface IAccounts
8176
Task<GetCreateAccountModelResponse> GetCreateModelAsync(GetCreateAccountModelRequest request, RetryConfig? retryConfig = null);
8277

8378
/// <summary>
84-
/// List accounts
79+
/// Create account
8580
///
8681
/// <remarks>
87-
/// The *List accounts* endpoint returns a list of <a href="https://docs.codat.io/sync-for-payables-api#/schemas/Account">accounts</a> for a given company&apos;s connection.<br/>
82+
/// The *Create account* endpoint creates a new <a href="https://docs.codat.io/sync-for-payables-api#/schemas/Account">account</a> for a given company&apos;s connection.<br/>
8883
/// <br/>
8984
/// <a href="https://docs.codat.io/sync-for-payables-api#/schemas/Account">Accounts</a> are the categories a business uses to record accounting transactions.<br/>
9085
/// <br/>
91-
/// Before using this endpoint, you must have <a href="https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data">retrieved data for the company</a>.
86+
/// **Integration-specific behaviour**<br/>
87+
/// <br/>
88+
/// Required data may vary by integration. To see what data to post, first call <a href="https://docs.codat.io/sync-for-payables-api#/operations/get-create-chartOfAccounts-model">Get create account model</a>.<br/>
89+
/// <br/>
90+
/// 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/>
91+
///
9292
/// </remarks>
9393
/// </summary>
94-
Task<ListAccountsResponse> ListAsync(ListAccountsRequest request, RetryConfig? retryConfig = null);
94+
Task<Models.Requests.CreateAccountResponse> CreateAsync(CreateAccountRequest request, RetryConfig? retryConfig = null);
9595
}
9696

9797
/// <summary>
@@ -101,42 +101,36 @@ public class Accounts: IAccounts
101101
{
102102
public SDKConfig SDKConfiguration { get; private set; }
103103
private const string _language = "csharp";
104-
private const string _sdkVersion = "3.3.1";
105-
private const string _sdkGenVersion = "2.413.0";
104+
private const string _sdkVersion = "4.0.0";
105+
private const string _sdkGenVersion = "2.415.6";
106106
private const string _openapiDocVersion = "3.0.0";
107-
private const string _userAgent = "speakeasy-sdk/csharp 3.3.1 2.413.0 3.0.0 Codat.Sync.Payables.V1";
107+
private const string _userAgent = "speakeasy-sdk/csharp 4.0.0 2.415.6 3.0.0 Codat.Sync.Payables.V1";
108108
private string _serverUrl = "";
109109
private ISpeakeasyHttpClient _client;
110-
private Func<Codat.Sync.Payables.V1.Models.Shared.Security>? _securitySource;
110+
private Func<Codat.Sync.Payables.V1.Models.Components.Security>? _securitySource;
111111

112-
public Accounts(ISpeakeasyHttpClient client, Func<Codat.Sync.Payables.V1.Models.Shared.Security>? securitySource, string serverUrl, SDKConfig config)
112+
public Accounts(ISpeakeasyHttpClient client, Func<Codat.Sync.Payables.V1.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
113113
{
114114
_client = client;
115115
_securitySource = securitySource;
116116
_serverUrl = serverUrl;
117117
SDKConfiguration = config;
118118
}
119119

120-
public async Task<Models.Operations.CreateAccountResponse> CreateAsync(CreateAccountRequest request, RetryConfig? retryConfig = null)
120+
public async Task<ListAccountsResponse> ListAsync(ListAccountsRequest request, RetryConfig? retryConfig = null)
121121
{
122122
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
123-
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/accounts", request);
123+
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/accounts", request);
124124

125-
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
125+
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
126126
httpRequest.Headers.Add("user-agent", _userAgent);
127127

128-
var serializedBody = RequestBodySerializer.Serialize(request, "AccountPrototype", "json", false, true);
129-
if (serializedBody != null)
130-
{
131-
httpRequest.Content = serializedBody;
132-
}
133-
134128
if (_securitySource != null)
135129
{
136130
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
137131
}
138132

139-
var hookCtx = new HookContext("create-account", null, _securitySource);
133+
var hookCtx = new HookContext("list-accounts", null, _securitySource);
140134

141135
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
142136
if (retryConfig == null)
@@ -181,7 +175,7 @@ public Accounts(ISpeakeasyHttpClient client, Func<Codat.Sync.Payables.V1.Models.
181175
httpResponse = await retries.Run();
182176
int _statusCode = (int)httpResponse.StatusCode;
183177

184-
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600)
178+
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 409 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600)
185179
{
186180
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
187181
if (_httpResponse != null)
@@ -211,22 +205,22 @@ public Accounts(ISpeakeasyHttpClient client, Func<Codat.Sync.Payables.V1.Models.
211205
{
212206
if(Utilities.IsContentTypeMatch("application/json", contentType))
213207
{
214-
var obj = ResponseBodyDeserializer.Deserialize<Models.Shared.CreateAccountResponse>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
215-
var response = new Models.Operations.CreateAccountResponse()
208+
var obj = ResponseBodyDeserializer.Deserialize<Models.Components.Accounts>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
209+
var response = new ListAccountsResponse()
216210
{
217211
StatusCode = responseStatusCode,
218212
ContentType = contentType,
219213
RawResponse = httpResponse
220214
};
221-
response.CreateAccountResponseValue = obj;
215+
response.Accounts = obj;
222216
return response;
223217
}
224218
else
225219
{
226220
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
227221
}
228222
}
229-
else if(new List<int>{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode))
223+
else if(new List<int>{400, 401, 402, 403, 404, 409, 429, 500, 503}.Contains(responseStatusCode))
230224
{
231225
if(Utilities.IsContentTypeMatch("application/json", contentType))
232226
{
@@ -498,20 +492,26 @@ public async Task<GetCreateAccountModelResponse> GetCreateModelAsync(GetCreateAc
498492
}
499493
}
500494

501-
public async Task<ListAccountsResponse> ListAsync(ListAccountsRequest request, RetryConfig? retryConfig = null)
495+
public async Task<Models.Requests.CreateAccountResponse> CreateAsync(CreateAccountRequest request, RetryConfig? retryConfig = null)
502496
{
503497
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
504-
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/accounts", request);
498+
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/accounts", request);
505499

506-
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
500+
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
507501
httpRequest.Headers.Add("user-agent", _userAgent);
508502

503+
var serializedBody = RequestBodySerializer.Serialize(request, "AccountPrototype", "json", false, true);
504+
if (serializedBody != null)
505+
{
506+
httpRequest.Content = serializedBody;
507+
}
508+
509509
if (_securitySource != null)
510510
{
511511
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
512512
}
513513

514-
var hookCtx = new HookContext("list-accounts", null, _securitySource);
514+
var hookCtx = new HookContext("create-account", null, _securitySource);
515515

516516
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
517517
if (retryConfig == null)
@@ -556,7 +556,7 @@ public async Task<ListAccountsResponse> ListAsync(ListAccountsRequest request, R
556556
httpResponse = await retries.Run();
557557
int _statusCode = (int)httpResponse.StatusCode;
558558

559-
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 409 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600)
559+
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600)
560560
{
561561
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
562562
if (_httpResponse != null)
@@ -586,22 +586,22 @@ public async Task<ListAccountsResponse> ListAsync(ListAccountsRequest request, R
586586
{
587587
if(Utilities.IsContentTypeMatch("application/json", contentType))
588588
{
589-
var obj = ResponseBodyDeserializer.Deserialize<Models.Shared.Accounts>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
590-
var response = new ListAccountsResponse()
589+
var obj = ResponseBodyDeserializer.Deserialize<Models.Components.CreateAccountResponse>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
590+
var response = new Models.Requests.CreateAccountResponse()
591591
{
592592
StatusCode = responseStatusCode,
593593
ContentType = contentType,
594594
RawResponse = httpResponse
595595
};
596-
response.Accounts = obj;
596+
response.CreateAccountResponseValue = obj;
597597
return response;
598598
}
599599
else
600600
{
601601
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
602602
}
603603
}
604-
else if(new List<int>{400, 401, 402, 403, 404, 409, 429, 500, 503}.Contains(responseStatusCode))
604+
else if(new List<int>{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode))
605605
{
606606
if(Utilities.IsContentTypeMatch("application/json", contentType))
607607
{

0 commit comments

Comments
 (0)