2023-01-15 04:44:23 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
2023-01-28 23:21:40 +01:00
|
|
|
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
|
2023-01-15 04:44:23 +01:00
|
|
|
*
|
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Services\Email;
|
|
|
|
|
2023-02-17 22:36:51 +01:00
|
|
|
use App\Models\User;
|
2023-03-06 09:07:25 +01:00
|
|
|
use App\Models\Quote;
|
|
|
|
use App\Models\Client;
|
|
|
|
use App\Models\Credit;
|
2023-02-17 22:36:51 +01:00
|
|
|
use App\Models\Vendor;
|
2023-03-07 09:52:37 +01:00
|
|
|
use App\Models\Company;
|
2023-03-06 09:07:25 +01:00
|
|
|
use App\Models\Invoice;
|
2023-03-07 09:52:37 +01:00
|
|
|
use App\Models\Payment;
|
2023-03-06 09:07:25 +01:00
|
|
|
use App\Models\ClientContact;
|
|
|
|
use App\Models\PurchaseOrder;
|
2023-01-15 04:44:23 +01:00
|
|
|
use App\Models\VendorContact;
|
2023-03-06 09:07:25 +01:00
|
|
|
use App\Models\QuoteInvitation;
|
|
|
|
use App\Models\CreditInvitation;
|
|
|
|
use App\Models\InvoiceInvitation;
|
2023-01-15 04:44:23 +01:00
|
|
|
use Illuminate\Mail\Mailables\Address;
|
2023-03-06 09:07:25 +01:00
|
|
|
use App\Models\PurchaseOrderInvitation;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* EmailObject.
|
|
|
|
*/
|
|
|
|
class EmailObject
|
|
|
|
{
|
2023-03-12 01:02:35 +01:00
|
|
|
/** @var array[string] $args */
|
2023-02-16 02:36:09 +01:00
|
|
|
public array $to = [];
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public ?Address $from = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public array $reply_to = [];
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-03-12 01:02:35 +01:00
|
|
|
/** @var array[Address] $args */
|
2023-02-16 02:36:09 +01:00
|
|
|
public array $cc = [];
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-03-12 01:02:35 +01:00
|
|
|
/** @var array[Address] $args */
|
2023-02-16 02:36:09 +01:00
|
|
|
public array $bcc = [];
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public ?string $subject = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public ?string $body = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-03-12 01:02:35 +01:00
|
|
|
/** @var array{key: value} $args */
|
2023-02-16 02:36:09 +01:00
|
|
|
public array $attachments = [];
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public string $company_key;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-03-07 09:52:37 +01:00
|
|
|
public Company $company;
|
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public ?object $settings = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public bool $whitelabel = false;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public ?string $logo = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public ?string $signature = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public ?string $greeting = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-03-06 09:07:25 +01:00
|
|
|
public ?int $invitation_id = null;
|
|
|
|
|
|
|
|
public InvoiceInvitation | QuoteInvitation | CreditInvitation | PurchaseOrderInvitation | null $invitation;
|
|
|
|
|
|
|
|
public ?int $entity_id = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-03-07 09:52:37 +01:00
|
|
|
public Invoice | Quote | Credit | PurchaseOrder | Payment | null $entity;
|
2023-03-06 09:07:25 +01:00
|
|
|
|
|
|
|
public ?int $client_id = null;
|
|
|
|
|
|
|
|
public ?Client $client;
|
|
|
|
|
|
|
|
public ?int $vendor_id = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-03-06 09:07:25 +01:00
|
|
|
public ?Vendor $vendor;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-03-06 09:07:25 +01:00
|
|
|
public ?int $user_id = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-03-06 09:07:25 +01:00
|
|
|
public ?User $user;
|
|
|
|
|
|
|
|
public ?int $client_contact_id = null;
|
|
|
|
|
|
|
|
public ClientContact | VendorContact | null $contact;
|
|
|
|
|
|
|
|
public ?int $vendor_contact_id = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public ?string $email_template_body = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public ?string $email_template_subject = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public ?string $html_template = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public ?string $text_template = 'email.template.text';
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-03-12 01:02:35 +01:00
|
|
|
/** @var array{key: value} $args */
|
2023-02-16 02:36:09 +01:00
|
|
|
public array $headers = [];
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-02-16 02:36:09 +01:00
|
|
|
public ?string $entity_class = null;
|
2023-01-15 04:44:23 +01:00
|
|
|
|
2023-03-12 01:02:35 +01:00
|
|
|
/** @var array{key: value} $args */
|
2023-02-16 02:36:09 +01:00
|
|
|
public array $variables = [];
|
2023-02-17 22:06:53 +01:00
|
|
|
|
2023-03-06 09:07:25 +01:00
|
|
|
public bool $override = false;
|
|
|
|
|
|
|
|
public ?string $invitation_key = null;
|
2023-03-07 09:52:37 +01:00
|
|
|
|
2023-03-12 01:02:35 +01:00
|
|
|
/** @var array[int] $args */
|
2023-03-07 09:52:37 +01:00
|
|
|
public array $documents = [];
|
2023-03-07 12:36:50 +01:00
|
|
|
|
|
|
|
public ?string $template = null; //invoice //quote //reminder1
|
2023-03-09 00:38:08 +01:00
|
|
|
|
|
|
|
public array $links = [];
|
2023-02-16 02:36:09 +01:00
|
|
|
}
|