Skip to content

Add deprecations on incorrect class names #678

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

Merged
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
38 changes: 11 additions & 27 deletions src/Picqer/Financials/Exact/Deleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,18 @@

namespace Picqer\Financials\Exact;

trigger_error(
sprintf(
'"%s" is deprecated due to an invalid naming convention, use "%s" instead',
Deleted::class,
SyncDeleted::class
),
E_USER_DEPRECATED
);

/**
* Class Deleted.
*
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=SyncDeleted
*
* @property int $Timestamp Timestamp
* @property string $DeletedBy UserID of person who deleted record
* @property string $DeletedDate Deleted date
* @property int $Division Division code
* @property string $EntityKey Entity key
* @property int $EntityType Entity Types: 1= TransactionLines 2= Accounts 3= Addresses 4= Attachments 5= Contacts 6= Documents 7= GLAccounts 8= SalesItemPrices 9= Items 10= PaymentTerms 11= Quotations 12= SalesOrders 13= SalesInvoices 14= TimeCostTransactions 15= StockPositions 16= GoodsDeliveries 17= GoodsDeliveryLines 18= GLClassifications 19= ItemWarehouses 20= StorageLocationStockPositions 21= Projects
* @property string $ID Primary key
* @deprecated since 4.5.2, use \Picqer\Financials\Exact\SyncDeleted instead, to be removed in 5.0
*/
class Deleted extends Model
class Deleted extends SyncDeleted
{
use Query\Findable;

protected $primaryKey = 'Timestamp';

protected $fillable = [
'Timestamp',
'DeletedBy',
'DeletedDate',
'Division',
'EntityKey',
'EntityType',
'ID',
];

protected $url = 'sync/Deleted';
}
31 changes: 11 additions & 20 deletions src/Picqer/Financials/Exact/DocumentCategorie.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,18 @@

namespace Picqer\Financials\Exact;

trigger_error(
sprintf(
'"%s" is deprecated due to an invalid naming convention, use "%s" instead',
DocumentCategorie::class,
DocumentCategory::class
),
E_USER_DEPRECATED
);

/**
* Class DocumentCategorie.
*
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=DocumentsDocumentCategories
*
* @property string $ID Primary key
* @property string $Created Creation date
* @property string $Description Document category description
* @property string $Modified Last modified date
* @deprecated since 4.5.2, use \Picqer\Financials\Exact\DocumentCategory instead, to be removed in 5.0
*/
class DocumentCategorie extends Model
class DocumentCategorie extends DocumentCategory
{
use Query\Findable;
use Persistance\Storable;

protected $fillable = [
'ID',
'Created',
'Description',
'Modified',
];

protected $url = 'documents/DocumentCategories';
}
32 changes: 11 additions & 21 deletions src/Picqer/Financials/Exact/DocumentsAttachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,18 @@

namespace Picqer\Financials\Exact;

trigger_error(
sprintf(
'"%s" is deprecated due to an invalid naming convention, use "%s" instead',
DocumentsAttachment::class,
CrmDocumentAttachment::class
),
E_USER_DEPRECATED
);

/**
* Class DocumentsAttachment.
*
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=ReadCRMDocumentsAttachments
*
* @property string $ID Primary key
* @property string $AttachmentFileName Filename of the attachment
* @property float $AttachmentFileSize File size of the attachment
* @property string $AttachmentUrl Url for downloading the attachment. To get the file in its original format (xml, jpg, pdf, etc.) append &Download=1 to the url.
* @property bool $CanShowInWebView
* @deprecated since 4.5.2, use \Picqer\Financials\Exact\CrmDocumentAttachment instead, to be removed in 5.0
*/
class DocumentsAttachment extends Model
class DocumentsAttachment extends CrmDocumentAttachment
{
use Query\Findable;

protected $fillable = [
'ID',
'AttachmentFileName',
'AttachmentFileSize',
'AttachmentUrl',
'CanShowInWebView',
];

protected $url = 'read/crm/DocumentsAttachments';
}
90 changes: 11 additions & 79 deletions src/Picqer/Financials/Exact/HrmDivision.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,86 +2,18 @@

namespace Picqer\Financials\Exact;

trigger_error(
sprintf(
'"%s" is deprecated due to an invalid naming convention, use "%s" instead',
HrmDivision::class,
Division::class
),
E_USER_DEPRECATED
);

