OEModule\PASAPI\controllers\V1Controller::sendSuccessResponse PHP Method

sendSuccessResponse() protected method

protected sendSuccessResponse ( $status, $response )
    protected function sendSuccessResponse($status, $response)
    {
        $body = '<Success>';
        if (isset($response['Id'])) {
            $body .= "<Id>{$response['Id']}</Id>";
        }
        $body .= "<Message>{$response['Message']}</Message>";
        if (isset($response['Warnings'])) {
            $body .= '<Warnings><Warning>' . implode('</Warning><Warning>', $response['Warnings']) . '</Warning></Warnings>';
        }
        $body .= '</Success>';
        $this->sendResponse($status, $body);
    }