Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add enum / constants classes for Accounting and PayrollAU and a fluent whereDate to query builder #885

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/XeroPHP/Enums/Accounting/Accounts/AccountClassType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace XeroPHP\Enums\Accounting\Accounts;

class AccountClassType
{
const ASSET = 'ASSET';

const EQUITY = 'EQUITY';

const EXPENSE = 'EXPENSE';

const LIABILITY = 'LIABILITY';
}
11 changes: 11 additions & 0 deletions src/XeroPHP/Enums/Accounting/Accounts/AccountStatusCode.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace XeroPHP\Enums\Accounting\Accounts;

class AccountStatusCode
{
const ACTIVE = 'ACTIVE';

const ARCHIVED = 'ARCHIVED';

}
50 changes: 50 additions & 0 deletions src/XeroPHP/Enums/Accounting/Accounts/AccountType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

namespace XeroPHP\Enums\Accounting\Accounts;

class AccountType
{

const BANK = 'BANK'; // Bank account

const CURRENT = 'CURRENT'; // Current Asset account

const CURRLIAB = 'CURRLIAB'; // Current Liability account

const DEPRECIATN = 'DEPRECIATN'; // Depreciation account

const DIRECTCOSTS = 'DIRECTCOSTS'; // Direct Costs account

const EQUITY = 'EQUITY'; // Equity account

const EXPENSE = 'EXPENSE'; // Expense account

const FIXED = 'FIXED'; // Fixed Asset account

const INVENTORY = 'INVENTORY'; // Inventory Asset account

const LIABILITY = 'LIABILITY'; // Liability account

const NONCURRENT = 'NONCURRENT'; // Non-current Asset account

const OTHERINCOME = 'OTHERINCOME'; // Other Income account

const OVERHEADS = 'OVERHEADS'; // Overhead account

const PREPAYMENT = 'PREPAYMENT'; // Prepayment account

const REVENUE = 'REVENUE'; // Revenue account

const SALES = 'SALES'; // Sale account

const TERMLIAB = 'TERMLIAB'; // Non-current Liability account

const PAYGLIABILITY = 'PAYGLIABILITY'; // PAYG Liability account

const SUPERANNUATIONEXPENSE = 'SUPERANNUATIONEXPENSE'; // Superannuation Expense account

const SUPERANNUATIONLIABILITY = 'SUPERANNUATIONLIABILITY'; // Superannuation Liability account

const WAGESEXPENSE = 'WAGESEXPENSE'; // Wages Expense account

}
11 changes: 11 additions & 0 deletions src/XeroPHP/Enums/Accounting/Accounts/BankAccountType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace XeroPHP\Enums\Accounting\Accounts;

class BankAccountType
{

const BANK = 'BANK';
const CREDITCARD = 'CREDITCARD';
const PAYPAL = 'PAYPAL';
}
25 changes: 25 additions & 0 deletions src/XeroPHP/Enums/Accounting/Accounts/SystemAccount.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace XeroPHP\Enums\Accounting\Accounts;

class SystemAccount
{
const DEBTORS = 'DEBTORS'; // Accounts Receivable
const CREDITORS = 'CREDITORS'; // Accounts Payable
const BANKCURRENCYGAIN = 'BANKCURRENCYGAIN'; // Bank Revaluations
const CISASSETS = 'CISASSETS'; // CIS Assets (UK Only)
const CISLABOUREXPENSE = 'CISLABOUREXPENSE'; // CIS Labour Expense (UK Only)
const CISLABOURINCOME = 'CISLABOURINCOME'; // CIS Labour Income (UK Only)
const CISLIABILITY = 'CISLIABILITY'; // CIS Liability (UK Only)
const CISMATERIALS = 'CISMATERIALS'; // CIS Materials (UK Only)
const GST = 'GST'; // GST / VAT
const GSTONIMPORTS = 'GSTONIMPORTS'; // GST On Imports
const HISTORICAL = 'HISTORICAL'; // Historical Adjustment
const REALISEDCURRENCYGAIN = 'REALISEDCURRENCYGAIN'; // Realised Currency Gains
const RETAINEDEARNINGS = 'RETAINEDEARNINGS'; // Retained Earnings
const ROUNDING = 'ROUNDING'; // Rounding
const TRACKINGTRANSFERS = 'TRACKINGTRANSFERS'; // Tracking Transfers
const UNPAIDEXPCLM = 'UNPAIDEXPCLM'; // Unpaid Expense Claims
const UNREALISEDCURRENCYGAIN = 'UNREALISEDCURRENCYGAIN'; // Unrealised Currency Gains
const WAGEPAYABLES = 'WAGEPAYABLES'; // Wages Payable
}
16 changes: 16 additions & 0 deletions src/XeroPHP/Enums/Accounting/Addresses/AddressType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace XeroPHP\Enums\Accounting\Addresses;

