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-03-06 09:07:25 +01:00
|
|
|
use App\Models\Client;
|
2023-03-18 08:24:56 +01:00
|
|
|
use App\Models\ClientContact;
|
2023-03-07 09:52:37 +01:00
|
|
|
use App\Models\Company;
|
2023-03-18 08:24:56 +01:00
|
|
|
use App\Models\Credit;
|
|
|
|
use App\Models\CreditInvitation;
|
2023-03-06 09:07:25 +01:00
|
|
|
use App\Models\Invoice;
|
2023-03-18 08:24:56 +01:00
|
|
|
use App\Models\InvoiceInvitation;
|
2023-03-07 09:52:37 +01:00
|
|
|
use App\Models\Payment;
|
2023-03-06 09:07:25 +01:00
|
|
|
use App\Models\PurchaseOrder;
|
2023-03-18 08:24:56 +01:00
|
|
|
use App\Models\PurchaseOrderInvitation;
|
|
|
|
use App\Models\Quote;
|
2023-03-06 09:07:25 +01:00
|
|
|
use App\Models\QuoteInvitation;
|
2023-03-18 08:24:56 +01:00
|
|
|
use App\Models\User;
|
|
|
|
use App\Models\Vendor;
|
|
|
|
use App\Models\VendorContact;
|
2023-01-15 04:44:23 +01:00
|
|
|
use Illuminate\Mail\Mailables\Address;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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-05-24 13:35:13 +02:00
|
|
|
public string $text_body = '';
|
|
|
|
|
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;
|
2024-01-14 05:05:00 +01:00
|
|
|
|
2023-03-06 09:07:25 +01:00
|
|
|
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;
|
2024-01-14 05:05:00 +01:00
|
|
|
|
2023-03-06 09:07:25 +01:00
|
|
|
public ?int $client_id = null;
|
|
|
|
|
|
|
|
public ?Client $client;
|
2024-01-14 05:05:00 +01:00
|
|
|
|
2023-03-06 09:07:25 +01:00
|
|
|
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-10-08 05:09:36 +02:00
|
|
|
|
|
|
|
public ?string $button = null;
|
|
|
|
|
|
|
|
public ?string $url = null;
|
2023-02-16 02:36:09 +01:00
|
|
|
}
|