Skip to content

Commit 8cb1e1f

Browse files
ci: regenerated with OpenAPI Doc 3.0.0, Speakeay CLI 1.90.0 (#111)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
1 parent 8026de6 commit 8cb1e1f

39 files changed

+622
-365
lines changed

sync-for-payables/CodatSyncPayables/Accounts.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ public class AccountsSDK: IAccountsSDK
9595
{
9696
public SDKConfig Config { get; private set; }
9797
private const string _language = "csharp";
98-
private const string _sdkVersion = "1.1.0";
99-
private const string _sdkGenVersion = "2.116.0";
98+
private const string _sdkVersion = "1.2.0";
99+
private const string _sdkGenVersion = "2.125.1";
100100
private const string _openapiDocVersion = "3.0.0";
101101
private string _serverUrl = "";
102102
private ISpeakeasyHttpClient _defaultClient;

sync-for-payables/CodatSyncPayables/BillCreditNotes.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ public class BillCreditNotesSDK: IBillCreditNotesSDK
114114
{
115115
public SDKConfig Config { get; private set; }
116116
private const string _language = "csharp";
117-
private const string _sdkVersion = "1.1.0";
118-
private const string _sdkGenVersion = "2.116.0";
117+
private const string _sdkVersion = "1.2.0";
118+
private const string _sdkGenVersion = "2.125.1";
119119
private const string _openapiDocVersion = "3.0.0";
120120
private string _serverUrl = "";
121121
private ISpeakeasyHttpClient _defaultClient;

sync-for-payables/CodatSyncPayables/BillPayments.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ public class BillPaymentsSDK: IBillPaymentsSDK
127127
{
128128
public SDKConfig Config { get; private set; }
129129
private const string _language = "csharp";
130-
private const string _sdkVersion = "1.1.0";
131-
private const string _sdkGenVersion = "2.116.0";
130+
private const string _sdkVersion = "1.2.0";
131+
private const string _sdkGenVersion = "2.125.1";
132132
private const string _openapiDocVersion = "3.0.0";
133133
private string _serverUrl = "";
134134
private ISpeakeasyHttpClient _defaultClient;

sync-for-payables/CodatSyncPayables/Bills.cs

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,35 @@ public interface IBillsSDK
7979
/// </summary>
8080
Task<DeleteBillResponse> DeleteAsync(DeleteBillRequest? request = null);
8181

82+
/// <summary>
83+
/// Delete bill attachment
84+
///
85+
/// <remarks>
86+
/// The *Delete bill attachment* endpoint allows you to delete a specified bill attachment from an accounting platform. <br/>
87+
/// <br/>
88+
/// <a href="https://docs.codat.io/accounting-api#/schemas/Bill">Bills</a> are invoices<br/>
89+
/// that represent the SMB&apos;s financial obligations to their supplier for a<br/>
90+
/// purchase of goods or services. <br/>
91+
/// <br/>
92+
/// ### Process <br/>
93+
/// <br/>
94+
/// 1. Pass the `{billId}` and `{attachmentId}` to the *Delete bill attachment* endpoint and store the `pushOperationKey` returned. <br/>
95+
/// <br/>
96+
/// 2. Check the status of the delete operation by checking the status of push operation either via <br/>
97+
/// <br/>
98+
/// 1. <a href="https://docs.codat.io/introduction/webhookscore-rules-types#push-operation-status-has-changed">Push operation webhook</a> (advised), <br/>
99+
/// <br/>
100+
/// 2. <a href="https://docs.codat.io/sync-for-payables-api#/operations/get-push-operation">Push operation status endpoint</a>. A `Success` status indicates that the bill attachment object was deleted from the accounting platform. <br/>
101+
/// <br/>
102+
/// 3. (Optional) Check that the bill attachment was deleted from the accounting platform. <br/>
103+
/// <br/>
104+
/// &gt;**Supported Integrations**<br/>
105+
/// &gt;<br/>
106+
/// &gt;This functionality is currently only supported for our QuickBooks Online integration.
107+
/// </remarks>
108+
/// </summary>
109+
Task<DeleteBillAttachmentResponse> DeleteAttachmentAsync(DeleteBillAttachmentRequest? request = null);
110+
82111
/// <summary>
83112
/// Download bill attachment
84113
///
@@ -210,8 +239,8 @@ public class BillsSDK: IBillsSDK
210239
{
211240
public SDKConfig Config { get; private set; }
212241
private const string _language = "csharp";
213-
private const string _sdkVersion = "1.1.0";
214-
private const string _sdkGenVersion = "2.116.0";
242+
private const string _sdkVersion = "1.2.0";
243+
private const string _sdkGenVersion = "2.125.1";
215244
private const string _openapiDocVersion = "3.0.0";
216245
private string _serverUrl = "";
217246
private ISpeakeasyHttpClient _defaultClient;
@@ -327,6 +356,54 @@ public async Task<DeleteBillResponse> DeleteAsync(DeleteBillRequest? request = n
327356
}
328357

329358

359+
public async Task<DeleteBillAttachmentResponse> DeleteAttachmentAsync(DeleteBillAttachmentRequest? request = null)
360+
{
361+
string baseUrl = _serverUrl;
362+
if (baseUrl.EndsWith("/"))
363+
{
364+
baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
365+
}
366+
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/bills/{billId}/attachments/{attachmentId}", request);
367+
368+
369+
var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString);
370+
httpRequest.Headers.Add("user-agent", $"speakeasy-sdk/{_language} {_sdkVersion} {_sdkGenVersion} {_openapiDocVersion}");
371+
372+
373+
var client = _securityClient;
374+
375+
var httpResponse = await client.SendAsync(httpRequest);
376+
377+
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
378+
379+
var response = new DeleteBillAttachmentResponse
380+
{
381+
StatusCode = (int)httpResponse.StatusCode,
382+
ContentType = contentType,
383+
RawResponse = httpResponse
384+
};
385+
if((response.StatusCode == 200))
386+
{
387+
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
388+
{
389+
response.PushOperation = JsonConvert.DeserializeObject<PushOperation>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }});
390+
}
391+
392+
return response;
393+
}
394+
if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429))
395+
{
396+
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
397+
{
398+
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }});
399+
}
400+
401+
return response;
402+
}
403+
return response;
404+
}
405+
406+
330407
public async Task<DownloadBillAttachmentResponse> DownloadAttachmentAsync(DownloadBillAttachmentRequest? request = null)
331408
{
332409
string baseUrl = _serverUrl;

sync-for-payables/CodatSyncPayables/CodatSyncPayables.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.Payables</PackageId>
5-
<Version>1.1.0</Version>
5+
<Version>1.2.0</Version>
66
<Authors>Codat</Authors>
77
<TargetFramework>net6.0</TargetFramework>
88
<Nullable>enable</Nullable>

sync-for-payables/CodatSyncPayables/CodatSyncPayablesSDK.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ public class CodatSyncPayablesSDK: ICodatSyncPayablesSDK
141141
};
142142

