JFIF  x x C         C     "        } !1AQa "q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz        w !1AQ aq"2B #3Rbr{ gilour
<?php namespace Luigel\Paymongo\Traits; use Luigel\Paymongo\Models\BaseModel; use Luigel\Paymongo\Models\Webhook; trait HasToggleWebhook { /** * Enables the webhook. * * @param Webhook $webhook * @return BaseModel */ public function enable(Webhook $webhook) { $this->method = 'POST'; $this->apiUrl = $this->apiUrl.$webhook->getId().'/enable'; $this->setOptions([ 'headers' => [ 'Accept' => 'application/json', ], 'auth' => [config('paymongo.secret_key'), ''], ]); return $this->request(); } /** * Disables the webhook. * * @param Webhook $webhook * @return BaseModel */ public function disable(Webhook $webhook) { $this->method = 'POST'; $this->apiUrl = $this->apiUrl.$webhook->getId().'/disable'; $this->setOptions([ 'headers' => [ 'Accept' => 'application/json', ], 'auth' => [config('paymongo.secret_key'), ''], ]); return $this->request(); } }