From ac1ceba1da1c4e3da36b7fda8e00addd80e87ac5 Mon Sep 17 00:00:00 2001 From: Kamron Brooks Date: Sat, 28 Jan 2023 23:33:05 +1100 Subject: [PATCH 1/2] Add enum / constants classes for Accounting and PayrollAU Mark old constant classes as deprecated and point to the new classes Fix return types * PayrollAU + Setting/TrackingCategory + Setting Add more fluent ->whereDate function to query builder --- .../Accounting/Accounts/AccountClassType.php | 14 ++++ .../Accounting/Accounts/AccountStatusCode.php | 11 +++ .../Enums/Accounting/Accounts/AccountType.php | 50 ++++++++++++ .../Accounting/Accounts/BankAccountType.php | 11 +++ .../Accounting/Accounts/SystemAccount.php | 25 ++++++ .../Accounting/Addresses/AddressType.php | 16 ++++ .../BankTransactionStatusCode.php | 10 +++ .../BankTransactions/BankTransactionType.php | 25 ++++++ .../Accounting/Contacts/ContactStatusCode.php | 16 ++++ .../Accounting/CreditNotes/CreditNoteType.php | 12 +++ .../ExpenseClaims/ExpenseClaimStatusCode.php | 13 +++ .../ExternalLinks/ExternalLinkType.php | 16 ++++ .../Accounting/Invoices/InvoiceStatusCode.php | 19 +++++ .../Enums/Accounting/Invoices/InvoiceType.php | 10 +++ .../Accounting/Invoices/LineAmountType.php | 13 +++ .../Accounting/Journals/JournalSourceType.php | 57 +++++++++++++ .../LinkedTransactionStatusCode.php | 17 ++++ .../ManualJournalStatusCode.php | 15 ++++ .../Organisation/OrganisationClass.php | 31 +++++++ .../Organisation/OrganisationType.php | 22 +++++ .../Accounting/Organisation/VersionType.php | 26 ++++++ .../Overpayments/OverpaymentStatusCode.php | 13 +++ .../Overpayments/OverpaymentType.php | 11 +++ .../Accounting/Payments/PaymentStatusCode.php | 11 +++ .../Accounting/Payments/PaymentTerms.php | 11 +++ .../Enums/Accounting/Payments/PaymentType.php | 23 ++++++ .../Enums/Accounting/Phones/PhoneType.php | 16 ++++ .../Prepayments/PrepaymentStatusCode.php | 13 +++ .../Accounting/Prepayments/PrepaymentType.php | 12 +++ .../PurchaseOrders/PurchaseOrderStatus.php | 18 +++++ .../PurchaseOrders/QuoteStatusCode.php | 19 +++++ .../Accounting/Receipts/ReceiptStatusCode.php | 15 ++++ .../Accounting/ReportTaxTypes/Australia.php | 30 +++++++ .../Accounting/ReportTaxTypes/NewZealand.php | 20 +++++ .../Enums/Accounting/ReportTaxTypes/UK.php | 39 +++++++++ .../SalesTaxBasis/AustraliaUsGlobal.php | 14 ++++ .../Accounting/SalesTaxBasis/NewZealand.php | 14 ++++ .../SalesTaxBasis/UnitedKingdom.php | 17 ++++ .../Accounting/SalesTaxPeriods/Australia.php | 16 ++++ .../Accounting/SalesTaxPeriods/NewZealand.php | 10 +++ .../SalesTaxPeriods/UnitedKingdom.php | 13 +++ .../Accounting/SalesTaxPeriods/UsGlobal.php | 18 +++++ .../Accounting/TaxRates/TaxStatusCode.php | 15 ++++ .../TaxRates/TaxTypes/Australia.php | 19 +++++ .../TaxRates/TaxTypes/GlobalTaxType.php | 15 ++++ .../TaxRates/TaxTypes/NewZealand.php | 17 ++++ .../TaxRates/TaxTypes/Singapore.php | 47 +++++++++++ .../TaxRates/TaxTypes/SouthAfrica.php | 59 ++++++++++++++ .../TaxRates/TaxTypes/UnitedKingdom.php | 53 ++++++++++++ .../TaxRates/TaxTypes/UnitedStates.php | 14 ++++ .../Enums/Accounting/UserRoles/UserRole.php | 19 +++++ .../EarningsRates/AllowanceCategory.php | 21 +++++ .../PayrollAU/EarningsRates/AllowanceType.php | 27 +++++++ .../PayrollAU/EarningsRates/EarningsType.php | 47 +++++++++++ .../EmploymentTerminationPaymentType.php | 11 +++ .../PayrollAU/EarningsRates/RateType.php | 15 ++++ .../PayrollAU/Employees/EmploymentType.php | 11 +++ .../Enums/PayrollAU/Employees/Gender.php | 11 +++ .../Enums/PayrollAU/Employees/IncomeType.php | 17 ++++ .../Employees/SeniorMaritalStatus.php | 17 ++++ .../PayrollAU/Employees/StateAbbreviation.php | 23 ++++++ .../Enums/PayrollAU/Employees/StatusCode.php | 11 +++ .../PayrollAU/Employees/TaxScaleType.php | 25 ++++++ .../Employees/TerminationReasonCode.php | 21 +++++ .../PayrollAU/Employees/WorkCondition.php | 17 ++++ .../LeavePeriodStatusCode.php | 10 +++ .../PayrollAU/PayItems/LeaveCategory.php | 29 +++++++ .../Enums/PayrollAU/PayRun/PayRunStatus.php | 10 +++ .../Enums/PayrollAU/PaySlip/ManualTaxType.php | 19 +++++ .../DeductionTypeCalculationType.php | 13 +++ .../EarningsRateCalculationType.php | 13 +++ .../PayrollAU/PayTemplates/EarningsType.php | 27 +++++++ .../EntitlementFinalPayPayoutType.php | 11 +++ .../PayTemplates/LeaveTypeCalculationType.php | 15 ++++ .../LeaveTypeContributionType.php | 15 ++++ .../PayTemplates/PaymentFrequencyType.php | 21 +++++ .../SuperannuationCalculationType.php | 13 +++ .../SuperannuationContributionType.php | 15 ++++ .../PayrollCalendars/CalendarType.php | 19 +++++ .../PayrollAU/SuperFund/SuperFundType.php | 9 +++ .../TaxDeclaration/EmploymentBasis.php | 19 +++++ .../TaxDeclaration/ResidencyStatus.php | 20 +++++ .../TaxDeclaration/TFNExemptionType.php | 15 ++++ .../Enums/PayrollAU/Timesheets/StatusCode.php | 13 +++ .../Models/Accounting/ExternalLink.php | 3 + .../Models/Accounting/Organisation.php | 81 ++++++++++--------- .../Models/Accounting/Organisation/Bill.php | 10 ++- .../Accounting/Organisation/PaymentTerm.php | 44 +++++----- .../Models/Accounting/Organisation/Sale.php | 8 +- .../Models/Accounting/ReportTaxType.php | 7 ++ .../Models/Accounting/SalesTaxBasis.php | 3 + .../Models/Accounting/SalesTaxPeriod.php | 3 + src/XeroPHP/Models/Accounting/TaxType.php | 41 +++------- src/XeroPHP/Models/Accounting/UserRole.php | 5 ++ src/XeroPHP/Models/PayrollAU/Setting.php | 57 ++----------- .../PayrollAU/Setting/TrackingCategory.php | 4 +- src/XeroPHP/Remote/Query.php | 12 +++ 97 files changed, 1749 insertions(+), 149 deletions(-) create mode 100644 src/XeroPHP/Enums/Accounting/Accounts/AccountClassType.php create mode 100644 src/XeroPHP/Enums/Accounting/Accounts/AccountStatusCode.php create mode 100644 src/XeroPHP/Enums/Accounting/Accounts/AccountType.php create mode 100644 src/XeroPHP/Enums/Accounting/Accounts/BankAccountType.php create mode 100644 src/XeroPHP/Enums/Accounting/Accounts/SystemAccount.php create mode 100644 src/XeroPHP/Enums/Accounting/Addresses/AddressType.php create mode 100644 src/XeroPHP/Enums/Accounting/BankTransactions/BankTransactionStatusCode.php create mode 100644 src/XeroPHP/Enums/Accounting/BankTransactions/BankTransactionType.php create mode 100644 src/XeroPHP/Enums/Accounting/Contacts/ContactStatusCode.php create mode 100644 src/XeroPHP/Enums/Accounting/CreditNotes/CreditNoteType.php create mode 100644 src/XeroPHP/Enums/Accounting/ExpenseClaims/ExpenseClaimStatusCode.php create mode 100644 src/XeroPHP/Enums/Accounting/ExternalLinks/ExternalLinkType.php create mode 100644 src/XeroPHP/Enums/Accounting/Invoices/InvoiceStatusCode.php create mode 100644 src/XeroPHP/Enums/Accounting/Invoices/InvoiceType.php create mode 100644 src/XeroPHP/Enums/Accounting/Invoices/LineAmountType.php create mode 100644 src/XeroPHP/Enums/Accounting/Journals/JournalSourceType.php create mode 100644 src/XeroPHP/Enums/Accounting/LinkedTransactions/LinkedTransactionStatusCode.php create mode 100644 src/XeroPHP/Enums/Accounting/ManualJournals/ManualJournalStatusCode.php create mode 100644 src/XeroPHP/Enums/Accounting/Organisation/OrganisationClass.php create mode 100644 src/XeroPHP/Enums/Accounting/Organisation/OrganisationType.php create mode 100644 src/XeroPHP/Enums/Accounting/Organisation/VersionType.php create mode 100644 src/XeroPHP/Enums/Accounting/Overpayments/OverpaymentStatusCode.php create mode 100644 src/XeroPHP/Enums/Accounting/Overpayments/OverpaymentType.php create mode 100644 src/XeroPHP/Enums/Accounting/Payments/PaymentStatusCode.php create mode 100644 src/XeroPHP/Enums/Accounting/Payments/PaymentTerms.php create mode 100644 src/XeroPHP/Enums/Accounting/Payments/PaymentType.php create mode 100644 src/XeroPHP/Enums/Accounting/Phones/PhoneType.php create mode 100644 src/XeroPHP/Enums/Accounting/Prepayments/PrepaymentStatusCode.php create mode 100644 src/XeroPHP/Enums/Accounting/Prepayments/PrepaymentType.php create mode 100644 src/XeroPHP/Enums/Accounting/PurchaseOrders/PurchaseOrderStatus.php create mode 100644 src/XeroPHP/Enums/Accounting/PurchaseOrders/QuoteStatusCode.php create mode 100644 src/XeroPHP/Enums/Accounting/Receipts/ReceiptStatusCode.php create mode 100644 src/XeroPHP/Enums/Accounting/ReportTaxTypes/Australia.php create mode 100644 src/XeroPHP/Enums/Accounting/ReportTaxTypes/NewZealand.php create mode 100644 src/XeroPHP/Enums/Accounting/ReportTaxTypes/UK.php create mode 100644 src/XeroPHP/Enums/Accounting/SalesTaxBasis/AustraliaUsGlobal.php create mode 100644 src/XeroPHP/Enums/Accounting/SalesTaxBasis/NewZealand.php create mode 100644 src/XeroPHP/Enums/Accounting/SalesTaxBasis/UnitedKingdom.php create mode 100644 src/XeroPHP/Enums/Accounting/SalesTaxPeriods/Australia.php create mode 100644 src/XeroPHP/Enums/Accounting/SalesTaxPeriods/NewZealand.php create mode 100644 src/XeroPHP/Enums/Accounting/SalesTaxPeriods/UnitedKingdom.php create mode 100644 src/XeroPHP/Enums/Accounting/SalesTaxPeriods/UsGlobal.php create mode 100644 src/XeroPHP/Enums/Accounting/TaxRates/TaxStatusCode.php create mode 100644 src/XeroPHP/Enums/Accounting/TaxRates/TaxTypes/Australia.php create mode 100644 src/XeroPHP/Enums/Accounting/TaxRates/TaxTypes/GlobalTaxType.php create mode 100644 src/XeroPHP/Enums/Accounting/TaxRates/TaxTypes/NewZealand.php create mode 100644 src/XeroPHP/Enums/Accounting/TaxRates/TaxTypes/Singapore.php create mode 100644 src/XeroPHP/Enums/Accounting/TaxRates/TaxTypes/SouthAfrica.php create mode 100644 src/XeroPHP/Enums/Accounting/TaxRates/TaxTypes/UnitedKingdom.php create mode 100644 src/XeroPHP/Enums/Accounting/TaxRates/TaxTypes/UnitedStates.php create mode 100644 src/XeroPHP/Enums/Accounting/UserRoles/UserRole.php create mode 100644 src/XeroPHP/Enums/PayrollAU/EarningsRates/AllowanceCategory.php create mode 100644 src/XeroPHP/Enums/PayrollAU/EarningsRates/AllowanceType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/EarningsRates/EarningsType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/EarningsRates/EmploymentTerminationPaymentType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/EarningsRates/RateType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/Employees/EmploymentType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/Employees/Gender.php create mode 100644 src/XeroPHP/Enums/PayrollAU/Employees/IncomeType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/Employees/SeniorMaritalStatus.php create mode 100644 src/XeroPHP/Enums/PayrollAU/Employees/StateAbbreviation.php create mode 100644 src/XeroPHP/Enums/PayrollAU/Employees/StatusCode.php create mode 100644 src/XeroPHP/Enums/PayrollAU/Employees/TaxScaleType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/Employees/TerminationReasonCode.php create mode 100644 src/XeroPHP/Enums/PayrollAU/Employees/WorkCondition.php create mode 100644 src/XeroPHP/Enums/PayrollAU/LeaveApplications/LeavePeriodStatusCode.php create mode 100644 src/XeroPHP/Enums/PayrollAU/PayItems/LeaveCategory.php create mode 100644 src/XeroPHP/Enums/PayrollAU/PayRun/PayRunStatus.php create mode 100644 src/XeroPHP/Enums/PayrollAU/PaySlip/ManualTaxType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/PayTemplates/DeductionTypeCalculationType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/PayTemplates/EarningsRateCalculationType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/PayTemplates/EarningsType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/PayTemplates/EntitlementFinalPayPayoutType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/PayTemplates/LeaveTypeCalculationType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/PayTemplates/LeaveTypeContributionType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/PayTemplates/PaymentFrequencyType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/PayTemplates/SuperannuationCalculationType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/PayTemplates/SuperannuationContributionType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/PayrollCalendars/CalendarType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/SuperFund/SuperFundType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/TaxDeclaration/EmploymentBasis.php create mode 100644 src/XeroPHP/Enums/PayrollAU/TaxDeclaration/ResidencyStatus.php create mode 100644 src/XeroPHP/Enums/PayrollAU/TaxDeclaration/TFNExemptionType.php create mode 100644 src/XeroPHP/Enums/PayrollAU/Timesheets/StatusCode.php diff --git a/src/XeroPHP/Enums/Accounting/Accounts/AccountClassType.php b/src/XeroPHP/Enums/Accounting/Accounts/AccountClassType.php new file mode 100644 index 00000000..3da9148b --- /dev/null +++ b/src/XeroPHP/Enums/Accounting/Accounts/AccountClassType.php @@ -0,0 +1,14 @@ + [false, self::PROPERTY_TYPE_STRING, null, false, false], 'RegistrationNumber' => [false, self::PROPERTY_TYPE_STRING, null, false, false], 'TaxNumber' => [false, self::PROPERTY_TYPE_STRING, null, false, false], - 'FinancialYearEndDay' => [false, self::PROPERTY_TYPE_STRING, null, false, false], - 'FinancialYearEndMonth' => [false, self::PROPERTY_TYPE_STRING, null, false, false], + 'FinancialYearEndDay' => [false, self::PROPERTY_TYPE_INT, null, false, false], + 'FinancialYearEndMonth' => [false, self::PROPERTY_TYPE_INT, null, false, false], 'SalesTaxBasis' => [false, self::PROPERTY_TYPE_ENUM, null, false, false], 'SalesTaxPeriod' => [false, self::PROPERTY_TYPE_ENUM, null, false, false], 'DefaultSalesTax' => [false, self::PROPERTY_TYPE_STRING, null, false, false], @@ -340,7 +327,7 @@ public static function getProperties() 'Addresses' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Address', true, false], 'Phones' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Phone', true, false], 'ExternalLinks' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Organisation\\ExternalLink', true, false], - 'PaymentTerms' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Organisation\\PaymentTerm', true, false], + 'PaymentTerms' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Organisation\\PaymentTerm', false, false], 'OrganisationID' => [false, self::PROPERTY_TYPE_STRING, null, false, false], ]; } @@ -371,9 +358,9 @@ public function setAPIKey($value) return $this; } - /** - * @return string - */ + /** + * @return string + */ public function getClass() { return $this->_data['Class']; @@ -622,7 +609,7 @@ public function setTaxNumber($value) } /** - * @return string + * @return int */ public function getFinancialYearEndDay() { @@ -630,7 +617,7 @@ public function getFinancialYearEndDay() } /** - * @param string $value + * @param int $value * * @return Organisation */ @@ -643,7 +630,7 @@ public function setFinancialYearEndDay($value) } /** - * @return string + * @return int */ public function getFinancialYearEndMonth() { @@ -651,7 +638,7 @@ public function getFinancialYearEndMonth() } /** - * @param string $value + * @param int $value * * @return Organisation */ @@ -967,7 +954,7 @@ public function addExternalLink(ExternalLink $value) } /** - * @return PaymentTerm[]|Remote\Collection + * @return PaymentTerm */ public function getPaymentTerms() { @@ -979,6 +966,22 @@ public function getPaymentTerms() * * @return Organisation */ + public function setPaymentTerms(PaymentTerm $value) + { + $this->propertyUpdated('PaymentTerms', $value); + + $this->_data['PaymentTerms'] = $value; + + return $this; + } + + /** + * @param PaymentTerm $value + * + * @return Organisation + * + * @deprecated Use setPaymentTerms + */ public function addPaymentTerm(PaymentTerm $value) { $this->propertyUpdated('PaymentTerms', $value); diff --git a/src/XeroPHP/Models/Accounting/Organisation/Bill.php b/src/XeroPHP/Models/Accounting/Organisation/Bill.php index 209640c8..174013e6 100644 --- a/src/XeroPHP/Models/Accounting/Organisation/Bill.php +++ b/src/XeroPHP/Models/Accounting/Organisation/Bill.php @@ -9,11 +9,13 @@ class Bill extends Remote\Model /** * Day of Month (0-31). * - * @property string Day + * @property int Day */ /** - * One of the following values OFFOLLOWINGMONTH/DAYSAFTERBILLDATE/OFCURRENTMONTH. + * A payment term + * + * @see \XeroPHP\Enums\Accounting\Payments\PaymentTerms * * @property string Type */ @@ -80,7 +82,7 @@ public static function getSupportedMethods() public static function getProperties() { return [ - 'Day' => [false, self::PROPERTY_TYPE_STRING, null, false, false], + 'Day' => [false, self::PROPERTY_TYPE_INT, null, false, false], 'Type' => [false, self::PROPERTY_TYPE_ENUM, null, false, false], ]; } @@ -91,7 +93,7 @@ public static function isPageable() } /** - * @return string + * @return int */ public function getDay() { diff --git a/src/XeroPHP/Models/Accounting/Organisation/PaymentTerm.php b/src/XeroPHP/Models/Accounting/Organisation/PaymentTerm.php index 1707f84a..9a245e53 100644 --- a/src/XeroPHP/Models/Accounting/Organisation/PaymentTerm.php +++ b/src/XeroPHP/Models/Accounting/Organisation/PaymentTerm.php @@ -6,24 +6,28 @@ class PaymentTerm extends Remote\Model { - /** - * Default payment terms for bills (accounts payable) – see Payment Terms. - * - * @property Bill[] Bills - */ + /** + * Default payment terms for bills (accounts payable) – see Payment Terms. + * + * @see \XeroPHP\Enums\Accounting\Payments\PaymentTerms + * + * @property Bill Bills + */ - /** - * Default payment terms for sales invoices(accounts receivable) – see Payment Terms. - * - * @property Sale[] Sales - */ - const DAYSAFTERBILLDATE = 'DAYSAFTERBILLDATE'; + /** + * Default payment terms for sales invoices(accounts receivable) – see Payment Terms. + * + * @see \XeroPHP\Enums\Accounting\Payments\PaymentTerms + * + * @property Sale Sales + */ + const DAYSAFTERBILLDATE = 'DAYSAFTERBILLDATE'; - const DAYSAFTERBILLMONTH = 'DAYSAFTERBILLMONTH'; + const DAYSAFTERBILLMONTH = 'DAYSAFTERBILLMONTH'; - const OFCURRENTMONTH = 'OFCURRENTMONTH'; + const OFCURRENTMONTH = 'OFCURRENTMONTH'; - const OFFOLLOWINGMONTH = 'OFFOLLOWINGMONTH'; + const OFFOLLOWINGMONTH = 'OFFOLLOWINGMONTH'; /** * Get the resource uri of the class (Contacts) etc. @@ -87,8 +91,8 @@ public static function getSupportedMethods() public static function getProperties() { return [ - 'Bills' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Organisation\\Bill', true, false], - 'Sales' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Organisation\\Sale', true, false], + 'Bills' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Organisation\\Bill', false, false], + 'Sales' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Organisation\\Sale', false, false], ]; } @@ -98,7 +102,7 @@ public static function isPageable() } /** - * @return Bill[]|Remote\Collection + * @return Bill */ public function getBills() { @@ -113,7 +117,7 @@ public function getBills() public function addBill(Bill $value) { $this->propertyUpdated('Bills', $value); - if (! isset($this->_data['Bills'])) { + if (!isset($this->_data['Bills'])) { $this->_data['Bills'] = new Remote\Collection(); } $this->_data['Bills'][] = $value; @@ -122,7 +126,7 @@ public function addBill(Bill $value) } /** - * @return Remote\Collection|Sale[] + * @return Sale */ public function getSales() { @@ -137,7 +141,7 @@ public function getSales() public function addSale(Sale $value) { $this->propertyUpdated('Sales', $value); - if (! isset($this->_data['Sales'])) { + if (!isset($this->_data['Sales'])) { $this->_data['Sales'] = new Remote\Collection(); } $this->_data['Sales'][] = $value; diff --git a/src/XeroPHP/Models/Accounting/Organisation/Sale.php b/src/XeroPHP/Models/Accounting/Organisation/Sale.php index 63984bd6..35b59d6b 100644 --- a/src/XeroPHP/Models/Accounting/Organisation/Sale.php +++ b/src/XeroPHP/Models/Accounting/Organisation/Sale.php @@ -9,11 +9,13 @@ class Sale extends Remote\Model /** * Day of Month (0-31). * - * @property string Day + * @property int Day */ /** - * One of the following values OFFOLLOWINGMONTH/DAYSAFTERBILLDATE/OFCURRENTMONTH. + * A payment term + * + * @see \XeroPHP\Enums\Accounting\Payments\PaymentTerms * * @property string Type */ @@ -80,7 +82,7 @@ public static function getSupportedMethods() public static function getProperties() { return [ - 'Day' => [false, self::PROPERTY_TYPE_STRING, null, false, false], + 'Day' => [false, self::PROPERTY_TYPE_INT, null, false, false], 'Type' => [false, self::PROPERTY_TYPE_ENUM, null, false, false], ]; } diff --git a/src/XeroPHP/Models/Accounting/ReportTaxType.php b/src/XeroPHP/Models/Accounting/ReportTaxType.php index a26cd805..4baea30a 100644 --- a/src/XeroPHP/Models/Accounting/ReportTaxType.php +++ b/src/XeroPHP/Models/Accounting/ReportTaxType.php @@ -2,6 +2,13 @@ namespace XeroPHP\Models\Accounting; +/** + * @deprecated + * + * @see \XeroPHP\Enums\Accounting\ReportTaxTypes\Australia + * @see \XeroPHP\Enums\Accounting\ReportTaxTypes\NewZealand + * @see \XeroPHP\Enums\Accounting\ReportTaxTypes\UK + */ class ReportTaxType { const AUSTRALIAN_OUTPUT = 'OUTPUT'; diff --git a/src/XeroPHP/Models/Accounting/SalesTaxBasis.php b/src/XeroPHP/Models/Accounting/SalesTaxBasis.php index 54767375..63e00283 100644 --- a/src/XeroPHP/Models/Accounting/SalesTaxBasis.php +++ b/src/XeroPHP/Models/Accounting/SalesTaxBasis.php @@ -2,6 +2,9 @@ namespace XeroPHP\Models\Accounting; +/** + * @deprecated + */ class SalesTaxBasis { const NEW_ZEALAND_PAYMENTS = 'PAYMENTS'; diff --git a/src/XeroPHP/Models/Accounting/SalesTaxPeriod.php b/src/XeroPHP/Models/Accounting/SalesTaxPeriod.php index e69faa94..5d00e908 100644 --- a/src/XeroPHP/Models/Accounting/SalesTaxPeriod.php +++ b/src/XeroPHP/Models/Accounting/SalesTaxPeriod.php @@ -2,6 +2,9 @@ namespace XeroPHP\Models\Accounting; +/** + * @deprecated + */ class SalesTaxPeriod { const AUSTRALIAN_MONTHLY = 'MONTHLY'; diff --git a/src/XeroPHP/Models/Accounting/TaxType.php b/src/XeroPHP/Models/Accounting/TaxType.php index 0eeeb060..2203c7b7 100644 --- a/src/XeroPHP/Models/Accounting/TaxType.php +++ b/src/XeroPHP/Models/Accounting/TaxType.php @@ -2,6 +2,17 @@ namespace XeroPHP\Models\Accounting; +/** + * @deprecated + * + * @see \XeroPHP\Enums\Accounting\TaxRates\TaxTypes\Australia + * @see \XeroPHP\Enums\Accounting\TaxRates\TaxTypes\GlobalTaxType + * @see \XeroPHP\Enums\Accounting\TaxRates\TaxTypes\NewZealand + * @see \XeroPHP\Enums\Accounting\TaxRates\TaxTypes\Singapore + * @see \XeroPHP\Enums\Accounting\TaxRates\TaxTypes\SouthAfrica + * @see \XeroPHP\Enums\Accounting\TaxRates\TaxTypes\UnitedKingdom + * @see \XeroPHP\Enums\Accounting\TaxRates\TaxTypes\UnitedStates + */ class TaxType { const AUSTRALIAN_TAX_TYPE = 'TAX TYPE'; @@ -179,34 +190,4 @@ class TaxType const SOUTH_AFRICA_ZERORATED = 'ZERORATED'; const SOUTH_AFRICA_ZERORATEDOUTPUT = 'ZERORATEDOUTPUT'; - - /** - * These have incorrect spelling and will be remove in a future release. - * Please see "AUSTRALIAN" constants at the top of this file. - * - * @deprecated - */ - const AUSTRALIUM_TAX_TYPE = self::AUSTRALIAN_TAX_TYPE; - - const AUSTRALIUM_OUTPUT = self::AUSTRALIAN_OUTPUT; - - const AUSTRALIUM_INPUT = self::AUSTRALIAN_INPUT; - - const AUSTRALIUM_CAPEXINPUT = self::AUSTRALIAN_CAPEXINPUT; - - const AUSTRALIUM_EXEMPTEXPORT = self::AUSTRALIAN_EXEMPTEXPORT; - - const AUSTRALIUM_EXEMPTEXPENSES = self::AUSTRALIAN_EXEMPTEXPENSES; - - const AUSTRALIUM_EXEMPTCAPITAL = self::AUSTRALIAN_EXEMPTCAPITAL; - - const AUSTRALIUM_EXEMPTOUTPUT = self::AUSTRALIAN_EXEMPTOUTPUT; - - const AUSTRALIUM_INPUTTAXED = self::AUSTRALIAN_INPUTTAXED; - - const AUSTRALIUM_BASEXCLUDED = self::AUSTRALIAN_BASEXCLUDED; - - const AUSTRALIUM_GSTONCAPIMPORTS = self::AUSTRALIAN_GSTONCAPIMPORTS; - - const AUSTRALIUM_GSTONIMPORTS = self::AUSTRALIAN_GSTONIMPORTS; } diff --git a/src/XeroPHP/Models/Accounting/UserRole.php b/src/XeroPHP/Models/Accounting/UserRole.php index 1a9860f6..a92de054 100644 --- a/src/XeroPHP/Models/Accounting/UserRole.php +++ b/src/XeroPHP/Models/Accounting/UserRole.php @@ -2,6 +2,11 @@ namespace XeroPHP\Models\Accounting; +/** + * @deprecated + * + * @see \XeroPHP\Enums\Accounting\UserRoles\UserRole + */ class UserRole { const XERO_USER_ROLE_READONLY = 'READONLY'; diff --git a/src/XeroPHP/Models/PayrollAU/Setting.php b/src/XeroPHP/Models/PayrollAU/Setting.php index 4ae42c11..0d083078 100644 --- a/src/XeroPHP/Models/PayrollAU/Setting.php +++ b/src/XeroPHP/Models/PayrollAU/Setting.php @@ -18,13 +18,13 @@ class Setting extends Remote\Model /** * Tracking categories for Employee’s and Timesheet’s. See Tracking Categories. * - * @property TrackingCategory[] TrackingCategories + * @property TrackingCategory TrackingCategories */ /** * Number of days in the Payroll year. * - * @property string DaysInPayrollYear + * @property int DaysInPayrollYear */ /** @@ -91,8 +91,8 @@ public static function getProperties() { return [ 'Accounts' => [false, self::PROPERTY_TYPE_OBJECT, 'PayrollAU\\Setting\\Account', true, false], - 'TrackingCategories' => [false, self::PROPERTY_TYPE_OBJECT, 'PayrollAU\\Setting\\TrackingCategory', true, false], - 'DaysInPayrollYear' => [false, self::PROPERTY_TYPE_STRING, null, false, false], + 'TrackingCategories' => [false, self::PROPERTY_TYPE_OBJECT, 'PayrollAU\\Setting\\TrackingCategory', false, false], + 'DaysInPayrollYear' => [false, self::PROPERTY_TYPE_INT, null, false, false], ]; } @@ -110,23 +110,7 @@ public function getAccounts() } /** - * @param Account $value - * - * @return Setting - */ - public function addAccount(Account $value) - { - $this->propertyUpdated('Accounts', $value); - if (! isset($this->_data['Accounts'])) { - $this->_data['Accounts'] = new Remote\Collection(); - } - $this->_data['Accounts'][] = $value; - - return $this; - } - - /** - * @return Remote\Collection|TrackingCategory[] + * @return TrackingCategory */ public function getTrackingCategories() { @@ -134,39 +118,10 @@ public function getTrackingCategories() } /** - * @param TrackingCategory $value - * - * @return Setting - */ - public function addTrackingCategory(TrackingCategory $value) - { - $this->propertyUpdated('TrackingCategories', $value); - if (! isset($this->_data['TrackingCategories'])) { - $this->_data['TrackingCategories'] = new Remote\Collection(); - } - $this->_data['TrackingCategories'][] = $value; - - return $this; - } - - /** - * @return string + * @return int */ public function getDaysInPayrollYear() { return $this->_data['DaysInPayrollYear']; } - - /** - * @param string $value - * - * @return Setting - */ - public function setDaysInPayrollYear($value) - { - $this->propertyUpdated('DaysInPayrollYear', $value); - $this->_data['DaysInPayrollYear'] = $value; - - return $this; - } } diff --git a/src/XeroPHP/Models/PayrollAU/Setting/TrackingCategory.php b/src/XeroPHP/Models/PayrollAU/Setting/TrackingCategory.php index e2dff226..aeefa463 100644 --- a/src/XeroPHP/Models/PayrollAU/Setting/TrackingCategory.php +++ b/src/XeroPHP/Models/PayrollAU/Setting/TrackingCategory.php @@ -91,7 +91,7 @@ public static function isPageable() } /** - * @return string + * @return EmployeeGroup */ public function getEmployeeGroups() { @@ -99,7 +99,7 @@ public function getEmployeeGroups() } /** - * @return string + * @return TimesheetCategory */ public function getTimesheetCategories() { diff --git a/src/XeroPHP/Remote/Query.php b/src/XeroPHP/Remote/Query.php index 635fa291..28c79bbf 100644 --- a/src/XeroPHP/Remote/Query.php +++ b/src/XeroPHP/Remote/Query.php @@ -3,6 +3,7 @@ namespace XeroPHP\Remote; use DateTime; +use DateTimeInterface; use XeroPHP\Application; class Query @@ -211,6 +212,17 @@ public function date(DateTime $date) return $this; } + /** + * @param DateTimeInterface $date + * @param string $operator the date comparison operator, e.g. >, >=, etc + * @param string $parameter + * @return $this + */ + public function whereDate(DateTimeInterface $date, $operator = '==', $parameter = 'Date') + { + return $this->addWhere('AND', [sprintf("$parameter $operator DateTime(%s)", $date->format('Y, m, d'))]); + } + /** * @param int $page * From 278c5afc04a9611dac387d6fc63efd60f7713598 Mon Sep 17 00:00:00 2001 From: Kamron Brooks Date: Thu, 9 Feb 2023 11:19:28 +1100 Subject: [PATCH 2/2] Remove breaking changes --- .../Models/Accounting/ExternalLink.php | 1 + .../Models/Accounting/Organisation.php | 139 ++++++++++++++++++ .../Models/Accounting/Organisation/Bill.php | 2 +- .../Accounting/Organisation/PaymentTerm.php | 17 +++ .../Models/Accounting/Organisation/Sale.php | 4 +- .../Models/Accounting/SalesTaxBasis.php | 3 + .../Models/Accounting/SalesTaxPeriod.php | 6 +- src/XeroPHP/Models/Accounting/TaxType.php | 30 ++++ src/XeroPHP/Models/PayrollAU/Setting.php | 49 +++++- 9 files changed, 245 insertions(+), 6 deletions(-) diff --git a/src/XeroPHP/Models/Accounting/ExternalLink.php b/src/XeroPHP/Models/Accounting/ExternalLink.php index fe53c9b0..198b8928 100644 --- a/src/XeroPHP/Models/Accounting/ExternalLink.php +++ b/src/XeroPHP/Models/Accounting/ExternalLink.php @@ -4,6 +4,7 @@ /** * @deprecated + * @see \XeroPHP\Enums\Accounting\ExternalLinks\ExternalLinkType */ class ExternalLink { diff --git a/src/XeroPHP/Models/Accounting/Organisation.php b/src/XeroPHP/Models/Accounting/Organisation.php index c91f7175..f10adb6a 100644 --- a/src/XeroPHP/Models/Accounting/Organisation.php +++ b/src/XeroPHP/Models/Accounting/Organisation.php @@ -199,42 +199,181 @@ class Organisation extends Remote\Model * * @property PaymentTerm */ + + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\VersionType + */ const VERSION_TYPE_AU = 'AU'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\VersionType + */ const VERSION_TYPE_NZ = 'NZ'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\VersionType + */ const VERSION_TYPE_GLOBAL = 'GLOBAL'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\VersionType + */ const VERSION_TYPE_UK = 'UK'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\VersionType + */ const VERSION_TYPE_US = 'US'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\VersionType + */ const VERSION_TYPE_AUONRAMP = 'AUONRAMP'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\VersionType + */ const VERSION_TYPE_NZONRAMP = 'NZONRAMP'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\VersionType + */ const VERSION_TYPE_GLOBALONRAMP = 'GLOBALONRAMP'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\VersionType + */ const VERSION_TYPE_UKONRAMP = 'UKONRAMP'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\VersionType + */ const VERSION_TYPE_USONRAMP = 'USONRAMP'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationType + */ const ORGANISATION_TYPE_COMPANY = 'COMPANY'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationType + */ const ORGANISATION_TYPE_CHARITY = 'CHARITY'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationType + */ const ORGANISATION_TYPE_CLUBSOCIETY = 'CLUBSOCIETY'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationType + */ const ORGANISATION_TYPE_PARTNERSHIP = 'PARTNERSHIP'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationType + */ const ORGANISATION_TYPE_PRACTICE = 'PRACTICE'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationType + */ const ORGANISATION_TYPE_PERSON = 'PERSON'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationType + */ const ORGANISATION_TYPE_SOLETRADER = 'SOLETRADER'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationType + */ const ORGANISATION_TYPE_TRUST = 'TRUST'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationClass + */ + const ORGANISATION_CLASS_DEMO = 'DEMO'; + + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationClass + */ + const ORGANISATION_CLASS_TRIAL = 'TRIAL'; + + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationClass + */ + const ORGANISATION_CLASS_STARTER = 'STARTER'; + + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationClass + */ + const ORGANISATION_CLASS_STANDARD = 'STANDARD'; + + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationClass + */ + const ORGANISATION_CLASS_PREMIUM = 'PREMIUM'; + + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationClass + */ + const ORGANISATION_CLASS_PREMIUM_20 = 'PREMIUM_20'; + + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationClass + */ + const ORGANISATION_CLASS_PREMIUM_50 = 'PREMIUM_50'; + + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationClass + */ + const ORGANISATION_CLASS_PREMIUM_100 = 'PREMIUM_100'; + + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationClass + */ + const ORGANISATION_CLASS_GST_CASHBOOK = 'GST_CASHBOOK'; + + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationClass + */ + const ORGANISATION_CLASS_NON_GST_CASHBOOK = 'NON_GST_CASHBOOK'; + + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Organisation\OrganisationClass + */ + const ORGANISATION_CLASS_ULTIMATE = 'ULTIMATE'; + /** * Get the resource uri of the class (Contacts) etc. * diff --git a/src/XeroPHP/Models/Accounting/Organisation/Bill.php b/src/XeroPHP/Models/Accounting/Organisation/Bill.php index 174013e6..2a16980f 100644 --- a/src/XeroPHP/Models/Accounting/Organisation/Bill.php +++ b/src/XeroPHP/Models/Accounting/Organisation/Bill.php @@ -101,7 +101,7 @@ public function getDay() } /** - * @param string $value + * @param int $value * * @return Bill */ diff --git a/src/XeroPHP/Models/Accounting/Organisation/PaymentTerm.php b/src/XeroPHP/Models/Accounting/Organisation/PaymentTerm.php index 9a245e53..4f423d65 100644 --- a/src/XeroPHP/Models/Accounting/Organisation/PaymentTerm.php +++ b/src/XeroPHP/Models/Accounting/Organisation/PaymentTerm.php @@ -21,12 +21,29 @@ class PaymentTerm extends Remote\Model * * @property Sale Sales */ + + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Payments\PaymentTerms + */ const DAYSAFTERBILLDATE = 'DAYSAFTERBILLDATE'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Payments\PaymentTerms + */ const DAYSAFTERBILLMONTH = 'DAYSAFTERBILLMONTH'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Payments\PaymentTerms + */ const OFCURRENTMONTH = 'OFCURRENTMONTH'; + /** + * @deprecated + * @see \XeroPHP\Enums\Accounting\Payments\PaymentTerms + */ const OFFOLLOWINGMONTH = 'OFFOLLOWINGMONTH'; /** diff --git a/src/XeroPHP/Models/Accounting/Organisation/Sale.php b/src/XeroPHP/Models/Accounting/Organisation/Sale.php index 35b59d6b..19ca5f2b 100644 --- a/src/XeroPHP/Models/Accounting/Organisation/Sale.php +++ b/src/XeroPHP/Models/Accounting/Organisation/Sale.php @@ -93,7 +93,7 @@ public static function isPageable() } /** - * @return string + * @return int */ public function getDay() { @@ -101,7 +101,7 @@ public function getDay() } /** - * @param string $value + * @param int $value * * @return Sale */ diff --git a/src/XeroPHP/Models/Accounting/SalesTaxBasis.php b/src/XeroPHP/Models/Accounting/SalesTaxBasis.php index 63e00283..5f7d5707 100644 --- a/src/XeroPHP/Models/Accounting/SalesTaxBasis.php +++ b/src/XeroPHP/Models/Accounting/SalesTaxBasis.php @@ -4,6 +4,9 @@ /** * @deprecated + * @see \XeroPHP\Enums\Accounting\SalesTaxBasis\UnitedKingdom + * @see \XeroPHP\Enums\Accounting\SalesTaxBasis\AustraliaUsGlobal + * @see \XeroPHP\Enums\Accounting\SalesTaxBasis\NewZealand */ class SalesTaxBasis { diff --git a/src/XeroPHP/Models/Accounting/SalesTaxPeriod.php b/src/XeroPHP/Models/Accounting/SalesTaxPeriod.php index 5d00e908..276b708d 100644 --- a/src/XeroPHP/Models/Accounting/SalesTaxPeriod.php +++ b/src/XeroPHP/Models/Accounting/SalesTaxPeriod.php @@ -4,6 +4,10 @@ /** * @deprecated + * @see \XeroPHP\Enums\Accounting\SalesTaxPeriods\NewZealand + * @see \XeroPHP\Enums\Accounting\SalesTaxPeriods\UnitedKingdom + * @see \XeroPHP\Enums\Accounting\SalesTaxPeriods\UsGlobal + * @see \XeroPHP\Enums\Accounting\SalesTaxPeriods\Australia */ class SalesTaxPeriod { @@ -40,7 +44,7 @@ class SalesTaxPeriod const UNITED_KINGDOM_YEARLY = 'YEARLY'; /** - * These have incorrect spelling and will be remove in a future release. + * These have incorrect spelling and will be removed in a future release. * Please see "AUSTRALIAN" constants at the top of this file. * * @deprecated diff --git a/src/XeroPHP/Models/Accounting/TaxType.php b/src/XeroPHP/Models/Accounting/TaxType.php index 2203c7b7..57c74430 100644 --- a/src/XeroPHP/Models/Accounting/TaxType.php +++ b/src/XeroPHP/Models/Accounting/TaxType.php @@ -190,4 +190,34 @@ class TaxType const SOUTH_AFRICA_ZERORATED = 'ZERORATED'; const SOUTH_AFRICA_ZERORATEDOUTPUT = 'ZERORATEDOUTPUT'; + + /** + * These have incorrect spelling and will be removed in a future release. + * Please see "AUSTRALIAN" constants at the top of this file. + * + * @deprecated + */ + const AUSTRALIUM_TAX_TYPE = self::AUSTRALIAN_TAX_TYPE; + + const AUSTRALIUM_OUTPUT = self::AUSTRALIAN_OUTPUT; + + const AUSTRALIUM_INPUT = self::AUSTRALIAN_INPUT; + + const AUSTRALIUM_CAPEXINPUT = self::AUSTRALIAN_CAPEXINPUT; + + const AUSTRALIUM_EXEMPTEXPORT = self::AUSTRALIAN_EXEMPTEXPORT; + + const AUSTRALIUM_EXEMPTEXPENSES = self::AUSTRALIAN_EXEMPTEXPENSES; + + const AUSTRALIUM_EXEMPTCAPITAL = self::AUSTRALIAN_EXEMPTCAPITAL; + + const AUSTRALIUM_EXEMPTOUTPUT = self::AUSTRALIAN_EXEMPTOUTPUT; + + const AUSTRALIUM_INPUTTAXED = self::AUSTRALIAN_INPUTTAXED; + + const AUSTRALIUM_BASEXCLUDED = self::AUSTRALIAN_BASEXCLUDED; + + const AUSTRALIUM_GSTONCAPIMPORTS = self::AUSTRALIAN_GSTONCAPIMPORTS; + + const AUSTRALIUM_GSTONIMPORTS = self::AUSTRALIAN_GSTONIMPORTS; } diff --git a/src/XeroPHP/Models/PayrollAU/Setting.php b/src/XeroPHP/Models/PayrollAU/Setting.php index 0d083078..37207275 100644 --- a/src/XeroPHP/Models/PayrollAU/Setting.php +++ b/src/XeroPHP/Models/PayrollAU/Setting.php @@ -110,7 +110,23 @@ public function getAccounts() } /** - * @return TrackingCategory + * @param Account $value + * @deprecated endpoint is GET only + * @return Setting + */ + public function addAccount(Account $value) + { + $this->propertyUpdated('Accounts', $value); + if (! isset($this->_data['Accounts'])) { + $this->_data['Accounts'] = new Remote\Collection(); + } + $this->_data['Accounts'][] = $value; + + return $this; + } + + /** + * @return Remote\Collection|TrackingCategory[] */ public function getTrackingCategories() { @@ -118,10 +134,39 @@ public function getTrackingCategories() } /** - * @return int + * @param TrackingCategory $value + * @deprecated endpoint is GET only + * @return Setting + */ + public function addTrackingCategory(TrackingCategory $value) + { + $this->propertyUpdated('TrackingCategories', $value); + if (! isset($this->_data['TrackingCategories'])) { + $this->_data['TrackingCategories'] = new Remote\Collection(); + } + $this->_data['TrackingCategories'][] = $value; + + return $this; + } + + /** + * @return string */ public function getDaysInPayrollYear() { return $this->_data['DaysInPayrollYear']; } + + /** + * @param string $value + * @deprecated endpoint is GET only + * @return Setting + */ + public function setDaysInPayrollYear($value) + { + $this->propertyUpdated('DaysInPayrollYear', $value); + $this->_data['DaysInPayrollYear'] = $value; + + return $this; + } }