2016-08-09 22:06:24 +02:00
|
|
|
<?php namespace App\Ninja\Intents;
|
|
|
|
|
2016-08-10 14:57:34 +02:00
|
|
|
use Auth;
|
2016-08-09 22:06:24 +02:00
|
|
|
use App\Models\EntityModel;
|
|
|
|
use App\Models\Invoice;
|
2016-08-10 14:57:34 +02:00
|
|
|
use App\Libraries\Skype\SkypeResponse;
|
2016-08-09 22:06:24 +02:00
|
|
|
|
|
|
|
class DownloadInvoiceIntent extends InvoiceIntent
|
|
|
|
{
|
|
|
|
public function process()
|
|
|
|
{
|
|
|
|
$invoice = $this->invoice();
|
|
|
|
|
|
|
|
$message = trans('texts.' . $invoice->getEntityType()) . ' ' . $invoice->invoice_number;
|
|
|
|
$message = link_to('/download/' . $invoice->invitations[0]->invitation_key, $message);
|
|
|
|
|
2016-08-10 14:57:34 +02:00
|
|
|
return SkypeResponse::message($message);
|
2016-08-09 22:06:24 +02:00
|
|
|
}
|
|
|
|
}
|