Mm 43084 add cloud workspace limits endpoint (#20041)

* add cloud workspace limits endpoint
Этот коммит содержится в:
Nathaniel Allred
2022-04-22 14:23:19 -05:00
коммит произвёл GitHub
родитель f460401cf2
Коммит d4db43c95e
7 изменённых файлов: 246 добавлений и 0 удалений

Просмотреть файл

@@ -7707,6 +7707,19 @@ func (c *Client4) GetCloudProducts() ([]*Product, *Response, error) {
return cloudProducts, BuildResponse(r), nil
}
func (c *Client4) GetProductLimits() (*ProductLimits, *Response, error) {
r, err := c.DoAPIGet(c.cloudRoute()+"/limits", "")
if err != nil {
return nil, BuildResponse(r), err
}
defer closeBody(r)
var productLimits *ProductLimits
json.NewDecoder(r.Body).Decode(&productLimits)
return productLimits, BuildResponse(r), nil
}
func (c *Client4) CreateCustomerPayment() (*StripeSetupIntent, *Response, error) {
r, err := c.DoAPIPost(c.cloudRoute()+"/payment", "")
if err != nil {