[MM-28211] API pass-thru to the CWS for getting subscription (#15666)
* API pass-thru to the CWS for getting subscription * Remove use of parameter in favour of env var * Remove unnecessary param * Removed unnecessary fields and added client4 method * Some cleanup * Translation fix Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ca145a83bd
Коммит
2403aae0c4
@@ -5650,3 +5650,16 @@ func (c *Client4) ConfirmCustomerPayment(confirmRequest *ConfirmPaymentMethodReq
|
||||
|
||||
return BuildResponse(r)
|
||||
}
|
||||
|
||||
func (c *Client4) GetSubscription() (*Subscription, *Response) {
|
||||
r, appErr := c.DoApiGet(c.GetCloudRoute()+"/subscription", "")
|
||||
if appErr != nil {
|
||||
return nil, BuildErrorResponse(r, appErr)
|
||||
}
|
||||
defer closeBody(r)
|
||||
|
||||
var subscription *Subscription
|
||||
json.NewDecoder(r.Body).Decode(&subscription)
|
||||
|
||||
return subscription, BuildResponse(r)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user