Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 3.0.0, Speakeay CLI 1.90.0 (#111)
Browse files Browse the repository at this point in the history
Co-authored-by: speakeasybot <[email protected]>
  • Loading branch information
github-actions[bot] and speakeasybot authored Sep 22, 2023
1 parent 8026de6 commit 8cb1e1f
Show file tree
Hide file tree
Showing 39 changed files with 622 additions and 365 deletions.
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/Accounts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ public class AccountsSDK: IAccountsSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/BillCreditNotes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ public class BillCreditNotesSDK: IBillCreditNotesSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/BillPayments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ public class BillPaymentsSDK: IBillPaymentsSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
81 changes: 79 additions & 2 deletions sync-for-payables/CodatSyncPayables/Bills.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,35 @@ public interface IBillsSDK
/// </summary>
Task<DeleteBillResponse> DeleteAsync(DeleteBillRequest? request = null);

/// <summary>
/// Delete bill attachment
///
/// <remarks>
/// The *Delete bill attachment* endpoint allows you to delete a specified bill attachment from an accounting platform. <br/>
/// <br/>
/// <a href="https://docs.codat.io/accounting-api#/schemas/Bill">Bills</a> are invoices<br/>
/// that represent the SMB&apos;s financial obligations to their supplier for a<br/>
/// purchase of goods or services. <br/>
/// <br/>
/// ### Process <br/>
/// <br/>
/// 1. Pass the `{billId}` and `{attachmentId}` to the *Delete bill attachment* endpoint and store the `pushOperationKey` returned. <br/>
/// <br/>
/// 2. Check the status of the delete operation by checking the status of push operation either via <br/>
/// <br/>
/// 1. <a href="https://docs.codat.io/introduction/webhookscore-rules-types#push-operation-status-has-changed">Push operation webhook</a> (advised), <br/>
/// <br/>
/// 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/>
/// <br/>
/// 3. (Optional) Check that the bill attachment was deleted from the accounting platform. <br/>
/// <br/>
/// &gt;**Supported Integrations**<br/>
/// &gt;<br/>
/// &gt;This functionality is currently only supported for our QuickBooks Online integration.
/// </remarks>
/// </summary>
Task<DeleteBillAttachmentResponse> DeleteAttachmentAsync(DeleteBillAttachmentRequest? request = null);

/// <summary>
/// Download bill attachment
///
Expand Down Expand Up @@ -210,8 +239,8 @@ public class BillsSDK: IBillsSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down Expand Up @@ -327,6 +356,54 @@ public async Task<DeleteBillResponse> DeleteAsync(DeleteBillRequest? request = n
}


public async Task<DeleteBillAttachmentResponse> DeleteAttachmentAsync(DeleteBillAttachmentRequest? request = null)
{
string baseUrl = _serverUrl;
if (baseUrl.EndsWith("/"))
{
baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
}
var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/bills/{billId}/attachments/{attachmentId}", request);


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


var client = _securityClient;

var httpResponse = await client.SendAsync(httpRequest);

var contentType = httpResponse.Content.Headers.ContentType?.MediaType;

var response = new DeleteBillAttachmentResponse
{
StatusCode = (int)httpResponse.StatusCode,
ContentType = contentType,
RawResponse = httpResponse
};
if((response.StatusCode == 200))
{
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
{
response.PushOperation = JsonConvert.DeserializeObject<PushOperation>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }});
}

return response;
}
if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429))
{
if(Utilities.IsContentTypeMatch("application/json", response.ContentType))
{
response.ErrorMessage = JsonConvert.DeserializeObject<ErrorMessage>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }});
}

return response;
}
return response;
}


public async Task<DownloadBillAttachmentResponse> DownloadAttachmentAsync(DownloadBillAttachmentRequest? request = null)
{
string baseUrl = _serverUrl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>Codat.Sync.Payables</PackageId>
<Version>1.1.0</Version>
<Version>1.2.0</Version>
<Authors>Codat</Authors>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
Expand Down
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/CodatSyncPayablesSDK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ public class CodatSyncPayablesSDK: ICodatSyncPayablesSDK
};

private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/Companies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public class CompaniesSDK: ICompaniesSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/CompanyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public class CompanyInfoSDK: ICompanyInfoSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/Connections.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ public class ConnectionsSDK: IConnectionsSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/JournalEntries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public class JournalEntriesSDK: IJournalEntriesSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/Journals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public class JournalsSDK: IJournalsSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/ManageData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public class ManageDataSDK: IManageDataSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace CodatSyncPayables.Models.Operations
{
using CodatSyncPayables.Utils;

public class DeleteBillAttachmentRequest
{

/// <summary>
/// Unique identifier for an attachment
/// </summary>
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=attachmentId")]
public string AttachmentId { get; set; } = default!;

/// <summary>
/// Unique identifier for a bill
/// </summary>
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=billId")]
public string BillId { get; set; } = default!;

[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")]
public string CompanyId { get; set; } = default!;

[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")]
public string ConnectionId { get; set; } = default!;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace CodatSyncPayables.Models.Operations
{
using CodatSyncPayables.Models.Shared;
using System.Net.Http;
using System;

public class DeleteBillAttachmentResponse
{

public string? ContentType { get; set; } = default!;

/// <summary>
/// Your API request was not properly authorized.
/// </summary>
public ErrorMessage? ErrorMessage { get; set; }

/// <summary>
/// OK
/// </summary>
public PushOperation? PushOperation { get; set; }

public int StatusCode { get; set; } = default!;

public HttpResponseMessage? RawResponse { get; set; }
}
}
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/PaymentMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public class PaymentMethodsSDK: IPaymentMethodsSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/PushOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public class PushOperationsSDK: IPushOperationsSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/Suppliers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ public class SuppliersSDK: ISuppliersSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/TaxRates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public class TaxRatesSDK: ITaxRatesSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
4 changes: 2 additions & 2 deletions sync-for-payables/CodatSyncPayables/TrackingCategories.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public class TrackingCategoriesSDK: ITrackingCategoriesSDK
{
public SDKConfig Config { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "1.1.0";
private const string _sdkGenVersion = "2.116.0";
private const string _sdkVersion = "1.2.0";
private const string _sdkGenVersion = "2.125.1";
private const string _openapiDocVersion = "3.0.0";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
Expand Down
Loading

0 comments on commit 8cb1e1f

Please sign in to comment.