Skip to content

Commit dff57e7

Browse files
authored
Merge pull request #575 from codatio/speakeasy-sdk-regen-1732638572
chore: 🐝 Update SDK - Generate Commerce library COMMERCE-LIBRARY 3.0.0
2 parents 4af184b + 813f728 commit dff57e7

101 files changed

Lines changed: 1035 additions & 1121 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: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
speakeasyVersion: 1.446.1
1+
speakeasyVersion: 1.447.0
22
sources:
33
accounting-source:
44
sourceNamespace: accounting-source
@@ -31,11 +31,12 @@ sources:
3131
- main
3232
commerce-source:
3333
sourceNamespace: commerce-source
34-
sourceRevisionDigest: sha256:f1f300bfa266578165fefb3f3f9c255fa11790fdcdc1f383ab554d34257a7c41
35-
sourceBlobDigest: sha256:6f1199c3d0384446a3a88e1c9a018ec6487a1cb391d46f4f4bbf4b7fce00a339
34+
sourceRevisionDigest: sha256:ee3aca155030d0547f29ee64fd18e229f9b52d993d001497870313dc1c7c81ab
35+
sourceBlobDigest: sha256:73a47ab404944bff6ed8d00026f964258da0ee1a81b5106ca87aa7036b1df49d
3636
tags:
3737
- latest
38-
- main
38+
- speakeasy-sdk-regen-1732638572
39+
- 3.0.0
3940
common-source:
4041
sourceNamespace: common-source
4142
sourceRevisionDigest: sha256:fe2bb6cab589215db3bd3d276d904394d44e6b1a3f28d917b7f818528d7df119
@@ -140,8 +141,10 @@ targets:
140141
commerce-library:
141142
source: commerce-source
142143
sourceNamespace: commerce-source
143-
sourceRevisionDigest: sha256:f1f300bfa266578165fefb3f3f9c255fa11790fdcdc1f383ab554d34257a7c41
144-
sourceBlobDigest: sha256:6f1199c3d0384446a3a88e1c9a018ec6487a1cb391d46f4f4bbf4b7fce00a339
144+
sourceRevisionDigest: sha256:ee3aca155030d0547f29ee64fd18e229f9b52d993d001497870313dc1c7c81ab
145+
sourceBlobDigest: sha256:73a47ab404944bff6ed8d00026f964258da0ee1a81b5106ca87aa7036b1df49d
146+
codeSamplesNamespace: commerce-source-code-samples
147+
codeSamplesRevisionDigest: sha256:49cbbb2ebc2d6c3bb2440645d77b11394bb0e11ca039a97bd6f9ebeacbc837db
145148
common-library:
146149
source: common-source
147150
sourceNamespace: common-source

previous-versions/commerce/.speakeasy/gen.lock

Lines changed: 162 additions & 160 deletions
Large diffs are not rendered by default.

previous-versions/commerce/.speakeasy/gen.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ generation:
99
requestResponseComponentNamesFeb2024: false
1010
auth:
1111
oAuth2ClientCredentialsEnabled: false
12+
oAuth2PasswordEnabled: false
1213
telemetryEnabled: true
1314
go:
14-
version: 0.26.0
15+
version: 3.0.0
1516
additionalDependencies: {}
1617
allowUnknownFieldsInWeakUnions: false
1718
clientServerStatusCodesAsErrors: true
19+
defaultErrorName: SDKError
1820
flattenGlobalSecurity: false
1921
imports:
2022
option: openapi

previous-versions/commerce/README.md

Lines changed: 40 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ package main
2626

2727
import (
2828
"context"
29-
"github.com/codatio/client-sdk-go/previous-versions/commerce"
30-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/operations"
31-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/shared"
29+
commerce "github.com/codatio/client-sdk-go/previous-versions/commerce/v3"
30+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/operations"
31+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/shared"
3232
"log"
3333
)
3434

