[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>
Этот коммит содержится в:
Devin Binnie
2020-10-05 08:46:52 -04:00
коммит произвёл GitHub
родитель 375931a4b9
Коммит ebd3e6aa49
4 изменённых файлов: 79 добавлений и 0 удалений

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

@@ -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 {