Skip to content

Commit

Permalink
Update code with current api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyvdSluijs committed Jul 21, 2021
1 parent 8b05ee2 commit cbe4d78
Show file tree
Hide file tree
Showing 143 changed files with 1,285 additions and 781 deletions.
3 changes: 1 addition & 2 deletions src/Picqer/Financials/Exact/AbsenceRegistration.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=HRMAbsenceRegistrations
*
* @property string $ID Primary key
* @property absenceregistrationtransactions $AbsenceRegistrationTransactions Collection of absence registration transactions
* @property AbsenceRegistrationTransaction[] $AbsenceRegistrationTransactions Collection of absence registration transactions
* @property int $Cause Absence cause, only supported for the Netherland legislation
* @property string $CauseCode Code for the absence cause, only supported for the Netherland legislation
* @property string $CauseDescription Description for the absence cause, only supported for the Netherland legislation
Expand All @@ -30,7 +30,6 @@
class AbsenceRegistration extends Model
{
use Query\Findable;
use Persistance\Storable;

protected $fillable = [
'ID',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @property int $Division Division code
* @property string $EndTime End time on the last day of absence stored as DateTime, and the date should be ignored
* @property string $ExpectedEndDate Expected end date of absence
* @property float $Hours Total number of absence hours
* @property float $Hours Differentiation of absence hours of the absence registration transaction between previous and current status
* @property float $HoursFirstDay Hours of absence on the first day
* @property float $HoursLastDay Hours of absence on the last day
* @property string $Modified Last modified date
Expand All @@ -31,7 +31,6 @@
class AbsenceRegistrationTransaction extends Model
{
use Query\Findable;
use Persistance\Storable;

protected $fillable = [
'ID',
Expand Down
46 changes: 9 additions & 37 deletions src/Picqer/Financials/Exact/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
* @property string $AddressLine1 Visit address first line
* @property string $AddressLine2 Visit address second line
* @property string $AddressLine3 Visit address third line
* @property bankaccounts $BankAccounts Collection of Bank accounts
* @property BankAccount[] $BankAccounts Collection of Bank accounts
* @property bool $Blocked Indicates if the account is blocked
* @property string $BRIN Obsolete
* @property string $BSN Citizen Service Number for the Netherlands
* @property string $BusinessType Reference to the business type of the account
* @property bool $CanDropShip Indicates the default for the possibility to drop ship when an item is linked to a supplier
* @property string $ChamberOfCommerce Chamber of commerce number
* @property string $City Visit address City
* @property string $Classification Obsolete
* @property string $Classification1 Account classification 1
* @property string $Classification2 Account classification 2
* @property string $Classification3 Account classification 3
Expand All @@ -33,31 +32,24 @@
* @property string $Classification6 Account classification 6
* @property string $Classification7 Account classification 7
* @property string $Classification8 Account classification 8
* @property string $ClassificationDescription Obsolete
* @property string $Code Unique key, fixed length numeric string with leading spaces, length 18. IMPORTANT: When you use OData $filter on this field you have to make sure the filter parameter contains the leading spaces
* @property string $CodeAtSupplier Code under which your own company is known at the account
* @property string $CompanySize Reference to Company size of the account
* @property int $ConsolidationScenario Consolidation scenario (Time & Billing). Values: 0 = No consolidation, 1 = Item, 2 = Item + Project, 3 = Item + Employee, 4 = Item + Employee + Project, 5 = Project + WBS + Item, 6 = Project + WBS + Item + Employee. Item means in this case including Unit and Price, these also have to be the same to consolidate
* @property string $ControlledDate Date of the latest control of account data with external web service
* @property string $Costcenter Obsolete
* @property string $CostcenterDescription Obsolete
* @property int $CostPaid Obsolete
* @property string $Country Country code
* @property string $CountryName Country name
* @property string $Created Creation date
* @property string $Creator User ID of creator
* @property string $CreatorFullName Name of creator
* @property float $CreditLinePurchase Maximum amount of credit for Purchase. If no value has been defined, there is no credit limit
* @property float $CreditLineSales Maximum amount of credit for sales. If no value has been defined, there is no credit limit
* @property string $Currency Obsolete
* @property string $CustomerSince Obsolete
* @property string $DatevCreditorCode DATEV creditor code for Germany legislation
* @property string $DatevDebtorCode DATEV debtor code for Germany legislation
* @property int $DeliveryAdvice Allows a customer to do goods delivery based on setting complete, partial or partial no back order. Values: 0 = Partial, 1 = Complete, 2 = PartialNoBackOrder
* @property float $DiscountPurchase Default discount percentage for purchase. This is stored as a fraction. ie 5.5% is stored as .055
* @property float $DiscountSales Default discount percentage for sales. This is stored as a fraction. ie 5.5% is stored as .055
* @property int $Division Division code
* @property string $Document Obsolete
* @property string $DunsNumber Obsolete
* @property string $Email E-Mail address of the account
* @property string $EndDate Determines in combination with the start date if the account is active. If the current date is > end date the account is inactive
* @property string $EstablishedDate RegistrationDate
Expand All @@ -79,17 +71,14 @@
* @property string $InvoiceAccountCode Code of InvoiceAccount
* @property string $InvoiceAccountName Name of InvoiceAccount
* @property int $InvoiceAttachmentType Indicates which attachment types should be sent when a sales invoice is printed. Only values in related table with Invoice=1 are allowed
* @property int $InvoicingMethod Method of sending for sales invoices. Values: 1: Paper, 2: EMail, 4: Mailbox (electronic exchange)
* @property int $InvoicingMethod Method of sending for sales invoices. Values: 1: Paper, 2: EMail, 4: Mailbox (electronic exchange), 8: Send and track
* @property int $IsAccountant Indicates whether the account is an accountant. Values: 0 = No accountant, 1 = True, but accountant doesn't want his name to be published in the list of accountants, 2 = True, and accountant is published in the list of accountants
* @property int $IsAgency Indicates whether the accounti is an agency
* @property int $IsAnonymised Indicates whtether the account is anonymised.
* @property bool $IsBank Obsolete
* @property int $IsCompetitor Indicates whether the account is a competitor
* @property bool $IsExtraDuty Indicates whether a customer is eligible for extra duty
* @property int $IsMailing Indicates if the account is excluded from mailing marketing information
* @property bool $IsMember Obsolete
* @property bool $IsPilot Indicates whether the account is a pilot account
* @property bool $IsPurchase Obsolete
* @property bool $IsReseller Indicates whether the account is a reseller
* @property bool $IsSales Indicates whether the account is allowed for sales
* @property bool $IsSupplier Indicates whether the account is a supplier
Expand All @@ -98,7 +87,7 @@
* @property float $Latitude Latitude (used by Google maps)
* @property string $LeadPurpose Reference to Lead purpose of an account
* @property string $LeadSource Reference to Lead source of an account
* @property binary $Logo Bytes of the logo image
* @property string $Logo Bytes of the logo image
* @property string $LogoFileName The file name (without path, but with extension) of the image
* @property string $LogoThumbnailUrl Thumbnail url of the logo
* @property string $LogoUrl Url to retrieve the logo
Expand Down Expand Up @@ -132,9 +121,6 @@
* @property string $RSIN Fiscal number for NL legislation
* @property string $SalesCurrency Currency of Sales used for Time & Billing
* @property string $SalesCurrencyDescription Description of SalesCurrency
* @property string $SalesTaxSchedule Obsolete
* @property string $SalesTaxScheduleCode Obsolete
* @property string $SalesTaxScheduleDescription Obsolete
* @property string $SalesVATCode Default VAT code for a sales entry
* @property string $SalesVATCodeDescription Description of SalesVATCode
* @property string $SearchCode Search code
Expand All @@ -143,11 +129,11 @@
* @property int $SeparateInvPerSubscription Indicates how invoices are generated from subscriptions. 0 = subscriptions belonging to the same customer are combined in a single invoice. 1 = each subscription results in one invoice. In both cases, each individual subscription line results in one invoice line
* @property int $ShippingLeadDays Indicates the number of days it takes to send goods to the customer. Acts as a default
* @property string $ShippingMethod Default shipping method
* @property bool $ShowRemarkForSales Indicates whether to display Ordered by account's remarks when creating a new sales order
* @property string $StartDate Indicates in combination with the end date if the account is active
* @property string $State State/Province/County code When changing the Country and the State is filled, the State must be assigned with a valid value from the selected country or set to empty
* @property string $StateName Name of State
* @property string $Status If the status field is filled this means the account is a customer. The value indicates the customer status. Possible values: A=None, S=Suspect, P=Prospect, C=Customer
* @property string $StatusSince Obsolete
* @property string $TradeName Trade name can be registered and shown with the client (for all legislations)
* @property string $Type Account type: Values: A = Relation, D = Division
* @property string $UniqueTaxpayerReference Unique taxpayer reference for UK legislation
Expand All @@ -173,12 +159,11 @@ class Account extends Model
'AddressLine3',
'BankAccounts',
'Blocked',
'BRIN',
'BSN',
'BusinessType',
'CanDropShip',
'ChamberOfCommerce',
'City',
'Classification',
'Classification1',
'Classification2',
'Classification3',
Expand All @@ -187,31 +172,24 @@ class Account extends Model
'Classification6',
'Classification7',
'Classification8',
'ClassificationDescription',
'Code',
'CodeAtSupplier',
'CompanySize',
'ConsolidationScenario',
'ControlledDate',
'Costcenter',
'CostcenterDescription',
'CostPaid',
'Country',
'CountryName',
'Created',
'Creator',
'CreatorFullName',
'CreditLinePurchase',
'CreditLineSales',
'Currency',
'CustomerSince',
'DatevCreditorCode',
'DatevDebtorCode',
'DeliveryAdvice',
'DiscountPurchase',
'DiscountSales',
'Division',
'Document',
'DunsNumber',
'Email',
'EndDate',
'EstablishedDate',
Expand All @@ -237,13 +215,10 @@ class Account extends Model
'IsAccountant',
'IsAgency',
'IsAnonymised',
'IsBank',
'IsCompetitor',
'IsExtraDuty',
'IsMailing',
'IsMember',
'IsPilot',
'IsPurchase',
'IsReseller',
'IsSales',
'IsSupplier',
Expand Down Expand Up @@ -286,9 +261,6 @@ class Account extends Model
'RSIN',
'SalesCurrency',
'SalesCurrencyDescription',
'SalesTaxSchedule',
'SalesTaxScheduleCode',
'SalesTaxScheduleDescription',
'SalesVATCode',
'SalesVATCodeDescription',
'SearchCode',
Expand All @@ -297,11 +269,11 @@ class Account extends Model
'SeparateInvPerSubscription',
'ShippingLeadDays',
'ShippingMethod',
'ShowRemarkForSales',
'StartDate',
'State',
'StateName',
'Status',
'StatusSince',
'TradeName',
'Type',
'UniqueTaxpayerReference',
Expand Down
1 change: 0 additions & 1 deletion src/Picqer/Financials/Exact/AccountClassification.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
class AccountClassification extends Model
{
use Query\Findable;
use Persistance\Storable;

protected $fillable = [
'ID',
Expand Down
1 change: 0 additions & 1 deletion src/Picqer/Financials/Exact/AccountClassificationName.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
class AccountClassificationName extends Model
{
use Query\Findable;
use Persistance\Storable;

protected $fillable = [
'ID',
Expand Down
6 changes: 3 additions & 3 deletions src/Picqer/Financials/Exact/AccountItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* @property int $Division Division code
* @property string $EndDate End date
* @property bool $IsFractionAllowedItem Indicates if decimals are allowed in quantities
* @property bool $IsSalesItem Indicates if this is a sales item
* @property bool $IsStockItem Indicates if this is a stock item
* @property bool $IsSalesItem Indicates if the item can be sold
* @property bool $IsStockItem If you have the Trade or Manufacturing license and you check this property, the item will be shown in the stock positions overview, stock counts and transaction lists
* @property int $IsTaxableItem Indicates if tax needs to be calculated for this item
* @property int $IsWebshopItem Indicates if this is a webshop item
* @property string $ItemGroup Item group
Expand All @@ -38,7 +38,7 @@
* @property string $PictureName File name of picture
* @property string $PictureThumbnailUrl Url where thumbnail picture can be retrieved
* @property string $PictureUrl Url where picture can be retrieved
* @property float $ProjectedStock
* @property float $ProjectedStock The quantity of stock projected given all planned future stock changes
* @property int $PurchaseLeadDays Number of days before purchase arrives
* @property float $QuantityToBeConsumed Quantity to be consumed
* @property float $QuantityToBeDelivered Quantity to be delivered
Expand Down
1 change: 0 additions & 1 deletion src/Picqer/Financials/Exact/ActiveEmployment.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
class ActiveEmployment extends Model
{
use Query\Findable;
use Persistance\Storable;

protected $fillable = [
'ID',
Expand Down
1 change: 0 additions & 1 deletion src/Picqer/Financials/Exact/AddressState.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
class AddressState extends Model
{
use Query\Findable;
use Persistance\Storable;

protected $fillable = [
'ID',
Expand Down
5 changes: 2 additions & 3 deletions src/Picqer/Financials/Exact/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,20 @@
* @property string $Parent Parent asset
* @property string $ParentCode Code of Parent
* @property string $ParentDescription Description of Parent
* @property binary $Picture Image for an asset
* @property string $Picture Image for an asset
* @property string $PictureFileName Filename of the image
* @property string $PrimaryMethod First method of depreciation. Currently, it is the only one used
* @property string $PrimaryMethodCode Code of PrimaryMethod
* @property string $PrimaryMethodDescription Description of PrimaryMethod
* @property float $ResidualValue Indicates the residual value of the asset at the end of the depreciation
* @property string $StartDate Asset Depreciation StartDate
* @property int $Status Identifies the status of the Asset. (see AssetStatus table to see the possibilities)
* @property int $Status Identifies the status of the Asset. (1 = Active, 2 = Not validated, 3 = Inactive, 4 = Depreciated, 5 = Blocked, 6 = Sold)
* @property string $TransactionEntryID Reference to the transaction lines that make up the financial entry.
* @property int $TransactionEntryNo Entry number of transaction
*/
class Asset extends Model
{
use Query\Findable;
use Persistance\Storable;

protected $fillable = [
'ID',
Expand Down
1 change: 0 additions & 1 deletion src/Picqer/Financials/Exact/AssetGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
class AssetGroup extends Model
{
use Query\Findable;
use Persistance\Storable;

protected $fillable = [
'ID',
Expand Down
1 change: 0 additions & 1 deletion src/Picqer/Financials/Exact/Bank.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
class Bank extends Model
{
use Query\Findable;
use Persistance\Storable;

protected $fillable = [
'ID',
Expand Down
8 changes: 0 additions & 8 deletions src/Picqer/Financials/Exact/BankAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,15 @@
* @property string $ID Primary key
* @property string $Account Account (customer, supplier) to which the bank account belongs
* @property string $AccountName The name of the account
* @property string $Bank Obsolete
* @property string $BankAccount The bank account number
* @property string $BankAccountHolderName Name of the holder of the bank account, as known by the bank
* @property string $BankDescription Obsolete
* @property string $BankName Obsolete
* @property string $BICCode BIC code of the bank where the bank account is held
* @property string $Created Creation date
* @property string $Creator User ID of creator
* @property string $CreatorFullName Name of creator
* @property string $Description Description of the bank account
* @property int $Division Division code
* @property string $Format Format that belongs to the bank account number
* @property string $IBAN Obsolete
* @property bool $Main Indicates if the bank account is the main bank account
* @property string $Modified Last modified date
* @property string $Modifier User ID of modifier
Expand All @@ -40,19 +36,15 @@ class BankAccount extends Model
'ID',
'Account',
'AccountName',
'Bank',
'BankAccount',
'BankAccountHolderName',
'BankDescription',
'BankName',
'BICCode',
'Created',
'Creator',
'CreatorFullName',
'Description',
'Division',
'Format',
'IBAN',
'Main',
'Modified',
'Modifier',
Expand Down
12 changes: 6 additions & 6 deletions src/Picqer/Financials/Exact/BankEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=FinancialTransactionBankEntries
*
* @property string $EntryID Primary key
* @property BankEntryLines $BankEntryLines Collection of lines
* @property BankEntryLine[] $BankEntryLines Collection of lines
* @property string $BankStatementDocument Reference to document with bank statement
* @property int $BankStatementDocumentNumber Document number of document with bank statement
* @property string $BankStatementDocumentSubject Subject of document with bank statement
Expand All @@ -17,13 +17,13 @@
* @property string $Currency Currency code
* @property int $Division Division code
* @property int $EntryNumber Entry number
* @property int $FinancialPeriod Financial period
* @property int $FinancialYear Financial year
* @property int $FinancialPeriod The period of the transaction lines. The period should exist in the period date table
* @property int $FinancialYear The financial year to which the entry belongs. The financial year should exist in the period date table
* @property string $JournalCode Code of Journal
* @property string $JournalDescription Description of Journal
* @property string $Modified Last modified date
* @property float $OpeningBalanceFC Opening balance in the currency of the transaction
* @property int $Status Status: 5 = Rejected, 20 = Open, 50 = Processed
* @property int $Status Status: 20 = Open, 50 = Processed
* @property string $StatusDescription Description of Status
*/
class BankEntry extends Model
Expand Down Expand Up @@ -56,13 +56,13 @@ class BankEntry extends Model
'StatusDescription',
];

protected $url = 'financialtransaction/BankEntries';

public function addItem(array $array)
{
if (! isset($this->attributes['BankEntryLines']) || $this->attributes['BankEntryLines'] == null) {
$this->attributes['BankEntryLines'] = [];
}
$this->attributes['BankEntryLines'][] = $array;
}

protected $url = 'financialtransaction/BankEntries';
}
Loading

0 comments on commit cbe4d78

Please sign in to comment.