class AddressType
{

// The default mailing address for invoices
const POBOX = 'POBOX';

const STREET = 'STREET';

// Read-only via the GET endpoint (if set). The delivery address of the Xero organisation. DELIVERY address type is not valid for Contacts.
const DELIVERY = 'DELIVERY';

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace XeroPHP\Enums\Accounting\BankTransactions;

class BankTransactionStatusCode
{
const AUTHORISED = 'AUTHORISED';

const DELETED = 'DELETED';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace XeroPHP\Enums\Accounting\BankTransactions;

class BankTransactionType
{
const RECEIVE = 'RECEIVE';

const RECEIVE_OVERPAYMENT = 'RECEIVE-OVERPAYMENT';

const RECEIVE_PREPAYMENT = 'RECEIVE-PREPAYMENT';

const SPEND = 'SPEND';

const SPEND_OVERPAYMENT = 'SPEND-OVERPAYMENT';

const SPEND_PREPAYMENT = 'SPEND-PREPAYMENT';


// The following values are only supported via the GET method at the moment

const RECEIVE_TRANSFER = 'RECEIVE-TRANSFER';

const SPEND_TRANSFER = 'SPEND-TRANSFER';
}
16 changes: 16 additions & 0 deletions src/XeroPHP/Enums/Accounting/Contacts/ContactStatusCode.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace XeroPHP\Enums\Accounting\Contacts;

class ContactStatusCode
{

// The Contact is active and can be used in transactions
const ACTIVE = 'ACTIVE';

// The Contact is archived and can no longer be used in transactions
const ARCHIVED = 'ARCHIVED';

// The Contact is the subject of a GDPR erasure request and can no longer be used in transactions
const GDPRREQUEST = 'GDPRREQUEST';
}
12 changes: 12 additions & 0 deletions src/XeroPHP/Enums/Accounting/CreditNotes/CreditNoteType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace XeroPHP\Enums\Accounting\CreditNotes;

class CreditNoteType
{

const ACCPAYCREDIT = 'ACCPAYCREDIT'; // An Accounts Payable(supplier) Credit Note

const ACCRECCREDIT = 'ACCRECCREDIT'; // An Account Receivable(customer) Credit Note

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace XeroPHP\Enums\Accounting\ExpenseClaims;

class ExpenseClaimStatusCode
{
const SUBMITTED = 'SUBMITTED'; // An expense claim has been submitted for approval ( default)

const AUTHORISED = 'AUTHORISED'; // An expense claim has been authorised for payment

const PAID = 'PAID'; // An expense claim has been paid

}
16 changes: 16 additions & 0 deletions src/XeroPHP/Enums/Accounting/ExternalLinks/ExternalLinkType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace XeroPHP\Enums\Accounting\ExternalLinks;

class ExternalLinkType
{
const FACEBOOK = 'Facebook';

const GOOGLEPLUS = 'GooglePlus';

const LINKEDIN = 'LinkedIn';

const TWITTER = 'Twitter';

const WEBSITE = 'Website';
}
19 changes: 19 additions & 0 deletions src/XeroPHP/Enums/Accounting/Invoices/InvoiceStatusCode.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace XeroPHP\Enums\Accounting\Invoices;

class InvoiceStatusCode
{
const DRAFT = 'DRAFT'; // A Draft Invoice ( default)

const SUBMITTED = 'SUBMITTED'; // An Awaiting Approval Invoice

const DELETED = 'DELETED'; // A Deleted Invoice

const AUTHORISED = 'AUTHORISED'; // An Invoice that is Approved and Awaiting Payment OR partially paid

const PAID = 'PAID'; // An Invoice that is completely Paid

const VOIDED = 'VOIDED'; // A Voided Invoice

}
10 changes: 10 additions & 0 deletions src/XeroPHP/Enums/Accounting/Invoices/InvoiceType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace XeroPHP\Enums\Accounting\Invoices;

class InvoiceType
{

const ACCPAY = 'ACCPAY'; //A bill - commonly known as an Accounts Payable or supplier invoice
const ACCREC = 'ACCREC'; //A sales invoice - commonly known as an Accounts Receivable or customer invoice
}
13 changes: 13 additions & 0 deletions src/XeroPHP/Enums/Accounting/Invoices/LineAmountType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace XeroPHP\Enums\Accounting\Invoices;

class LineAmountType
{
const Exclusive = 'Exclusive'; // Line items are exclusive of tax

const Inclusive = 'Inclusive'; // Line items are inclusive tax

const NoTax = 'NoTax'; // Line have no tax

}
57 changes: 57 additions & 0 deletions src/XeroPHP/Enums/Accounting/Journals/JournalSourceType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

namespace XeroPHP\Enums\Accounting\Journals;

class JournalSourceType
{
const ACCREC = 'ACCREC'; // Accounts Receivable Invoice

const ACCPAY = 'ACCPAY'; // Accounts Payable Invoice

const ACCRECCREDIT = 'ACCRECCREDIT'; // Accounts Receivable Credit Note

const ACCPAYCREDIT = 'ACCPAYCREDIT'; // Accounts Payable Credit Note

const ACCRECPAYMENT = 'ACCRECPAYMENT'; // Payment on an Accounts Receivable Invoice

const ACCPAYPAYMENT = 'ACCPAYPAYMENT'; // Payment on an Accounts Payable Invoice

const ARCREDITPAYMENT = 'ARCREDITPAYMENT'; // Accounts Receivable Credit Note Payment

const APCREDITPAYMENT = 'APCREDITPAYMENT'; // Accounts Payable Credit Note Payment

const CASHREC = 'CASHREC'; // Receive Money Bank Transaction

const CASHPAID = 'CASHPAID'; // Spend Money Bank Transaction

const TRANSFER = 'TRANSFER'; // Bank Transfer

const ARPREPAYMENT = 'ARPREPAYMENT'; // Accounts Receivable Prepayment

const APPREPAYMENT = 'APPREPAYMENT'; // Accounts Payable Prepayment

const AROVERPAYMENT = 'AROVERPAYMENT'; // Accounts Receivable Overpayment

const APOVERPAYMENT = 'APOVERPAYMENT'; // Accounts Payable Overpayment

const EXPCLAIM = 'EXPCLAIM'; // Expense Claim

const EXPPAYMENT = 'EXPPAYMENT'; // Expense Claim Payment

const MANJOURNAL = 'MANJOURNAL'; // Manual Journal

const PAYSLIP = 'PAYSLIP'; // Payslip

const WAGEPAYABLE = 'WAGEPAYABLE'; // Payroll Payable

const INTEGRATEDPAYROLLPE = 'INTEGRATEDPAYROLLPE'; // Payroll Expense

const INTEGRATEDPAYROLLPT = 'INTEGRATEDPAYROLLPT'; // Payroll Payment

const EXTERNALSPENDMONEY = 'EXTERNALSPENDMONEY'; // Payroll Employee Payment

const INTEGRATEDPAYROLLPTPAYMENT = 'INTEGRATEDPAYROLLPTPAYMENT'; // Payroll Tax Payment

const INTEGRATEDPAYROLLCN = 'INTEGRATEDPAYROLLCN'; // Payroll Credit Note

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace XeroPHP\Enums\Accounting\LinkedTransactions;

class LinkedTransactionStatusCode
{
const DRAFT = 'DRAFT'; // The source transaction is in a draft status. The linked transaction has not been allocated to target transaction

const APPROVED = 'APPROVED'; // The source transaction is in a authorised status. The linked transaction has not been allocated to target transaction

const ONDRAFT = 'ONDRAFT'; // The linked transaction has been allocated to target transaction in draft status

const BILLED = 'BILLED'; // The linked transaction has been allocated to a target transaction in authorised status

const VOIDED = 'VOIDED'; // The source transaction has been voided

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace XeroPHP\Enums\Accounting\ManualJournals;

class ManualJournalStatusCode
{
const DRAFT = 'DRAFT'; // A Draft ManualJournal ( default)

const POSTED = 'POSTED'; // A Posted ManualJournal

const DELETED = 'DELETED'; // A Deleted Draft ManualJournal

const VOIDED = 'VOIDED'; // A Voided Posted ManualJournal

}
Loading