Mm 43084 add cloud workspace limits endpoint (#20041)
* add cloud workspace limits endpoint
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f460401cf2
Коммит
d4db43c95e
@@ -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 {
|
||||
|
||||
Ссылка в новой задаче
Block a user