/**
* Class HrmDivision.
*
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=HRMDivisions
*
* @property int $Code Primary key
* @property string $ArchiveDate Date on which the division is archived
* @property int $BlockingStatus Values: 0 = Not blocked, 1 = Backup/restore, 2 = Conversion busy, 3 = Conversion shadow, 4 = Conversion waiting, 5 = Copy data waiting, 6 = Copy data busy
* @property DivisionClass[] $Class_01 First division classification. User should have access rights to view division classifications.
* @property DivisionClass[] $Class_02 Second division classification. User should have access rights to view division classifications.
* @property DivisionClass[] $Class_03 Third division classification. User should have access rights to view division classifications.
* @property DivisionClass[] $Class_04 Fourth division classification. User should have access rights to view division classifications.
* @property DivisionClass[] $Class_05 Fifth division classification. User should have access rights to view division classifications.
* @property string $Country Country of the division. Is used for determination of legislation
* @property string $CountryDescription Description of Country
* @property string $Created Creation date
* @property string $Creator User ID of creator
* @property string $CreatorFullName Name of the creator
* @property string $Currency Default currency of the division
* @property string $CurrencyDescription Description of Currency
* @property string $Customer Owner account of the division
* @property string $CustomerCode Owner account code of the division
* @property string $CustomerName Owner account name of the division
* @property string $Description Description
* @property int $HID Number that customers give to the division
* @property bool $Main True for the main (hosting) division
* @property string $Modified Last modified date
* @property string $Modifier User ID of modifier
* @property string $ModifierFullName Name of the last modifier
* @property string $OBNumber The soletrader VAT number used for offical returns to tax authority
* @property string $SiretNumber Siret Number of the division (France)
* @property string $StartDate Date on which the division becomes active
* @property int $Status Regular administrations will have status 0. Currently, the only other possibility is 'archived' (1), which means the administration is not actively used, but still needs to be accessible for the customer/accountant to meet legal obligations
* @property string $TaxOfficeNumber Number of your local tax authority (Germany)
* @property string $TaxReferenceNumber Local tax reference number (Germany)
* @property string $TemplateCode Division template code
* @property string $VATNumber VAT number
* @property string $Website Customer value, hyperlink to external website
* @deprecated since 4.5.2, use \Picqer\Financials\Exact\Division instead, to be removed in 5.0
*/
class HrmDivision extends Model
class HrmDivision extends Division
{
use Query\Findable;

protected $primaryKey = 'Code';

protected $fillable = [
'Code',
'ArchiveDate',
'BlockingStatus',
'Class_01',
'Class_02',
'Class_03',
'Class_04',
'Class_05',
'Country',
'CountryDescription',
'Created',
'Creator',
'CreatorFullName',
'Currency',
'CurrencyDescription',
'Customer',
'CustomerCode',
'CustomerName',
'Description',
'HID',
'Main',
'Modified',
'Modifier',
'ModifierFullName',
'OBNumber',
'SiretNumber',
'StartDate',
'Status',
'TaxOfficeNumber',
'TaxReferenceNumber',
'TemplateCode',
'VATNumber',
'Website',
];

protected $url = 'hrm/Divisions';
}
76 changes: 11 additions & 65 deletions src/Picqer/Financials/Exact/InventoryItemWarehouse.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,18 @@

namespace Picqer\Financials\Exact;

trigger_error(
sprintf(
'"%s" is deprecated due to an invalid naming convention, use "%s" instead',
InventoryItemWarehouse::class,
SyncInventoryItemWarehouse::class
),
E_USER_DEPRECATED
);

