/** * Evalua que el cliente pueda autentificarse correctamente * * @param Client $client * @return \ComproPago\MgPayment\Model\Api\CompropagoSdk\Models\EvalAuthInfo * @throws \Exception */ public static function evalAuth(Client $client) { $response = Rest::get($client->getUri() . "users/auth/", $client->getFullAuth()); $info = Factory::evalAuthInfo($response); switch ($info->code) { case '200': return $info; default: throw new \Exception("CODE {$info->code}: " . $info->message, $info->code); } }
/** * @return array * @throws \Exception */ public function listWebhooks() { Validations::validateGateway($this->client); $response = Rest::get($this->client->getUri() . "webhooks/stores/", $this->client->getFullAuth(), $this->headers); $obj = Factory::listWebhooks($response); return $obj; }