[MM-28217] Server API to serve up cloud customer information (#15656)
* [MM-28217] Server API to serve up cloud customer information * Added missing client4 method * merge'd Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
375931a4b9
Коммит
ebd3e6aa49
@@ -5651,6 +5651,19 @@ func (c *Client4) ConfirmCustomerPayment(confirmRequest *ConfirmPaymentMethodReq
|
||||
return BuildResponse(r)
|
||||
}
|
||||
|
||||
func (c *Client4) GetCloudCustomer() (*CloudCustomer, *Response) {
|
||||
r, appErr := c.DoApiGet(c.GetCloudRoute()+"/customer", "")
|
||||
if appErr != nil {
|
||||
return nil, BuildErrorResponse(r, appErr)
|
||||
}
|
||||
defer closeBody(r)
|
||||
|
||||
var cloudCustomer *CloudCustomer
|
||||
json.NewDecoder(r.Body).Decode(&cloudCustomer)
|
||||
|
||||
return cloudCustomer, BuildResponse(r)
|
||||
}
|
||||
|
||||
func (c *Client4) GetSubscription() (*Subscription, *Response) {
|
||||
r, appErr := c.DoApiGet(c.GetCloudRoute()+"/subscription", "")
|
||||
if appErr != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user