protected function makePostRequest($endpoint, array $params, $type = 'form_params') {
        try {
            $params[$type] = $params;
            $response = $this->_client->post($endpoint, $params);
            $this->validateResponse($response->getStatusCode());
            return $this->to_json($response);
        } catch(ClientException $e) {
            $this->validateResponse($e->getResponse()->getStatusCode());
        }
    }