Skip to content

Commit e86c1bb

Browse files
authored
Release fix for sync for payables deployment (#282)
Co-authored-by: David Coplowe <d.coplowe@codat.io>
1 parent e5e437d commit e86c1bb

File tree

2 files changed

+60
-245
lines changed

2 files changed

+60
-245
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
configVersion: 2.0.0
22
generation:
3-
sdkClassName: SDK
3+
sdkClassName: Codat.SyncPayables
44
maintainOpenAPIOrder: true
55
usageSnippets:
66
optionalPropertyRendering: withExample
@@ -10,11 +10,12 @@ generation:
1010
parameterOrderingFeb2024: true
1111
requestResponseComponentNamesFeb2024: true
1212
auth:
13-
oAuth2ClientCredentialsEnabled: true
13+
oAuth2ClientCredentialsEnabled: false
1414
csharp:
15-
version: 0.0.10
15+
version: 3.2.0
1616
additionalDependencies: []
17-
author: Speakeasy
17+
author: Codat
18+
description: Streamline your customers' accounts payable workflow.
1819
clientServerStatusCodesAsErrors: true
1920
disableNamespacePascalCasingApr2024: true
2021
dotnetVersion: net8.0
@@ -30,8 +31,8 @@ csharp:
3031
webhooks: Models/Webhooks
3132
includeDebugSymbols: false
3233
inputModelSuffix: input
33-
maxMethodParams: 4
34+
maxMethodParams: 0
3435
outputModelSuffix: output
35-
packageName: Openapi
36+
packageName: Codat.Sync.Payables
3637
packageTags: ""
37-
responseFormat: envelope-http
38+
responseFormat: envelope

sync-for-payables/README.md

Lines changed: 52 additions & 238 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,40 @@
1-
# Openapi
1+
# Sync for Payables
22

3-
<div align="left">
4-
<a href="https://www.speakeasy.com/?utm_source=openapi&utm_campaign=csharp"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
5-
<a href="https://opensource.org/licenses/MIT">
6-
<img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
7-
</a>
8-
</div>
9-
10-
11-
## 🏗 **Welcome to your new SDK!** 🏗
12-
13-
It has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps:
14-
- [ ] 🛠 Make your SDK feel handcrafted by [customizing it](https://www.speakeasy.com/docs/customize-sdks)
15-
- [ ] ♻️ Refine your SDK quickly by iterating locally with the [Speakeasy CLI](https://github.com/speakeasy-api/speakeasy)
16-
- [ ] 🎁 Publish your SDK to package managers by [configuring automatic publishing](https://www.speakeasy.com/docs/advanced-setup/publish-sdks)
17-
- [ ] ✨ When ready to productionize, delete this section from the README
18-
19-
<!-- Start Summary [summary] -->
20-
## Summary
21-
22-
Bill pay kit: The API reference for the Bill Pay kit.
23-
24-
The bill pay kit is an API and a set of supporting tools designed to integrate a bill pay flow into your app as quickly as possible. It's ideal for facilitating essential bill payment processes within your SMB's accounting software.
25-
26-
[Explore product](https://docs.codat.io/payables/bill-pay-kit) | [See OpenAPI spec](https://github.com/codatio/oas)
27-
28-
---
29-
<!-- Start Codat Tags Table -->
30-
## Endpoints
31-
32-
| Endpoints | Description |
33-
| :- |:- |
34-
| Companies | Create and manage your SMB users' companies. |
35-
| Connections | Create new and manage existing data connections for a company. |
36-
| Company information | View company profile from the source platform. |
37-
| Bills | Get, create, and update Bills. |
38-
| Bill payments | Get, create, and update Bill payments. |
39-
| Suppliers | Get, create, and update Suppliers. |
40-
| Bank accounts | Create a bank account for a given company's connection. |
41-
<!-- End Codat Tags Table -->
42-
<!-- End Summary [summary] -->
43-
44-
<!-- Start Table of Contents [toc] -->
45-
## Table of Contents
46-
47-
* [SDK Installation](#sdk-installation)
48-
* [SDK Example Usage](#sdk-example-usage)
49-
* [Available Resources and Operations](#available-resources-and-operations)
50-
* [Retries](#retries)
51-
* [Error Handling](#error-handling)
52-
* [Server Selection](#server-selection)
53-
* [Authentication](#authentication)
54-
<!-- End Table of Contents [toc] -->
3+
<!-- Start Codat Library Description -->
4+
Streamline your customers' accounts payable workflow.
5+
<!-- End Codat Library Description -->
556

567
<!-- Start SDK Installation [installation] -->
578
## SDK Installation
589

59-
### NuGet
60-
61-
To add the [NuGet](https://www.nuget.org/) package to a .NET project:
62-
```bash
63-
dotnet add package Openapi
64-
```
65-
66-
### Locally
10+
### Nuget
6711

68-
To add a reference to a local instance of the SDK in a .NET project:
6912
```bash
70-
dotnet add reference Openapi/Openapi.csproj
13+
dotnet add package Codat.Sync.Payables
7114
```
7215
<!-- End SDK Installation [installation] -->
7316

17+
## Example Usage
7418
<!-- Start SDK Example Usage [usage] -->
7519
## SDK Example Usage
7620

7721
### Example
7822

7923
```csharp
80-
using Openapi;
81-
using Openapi.Models.Requests;
82-
using Openapi.Models.Components;
24+
using Codat.Sync.Payables;
25+
using Codat.Sync.Payables.Models.Shared;
26+
using System.Collections.Generic;
8327

84-
var sdk = new SDK(authHeader: "Basic BASE_64_ENCODED(API_KEY)");
28+
var sdk = new CodatSyncPayables(security: new Security() {
29+
AuthHeader = "Basic BASE_64_ENCODED(API_KEY)",
30+
});
8531

86-
var res = await sdk.Companies.ListAsync(
87-
page: 1,
88-
pageSize: 100,
89-
query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
90-
orderBy: "-modifiedDate"
91-
);
32+
CompanyRequestBody req = new CompanyRequestBody() {
33+
Description = "Requested early access to the new financing scheme.",
34+
Name = "Bank of Dave",
35+
};
36+
37+
var res = await sdk.Companies.CreateAsync(req);
9238

9339
// handle response
9440
```
@@ -99,161 +45,30 @@ var res = await sdk.Companies.ListAsync(
9945

10046
### [Companies](docs/sdks/companies/README.md)
10147

102-
* [List](docs/sdks/companies/README.md#list) - List companies
10348
* [Create](docs/sdks/companies/README.md#create) - Create company
104-
* [Update](docs/sdks/companies/README.md#update) - Update company
10549
* [Delete](docs/sdks/companies/README.md#delete) - Delete a company
10650
* [Get](docs/sdks/companies/README.md#get) - Get company
107-
108-
### [Connections](docs/sdks/connections/README.md)
109-
110-
* [List](docs/sdks/connections/README.md#list) - List connections
111-
* [Create](docs/sdks/connections/README.md#create) - Create connection
112-
* [Get](docs/sdks/connections/README.md#get) - Get connection
113-
* [Delete](docs/sdks/connections/README.md#delete) - Delete connection
114-
* [Unlink](docs/sdks/connections/README.md#unlink) - Unlink connection
115-
116-
### [CompanyInformation](docs/sdks/companyinformation/README.md)
117-
118-
* [Get](docs/sdks/companyinformation/README.md#get) - Get company information
51+
* [List](docs/sdks/companies/README.md#list) - List companies
52+
* [Update](docs/sdks/companies/README.md#update) - Update company
11953

12054
### [Bills](docs/sdks/bills/README.md)
12155

122-
* [GetBillOptions](docs/sdks/bills/README.md#getbilloptions) - Get bill mapping options
12356
* [List](docs/sdks/bills/README.md#list) - List bills
124-
* [Create](docs/sdks/bills/README.md#create) - Create bill
125-
* [UploadAttachment](docs/sdks/bills/README.md#uploadattachment) - Upload bill attachment
126-
* [ListAttachments](docs/sdks/bills/README.md#listattachments) - List bill attachments
127-
* [DownloadAttachment](docs/sdks/bills/README.md#downloadattachment) - Download bill attachment
128-
129-
### [BillPayments](docs/sdks/billpayments/README.md)
130-
131-
* [GetPaymentOptions](docs/sdks/billpayments/README.md#getpaymentoptions) - Get payment mapping options
132-
* [Create](docs/sdks/billpayments/README.md#create) - Create bill payment
133-
134-
### [Suppliers](docs/sdks/suppliers/README.md)
13557

136-
* [List](docs/sdks/suppliers/README.md#list) - List suppliers
137-
* [Create](docs/sdks/suppliers/README.md#create) - Create supplier
138-
139-
### [BankAccounts](docs/sdks/bankaccounts/README.md)
58+
### [Connections](docs/sdks/connections/README.md)
14059

141-
* [Create](docs/sdks/bankaccounts/README.md#create) - Create bank account
60+
* [Create](docs/sdks/connections/README.md#create) - Create connection
61+
* [Delete](docs/sdks/connections/README.md#delete) - Delete connection
62+
* [Get](docs/sdks/connections/README.md#get) - Get connection
63+
* [List](docs/sdks/connections/README.md#list) - List connections
64+
* [Unlink](docs/sdks/connections/README.md#unlink) - Unlink connection
14265
<!-- End Available Resources and Operations [operations] -->
14366

144-
<!-- Start Retries [retries] -->
145-
## Retries
146-
147-
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
148-
149-
To change the default retry strategy for a single API call, simply pass a `RetryConfig` to the call:
150-
```csharp
151-
using Openapi;
152-
using Openapi.Models.Requests;
153-
using Openapi.Models.Components;
154-
155-
var sdk = new SDK(authHeader: "Basic BASE_64_ENCODED(API_KEY)");
156-
157-
var res = await sdk.Companies.ListAsync(
158-
retryConfig: new RetryConfig(
159-
strategy: RetryConfig.RetryStrategy.BACKOFF,
160-
backoff: new BackoffStrategy(
161-
initialIntervalMs: 1L,
162-
maxIntervalMs: 50L,
163-
maxElapsedTimeMs: 100L,
164-
exponent: 1.1
165-
),
166-
retryConnectionErrors: false
167-
),
168-
page: 1,
169-
pageSize: 100,
170-
query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
171-
orderBy: "-modifiedDate"
172-
);
173-
174-
// handle response
175-
```
176-
177-
If you'd like to override the default retry strategy for all operations that support retries, you can use the `RetryConfig` optional parameter when intitializing the SDK:
178-
```csharp
179-
using Openapi;
180-
using Openapi.Models.Requests;
181-
using Openapi.Models.Components;
182-
183-
var sdk = new SDK(
184-
retryConfig: new RetryConfig(
185-
strategy: RetryConfig.RetryStrategy.BACKOFF,
186-
backoff: new BackoffStrategy(
187-
initialIntervalMs: 1L,
188-
maxIntervalMs: 50L,
189-
maxElapsedTimeMs: 100L,
190-
exponent: 1.1
191-
),
192-
retryConnectionErrors: false
193-
),
194-
authHeader: "Basic BASE_64_ENCODED(API_KEY)"
195-
);
196-
197-
var res = await sdk.Companies.ListAsync(
198-
page: 1,
199-
pageSize: 100,
200-
query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
201-
orderBy: "-modifiedDate"
202-
);
203-
204-
// handle response
205-
```
206-
<!-- End Retries [retries] -->
207-
208-
<!-- Start Error Handling [errors] -->
209-
## Error Handling
210-
211-
Handling errors in this SDK should largely match your expectations. All operations return a response object or thow an exception. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate type.
212-
213-
| Error Object | Status Code | Content Type |
214-
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
215-
| Openapi.Models.Errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json |
216-
| Openapi.Models.Errors.SDKException | 4xx-5xx | */* |
217-
218-
### Example
219-
220-
```csharp
221-
using Openapi;
222-
using Openapi.Models.Requests;
223-
using Openapi.Models.Components;
224-
using System;
225-
using Openapi.Models.Errors;
226-
227-
var sdk = new SDK(authHeader: "Basic BASE_64_ENCODED(API_KEY)");
228-
229-
try
230-
{
231-
var res = await sdk.Companies.ListAsync(
232-
page: 1,
233-
pageSize: 100,
234-
query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
235-
orderBy: "-modifiedDate"
236-
);
237-
238-
// handle response
239-
}
240-
catch (Exception ex)
241-
{
242-
if (ex is ErrorMessage)
243-
{
244-
// handle exception
245-
}
246-
else if (ex is Openapi.Models.Errors.SDKException)
247-
{
248-
// handle exception
249-
}
250-
}
251-
```
252-
<!-- End Error Handling [errors] -->
253-
25467
<!-- Start Server Selection [server] -->
25568
## Server Selection
25669

70+
## Server Selection
71+
25772
### Select Server by Index
25873

25974
You can override the default server globally by passing a server index to the `serverIndex: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
@@ -279,40 +94,39 @@ This SDK supports the following security scheme globally:
27994

28095
| Name | Type | Scheme |
28196
| ------------ | ------------ | ------------ |
282-
| `AuthHeader` | apiKey | API key |
97+
| `authHeader` | apiKey | API key |
28398

284-
To authenticate with the API the `AuthHeader` parameter must be set when initializing the SDK client instance. For example:
99+
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:
285100
```csharp
286-
using Openapi;
287-
using Openapi.Models.Requests;
288-
using Openapi.Models.Components;
101+
using Codat.Sync.Payables;
102+
using Codat.Sync.Payables.Models.Shared;
103+
using System.Collections.Generic;
289104

290-
var sdk = new SDK(authHeader: "Basic BASE_64_ENCODED(API_KEY)");
105+
var sdk = new CodatSyncPayables(security: new Security() {
106+
AuthHeader = "Basic BASE_64_ENCODED(API_KEY)",
107+
});
291108

292-
var res = await sdk.Companies.ListAsync(
293-
page: 1,
294-
pageSize: 100,
295-
query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
296-
orderBy: "-modifiedDate"
297-
);
109+
CompanyRequestBody req = new CompanyRequestBody() {
110+
Description = "Requested early access to the new financing scheme.",
111+
Name = "Bank of Dave",
112+
};
113+
114+
var res = await sdk.Companies.CreateAsync(req);
298115

299116
// handle response
300117
```
301118
<!-- End Authentication [security] -->
302119

303120
<!-- Placeholder for Future Speakeasy SDK Sections -->
304121

305-
# Development
306-
307-
## Maturity
308-
309-
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
310-
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
311-
looking for the latest version.
312-
313-
## Contributions
122+
<!-- Start Codat Support Notes -->
123+
### Support
314124

315-
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
316-
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
125+
If you encounter any challenges while utilizing our SDKs, please don't hesitate to reach out for assistance.
126+
You can raise any issues by contacting your dedicated Codat representative or reaching out to our [support team](mailto:support@codat.io).
127+
We're here to help ensure a smooth experience for you.
128+
<!-- End Codat Support Notes -->
317129

318-
### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=openapi&utm_campaign=csharp)
130+
<!-- Start Codat Generated By -->
131+
### Library generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
132+
<!-- End Codat Generated By -->

0 commit comments

Comments
 (0)