Skip to content

Commit 4af184b

Browse files
authored
Merge pull request #573 from codatio/speakeasy-sdk-regen-1732634660
chore: 🐝 Update SDK - Generate Bank Feeds library BANK-FEEDS-LIBRARY 7.0.0
2 parents b1db0a7 + 4ea86a5 commit 4af184b

97 files changed

Lines changed: 2646 additions & 442 deletions

File tree

Some content is hidden

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

.speakeasy/workflow.lock

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ sources:
1616
- main
1717
bank-feeds-source:
1818
sourceNamespace: bank-feeds-source
19-
sourceRevisionDigest: sha256:e4e149ee072f8b59d00e55582886a38d4c0fe44de48fdadc48654e6482ec525c
20-
sourceBlobDigest: sha256:a490b555d6f186cd37f72a06e06ba49293a0f371d145db2d9913d5081ecfc5a2
19+
sourceRevisionDigest: sha256:3f6eca31ed42017e87f8b7b80dc78dcad56cd815f794ae4da3903cfcfd4127bb
20+
sourceBlobDigest: sha256:b5233f0bab180b8aae271a0d5ab149316931ec9e84a140e1c073a2025305eb7d
2121
tags:
2222
- latest
23-
- main
23+
- speakeasy-sdk-regen-1732634660
24+
- 3.0.0
2425
banking-source:
2526
sourceNamespace: banking-source
2627
sourceRevisionDigest: sha256:a9c5ba21f35017109b81d29ec43b33f08085d83e7501bc8b20e319fecb9c14c7
@@ -127,8 +128,10 @@ targets:
127128
bank-feeds-library:
128129
source: bank-feeds-source
129130
sourceNamespace: bank-feeds-source
130-
sourceRevisionDigest: sha256:e4e149ee072f8b59d00e55582886a38d4c0fe44de48fdadc48654e6482ec525c
131-
sourceBlobDigest: sha256:a490b555d6f186cd37f72a06e06ba49293a0f371d145db2d9913d5081ecfc5a2
131+
sourceRevisionDigest: sha256:3f6eca31ed42017e87f8b7b80dc78dcad56cd815f794ae4da3903cfcfd4127bb
132+
sourceBlobDigest: sha256:b5233f0bab180b8aae271a0d5ab149316931ec9e84a140e1c073a2025305eb7d
133+
codeSamplesNamespace: bank-feeds-source-code-samples
134+
codeSamplesRevisionDigest: sha256:9eb69d3039e220032803399e96da8452398a4d8d7ab3b1359d0da54cffccee42
132135
banking-library:
133136
source: banking-source
134137
sourceNamespace: banking-source

bank-feeds/.speakeasy/gen.lock

Lines changed: 107 additions & 33 deletions
Large diffs are not rendered by default.

bank-feeds/.speakeasy/gen.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ generation:
1212
oAuth2PasswordEnabled: false
1313
telemetryEnabled: true
1414
go:
15-
version: 6.0.0
15+
version: 7.0.0
1616
additionalDependencies: {}
1717
allowUnknownFieldsInWeakUnions: false
1818
clientServerStatusCodesAsErrors: true
19+
defaultErrorName: SDKError
1920
flattenGlobalSecurity: false
2021
imports:
2122
option: openapi

bank-feeds/README.md

Lines changed: 27 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ package main
6161

6262
import (
6363
"context"
64-
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v6"
65-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/shared"
64+
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v7"
65+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/models/shared"
6666
"log"
6767
)
6868

