Mm 47648 check license expandable (#21770)
* [MM-47648] Handler for check if a subscription is expandable * Mock cloud regenerate * PR Webapp test purpose only * [MM-47648] Refactor and tests for expand stats for a subscription * Fix typos * style fix * has to be revert * CWS URL to Spinwick * new spinwick url * target portal test * Generate token instead of send licenseId * Rename * Rename methods * Revert public key and cws url Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
dc533e59b8
Коммит
b9501bc535
@@ -8213,6 +8213,19 @@ func (c *Client4) GetCloudCustomer() (*CloudCustomer, *Response, error) {
|
||||
return cloudCustomer, BuildResponse(r), nil
|
||||
}
|
||||
|
||||
func (c *Client4) GetExpandStats(licenseId string) (*SubscriptionExpandStatus, *Response, error) {
|
||||
r, err := c.DoAPIGet(fmt.Sprintf("%s%s?licenseID=%s", c.cloudRoute(), "/subscription/expand", licenseId), "")
|
||||
if err != nil {
|
||||
return nil, BuildResponse(r), err
|
||||
}
|
||||
defer closeBody(r)
|
||||
|
||||
var subscriptionExpandable *SubscriptionExpandStatus
|
||||
json.NewDecoder(r.Body).Decode(&subscriptionExpandable)
|
||||
|
||||
return subscriptionExpandable, BuildResponse(r), nil
|
||||
}
|
||||
|
||||
func (c *Client4) GetSubscription() (*Subscription, *Response, error) {
|
||||
r, err := c.DoAPIGet(c.cloudRoute()+"/subscription", "")
|
||||
if err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user