This commit is contained in:
2026-06-19 17:37:20 +03:00
parent b897b3447a
commit f679261f74
1513 changed files with 107093 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
package vins
import (
"context"
"net/http"
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
// MassEnableRequest struct to enable several VINSes
type MassEnableRequest struct {
// VINS IDs
// Required: true
VINSIDs []uint64 `url:"vinsIds" json:"vinsIds" validate:"min=1"`
}
// MassEnable start jobs to enable several VINSes
func (v VINS) MassEnable(ctx context.Context, req MassEnableRequest) (string, error) {
err := validators.ValidateRequest(req)
if err != nil {
return "", validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudbroker/vins/massEnable"
res, err := v.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
return "", err
}
return string(res), nil
}