diff --git a/previous-versions/accounting/RELEASES.md b/previous-versions/accounting/RELEASES.md index d0d3d358..8f1a0cee 100644 --- a/previous-versions/accounting/RELEASES.md +++ b/previous-versions/accounting/RELEASES.md @@ -390,4 +390,14 @@ Based on: ### Generated - [go v0.28.0] previous-versions/accounting ### Releases -- [Go v0.28.0] https://github.com/codatio/client-sdk-go/releases/tag/previous-versions/accounting/v0.28.0 - previous-versions/accounting \ No newline at end of file +- [Go v0.28.0] https://github.com/codatio/client-sdk-go/releases/tag/previous-versions/accounting/v0.28.0 - previous-versions/accounting + +## 2023-12-06 09:03:43 +### Changes +Based on: +- OpenAPI Doc 3.0.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Accounting.yaml +- Speakeasy CLI 1.125.2 (2.210.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.29.0] previous-versions/accounting +### Releases +- [Go v0.29.0] https://github.com/codatio/client-sdk-go/releases/tag/previous-versions/accounting/v0.29.0 - previous-versions/accounting \ No newline at end of file diff --git a/previous-versions/accounting/bills.go b/previous-versions/accounting/bills.go index 8e313189..7b4b745d 100644 --- a/previous-versions/accounting/bills.go +++ b/previous-versions/accounting/bills.go @@ -1279,7 +1279,7 @@ func (s *Bills) UploadAttachment(ctx context.Context, request operations.UploadB 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 3d751150..3be87253 100644 --- a/previous-versions/accounting/codataccounting.go +++ b/previous-versions/accounting/codataccounting.go @@ -199,9 +199,9 @@ func New(opts ...SDKOption) *CodatAccounting { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "3.0.0", - SDKVersion: "0.28.0", - GenVersion: "2.210.3", - UserAgent: "speakeasy-sdk/go 0.28.0 2.210.3 3.0.0 github.com/codatio/client-sdk-go/previous-versions/accounting", + SDKVersion: "0.29.0", + GenVersion: "2.210.6", + UserAgent: "speakeasy-sdk/go 0.29.0 2.210.6 3.0.0 github.com/codatio/client-sdk-go/previous-versions/accounting", }, } for _, opt := range opts { diff --git a/previous-versions/accounting/directcosts.go b/previous-versions/accounting/directcosts.go index 27623d26..f6c0f64f 100644 --- a/previous-versions/accounting/directcosts.go +++ b/previous-versions/accounting/directcosts.go @@ -981,7 +981,7 @@ func (s *DirectCosts) UploadAttachment(ctx context.Context, request operations.U 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/uploadbillattachmentrequest.md b/previous-versions/accounting/docs/pkg/models/operations/uploadbillattachmentrequest.md index 58ef4cd5..ab1bd9a9 100644 --- a/previous-versions/accounting/docs/pkg/models/operations/uploadbillattachmentrequest.md +++ b/previous-versions/accounting/docs/pkg/models/operations/uploadbillattachmentrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `RequestBody` | [*operations.UploadBillAttachmentRequestBody](../../../pkg/models/operations/uploadbillattachmentrequestbody.md) | :heavy_minus_sign: | N/A | | -| `BillID` | *string* | :heavy_check_mark: | Unique identifier for a bill. | 13d946f0-c5d5-42bc-b092-97ece17923ab | -| `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 | | +| `BillID` | *string* | :heavy_check_mark: | Unique identifier for a bill. | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `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/uploaddirectcostattachmentrequest.md b/previous-versions/accounting/docs/pkg/models/operations/uploaddirectcostattachmentrequest.md index ec24ad4a..6f74064b 100644 --- a/previous-versions/accounting/docs/pkg/models/operations/uploaddirectcostattachmentrequest.md +++ b/previous-versions/accounting/docs/pkg/models/operations/uploaddirectcostattachmentrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `RequestBody` | [*operations.UploadDirectCostAttachmentRequestBody](../../../pkg/models/operations/uploaddirectcostattachmentrequestbody.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 | -| `DirectCostID` | *string* | :heavy_check_mark: | Unique identifier for a direct cost. | | \ 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 | +| `DirectCostID` | *string* | :heavy_check_mark: | Unique identifier for a direct cost. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/pkg/models/operations/uploaddirectcostattachmentrequestbody.md b/previous-versions/accounting/docs/pkg/models/operations/uploaddirectcostattachmentrequestbody.md deleted file mode 100644 index 17ef78ae..00000000 --- a/previous-versions/accounting/docs/pkg/models/operations/uploaddirectcostattachmentrequestbody.md +++ /dev/null @@ -1,9 +0,0 @@ -# UploadDirectCostAttachmentRequestBody - - -## 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/shared/attachmentupload.md b/previous-versions/accounting/docs/pkg/models/shared/attachmentupload.md new file mode 100644 index 00000000..9492c60d --- /dev/null +++ b/previous-versions/accounting/docs/pkg/models/shared/attachmentupload.md @@ -0,0 +1,8 @@ +# AttachmentUpload + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `File` | [shared.CodatFile](../../../pkg/models/shared/codatfile.md) | :heavy_check_mark: | The file to be uploaded as an attachment. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/pkg/models/operations/uploadbillattachmentrequestbody.md b/previous-versions/accounting/docs/pkg/models/shared/codatfile.md similarity index 91% rename from previous-versions/accounting/docs/pkg/models/operations/uploadbillattachmentrequestbody.md rename to previous-versions/accounting/docs/pkg/models/shared/codatfile.md index 08740269..0f76ad4e 100644 --- a/previous-versions/accounting/docs/pkg/models/operations/uploadbillattachmentrequestbody.md +++ b/previous-versions/accounting/docs/pkg/models/shared/codatfile.md @@ -1,4 +1,4 @@ -# UploadBillAttachmentRequestBody +# CodatFile ## Fields diff --git a/previous-versions/accounting/docs/sdks/bills/README.md b/previous-versions/accounting/docs/sdks/bills/README.md index 354c8720..2607cf95 100644 --- a/previous-versions/accounting/docs/sdks/bills/README.md +++ b/previous-versions/accounting/docs/sdks/bills/README.md @@ -803,9 +803,11 @@ func main() { ctx := context.Background() res, err := s.Bills.UploadAttachment(ctx, operations.UploadBillAttachmentRequest{ - RequestBody: &operations.UploadBillAttachmentRequestBody{ - Content: []byte("0xE3ABc1980E"), - FileName: "elegant_producer_electric.jpeg", + AttachmentUpload: &shared.AttachmentUpload{ + File: shared.CodatFile{ + Content: []byte("0xE3ABc1980E"), + FileName: "elegant_producer_electric.jpeg", + }, }, BillID: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2", CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002", diff --git a/previous-versions/accounting/docs/sdks/directcosts/README.md b/previous-versions/accounting/docs/sdks/directcosts/README.md index 878b1232..488c58a1 100644 --- a/previous-versions/accounting/docs/sdks/directcosts/README.md +++ b/previous-versions/accounting/docs/sdks/directcosts/README.md @@ -556,9 +556,11 @@ func main() { ctx := context.Background() res, err := s.DirectCosts.UploadAttachment(ctx, operations.UploadDirectCostAttachmentRequest{ - RequestBody: &operations.UploadDirectCostAttachmentRequestBody{ - 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 3c5434d6..d6e46c11 100755 --- a/previous-versions/accounting/files.gen +++ b/previous-versions/accounting/files.gen @@ -230,6 +230,8 @@ pkg/utils/utils.go /pkg/models/shared/bills.go /pkg/models/shared/attachmentsdataset.go /pkg/models/shared/updatebillresponse.go +/pkg/models/shared/attachmentupload.go +/pkg/models/shared/codatfile.go /pkg/models/shared/createcustomerresponse.go /pkg/models/shared/customer.go /pkg/models/shared/customerstatus.go @@ -407,7 +409,6 @@ docs/pkg/models/operations/listbillattachmentsrequest.md docs/pkg/models/operations/listbillattachmentsresponse.md docs/pkg/models/operations/updatebillrequest.md docs/pkg/models/operations/updatebillresponse.md -docs/pkg/models/operations/uploadbillattachmentrequestbody.md docs/pkg/models/operations/uploadbillattachmentrequest.md docs/pkg/models/operations/uploadbillattachmentresponse.md docs/pkg/models/operations/createcustomerrequest.md @@ -440,7 +441,6 @@ docs/pkg/models/operations/listdirectcostsrequest.md docs/pkg/models/operations/listdirectcostsresponse.md docs/pkg/models/operations/listdirectcostattachmentsrequest.md docs/pkg/models/operations/listdirectcostattachmentsresponse.md -docs/pkg/models/operations/uploaddirectcostattachmentrequestbody.md docs/pkg/models/operations/uploaddirectcostattachmentrequest.md docs/pkg/models/operations/uploaddirectcostattachmentresponse.md docs/pkg/models/operations/createdirectincomerequest.md @@ -701,6 +701,8 @@ docs/pkg/models/shared/attachment.md docs/pkg/models/shared/bills.md docs/pkg/models/shared/attachmentsdataset.md docs/pkg/models/shared/updatebillresponse.md +docs/pkg/models/shared/attachmentupload.md +docs/pkg/models/shared/codatfile.md docs/pkg/models/shared/createcustomerresponse.md docs/pkg/models/shared/customer.md docs/pkg/models/shared/customerstatus.md diff --git a/previous-versions/accounting/gen.yaml b/previous-versions/accounting/gen.yaml index bf9e43b4..12a64e44 100644 --- a/previous-versions/accounting/gen.yaml +++ b/previous-versions/accounting/gen.yaml @@ -1,9 +1,9 @@ configVersion: 1.0.0 management: - docChecksum: 1643e696b57c43c25f8da2810bbbeae4 + docChecksum: 643eb8e5abb697d514899964068b369b docVersion: 3.0.0 - speakeasyVersion: 1.125.1 - generationVersion: 2.210.3 + speakeasyVersion: 1.125.2 + generationVersion: 2.210.6 generation: comments: {} sdkClassName: CodatAccounting @@ -24,7 +24,7 @@ features: nameOverrides: 2.81.1 retries: 2.82.1 go: - version: 0.28.0 + version: 0.29.0 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: false imports: diff --git a/previous-versions/accounting/pkg/models/operations/uploadbillattachment.go b/previous-versions/accounting/pkg/models/operations/uploadbillattachment.go index 4038549b..2f8e8dcd 100644 --- a/previous-versions/accounting/pkg/models/operations/uploadbillattachment.go +++ b/previous-versions/accounting/pkg/models/operations/uploadbillattachment.go @@ -3,30 +3,12 @@ package operations import ( + "github.com/codatio/client-sdk-go/previous-versions/accounting/pkg/models/shared" "net/http" ) -type UploadBillAttachmentRequestBody struct { - Content []byte `multipartForm:"content"` - FileName string `multipartForm:"name=fileName"` -} - -func (o *UploadBillAttachmentRequestBody) GetContent() []byte { - if o == nil { - return []byte{} - } - return o.Content -} - -func (o *UploadBillAttachmentRequestBody) GetFileName() string { - if o == nil { - return "" - } - return o.FileName -} - type UploadBillAttachmentRequest struct { - RequestBody *UploadBillAttachmentRequestBody `multipartForm:"file" request:"mediaType=multipart/form-data"` + AttachmentUpload *shared.AttachmentUpload `request:"mediaType=multipart/form-data"` // Unique identifier for a bill. BillID string `pathParam:"style=simple,explode=false,name=billId"` // Unique identifier for a company. @@ -35,11 +17,11 @@ type UploadBillAttachmentRequest struct { ConnectionID string `pathParam:"style=simple,explode=false,name=connectionId"` } -func (o *UploadBillAttachmentRequest) GetRequestBody() *UploadBillAttachmentRequestBody { +func (o *UploadBillAttachmentRequest) GetAttachmentUpload() *shared.AttachmentUpload { if o == nil { return nil } - return o.RequestBody + return o.AttachmentUpload } func (o *UploadBillAttachmentRequest) GetBillID() string { diff --git a/previous-versions/accounting/pkg/models/operations/uploaddirectcostattachment.go b/previous-versions/accounting/pkg/models/operations/uploaddirectcostattachment.go index edf7927e..1829c719 100644 --- a/previous-versions/accounting/pkg/models/operations/uploaddirectcostattachment.go +++ b/previous-versions/accounting/pkg/models/operations/uploaddirectcostattachment.go @@ -3,30 +3,12 @@ package operations import ( + "github.com/codatio/client-sdk-go/previous-versions/accounting/pkg/models/shared" "net/http" ) -type UploadDirectCostAttachmentRequestBody struct { - Content []byte `multipartForm:"content"` - FileName string `multipartForm:"name=fileName"` -} - -func (o *UploadDirectCostAttachmentRequestBody) GetContent() []byte { - if o == nil { - return []byte{} - } - return o.Content -} - -func (o *UploadDirectCostAttachmentRequestBody) GetFileName() string { - if o == nil { - return "" - } - return o.FileName -} - type UploadDirectCostAttachmentRequest struct { - RequestBody *UploadDirectCostAttachmentRequestBody `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 UploadDirectCostAttachmentRequest struct { DirectCostID string `pathParam:"style=simple,explode=false,name=directCostId"` } -func (o *UploadDirectCostAttachmentRequest) GetRequestBody() *UploadDirectCostAttachmentRequestBody { +func (o *UploadDirectCostAttachmentRequest) GetAttachmentUpload() *shared.AttachmentUpload { if o == nil { return nil } - return o.RequestBody + return o.AttachmentUpload } func (o *UploadDirectCostAttachmentRequest) GetCompanyID() string { diff --git a/previous-versions/accounting/pkg/models/shared/attachmentupload.go b/previous-versions/accounting/pkg/models/shared/attachmentupload.go new file mode 100644 index 00000000..4d760384 --- /dev/null +++ b/previous-versions/accounting/pkg/models/shared/attachmentupload.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +type AttachmentUpload struct { + // The file to be uploaded as an attachment. + File CodatFile `multipartForm:"file"` +} + +func (o *AttachmentUpload) GetFile() CodatFile { + if o == nil { + return CodatFile{} + } + return o.File +} diff --git a/previous-versions/accounting/pkg/models/shared/codatfile.go b/previous-versions/accounting/pkg/models/shared/codatfile.go new file mode 100644 index 00000000..c8b6ca1b --- /dev/null +++ b/previous-versions/accounting/pkg/models/shared/codatfile.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +type CodatFile struct { + Content []byte `multipartForm:"content"` + FileName string `multipartForm:"name=fileName"` +} + +func (o *CodatFile) GetContent() []byte { + if o == nil { + return []byte{} + } + return o.Content +} + +func (o *CodatFile) GetFileName() string { + if o == nil { + return "" + } + return o.FileName +}