1 | <?php |
||
7 | class AccountingInvoice extends Model |
||
8 | { |
||
9 | const ENDPOINT = 'Invoices'; |
||
10 | const NODE_NAME = 'Invoice'; |
||
11 | const KEY_FIELD = 'InvoiceID'; |
||
12 | |||
13 | protected $methods = ['get', 'post', 'put']; |
||
14 | |||
15 | protected $attributes = [ |
||
16 | 'Type' => 'ACCREC', |
||
17 | 'Contact' => '', |
||
18 | 'LineItems' => [], |
||
19 | 'Date' => '', |
||
20 | 'DueDate' => '', |
||
21 | 'LineAmountTypes' => '', |
||
22 | 'InvoiceNumber' => '', |
||
23 | 'Reference' => '', |
||
24 | 'BrandingThemeID' => '', |
||
25 | 'Url' => '', |
||
26 | 'CurrencyCode' => '', |
||
27 | 'CurrencyRate' => '', |
||
28 | 'Status' => '', |
||
29 | 'SentToContact' => '', |
||
30 | 'ExpectedPaymentDate' => '', |
||
31 | 'PlannedPaymentDate' => '', |
||
32 | 'SubTotal' => '', |
||
33 | 'TotalTax' => '', |
||
34 | 'Total' => '', |
||
35 | 'TotalDiscount' => '', |
||
36 | 'InvoiceID' => '', |
||
37 | 'HasAttachments' => '', |
||
38 | 'Payments' => [], |
||
39 | 'Prepayments' => [], |
||
40 | 'Overpayments' => [], |
||
41 | 'AmountDue' => '', |
||
42 | 'AmountPaid' => '', |
||
43 | 'FullyPaidOnDate' => '', |
||
44 | 'AmountCredited' => '', |
||
45 | 'UpdatedDateUTC' => '', |
||
46 | 'CreditNotes' => [], |
||
47 | ]; |
||
48 | |||
49 | protected $relationships = [ |
||
50 | 'Contact' => '\MacsiDigital\Xero\AccountingContact', |
||
51 | 'LineItems' => '\MacsiDigital\Xero\AccountingLineItem', |
||
52 | 'Payments' => '\MacsiDigital\Xero\AccountingPayment', |
||
53 | 'Prepayments' => '\MacsiDigital\Xero\AccountingPrepayment', |
||
54 | 'Overpayments' => '\MacsiDigital\Xero\AccountingOverpayment', |
||
55 | ]; |
||
56 | |||
57 | public function addLineItem($item) |
||
61 | } |
||
62 |