public function subscribeToWebhook(Structure\RequestWebhook $requestWebhook)
    {
        $this->response = parent::subscribeToWebhook($this->entity, $requestWebhook);

        /**
         * Checks the state of the platform integration.
         */
        if (Exception\IntegrationState::check($this->response->integrationState)) {
            throw new Exception\IntegrationState($this->response->integrationState);
        }

        /**
         * Caso ocorra algum erro específico do método.
         */
        if ($this->response->integrationState->state == 0) {
            throw new Exception\IntegrationResponse(
                $this->response->integrationState->message,
                $this->response->integrationState->code
            );
        }

        return $this->response;
    }
public function subscribeToWebhook(Structure\RequestWebhook $requestWebhook)
    {
        $this->response = parent::subscribeToWebhook($this->entity, $requestWebhook);

        /**
         * Checks the state of the platform integration.
         */
        if (Exception\IntegrationState::check($this->response->integrationState)) {
            throw new Exception\IntegrationState($this->response->integrationState);
        }

        /**
         * Caso ocorra algum erro específico do método.
         */
        if ($this->response->integrationState->state == 0) {
            throw new Exception\IntegrationResponse(
                $this->response->integrationState->message,
                $this->response->integrationState->code
            );
        }

        return $this->response;
    }
public function subscribeToWebhook ( Structure \ RequestWebhook $ requestWebhook ) { $ this -> response = parent :: subscribeToWebhook ( $ this -> entity , $ requestWebhook ) ; /**
         * Checks the state of the platform integration.
         */ if ( Exception \ IntegrationState :: check ( $ this -> response -> integrationState ) ) { throw new Exception \ IntegrationState ( $ this -> response -> integrationState ) ; } /**
         * Caso ocorra algum erro específico do método.
         */ if ( $ this -> response -> integrationState -> state == 0 ) { throw new Exception \ IntegrationResponse ( $ this -> response -> integrationState -> message , $ this -> response -> integrationState -> code ) ; } return $ this -> response ; }
Subscribe to a webhook to receive callbacks from events ocurred at PayPay.

@param  Structure\RequestWebhook $requestWebhook
@return Structure\ResponseWebhook
Subscribe to a webhook to receive callbacks from events ocurred at PayPay .