Skip to content

Commit

Permalink
feat(webhosting): add control panels field in public list hostings re…
Browse files Browse the repository at this point in the history
…quest (scaleway#1941)
  • Loading branch information
scaleway-bot authored Nov 29, 2023
1 parent 9aaaa99 commit fc27865
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/webhosting/v1alpha1/webhosting_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,9 @@ type ListOffersRequest struct {

// HostingID: ID of a Web Hosting plan, to check compatibility with returned offers (in case of wanting to update the plan).
HostingID *string `json:"-"`

// ControlPanels: name of the control panel to filter for.
ControlPanels []string `json:"-"`
}

// ListOffersResponse: list offers response.
Expand Down Expand Up @@ -1015,6 +1018,7 @@ func (s *API) ListOffers(req *ListOffersRequest, opts ...scw.RequestOption) (*Li
parameter.AddToQuery(query, "without_options", req.WithoutOptions)
parameter.AddToQuery(query, "only_options", req.OnlyOptions)
parameter.AddToQuery(query, "hosting_id", req.HostingID)
parameter.AddToQuery(query, "control_panels", req.ControlPanels)

if fmt.Sprint(req.Region) == "" {
return nil, errors.New("field Region cannot be empty in request")
Expand Down

0 comments on commit fc27865

Please sign in to comment.