/**
* Class InventoryItemWarehouse.
*
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=SyncInventoryItemWarehouses
*
* @property int $Timestamp Timestamp
* @property string $Created Creation date
* @property string $Creator User ID of creator
* @property string $CreatorFullName Name of creator
* @property string $DefaultStorageLocation This is a default storage location
* @property string $DefaultStorageLocationCode Default storage location's code
* @property string $DefaultStorageLocationDescription Default storage location's description
* @property int $Division Division code
* @property string $ID A guid that is the unique identifier of the linkage between item and warehouse
* @property string $Item Item ID
* @property string $ItemCode Code of item
* @property string $ItemDescription Description of item
* @property float $MaximumStock Maximum quantity of items that you want in warehouse
* @property string $Modified Last modified date
* @property string $Modifier User ID of modifier
* @property string $ModifierFullName Name of modifier
* @property int $OrderPolicy Order Policy options: 1-Lot for lot, 2-Fixed order quantity, 3-Min / Max, 4-Order
* @property int $Period Period that work together with replenishment in MRP
* @property float $ReorderPoint Quantity of items as an indication of when you need to reorder more stock for the warehouse
* @property float $ReorderQuantity Reorder quantity that work together with replenishment in MRP
* @property int $ReplenishmentType Replenishment options: 1-Purchase, 2-Assemble, 3-Make, 4-Transfer, 5-No replenishment advice
* @property float $ReservedStock The quantity in a back to back order process which is already received from the purchase order, but not yet delivered for the sales order.
* @property float $SafetyStock Minimum quantity of items you must have in stock
* @property string $Warehouse Warehouse ID
* @property string $WarehouseCode Code of warehouse
* @property string $WarehouseDescription Description of warehouse
* @deprecated since 4.5.2, use \Picqer\Financials\Exact\SyncInventoryItemWarehouse instead, to be removed in 5.0
*/
class InventoryItemWarehouse extends Model
class InventoryItemWarehouse extends SyncInventoryItemWarehouse
{
use Query\Findable;

protected $primaryKey = 'Timestamp';

protected $fillable = [
'Timestamp',
'Created',
'Creator',
'CreatorFullName',
'DefaultStorageLocation',
'DefaultStorageLocationCode',
'DefaultStorageLocationDescription',
'Division',
'ID',
'Item',
'ItemCode',
'ItemDescription',
'MaximumStock',
'Modified',
'Modifier',
'ModifierFullName',
'OrderPolicy',
'Period',
'ReorderPoint',
'ReorderQuantity',
'ReplenishmentType',
'ReservedStock',
'SafetyStock',
'Warehouse',
'WarehouseCode',
'WarehouseDescription',
];

protected $url = 'sync/Inventory/ItemWarehouses';
}
52 changes: 11 additions & 41 deletions src/Picqer/Financials/Exact/ItemWarehousePlanningDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,18 @@

namespace Picqer\Financials\Exact;

trigger_error(
sprintf(
'"%s" is deprecated due to an invalid naming convention, use "%s" instead',
ItemWarehousePlanningDetails::class,
ItemWarehousePlanningDetail::class
),
E_USER_DEPRECATED
);

/**
* Class ItemWarehousePlanningDetails.
*
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=InventoryItemWarehousePlanningDetails
*
* @property string $Item Primary key
* @property string $ItemCode Code of item
* @property string $ItemDescription Description of item
* @property string $PlannedDate Date which quantity in stock is planned to change
* @property float $PlannedQuantity Amount by which quantity in stock is planned to change
* @property string $PlanningSourceDescription Human readable description of the PlanningSource (translated to user's language) - Examples: Purchase Order, Sales Order, Shop Order, etc.
* @property string $PlanningSourceID ID of the PlanningSource
* @property int $PlanningSourceLineNumber Line number of the PlanningSource if the PlanningSourceType supports line numbers
* @property int $PlanningSourceNumber Human readable number of the PlanningSource - Examples: Shop order number '201600001' or Sales order number '2016020001'
* @property string $PlanningSourceUrl REST API URL of this specific PlanningSource and PlanningSourceID (Assembly orders and warehouse transfers not supported over REST)
* @property int $PlanningType Type of the PlanningSource - 120=GoodsDelivery, 124=WarehouseTransferDelivery, 130=GoodsReceipt, 134=WarehouseTransferReceipt, 140=ShopOrderStockReceipt, 147=ShopOrderByProductReceipt, 150=ShopOrderRequirement, 160=AssemblyOrderReceipt, 165=AssemblyOrderIssue
* @property string $PlanningTypeDescription Human readable description of the PlanningSourceType (translated to user's language) - Examples: 'Shop order stock receipt' or 'Goods delivery'
* @property string $Warehouse ID of warehouse
* @property string $WarehouseCode Code of warehouse
* @property string $WarehouseDescription Description of warehouse
* @deprecated since 4.5.2, use \Picqer\Financials\Exact\ItemWarehousePlanningDetail instead, to be removed in 5.0
*/
class ItemWarehousePlanningDetails extends Model
class ItemWarehousePlanningDetails extends ItemWarehousePlanningDetail
{
use Query\Findable;
use Persistance\Storable;

protected $fillable = [
'Item',
'ItemCode',
'ItemDescription',
'PlannedDate',
'PlannedQuantity',
'PlanningSourceDescription',
'PlanningSourceID',
'PlanningSourceLineNumber',
'PlanningSourceUrl',
'PlanningType',
'PlanningTypeDescription',
'Warehouse',
'WarehouseCode',
'WarehouseDescription',
];

protected $url = 'inventory/ItemWarehousePlanningDetails';
}
Loading