143143
private const string _language = "csharp";
144-
private const string _sdkVersion = "1.1.0";
145-
private const string _sdkGenVersion = "2.116.0";
144+
private const string _sdkVersion = "1.2.0";
145+
private const string _sdkGenVersion = "2.125.1";
146146
private const string _openapiDocVersion = "3.0.0";
147147
private string _serverUrl = "";
148148
private ISpeakeasyHttpClient _defaultClient;

sync-for-payables/CodatSyncPayables/Companies.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ public class CompaniesSDK: ICompaniesSDK
8080
{
8181
public SDKConfig Config { get; private set; }
8282
private const string _language = "csharp";
83-
private const string _sdkVersion = "1.1.0";
84-
private const string _sdkGenVersion = "2.116.0";
83+
private const string _sdkVersion = "1.2.0";
84+
private const string _sdkGenVersion = "2.125.1";
8585
private const string _openapiDocVersion = "3.0.0";
8686
private string _serverUrl = "";
8787
private ISpeakeasyHttpClient _defaultClient;

sync-for-payables/CodatSyncPayables/CompanyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public class CompanyInfoSDK: ICompanyInfoSDK
3939
{
4040
public SDKConfig Config { get; private set; }
4141
private const string _language = "csharp";
42-
private const string _sdkVersion = "1.1.0";
43-
private const string _sdkGenVersion = "2.116.0";
42+
private const string _sdkVersion = "1.2.0";
43+
private const string _sdkGenVersion = "2.125.1";
4444
private const string _openapiDocVersion = "3.0.0";
4545
private string _serverUrl = "";
4646
private ISpeakeasyHttpClient _defaultClient;

sync-for-payables/CodatSyncPayables/Connections.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ public class ConnectionsSDK: IConnectionsSDK
7878
{
7979
public SDKConfig Config { get; private set; }
8080
private const string _language = "csharp";
81-
private const string _sdkVersion = "1.1.0";
82-
private const string _sdkGenVersion = "2.116.0";
81+
private const string _sdkVersion = "1.2.0";
82+
private const string _sdkGenVersion = "2.125.1";
8383
private const string _openapiDocVersion = "3.0.0";
8484
private string _serverUrl = "";
8585
private ISpeakeasyHttpClient _defaultClient;

sync-for-payables/CodatSyncPayables/JournalEntries.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public class JournalEntriesSDK: IJournalEntriesSDK
6666
{
6767
public SDKConfig Config { get; private set; }
6868
private const string _language = "csharp";
69-
private const string _sdkVersion = "1.1.0";
70-
private const string _sdkGenVersion = "2.116.0";
69+
private const string _sdkVersion = "1.2.0";
70+
private const string _sdkGenVersion = "2.125.1";
7171
private const string _openapiDocVersion = "3.0.0";
7272
private string _serverUrl = "";
7373
private ISpeakeasyHttpClient _defaultClient;

sync-for-payables/CodatSyncPayables/Journals.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ public class JournalsSDK: IJournalsSDK
9696
{
9797
public SDKConfig Config { get; private set; }
9898
private const string _language = "csharp";
99-
private const string _sdkVersion = "1.1.0";
100-
private const string _sdkGenVersion = "2.116.0";
99+
private const string _sdkVersion = "1.2.0";
100+
private const string _sdkGenVersion = "2.125.1";
101101
private const string _openapiDocVersion = "3.0.0";
102102
private string _serverUrl = "";
103103
private ISpeakeasyHttpClient _defaultClient;

sync-for-payables/CodatSyncPayables/ManageData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ public class ManageDataSDK: IManageDataSDK
8282
{
8383
public SDKConfig Config { get; private set; }
8484
private const string _language = "csharp";
85-
private const string _sdkVersion = "1.1.0";
86-
private const string _sdkGenVersion = "2.116.0";
85+
private const string _sdkVersion = "1.2.0";
86+
private const string _sdkGenVersion = "2.125.1";
8787
private const string _openapiDocVersion = "3.0.0";
8888
private string _serverUrl = "";
8989
private ISpeakeasyHttpClient _defaultClient;
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
//------------------------------------------------------------------------------
3+
// <auto-generated>
4+
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost when
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
#nullable enable
11+
namespace CodatSyncPayables.Models.Operations
12+
{
13+
using CodatSyncPayables.Utils;
14+
15+
public class DeleteBillAttachmentRequest
16+
{
17+
18+
/// <summary>
19+
/// Unique identifier for an attachment
20+
/// </summary>
21+
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=attachmentId")]
22+
public string AttachmentId { get; set; } = default!;
23+
24+
/// <summary>
25+
/// Unique identifier for a bill
26+
/// </summary>
27+
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=billId")]
28+
public string BillId { get; set; } = default!;
29+
30+
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")]
31+
public string CompanyId { get; set; } = default!;
32+
33+
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")]
34+
public string ConnectionId { get; set; } = default!;
35+
}
36+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
//------------------------------------------------------------------------------
3+
// <auto-generated>
4+
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost when
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
#nullable enable
11+
namespace CodatSyncPayables.Models.Operations
12+
{
13+
using CodatSyncPayables.Models.Shared;
14+
using System.Net.Http;
15+
using System;
16+
17+
public class DeleteBillAttachmentResponse
18+
{
19+
20+
public string? ContentType { get; set; } = default!;
21+
22+
/// <summary>
23+
/// Your API request was not properly authorized.
24+
/// </summary>
25+
public ErrorMessage? ErrorMessage { get; set; }
26+
27+
/// <summary>
28+
/// OK
29+
/// </summary>
30+
public PushOperation? PushOperation { get; set; }
31+
32+
public int StatusCode { get; set; } = default!;
33+
34+
public HttpResponseMessage? RawResponse { get; set; }
35+
}
36+
}

sync-for-payables/CodatSyncPayables/PaymentMethods.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public class PaymentMethodsSDK: IPaymentMethodsSDK
6060
{
6161
public SDKConfig Config { get; private set; }
6262
private const string _language = "csharp";
63-
private const string _sdkVersion = "1.1.0";
64-
private const string _sdkGenVersion = "2.116.0";
63+
private const string _sdkVersion = "1.2.0";
64+
private const string _sdkGenVersion = "2.125.1";
6565
private const string _openapiDocVersion = "3.0.0";
6666
private string _serverUrl = "";
6767
private ISpeakeasyHttpClient _defaultClient;

sync-for-payables/CodatSyncPayables/PushOperations.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public class PushOperationsSDK: IPushOperationsSDK
4848
{
4949
public SDKConfig Config { get; private set; }
5050
private const string _language = "csharp";
51-
private const string _sdkVersion = "1.1.0";
52-
private const string _sdkGenVersion = "2.116.0";
51+
private const string _sdkVersion = "1.2.0";
52+
private const string _sdkGenVersion = "2.125.1";
5353
private const string _openapiDocVersion = "3.0.0";
5454
private string _serverUrl = "";
5555
private ISpeakeasyHttpClient _defaultClient;

sync-for-payables/CodatSyncPayables/Suppliers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ public class SuppliersSDK: ISuppliersSDK
114114
{
115115
public SDKConfig Config { get; private set; }
116116
private const string _language = "csharp";
117-
private const string _sdkVersion = "1.1.0";
118-
private const string _sdkGenVersion = "2.116.0";
117+
private const string _sdkVersion = "1.2.0";
118+
private const string _sdkGenVersion = "2.125.1";
119119
private const string _openapiDocVersion = "3.0.0";
120120
private string _serverUrl = "";
121121
private ISpeakeasyHttpClient _defaultClient;

sync-for-payables/CodatSyncPayables/TaxRates.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public class TaxRatesSDK: ITaxRatesSDK
6060
{
6161
public SDKConfig Config { get; private set; }
6262
private const string _language = "csharp";
63-
private const string _sdkVersion = "1.1.0";
64-
private const string _sdkGenVersion = "2.116.0";
63+
private const string _sdkVersion = "1.2.0";
64+
private const string _sdkGenVersion = "2.125.1";
6565
private const string _openapiDocVersion = "3.0.0";
6666
private string _serverUrl = "";
6767
private ISpeakeasyHttpClient _defaultClient;

sync-for-payables/CodatSyncPayables/TrackingCategories.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public class TrackingCategoriesSDK: ITrackingCategoriesSDK
6060
{
6161
public SDKConfig Config { get; private set; }
6262
private const string _language = "csharp";
63-
private const string _sdkVersion = "1.1.0";
64-
private const string _sdkGenVersion = "2.116.0";
63+
private const string _sdkVersion = "1.2.0";
64+
private const string _sdkGenVersion = "2.125.1";
6565
private const string _openapiDocVersion = "3.0.0";
6666
private string _serverUrl = "";
6767
private ISpeakeasyHttpClient _defaultClient;

0 commit comments

Comments
 (0)