From 9f5c8e3d4a2c8078d1cad96977ac3312e17e5f8d Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 15 Dec 2023 12:56:43 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc 3.0.0, Speakeasy CLI 1.126.3 --- previous-versions/accounting/README.md | 4 +-- previous-versions/accounting/RELEASES.md | 12 ++++++++- .../accounting/billcreditnotes.go | 2 +- .../accounting/codataccounting.go | 4 +-- previous-versions/accounting/directincomes.go | 2 +- .../uploadbillcreditnoteattachmentrequest.md | 12 ++++----- ...loadbillcreditnoteattachmentrequestbody.md | 9 ------- .../uploaddirectincomeattachmentrequest.md | 12 ++++----- ...uploaddirectincomeattachmentrequestbody.md | 9 ------- .../uploadinvoiceattachmentrequest.md | 12 ++++----- .../uploadinvoiceattachmentrequestbody.md | 9 ------- .../uploadtransferattachmentrequest.md | 12 ++++----- .../uploadtransferattachmentrequestbody.md | 9 ------- .../docs/sdks/billcreditnotes/README.md | 8 +++--- .../docs/sdks/directincomes/README.md | 8 +++--- .../accounting/docs/sdks/invoices/README.md | 10 ++++--- .../accounting/docs/sdks/transfers/README.md | 10 ++++--- previous-versions/accounting/files.gen | 4 --- previous-versions/accounting/gen.yaml | 4 +-- previous-versions/accounting/invoices.go | 4 +-- .../uploadbillcreditnoteattachment.go | 26 +++---------------- .../uploaddirectincomeattachment.go | 26 +++---------------- .../operations/uploadinvoiceattachment.go | 26 +++---------------- .../operations/uploadtransferattachment.go | 26 +++---------------- previous-versions/accounting/transfers.go | 4 +-- 25 files changed, 85 insertions(+), 179 deletions(-) delete mode 100644 previous-versions/accounting/docs/pkg/models/operations/uploadbillcreditnoteattachmentrequestbody.md delete mode 100644 previous-versions/accounting/docs/pkg/models/operations/uploaddirectincomeattachmentrequestbody.md delete mode 100644 previous-versions/accounting/docs/pkg/models/operations/uploadinvoiceattachmentrequestbody.md delete mode 100644 previous-versions/accounting/docs/pkg/models/operations/uploadtransferattachmentrequestbody.md diff --git a/previous-versions/accounting/README.md b/previous-versions/accounting/README.md index b08d0c11..a7a0a384 100644 --- a/previous-versions/accounting/README.md +++ b/previous-versions/accounting/README.md @@ -136,7 +136,7 @@ func main() { * [List](docs/sdks/invoices/README.md#list) - List invoices * [ListAttachments](docs/sdks/invoices/README.md#listattachments) - List invoice attachments * [Update](docs/sdks/invoices/README.md#update) - Update invoice -* [UploadAttachment](docs/sdks/invoices/README.md#uploadattachment) - Push invoice attachment +* [UploadAttachment](docs/sdks/invoices/README.md#uploadattachment) - Upload invoice attachment ### [ItemReceipts](docs/sdks/itemreceipts/README.md) @@ -172,7 +172,7 @@ func main() { * [Get](docs/sdks/transfers/README.md#get) - Get transfer * [GetCreateModel](docs/sdks/transfers/README.md#getcreatemodel) - Get create transfer model * [List](docs/sdks/transfers/README.md#list) - List transfers -* [UploadAttachment](docs/sdks/transfers/README.md#uploadattachment) - Push invoice attachment +* [UploadAttachment](docs/sdks/transfers/README.md#uploadattachment) - Upload invoice attachment ### [BillCreditNotes](docs/sdks/billcreditnotes/README.md) diff --git a/previous-versions/accounting/RELEASES.md b/previous-versions/accounting/RELEASES.md index 87a1e46d..d4b1645a 100644 --- a/previous-versions/accounting/RELEASES.md +++ b/previous-versions/accounting/RELEASES.md @@ -410,4 +410,14 @@ Based on: ### Generated - [go v0.30.0] previous-versions/accounting ### Releases -- [Go v0.30.0] https://github.com/codatio/client-sdk-go/releases/tag/previous-versions/accounting/v0.30.0 - previous-versions/accounting \ No newline at end of file +- [Go v0.30.0] https://github.com/codatio/client-sdk-go/releases/tag/previous-versions/accounting/v0.30.0 - previous-versions/accounting + +## 2023-12-15 12:56:13 +### Changes +Based on: +- OpenAPI Doc 3.0.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Accounting.yaml +- Speakeasy CLI 1.126.3 (2.214.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.31.0] previous-versions/accounting +### Releases +- [Go v0.31.0] https://github.com/codatio/client-sdk-go/releases/tag/previous-versions/accounting/v0.31.0 - previous-versions/accounting \ No newline at end of file diff --git a/previous-versions/accounting/billcreditnotes.go b/previous-versions/accounting/billcreditnotes.go index 30341f8d..0f6284ef 100644 --- a/previous-versions/accounting/billcreditnotes.go +++ b/previous-versions/accounting/billcreditnotes.go @@ -741,7 +741,7 @@ func (s *BillCreditNotes) UploadAttachment(ctx context.Context, request operatio return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "multipart", `multipartForm:"file" request:"mediaType=multipart/form-data"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "AttachmentUpload", "multipart", `request:"mediaType=multipart/form-data"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } diff --git a/previous-versions/accounting/codataccounting.go b/previous-versions/accounting/codataccounting.go index 181658d0..278347bb 100644 --- a/previous-versions/accounting/codataccounting.go +++ b/previous-versions/accounting/codataccounting.go @@ -198,9 +198,9 @@ func New(opts ...SDKOption) *CodatAccounting { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "3.0.0", - SDKVersion: "0.30.0", + SDKVersion: "0.31.0", GenVersion: "2.214.3", - UserAgent: "speakeasy-sdk/go 0.30.0 2.214.3 3.0.0 github.com/codatio/client-sdk-go/previous-versions/accounting", + UserAgent: "speakeasy-sdk/go 0.31.0 2.214.3 3.0.0 github.com/codatio/client-sdk-go/previous-versions/accounting", }, } for _, opt := range opts { diff --git a/previous-versions/accounting/directincomes.go b/previous-versions/accounting/directincomes.go index 99061884..dc745423 100644 --- a/previous-versions/accounting/directincomes.go +++ b/previous-versions/accounting/directincomes.go @@ -985,7 +985,7 @@ func (s *DirectIncomes) UploadAttachment(ctx context.Context, request operations return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "multipart", `multipartForm:"file" request:"mediaType=multipart/form-data"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "AttachmentUpload", "multipart", `request:"mediaType=multipart/form-data"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } diff --git a/previous-versions/accounting/docs/pkg/models/operations/uploadbillcreditnoteattachmentrequest.md b/previous-versions/accounting/docs/pkg/models/operations/uploadbillcreditnoteattachmentrequest.md index ae67c244..2a5dc484 100644 --- a/previous-versions/accounting/docs/pkg/models/operations/uploadbillcreditnoteattachmentrequest.md +++ b/previous-versions/accounting/docs/pkg/models/operations/uploadbillcreditnoteattachmentrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| `RequestBody` | [*operations.UploadBillCreditNoteAttachmentRequestBody](../../../pkg/models/operations/uploadbillcreditnoteattachmentrequestbody.md) | :heavy_minus_sign: | N/A | | -| `BillCreditNoteID` | *string* | :heavy_check_mark: | Unique identifier for a bill credit note. | | -| `CompanyID` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `ConnectionID` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `AttachmentUpload` | [*shared.AttachmentUpload](../../../pkg/models/shared/attachmentupload.md) | :heavy_minus_sign: | N/A | | +| `BillCreditNoteID` | *string* | :heavy_check_mark: | Unique identifier for a bill credit note. | | +| `CompanyID` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `ConnectionID` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/previous-versions/accounting/docs/pkg/models/operations/uploadbillcreditnoteattachmentrequestbody.md b/previous-versions/accounting/docs/pkg/models/operations/uploadbillcreditnoteattachmentrequestbody.md deleted file mode 100644 index 8b9cc413..00000000 --- a/previous-versions/accounting/docs/pkg/models/operations/uploadbillcreditnoteattachmentrequestbody.md +++ /dev/null @@ -1,9 +0,0 @@ -# UploadBillCreditNoteAttachmentRequestBody - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `Content` | *[]byte* | :heavy_check_mark: | N/A | -| `FileName` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/pkg/models/operations/uploaddirectincomeattachmentrequest.md b/previous-versions/accounting/docs/pkg/models/operations/uploaddirectincomeattachmentrequest.md index 913b5568..f1fb630d 100644 --- a/previous-versions/accounting/docs/pkg/models/operations/uploaddirectincomeattachmentrequest.md +++ b/previous-versions/accounting/docs/pkg/models/operations/uploaddirectincomeattachmentrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `RequestBody` | [*operations.UploadDirectIncomeAttachmentRequestBody](../../../pkg/models/operations/uploaddirectincomeattachmentrequestbody.md) | :heavy_minus_sign: | N/A | | -| `CompanyID` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `ConnectionID` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `DirectIncomeID` | *string* | :heavy_check_mark: | Unique identifier for a direct income. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `AttachmentUpload` | [*shared.AttachmentUpload](../../../pkg/models/shared/attachmentupload.md) | :heavy_minus_sign: | N/A | | +| `CompanyID` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `ConnectionID` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `DirectIncomeID` | *string* | :heavy_check_mark: | Unique identifier for a direct income. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/pkg/models/operations/uploaddirectincomeattachmentrequestbody.md b/previous-versions/accounting/docs/pkg/models/operations/uploaddirectincomeattachmentrequestbody.md deleted file mode 100644 index ff4d4a87..00000000 --- a/previous-versions/accounting/docs/pkg/models/operations/uploaddirectincomeattachmentrequestbody.md +++ /dev/null @@ -1,9 +0,0 @@ -# UploadDirectIncomeAttachmentRequestBody - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `Content` | *[]byte* | :heavy_check_mark: | N/A | -| `FileName` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/pkg/models/operations/uploadinvoiceattachmentrequest.md b/previous-versions/accounting/docs/pkg/models/operations/uploadinvoiceattachmentrequest.md index bd072fb8..649e33d0 100644 --- a/previous-versions/accounting/docs/pkg/models/operations/uploadinvoiceattachmentrequest.md +++ b/previous-versions/accounting/docs/pkg/models/operations/uploadinvoiceattachmentrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `RequestBody` | [*operations.UploadInvoiceAttachmentRequestBody](../../../pkg/models/operations/uploadinvoiceattachmentrequestbody.md) | :heavy_minus_sign: | N/A | | -| `CompanyID` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `ConnectionID` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `InvoiceID` | *string* | :heavy_check_mark: | Unique identifier for an invoice. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `AttachmentUpload` | [*shared.AttachmentUpload](../../../pkg/models/shared/attachmentupload.md) | :heavy_minus_sign: | N/A | | +| `CompanyID` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `ConnectionID` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `InvoiceID` | *string* | :heavy_check_mark: | Unique identifier for an invoice. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/pkg/models/operations/uploadinvoiceattachmentrequestbody.md b/previous-versions/accounting/docs/pkg/models/operations/uploadinvoiceattachmentrequestbody.md deleted file mode 100644 index 10ce104a..00000000 --- a/previous-versions/accounting/docs/pkg/models/operations/uploadinvoiceattachmentrequestbody.md +++ /dev/null @@ -1,9 +0,0 @@ -# UploadInvoiceAttachmentRequestBody - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `Content` | *[]byte* | :heavy_check_mark: | N/A | -| `FileName` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/pkg/models/operations/uploadtransferattachmentrequest.md b/previous-versions/accounting/docs/pkg/models/operations/uploadtransferattachmentrequest.md index 0e00fa80..38b6f272 100644 --- a/previous-versions/accounting/docs/pkg/models/operations/uploadtransferattachmentrequest.md +++ b/previous-versions/accounting/docs/pkg/models/operations/uploadtransferattachmentrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `RequestBody` | [*operations.UploadTransferAttachmentRequestBody](../../../pkg/models/operations/uploadtransferattachmentrequestbody.md) | :heavy_minus_sign: | N/A | | -| `CompanyID` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `ConnectionID` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `TransferID` | *string* | :heavy_check_mark: | Unique identifier for a transfer. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `AttachmentUpload` | [*shared.AttachmentUpload](../../../pkg/models/shared/attachmentupload.md) | :heavy_minus_sign: | N/A | | +| `CompanyID` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `ConnectionID` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `TransferID` | *string* | :heavy_check_mark: | Unique identifier for a transfer. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/pkg/models/operations/uploadtransferattachmentrequestbody.md b/previous-versions/accounting/docs/pkg/models/operations/uploadtransferattachmentrequestbody.md deleted file mode 100644 index 1a1f105b..00000000 --- a/previous-versions/accounting/docs/pkg/models/operations/uploadtransferattachmentrequestbody.md +++ /dev/null @@ -1,9 +0,0 @@ -# UploadTransferAttachmentRequestBody - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `Content` | *[]byte* | :heavy_check_mark: | N/A | -| `FileName` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/sdks/billcreditnotes/README.md b/previous-versions/accounting/docs/sdks/billcreditnotes/README.md index a57140a9..fd7d0992 100644 --- a/previous-versions/accounting/docs/sdks/billcreditnotes/README.md +++ b/previous-versions/accounting/docs/sdks/billcreditnotes/README.md @@ -534,9 +534,11 @@ func main() { ctx := context.Background() res, err := s.BillCreditNotes.UploadAttachment(ctx, operations.UploadBillCreditNoteAttachmentRequest{ - RequestBody: &operations.UploadBillCreditNoteAttachmentRequestBody{ - Content: []byte("0xE3ABc1980E"), - FileName: "elegant_producer_electric.jpeg", + AttachmentUpload: &shared.AttachmentUpload{ + File: shared.CodatFile{ + Content: []byte("0xE3ABc1980E"), + FileName: "elegant_producer_electric.jpeg", + }, }, BillCreditNoteID: "string", CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002", diff --git a/previous-versions/accounting/docs/sdks/directincomes/README.md b/previous-versions/accounting/docs/sdks/directincomes/README.md index c2cc7aa8..a0ae5322 100644 --- a/previous-versions/accounting/docs/sdks/directincomes/README.md +++ b/previous-versions/accounting/docs/sdks/directincomes/README.md @@ -549,9 +549,11 @@ func main() { ctx := context.Background() res, err := s.DirectIncomes.UploadAttachment(ctx, operations.UploadDirectIncomeAttachmentRequest{ - RequestBody: &operations.UploadDirectIncomeAttachmentRequestBody{ - Content: []byte("0xE3ABc1980E"), - FileName: "elegant_producer_electric.jpeg", + AttachmentUpload: &shared.AttachmentUpload{ + File: shared.CodatFile{ + Content: []byte("0xE3ABc1980E"), + FileName: "elegant_producer_electric.jpeg", + }, }, CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionID: "2e9d2c44-f675-40ba-8049-353bfcb5e171", diff --git a/previous-versions/accounting/docs/sdks/invoices/README.md b/previous-versions/accounting/docs/sdks/invoices/README.md index aee606f7..cf892875 100644 --- a/previous-versions/accounting/docs/sdks/invoices/README.md +++ b/previous-versions/accounting/docs/sdks/invoices/README.md @@ -17,7 +17,7 @@ Invoices * [List](#list) - List invoices * [ListAttachments](#listattachments) - List invoice attachments * [Update](#update) - Update invoice -* [UploadAttachment](#uploadattachment) - Push invoice attachment +* [UploadAttachment](#uploadattachment) - Upload invoice attachment ## Create @@ -874,9 +874,11 @@ func main() { ctx := context.Background() res, err := s.Invoices.UploadAttachment(ctx, operations.UploadInvoiceAttachmentRequest{ - RequestBody: &operations.UploadInvoiceAttachmentRequestBody{ - Content: []byte("0xE3ABc1980E"), - FileName: "elegant_producer_electric.jpeg", + AttachmentUpload: &shared.AttachmentUpload{ + File: shared.CodatFile{ + Content: []byte("0xE3ABc1980E"), + FileName: "elegant_producer_electric.jpeg", + }, }, CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionID: "2e9d2c44-f675-40ba-8049-353bfcb5e171", diff --git a/previous-versions/accounting/docs/sdks/transfers/README.md b/previous-versions/accounting/docs/sdks/transfers/README.md index 92d7e04b..258a0bd3 100644 --- a/previous-versions/accounting/docs/sdks/transfers/README.md +++ b/previous-versions/accounting/docs/sdks/transfers/README.md @@ -11,7 +11,7 @@ Transfers * [Get](#get) - Get transfer * [GetCreateModel](#getcreatemodel) - Get create transfer model * [List](#list) - List transfers -* [UploadAttachment](#uploadattachment) - Push invoice attachment +* [UploadAttachment](#uploadattachment) - Upload invoice attachment ## Create @@ -342,9 +342,11 @@ func main() { ctx := context.Background() res, err := s.Transfers.UploadAttachment(ctx, operations.UploadTransferAttachmentRequest{ - RequestBody: &operations.UploadTransferAttachmentRequestBody{ - Content: []byte("0xE3ABc1980E"), - FileName: "elegant_producer_electric.jpeg", + AttachmentUpload: &shared.AttachmentUpload{ + File: shared.CodatFile{ + Content: []byte("0xE3ABc1980E"), + FileName: "elegant_producer_electric.jpeg", + }, }, CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionID: "2e9d2c44-f675-40ba-8049-353bfcb5e171", diff --git a/previous-versions/accounting/files.gen b/previous-versions/accounting/files.gen index d6e46c11..1a48dcc1 100755 --- a/previous-versions/accounting/files.gen +++ b/previous-versions/accounting/files.gen @@ -457,7 +457,6 @@ docs/pkg/models/operations/listdirectincomesrequest.md docs/pkg/models/operations/listdirectincomesresponse.md docs/pkg/models/operations/listdirectincomeattachmentsrequest.md docs/pkg/models/operations/listdirectincomeattachmentsresponse.md -docs/pkg/models/operations/uploaddirectincomeattachmentrequestbody.md docs/pkg/models/operations/uploaddirectincomeattachmentrequest.md docs/pkg/models/operations/uploaddirectincomeattachmentresponse.md docs/pkg/models/operations/createinvoicerequest.md @@ -480,7 +479,6 @@ docs/pkg/models/operations/listinvoiceattachmentsrequest.md docs/pkg/models/operations/listinvoiceattachmentsresponse.md docs/pkg/models/operations/updateinvoicerequest.md docs/pkg/models/operations/updateinvoiceresponse.md -docs/pkg/models/operations/uploadinvoiceattachmentrequestbody.md docs/pkg/models/operations/uploadinvoiceattachmentrequest.md docs/pkg/models/operations/uploadinvoiceattachmentresponse.md docs/pkg/models/operations/getitemreceiptrequest.md @@ -529,7 +527,6 @@ docs/pkg/models/operations/getcreatetransfersmodelrequest.md docs/pkg/models/operations/getcreatetransfersmodelresponse.md docs/pkg/models/operations/listtransfersrequest.md docs/pkg/models/operations/listtransfersresponse.md -docs/pkg/models/operations/uploadtransferattachmentrequestbody.md docs/pkg/models/operations/uploadtransferattachmentrequest.md docs/pkg/models/operations/uploadtransferattachmentresponse.md docs/pkg/models/operations/createbillcreditnoterequest.md @@ -542,7 +539,6 @@ docs/pkg/models/operations/listbillcreditnotesrequest.md docs/pkg/models/operations/listbillcreditnotesresponse.md docs/pkg/models/operations/updatebillcreditnoterequest.md docs/pkg/models/operations/updatebillcreditnoteresponse.md -docs/pkg/models/operations/uploadbillcreditnoteattachmentrequestbody.md docs/pkg/models/operations/uploadbillcreditnoteattachmentrequest.md docs/pkg/models/operations/uploadbillcreditnoteattachmentresponse.md docs/pkg/models/operations/createbillpaymentrequest.md diff --git a/previous-versions/accounting/gen.yaml b/previous-versions/accounting/gen.yaml index 3b1ff008..ad6f20ae 100644 --- a/previous-versions/accounting/gen.yaml +++ b/previous-versions/accounting/gen.yaml @@ -1,6 +1,6 @@ configVersion: 1.0.0 management: - docChecksum: daa39ef3388bfb2fd87ff2c53c9107b8 + docChecksum: 8ea965ff5a23362485749797744b35ac docVersion: 3.0.0 speakeasyVersion: 1.126.3 generationVersion: 2.214.3 @@ -24,7 +24,7 @@ features: nameOverrides: 2.81.1 retries: 2.82.1 go: - version: 0.30.0 + version: 0.31.0 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: false imports: diff --git a/previous-versions/accounting/invoices.go b/previous-versions/accounting/invoices.go index a2fb1634..b58814b3 100644 --- a/previous-versions/accounting/invoices.go +++ b/previous-versions/accounting/invoices.go @@ -1388,7 +1388,7 @@ func (s *Invoices) Update(ctx context.Context, request operations.UpdateInvoiceR return res, nil } -// UploadAttachment - Push invoice attachment +// UploadAttachment - Upload invoice attachment // The *Upload invoice attachment* endpoint uploads an attachment and assigns it against a specific `invoiceId`. // // [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. @@ -1415,7 +1415,7 @@ func (s *Invoices) UploadAttachment(ctx context.Context, request operations.Uplo return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "multipart", `multipartForm:"file" request:"mediaType=multipart/form-data"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "AttachmentUpload", "multipart", `request:"mediaType=multipart/form-data"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) } diff --git a/previous-versions/accounting/pkg/models/operations/uploadbillcreditnoteattachment.go b/previous-versions/accounting/pkg/models/operations/uploadbillcreditnoteattachment.go index f6781d85..73a81301 100644 --- a/previous-versions/accounting/pkg/models/operations/uploadbillcreditnoteattachment.go +++ b/previous-versions/accounting/pkg/models/operations/uploadbillcreditnoteattachment.go @@ -3,30 +3,12 @@ package operations import ( + "github.com/codatio/client-sdk-go/previous-versions/accounting/pkg/models/shared" "net/http" ) -type UploadBillCreditNoteAttachmentRequestBody struct { - Content []byte `multipartForm:"content"` - FileName string `multipartForm:"name=fileName"` -} - -func (o *UploadBillCreditNoteAttachmentRequestBody) GetContent() []byte { - if o == nil { - return []byte{} - } - return o.Content -} - -func (o *UploadBillCreditNoteAttachmentRequestBody) GetFileName() string { - if o == nil { - return "" - } - return o.FileName -} - type UploadBillCreditNoteAttachmentRequest struct { - RequestBody *UploadBillCreditNoteAttachmentRequestBody `multipartForm:"file" request:"mediaType=multipart/form-data"` + AttachmentUpload *shared.AttachmentUpload `request:"mediaType=multipart/form-data"` // Unique identifier for a bill credit note. BillCreditNoteID string `pathParam:"style=simple,explode=false,name=billCreditNoteId"` // Unique identifier for a company. @@ -35,11 +17,11 @@ type UploadBillCreditNoteAttachmentRequest struct { ConnectionID string `pathParam:"style=simple,explode=false,name=connectionId"` } -func (o *UploadBillCreditNoteAttachmentRequest) GetRequestBody() *UploadBillCreditNoteAttachmentRequestBody { +func (o *UploadBillCreditNoteAttachmentRequest) GetAttachmentUpload() *shared.AttachmentUpload { if o == nil { return nil } - return o.RequestBody + return o.AttachmentUpload } func (o *UploadBillCreditNoteAttachmentRequest) GetBillCreditNoteID() string { diff --git a/previous-versions/accounting/pkg/models/operations/uploaddirectincomeattachment.go b/previous-versions/accounting/pkg/models/operations/uploaddirectincomeattachment.go index 01788a1a..4152dc69 100644 --- a/previous-versions/accounting/pkg/models/operations/uploaddirectincomeattachment.go +++ b/previous-versions/accounting/pkg/models/operations/uploaddirectincomeattachment.go @@ -3,30 +3,12 @@ package operations import ( + "github.com/codatio/client-sdk-go/previous-versions/accounting/pkg/models/shared" "net/http" ) -type UploadDirectIncomeAttachmentRequestBody struct { - Content []byte `multipartForm:"content"` - FileName string `multipartForm:"name=fileName"` -} - -func (o *UploadDirectIncomeAttachmentRequestBody) GetContent() []byte { - if o == nil { - return []byte{} - } - return o.Content -} - -func (o *UploadDirectIncomeAttachmentRequestBody) GetFileName() string { - if o == nil { - return "" - } - return o.FileName -} - type UploadDirectIncomeAttachmentRequest struct { - RequestBody *UploadDirectIncomeAttachmentRequestBody `multipartForm:"file" request:"mediaType=multipart/form-data"` + AttachmentUpload *shared.AttachmentUpload `request:"mediaType=multipart/form-data"` // Unique identifier for a company. CompanyID string `pathParam:"style=simple,explode=false,name=companyId"` // Unique identifier for a connection. @@ -35,11 +17,11 @@ type UploadDirectIncomeAttachmentRequest struct { DirectIncomeID string `pathParam:"style=simple,explode=false,name=directIncomeId"` } -func (o *UploadDirectIncomeAttachmentRequest) GetRequestBody() *UploadDirectIncomeAttachmentRequestBody { +func (o *UploadDirectIncomeAttachmentRequest) GetAttachmentUpload() *shared.AttachmentUpload { if o == nil { return nil } - return o.RequestBody + return o.AttachmentUpload } func (o *UploadDirectIncomeAttachmentRequest) GetCompanyID() string { diff --git a/previous-versions/accounting/pkg/models/operations/uploadinvoiceattachment.go b/previous-versions/accounting/pkg/models/operations/uploadinvoiceattachment.go index ab91b2b9..0d21860a 100644 --- a/previous-versions/accounting/pkg/models/operations/uploadinvoiceattachment.go +++ b/previous-versions/accounting/pkg/models/operations/uploadinvoiceattachment.go @@ -3,30 +3,12 @@ package operations import ( + "github.com/codatio/client-sdk-go/previous-versions/accounting/pkg/models/shared" "net/http" ) -type UploadInvoiceAttachmentRequestBody struct { - Content []byte `multipartForm:"content"` - FileName string `multipartForm:"name=fileName"` -} - -func (o *UploadInvoiceAttachmentRequestBody) GetContent() []byte { - if o == nil { - return []byte{} - } - return o.Content -} - -func (o *UploadInvoiceAttachmentRequestBody) GetFileName() string { - if o == nil { - return "" - } - return o.FileName -} - type UploadInvoiceAttachmentRequest struct { - RequestBody *UploadInvoiceAttachmentRequestBody `multipartForm:"file" request:"mediaType=multipart/form-data"` + AttachmentUpload *shared.AttachmentUpload `request:"mediaType=multipart/form-data"` // Unique identifier for a company. CompanyID string `pathParam:"style=simple,explode=false,name=companyId"` // Unique identifier for a connection. @@ -35,11 +17,11 @@ type UploadInvoiceAttachmentRequest struct { InvoiceID string `pathParam:"style=simple,explode=false,name=invoiceId"` } -func (o *UploadInvoiceAttachmentRequest) GetRequestBody() *UploadInvoiceAttachmentRequestBody { +func (o *UploadInvoiceAttachmentRequest) GetAttachmentUpload() *shared.AttachmentUpload { if o == nil { return nil } - return o.RequestBody + return o.AttachmentUpload } func (o *UploadInvoiceAttachmentRequest) GetCompanyID() string { diff --git a/previous-versions/accounting/pkg/models/operations/uploadtransferattachment.go b/previous-versions/accounting/pkg/models/operations/uploadtransferattachment.go index fef99da3..db53e4cc 100644 --- a/previous-versions/accounting/pkg/models/operations/uploadtransferattachment.go +++ b/previous-versions/accounting/pkg/models/operations/uploadtransferattachment.go @@ -3,30 +3,12 @@ package operations import ( + "github.com/codatio/client-sdk-go/previous-versions/accounting/pkg/models/shared" "net/http" ) -type UploadTransferAttachmentRequestBody struct { - Content []byte `multipartForm:"content"` - FileName string `multipartForm:"name=fileName"` -} - -func (o *UploadTransferAttachmentRequestBody) GetContent() []byte { - if o == nil { - return []byte{} - } - return o.Content -} - -func (o *UploadTransferAttachmentRequestBody) GetFileName() string { - if o == nil { - return "" - } - return o.FileName -} - type UploadTransferAttachmentRequest struct { - RequestBody *UploadTransferAttachmentRequestBody `multipartForm:"file" request:"mediaType=multipart/form-data"` + AttachmentUpload *shared.AttachmentUpload `request:"mediaType=multipart/form-data"` // Unique identifier for a company. CompanyID string `pathParam:"style=simple,explode=false,name=companyId"` // Unique identifier for a connection. @@ -35,11 +17,11 @@ type UploadTransferAttachmentRequest struct { TransferID string `pathParam:"style=simple,explode=false,name=transferId"` } -func (o *UploadTransferAttachmentRequest) GetRequestBody() *UploadTransferAttachmentRequestBody { +func (o *UploadTransferAttachmentRequest) GetAttachmentUpload() *shared.AttachmentUpload { if o == nil { return nil } - return o.RequestBody + return o.AttachmentUpload } func (o *UploadTransferAttachmentRequest) GetCompanyID() string { diff --git a/previous-versions/accounting/transfers.go b/previous-versions/accounting/transfers.go index 1356354a..7f469246 100644 --- a/previous-versions/accounting/transfers.go +++ b/previous-versions/accounting/transfers.go @@ -562,7 +562,7 @@ func (s *Transfers) List(ctx context.Context, request operations.ListTransfersRe return res, nil } -// UploadAttachment - Push invoice attachment +// UploadAttachment - Upload invoice attachment // The *Upload transfer attachment* endpoint uploads an attachment and assigns it against a specific `transferId`. // // [Transfers](https://docs.codat.io/accounting-api#/schemas/Transfer) are issued by a supplier for the purpose of recording transfer. @@ -589,7 +589,7 @@ func (s *Transfers) UploadAttachment(ctx context.Context, request operations.Upl return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "multipart", `multipartForm:"file" request:"mediaType=multipart/form-data"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "AttachmentUpload", "multipart", `request:"mediaType=multipart/form-data"`) if err != nil { return nil, fmt.Errorf("error serializing request body: %w", err) }