@@ -43,7 +43,7 @@ func main() {
4343
res, err := s.Customers.Get(ctx, operations.GetCustomerRequest{
4444
CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002",
4545
ConnectionID: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
46-
CustomerID: "<value>",
46+
CustomerID: "7110701885",
4747
})
4848
if err != nil {
4949
log.Fatal(err)
@@ -118,12 +118,6 @@ func main() {
118118

119119

120120

121-
<!-- Start Special Types [types] -->
122-
## Special Types
123-
124-
125-
<!-- End Special Types [types] -->
126-
127121
<!-- Start Summary [summary] -->
128122
## Summary
129123

@@ -170,7 +164,6 @@ Standardize how you connect to your customers’ payment, PoS, and eCommerce sys
170164
* [Server Selection](#server-selection)
171165
* [Custom HTTP Client](#custom-http-client)
172166
* [Authentication](#authentication)
173-
* [Special Types](#special-types)
174167
<!-- End Table of Contents [toc] -->
175168

176169
<!-- Start Retries [retries] -->
@@ -184,10 +177,10 @@ package main
184177

185178
import (
186179
"context"
187-
"github.com/codatio/client-sdk-go/previous-versions/commerce"
188-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/operations"
189-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/shared"
190-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/retry"
180+
commerce "github.com/codatio/client-sdk-go/previous-versions/commerce/v3"
181+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/operations"
182+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/shared"
183+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/retry"
191184
"log"
192185
"pkg/models/operations"
193186
)
@@ -203,7 +196,7 @@ func main() {
203196
res, err := s.Customers.Get(ctx, operations.GetCustomerRequest{
204197
CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002",
205198
ConnectionID: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
206-
CustomerID: "<value>",
199+
CustomerID: "7110701885",
207200
}, operations.WithRetries(
208201
retry.Config{
209202
Strategy: "backoff",
@@ -231,10 +224,10 @@ package main
231224

232225
import (
233226
"context"
234-
"github.com/codatio/client-sdk-go/previous-versions/commerce"
235-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/operations"
236-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/shared"
237-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/retry"
227+
commerce "github.com/codatio/client-sdk-go/previous-versions/commerce/v3"
228+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/operations"
229+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/shared"
230+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/retry"
238231
"log"
239232
)
240233

@@ -260,7 +253,7 @@ func main() {
260253
res, err := s.Customers.Get(ctx, operations.GetCustomerRequest{
261254
CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002",
262255
ConnectionID: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
263-
CustomerID: "<value>",
256+
CustomerID: "7110701885",
264257
})
265258
if err != nil {
266259
log.Fatal(err)
@@ -276,12 +269,16 @@ func main() {
276269
<!-- Start Error Handling [errors] -->
277270
## Error Handling
278271

279-
Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both. When specified by the OpenAPI spec document, the SDK will return the appropriate subclass.
272+
Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both.
273+
274+
By Default, an API error will return `sdkerrors.SDKError`. When custom error responses are specified for an operation, the SDK may also return their associated error. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation.
275+
276+
For example, the `Get` function may return the following errors:
280277

281-
| Error Object | Status Code | Content Type |
282-
| ------------------------------- | ------------------------------- | ------------------------------- |
283-
| sdkerrors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json |
284-
| sdkerrors.SDKError | 4xx-5xx | */* |
278+
| Error Type | Status Code | Content Type |
279+
| ---------------------- | -------------------------------------- | ---------------- |
280+
| sdkerrors.ErrorMessage | 401, 402, 403, 404, 409, 429, 500, 503 | application/json |
281+
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
285282

286283
### Example
287284

@@ -291,10 +288,10 @@ package main
291288
import (
292289
"context"
293290
"errors"
294-
"github.com/codatio/client-sdk-go/previous-versions/commerce"
295-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/operations"
296-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/sdkerrors"
297-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/shared"
291+
commerce "github.com/codatio/client-sdk-go/previous-versions/commerce/v3"
292+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/operations"
293+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/sdkerrors"
294+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/shared"
298295
"log"
299296
)
300297

@@ -309,7 +306,7 @@ func main() {
309306
res, err := s.Customers.Get(ctx, operations.GetCustomerRequest{
310307
CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002",
311308
ConnectionID: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
312-
CustomerID: "<value>",
309+
CustomerID: "7110701885",
313310
})
314311
if err != nil {
315312

@@ -333,63 +330,17 @@ func main() {
333330
<!-- Start Server Selection [server] -->
334331
## Server Selection
335332

336-
### Select Server by Index
337-
338-
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:
339-
340-
| # | Server | Variables |
341-
| - | ------ | --------- |
342-
| 0 | `https://api.codat.io` | None |
343-
344-
#### Example
345-
346-
```go
347-
package main
348-
349-
import (
350-
"context"
351-
"github.com/codatio/client-sdk-go/previous-versions/commerce"
352-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/operations"
353-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/shared"
354-
"log"
355-
)
356-
357-
func main() {
358-
s := commerce.New(
359-
commerce.WithServerIndex(0),
360-
commerce.WithSecurity(shared.Security{
361-
AuthHeader: "Basic BASE_64_ENCODED(API_KEY)",
362-
}),
363-
)
364-
365-
ctx := context.Background()
366-
res, err := s.Customers.Get(ctx, operations.GetCustomerRequest{
367-
CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002",
368-
ConnectionID: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
369-
CustomerID: "<value>",
370-
})
371-
if err != nil {
372-
log.Fatal(err)
373-
}
374-
if res.Customer != nil {
375-
// handle response
376-
}
377-
}
378-
379-
```
380-
381-
382333
### Override Server URL Per-Client
383334

384-
The default server can also be overridden globally using the `WithServerURL` option when initializing the SDK client instance. For example:
335+
The default server can also be overridden globally using the `WithServerURL(serverURL string)` option when initializing the SDK client instance. For example:
385336
```go
386337
package main
387338

388339
import (
389340
"context"
390-
"github.com/codatio/client-sdk-go/previous-versions/commerce"
391-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/operations"
392-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/shared"
341+
commerce "github.com/codatio/client-sdk-go/previous-versions/commerce/v3"
342+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/operations"
343+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/shared"
393344
"log"
394345
)
395346

@@ -405,7 +356,7 @@ func main() {
405356
res, err := s.Customers.Get(ctx, operations.GetCustomerRequest{
406357
CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002",
407358
ConnectionID: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
408-
CustomerID: "<value>",
359+
CustomerID: "7110701885",
409360
})
410361
if err != nil {
411362
log.Fatal(err)
@@ -454,19 +405,19 @@ This can be a convenient way to configure timeouts, cookies, proxies, custom hea
454405

455406
This SDK supports the following security scheme globally:
456407

457-
| Name | Type | Scheme |
458-
| ------------ | ------------ | ------------ |
459-
| `AuthHeader` | apiKey | API key |
408+
| Name | Type | Scheme |
409+
| ------------ | ------ | ------- |
410+
| `AuthHeader` | apiKey | API key |
460411

461412
You can configure it using the `WithSecurity` option when initializing the SDK client instance. For example:
462413
```go
463414
package main
464415

465416
import (
466417
"context"
467-
"github.com/codatio/client-sdk-go/previous-versions/commerce"
468-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/operations"
469-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/shared"
418+
commerce "github.com/codatio/client-sdk-go/previous-versions/commerce/v3"
419+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/operations"
420+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/shared"
470421
"log"
471422
)
472423

@@ -481,7 +432,7 @@ func main() {
481432
res, err := s.Customers.Get(ctx, operations.GetCustomerRequest{
482433
CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002",
483434
ConnectionID: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
484-
CustomerID: "<value>",
435+
CustomerID: "7110701885",
485436
})
486437
if err != nil {
487438
log.Fatal(err)

previous-versions/commerce/RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,4 +350,14 @@ Based on:
350350
### Generated
351351
- [go v0.26.0] previous-versions/commerce
352352
### Releases
353-
- [Go v0.26.0] https://github.com/codatio/client-sdk-go/releases/tag/previous-versions/commerce/v0.26.0 - previous-versions/commerce
353+
- [Go v0.26.0] https://github.com/codatio/client-sdk-go/releases/tag/previous-versions/commerce/v0.26.0 - previous-versions/commerce
354+
355+
## 2024-11-26 16:29:25
356+
### Changes
357+
Based on:
358+
- OpenAPI Doc
359+
- Speakeasy CLI 1.447.0 (2.463.0) https://github.com/speakeasy-api/speakeasy
360+
### Generated
361+
- [go v3.0.0] previous-versions/commerce
362+
### Releases
363+
- [Go v3.0.0] https://github.com/codatio/client-sdk-go/releases/tag/previous-versions/commerce/v3.0.0 - previous-versions/commerce

previous-versions/commerce/USAGE.md

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

55
import (
66
"context"
7-
"github.com/codatio/client-sdk-go/previous-versions/commerce"
8-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/operations"
9-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/shared"
7+
commerce "github.com/codatio/client-sdk-go/previous-versions/commerce/v3"
8+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/operations"
9+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/shared"
1010
"log"
1111
)
1212

@@ -21,7 +21,7 @@ func main() {
2121
res, err := s.Customers.Get(ctx, operations.GetCustomerRequest{
2222
CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002",
2323
ConnectionID: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
24-
CustomerID: "<value>",
24+
CustomerID: "7110701885",
2525
})
2626
if err != nil {
2727
log.Fatal(err)

previous-versions/commerce/codatcommerce.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ package commerce
55
import (
66
"context"
77
"fmt"
8-
"github.com/codatio/client-sdk-go/previous-versions/commerce/internal/hooks"
9-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/models/shared"
10-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/retry"
11-
"github.com/codatio/client-sdk-go/previous-versions/commerce/pkg/utils"
8+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/internal/hooks"
9+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/models/shared"
10+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/retry"
11+
"github.com/codatio/client-sdk-go/previous-versions/commerce/v3/pkg/utils"
1212
"net/http"
1313
"time"
1414
)
@@ -193,9 +193,9 @@ func New(opts ...SDKOption) *CodatCommerce {
193193
sdkConfiguration: sdkConfiguration{
194194
Language: "go",
195195
OpenAPIDocVersion: "3.0.0",
196-
SDKVersion: "0.26.0",
197-
GenVersion: "2.415.6",
198-
UserAgent: "speakeasy-sdk/go 0.26.0 2.415.6 3.0.0 github.com/codatio/client-sdk-go/previous-versions/commerce",
196+
SDKVersion: "3.0.0",
197+
GenVersion: "2.463.0",
198+
UserAgent: "speakeasy-sdk/go 3.0.0 2.463.0 3.0.0 github.com/codatio/client-sdk-go/previous-versions/commerce",
199199
Hooks: hooks.New(),
200200
},
201201
}

0 commit comments

Comments
 (0)