@@ -112,6 +112,7 @@ func main() {
112112
* [Create](docs/sdks/companies/README.md#create) - Create company
113113
* [Delete](docs/sdks/companies/README.md#delete) - Delete a company
114114
* [Get](docs/sdks/companies/README.md#get) - Get company
115+
* [GetAccessToken](docs/sdks/companies/README.md#getaccesstoken) - Get company access token
115116
* [List](docs/sdks/companies/README.md#list) - List companies
116117
* [Update](docs/sdks/companies/README.md#update) - Update company
117118

@@ -134,7 +135,8 @@ func main() {
134135

135136
### [SourceAccounts](docs/sdks/sourceaccounts/README.md)
136137

137-
* [Create](docs/sdks/sourceaccounts/README.md#create) - Create source account
138+
* [Create](docs/sdks/sourceaccounts/README.md#create) - Create single source account
139+
* [CreateBatch](docs/sdks/sourceaccounts/README.md#createbatch) - Create source accounts
138140
* [Delete](docs/sdks/sourceaccounts/README.md#delete) - Delete source account
139141
* [DeleteCredentials](docs/sdks/sourceaccounts/README.md#deletecredentials) - Delete all source account credentials
140142
* [GenerateCredentials](docs/sdks/sourceaccounts/README.md#generatecredentials) - Generate source account credentials
@@ -148,6 +150,7 @@ func main() {
148150
### [Transactions](docs/sdks/transactions/README.md)
149151

150152
* [Create](docs/sdks/transactions/README.md#create) - Create bank transactions
153+
* [GetCreateModel](docs/sdks/transactions/README.md#getcreatemodel) - Get create bank transactions model
151154
* [GetCreateOperation](docs/sdks/transactions/README.md#getcreateoperation) - Get create operation
152155
* [ListCreateOperations](docs/sdks/transactions/README.md#listcreateoperations) - List create operations
153156

@@ -171,9 +174,9 @@ package main
171174

172175
import (
173176
"context"
174-
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v6"
175-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/shared"
176-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/retry"
177+
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v7"
178+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/models/shared"
179+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/retry"
177180
"log"
178181
"pkg/models/operations"
179182
)
@@ -216,9 +219,9 @@ package main
216219

217220
import (
218221
"context"
219-
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v6"
220-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/shared"
221-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/retry"
222+
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v7"
223+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/models/shared"
224+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/retry"
222225
"log"
223226
)
224227

@@ -267,10 +270,10 @@ By Default, an API error will return `sdkerrors.SDKError`. When custom error res
267270

268271
For example, the `Create` function may return the following errors:
269272

270-
| Error Type | Status Code | Content Type |
271-
| --------------------------------- | --------------------------------- | --------------------------------- |
272-
| sdkerrors.ErrorMessage | 400, 401, 402, 403, 429, 500, 503 | application/json |
273-
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
273+
| Error Type | Status Code | Content Type |
274+
| ---------------------- | --------------------------------- | ---------------- |
275+
| sdkerrors.ErrorMessage | 400, 401, 402, 403, 429, 500, 503 | application/json |
276+
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
274277

275278
### Example
276279

@@ -280,9 +283,9 @@ package main
280283
import (
281284
"context"
282285
"errors"
283-
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v6"
284-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/sdkerrors"
285-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/shared"
286+
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v7"
287+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/models/sdkerrors"
288+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/models/shared"
286289
"log"
287290
)
288291

@@ -322,60 +325,16 @@ func main() {
322325
<!-- Start Server Selection [server] -->
323326
## Server Selection
324327

325-
### Select Server by Index
326-
327-
You can override the default server globally using the `WithServerIndex` option 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:
328-
329-
| # | Server | Variables |
330-
| - | ------ | --------- |
331-
| 0 | `https://api.codat.io` | None |
332-
333-
#### Example
334-
335-
```go
336-
package main
337-
338-
import (
339-
"context"
340-
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v6"
341-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/shared"
342-
"log"
343-
)
344-
345-
func main() {
346-
s := bankfeeds.New(
347-
bankfeeds.WithServerIndex(0),
348-
bankfeeds.WithSecurity(shared.Security{
349-
AuthHeader: "Basic BASE_64_ENCODED(API_KEY)",
350-
}),
351-
)
352-
353-
ctx := context.Background()
354-
res, err := s.Companies.Create(ctx, &shared.CompanyRequestBody{
355-
Description: bankfeeds.String("Requested early access to the new financing scheme."),
356-
Name: "Technicalium",
357-
})
358-
if err != nil {
359-
log.Fatal(err)
360-
}
361-
if res.Company != nil {
362-
// handle response
363-
}
364-
}
365-
366-
```
367-
368-
369328
### Override Server URL Per-Client
370329

371-
The default server can also be overridden globally using the `WithServerURL` option when initializing the SDK client instance. For example:
330+
The default server can also be overridden globally using the `WithServerURL(serverURL string)` option when initializing the SDK client instance. For example:
372331
```go
373332
package main
374333

375334
import (
376335
"context"
377-
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v6"
378-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/shared"
336+
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v7"
337+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/models/shared"
379338
"log"
380339
)
381340

@@ -443,18 +402,18 @@ This can be a convenient way to configure timeouts, cookies, proxies, custom hea
443402

444403
This SDK supports the following security scheme globally:
445404

446-
| Name | Type | Scheme |
447-
| ------------ | ------------ | ------------ |
448-
| `AuthHeader` | apiKey | API key |
405+
| Name | Type | Scheme |
406+
| ------------ | ------ | ------- |
407+
| `AuthHeader` | apiKey | API key |
449408

450409
You can configure it using the `WithSecurity` option when initializing the SDK client instance. For example:
451410
```go
452411
package main
453412

454413
import (
455414
"context"
456-
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v6"
457-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/shared"
415+
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v7"
416+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/models/shared"
458417
"log"
459418
)
460419

bank-feeds/RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,4 +480,14 @@ Based on:
480480
### Generated
481481
- [go v6.0.0] bank-feeds
482482
### Releases
483-
- [Go v6.0.0] https://github.com/codatio/client-sdk-go/releases/tag/bank-feeds/v6.0.0 - bank-feeds
483+
- [Go v6.0.0] https://github.com/codatio/client-sdk-go/releases/tag/bank-feeds/v6.0.0 - bank-feeds
484+
485+
## 2024-11-26 15:24:13
486+
### Changes
487+
Based on:
488+
- OpenAPI Doc
489+
- Speakeasy CLI 1.446.1 (2.462.1) https://github.com/speakeasy-api/speakeasy
490+
### Generated
491+
- [go v7.0.0] bank-feeds
492+
### Releases
493+
- [Go v7.0.0] https://github.com/codatio/client-sdk-go/releases/tag/bank-feeds/v7.0.0 - bank-feeds

bank-feeds/USAGE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ package main
44

55
import (
66
"context"
7-
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v6"
8-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/shared"
7+
bankfeeds "github.com/codatio/client-sdk-go/bank-feeds/v7"
8+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/models/shared"
99
"log"
1010
)
1111

bank-feeds/accountmapping.go

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import (
66
"bytes"
77
"context"
88
"fmt"
9-
"github.com/cenkalti/backoff/v4"
10-
"github.com/codatio/client-sdk-go/bank-feeds/v6/internal/hooks"
11-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/operations"
12-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/sdkerrors"
13-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/shared"
14-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/retry"
15-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/utils"
9+
"github.com/codatio/client-sdk-go/bank-feeds/v7/internal/hooks"
10+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/models/operations"
11+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/models/sdkerrors"
12+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/models/shared"
13+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/retry"
14+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/utils"
1615
"net/http"
1716
)
1817

@@ -37,6 +36,27 @@ func newAccountMapping(sdkConfig sdkConfiguration) *AccountMapping {
3736
// > **For custom builds only**
3837
// >
3938
// > Only use this endpoint if you are building your own account management UI.
39+
//
40+
// #### Account mapping variability
41+
//
42+
// The method of mapping the source account to the target account varies depending on the accounting software your company uses.
43+
//
44+
// #### Mapping options:
45+
//
46+
// 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.
47+
// 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.
48+
// 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.
49+
//
50+
// ### Integration-specific behaviour
51+
//
52+
// | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |
53+
// | --------------------- | ----------- | ---------------- | --------------------------- |
54+
// | Xero | ✅ | ✅ | |
55+
// | FreeAgent | ✅ | ✅ | |
56+
// | Oracle NetSuite | ✅ | ✅ | |
57+
// | Exact Online (NL) | ✅ | ✅ | |
58+
// | QuickBooks Online | | | ✅ |
59+
// | Sage | | | ✅ |
4060
func (s *AccountMapping) Create(ctx context.Context, request operations.CreateBankAccountMappingRequest, opts ...operations.Option) (*operations.CreateBankAccountMappingResponse, error) {
4161
hookCtx := hooks.HookContext{
4262
Context: ctx,
@@ -129,7 +149,11 @@ func (s *AccountMapping) Create(ctx context.Context, request operations.CreateBa
129149

130150
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
131151
if err != nil {
132-
return nil, backoff.Permanent(err)
152+
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
153+
return nil, err
154+
}
155+
156+
return nil, retry.Permanent(err)
133157
}
134158

135159
httpRes, err := s.sdkConfiguration.Client.Do(req)
@@ -361,7 +385,11 @@ func (s *AccountMapping) Get(ctx context.Context, request operations.GetBankAcco
361385

362386
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
363387
if err != nil {
364-
return nil, backoff.Permanent(err)
388+
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
389+
return nil, err
390+
}
391+
392+
return nil, retry.Permanent(err)
365393
}
366394

367395
httpRes, err := s.sdkConfiguration.Client.Do(req)

bank-feeds/bankaccounts.go

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import (
66
"bytes"
77
"context"
88
"fmt"
9-
"github.com/cenkalti/backoff/v4"
10-
"github.com/codatio/client-sdk-go/bank-feeds/v6/internal/hooks"
11-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/operations"
12-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/sdkerrors"
13-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/models/shared"
14-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/retry"
15-
"github.com/codatio/client-sdk-go/bank-feeds/v6/pkg/utils"
9+
"github.com/codatio/client-sdk-go/bank-feeds/v7/internal/hooks"
10+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/models/operations"
11+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/models/sdkerrors"
12+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/models/shared"
13+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/retry"
14+
"github.com/codatio/client-sdk-go/bank-feeds/v7/pkg/utils"
1615
"net/http"
1716
)
1817

@@ -131,7 +130,11 @@ func (s *BankAccounts) Create(ctx context.Context, request operations.CreateBank
131130

132131
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
133132
if err != nil {
134-
return nil, backoff.Permanent(err)
133+
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
134+
return nil, err
135+
}
136+
137+
return nil, retry.Permanent(err)
135138
}
136139

137140
httpRes, err := s.sdkConfiguration.Client.Do(req)
@@ -363,7 +366,11 @@ func (s *BankAccounts) GetCreateModel(ctx context.Context, request operations.Ge
363366

364367
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
365368
if err != nil {
366-
return nil, backoff.Permanent(err)
369+
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
370+
return nil, err
371+
}
372+
373+
return nil, retry.Permanent(err)
367374
}
368375

369376
httpRes, err := s.sdkConfiguration.Client.Do(req)
@@ -595,7 +602,11 @@ func (s *BankAccounts) List(ctx context.Context, request operations.ListBankAcco
595602

596603
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
597604
if err != nil {
598-
return nil, backoff.Permanent(err)
605+
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
606+
return nil, err
607+
}
608+
609+
return nil, retry.Permanent(err)
599610
}
600611

601612
httpRes, err := s.sdkConfiguration.Client.Do(req)

0 commit comments

Comments
 (0)