Plentymarkets interface documentation
Variables
Contracts
DocumentBuilderVariablesContainerContract
A container service for DocumentBuilder variables and variable groups registration
Namespace
Plenty\Modules\Document\Builder\Variables\Contracts
Methods
public registerVariableGroup($group):void
Register a variable group.
Name |
Type |
Description |
|
public registerVariable($variable):void
Name |
Type |
Description |
|
Models
DynamicVariable
The base class for dynamically detected variables.
Namespace
Plenty\Modules\Document\Builder\Variables\Models
Methods
public toArray()
Returns this model as an array.
DynamicVariableGroup
A variable group that can be used to register dynamically determined variables.
Namespace
Plenty\Modules\Document\Builder\Variables\Models
Methods
public toArray()
Returns this model as an array.
AddressGroup
Services
VariablesResolutionService
The service for variables resolution
Namespace
Plenty\Modules\Document\Builder\Variables\Services
Methods
public setLanguage($language):Plenty\Modules\Document\Builder\Variables\Services\VariablesResolutionService
Return type: VariablesResolutionService
Set the language to be used by the variables resolution.
Name |
Type |
Description |
|
public setOrder($order):Plenty\Modules\Document\Builder\Variables\Services\VariablesResolutionService
Return type: VariablesResolutionService
Set the order into the variables context
Name |
Type |
Description |
|
public setDocument($document):Plenty\Modules\Document\Builder\Variables\Services\VariablesResolutionService
Return type: VariablesResolutionService
Set the document into the variables context
Name |
Type |
Description |
|
public setMetaData($metaData):Plenty\Modules\Document\Builder\Variables\Services\VariablesResolutionService
Return type: VariablesResolutionService
Set the meta data of the template into the variables context
Name |
Type |
Description |
|
public setContact($contact):Plenty\Modules\Document\Builder\Variables\Services\VariablesResolutionService
Return type: VariablesResolutionService
Set the contact into the variables context
Name |
Type |
Description |
|
public setObject($typeEnum, $object):Plenty\Modules\Document\Builder\Variables\Services\VariablesResolutionService
Return type: VariablesResolutionService
Set an object into the variables context.
Name |
Type |
Description |
|
A VariablesObjectTypeEnum constant |
|
|
Models
Context
ObjectEntry
This class represents an object entry with the object type and the object itself.
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Context
Name | Type | Description |
---|---|---|
objectType |
A VariablesObjectTypeEnum constant |
|
object |
Methods
public toArray()
Returns this model as an array.
PluginContext
Informations about plugin entries for the plugin variables (old logic).
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Context
Methods
public toArray()
Returns this model as an array.
Groups
AddressGroup
The order address variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
AddressTypeBaseGroup
The order address type variable group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
BankDataGroup
The BankData variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
CompanyGroup
The Company variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
ContactBankDataGroup
The ContactBankData variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
ContactGroup
The contact variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
DocumentGroup
The Document variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
HeaderFooterGroup
The HeaderFooter variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
OrderForeignAmountGroup
The OrderForeignAmount variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
OrderGroup
The Order variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
OrderItemForeignAmountGroup
The OrderItemForeignAmount variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
OrderItemGroup
The OrderItem variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
OrderItemPropertyGroup
The OrderItemProperty variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
OrderItemSystemAmountGroup
The OrderItemSystemAmount variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
OrderPropertyGroup
The OrderPropety variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
OrderSystemAmountGroup
The OrderSystemAmount variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
PaymentGroup
The Order Payment variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
PluginGroup
The Plugin variables group
Namespace
Plenty\Modules\Document\Builder\Variables\Models\Groups
Methods
public toArray()
Returns this model as an array.
Document
Contracts
DocumentRepositoryContract
Download and list order documents as well as download, list, upload and delete category documents.
Namespace
Plenty\Modules\Document\Contracts
Methods
public getDocumentPath($id):void
Get the path to a document
Name |
Type |
Description |
|
The ID of the document |
public findById($id, $columns = [], $with = []):Plenty\Modules\Document\Models\Document
Return type: Document
Get a document
Name |
Type |
Description |
|
The ID of the document |
|
|
The columns to be loaded |
|
|
The relations to be loaded. Possible value is "references". |
public find($page = 1, $itemsPerPage = 50, $columns = [], $with = [], $sortBy = "id", $sortOrder = "desc"):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
List documents
Name |
Type |
Description |
|
The page to get. The default page that will be returned is page 1. |
|
|
The number of orders to be displayed per page. The default number of orders per page is 50. |
|
|
The columns to be loaded |
|
|
The relations to be loaded. Possible value is "references". |
|
|
This field is used for sorting. Default is 'id'. Possible values are 'id', 'type', 'number', 'createdAt', 'displayDate', 'updatedAt' |
|
|
The order to sort by. Possible values are 'asc' and 'desc'. |
public uploadOrderDocuments($orderId, $type, $data):array
Upload order documents
Name |
Type |
Description |
|
The ID of the order |
|
|
The document type. Supported types are 'invoiceExternal', 'deliveryNote', 'poDeliveryNote', 'orderConfirmation', 'offer', 'dunningLetter', 'returnNote', 'successConfirmation', 'correction', 'creditNoteExternal', 'reorder', 'uploaded'. |
|
|
The request data |
public deleteOrderDocument($orderId, $documentId):bool
Delete order document
Name |
Type |
Description |
|
The ID of the order |
|
|
The ID of the document |
public archiveOrderDocument($orderId, $documentId):void
Archive order document
Name |
Type |
Description |
|
The ID of the order |
|
|
The ID of the document |
public uploadCategoryDocuments($categoryId, $data):array
Upload category documents
Name |
Type |
Description |
|
The ID of the category |
|
|
The request data |
public deleteCategoryDocument($categoryId, $documentId):bool
Delete a category document.
Name |
Type |
Description |
|
The ID of the category |
|
|
The ID of the document |
public uploadOrderShippingPackageDocuments($packageId, $type, $document):array
Uploads documents
Name |
Type |
Description |
|
||
|
||
|
base64 encoded document |
public findOrderShippingPackageDocuments($packageId, $type):array
Find documents
Name |
Type |
Description |
|
||
|
public findCurrentOrderDocument($orderId, $type, $includePending = false):Plenty\Modules\Document\Models\Document
Return type: Document
Finds the current order document
Name |
Type |
Description |
|
||
|
||
|
public findRecentOrderDocument($orderId, $type, $includePending = false):Plenty\Modules\Document\Models\Document
Return type: Document
Finds order document.
Name |
Type |
Description |
|
||
|
||
|
public deleteOrderShippingPackageDocuments($packageId):bool
Delets a document.
Name |
Type |
Description |
|
public getDocumentStorageObject($key):void
Gets a document storage object.
Name |
Type |
Description |
|
public uploadOrderReturnsDocuments($returnsId, $document):Plenty\Modules\Document\Models\Document
Return type: Document
Uploads a specific document.
Name |
Type |
Description |
|
||
|
public getOrderReturnsDocumentById($returnsId, $withLabel = false):Plenty\Modules\Document\Models\Document
Return type: Document
Finds a document.
Name |
Type |
Description |
|
||
|
public generateOrderDocument($orderId, $type, $data):bool
Generate order document
Name |
Type |
Description |
|
The ID of the order |
|
|
The document type |
|
|
The request data |
public documentWithoutReversalDocumentExists($orderId, $documentTypes):bool
Check if there is a document without a reversed counter part
Name |
Type |
Description |
|
The ID of the order |
|
|
The document types |
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
Enums
Models
Document
The document model contains information about actual documents.
Namespace
Plenty\Modules\Document\Models
Name | Type | Description |
---|---|---|
id |
The ID of the document |
|
type |
The type of the document. The following types are available: <ul> <li>admin</li> <li>blog</li> <li>category</li> <li>correction_document</li> <li>credit_note</li> <li>credit_note_external</li> <li>customer</li> <li>delivery_note</li> <li>dunning_letter</li> <li>ebics_hash</li> <li>facet</li> <li>invoice</li> <li>invoice_external</li> <li>pos_invoice</li> <li>pos_invoice_cancellation</li> <li>item</li> <li>multi_credit_note</li> <li>multi_invoice</li> <li>offer</li> <li>order_confirmation</li> <li>pickup_delivery</li> <li>receipt</li> <li>refund_reversal</li> <li>reorder</li> <li>repair_bill</li> <li>return_note</li> <li>reversal_document</li> <li>settlement_report</li> <li>success_confirmation</li> <li>ticket</li> <li>webshop</li> <li>webshop_customer</li> <li>z_report</li> <li>shipping_label</li> <li>shipping_export_label</li> <li>returns_label</li> <li>reversal_dunning_letter</l> </ul> |
|
number |
The document number |
|
numberWithPrefix |
The document number with prefix |
|
path |
The path to the document |
|
userId |
The ID of the user |
|
source |
The source where the document was generated. Possible sources are 'klarna', 'soap', 'admin', 'hitmeister', 'paypal' and 'rest'. |
|
displayDate |
The date displayed on the document |
|
status |
The generation status of the document ("pending", "faulty" or "done" |
|
content |
The base64 encoded content of the document. |
|
createdAt |
The time the document was created |
|
updatedAt |
The time the document was last updated |
|
references |
Collection of document references. The references available are: <ul> <li>contacts</li> <li>orders</li> <li>webstores = refers to clients</li> <li>categories</li> </ul> |
|
comment |
The manual comment |
|
cancelledBy |
The reference document that cancelled the current document, if any |
|
cancels |
The reference document that is cancelled by the current document, if any |
|
contacts |
Collection of contacts that are associated with the document |
|
orders |
Collection of orders that are associated with the document |
|
webstores |
Collection of webstores that are associated with the document |
|
categories |
Collection of categories that are associated with the document |
|
tags |
Methods
public toArray()
Returns this model as an array.
DocumentComment
The manual comment model for the document model .
Namespace
Plenty\Modules\Document\Models
Name | Type | Description |
---|---|---|
documentId |
The id of the document. |
|
type |
The type of the text (comment). |
|
value |
The text value |
|
document |
The related document. |
Methods
public toArray()
Returns this model as an array.
DocumentReference
The document reference model. A document reference allows you to assign a document to other models.
Namespace
Plenty\Modules\Document\Models
Name | Type | Description |
---|---|---|
documentId |
The ID of the document |
|
type |
The reference type. The following reference types are available: <ul> <li>blog</li> <li>cash_register</li> <li>category</li> <li>customer</li> <li>facet</li> <li>facet_value</li> <li>item</li> <li>multishop</li> <li>order</li> <li>reorder</li> <li>ticket</li> <li>warehouse</li> <li>order_shipping_package</li> </ul> |
|
value |
The reference value (e.g. the ID of another model) |
|
document |
The document this reference belongs to |
Methods
public toArray()
Returns this model as an array.
Generation
Contracts
DocumentBuilderGenerationRestrictionContainerContract
A container service for DocumentBuilder document generation restrictions registration
Namespace
Plenty\Modules\Document\Generation\Contracts
Methods
public registerGenerationRestriction($restriction, $descriptions):void
Register a document generation restriction.
Name |
Type |
Description |
|
The Closure should have the signature <pre>function(Order $order, string $documentType): bool</pre> |
|
|
The messages in case of restriction. At least the keys 'de' and 'en' are required. |
public checkGenerationRestrictions($order, $documentType):void
Check for restrictions of the generation of the given document type for the given order.
Name |
Type |
Description |
|
The order for which the document is to be generated |
|
|
The document type of the document to be generated |
TemplateSetting
Models
DocumentTemplateOutputSetting
The DocumentBuilder template output setting model
Namespace
Plenty\Modules\Document\TemplateSetting\Models
Name | Type | Description |
---|---|---|
id |
||
templateId |
||
pageWidth |
||
pageHeight |
||
marginTop |
||
marginBottom |
||
marginLeft |
||
marginRight |
||
header |
||
footer |
||
createdAt |
||
updatedAt |
||
fontFamily |
||
fontSize |
||
amountFormat |
||
currencyFormat |
||
dateFormat |
||
pdfBackground |
||
outputType |
||
xmlFormat |
||
repeatPdfBackground |
||
unitFormat |
||
documentTemplateSetting |
Methods
public toArray()
Returns this model as an array.
DocumentTemplateReference
The DocumentBuilder template reference model
Namespace
Plenty\Modules\Document\TemplateSetting\Models
Name | Type | Description |
---|---|---|
templateId |
||
type |
||
referenceTemplateId |
||
documentTemplateSetting |
||
referenceDocumentTemplateSetting |
Methods
public toArray()
Returns this model as an array.
DocumentTemplateSetting
The DocumentBuilder template setting model
Namespace
Plenty\Modules\Document\TemplateSetting\Models
Name | Type | Description |
---|---|---|
id |
||
defaultTemplate |
||
referenceId |
||
active |
||
documentType |
||
templateName |
||
metaData |
||
fileName |
||
stateChangeDate |
||
createdAt |
||
updatedAt |
||
tags |
||
outputSetting |
||
references |
||
headerReference |
||
footerReference |
||
referencedBy |
||
headerReferencedBy |
||
footerReferencedBy |
||
typeSettings |
Methods
public toArray()
Returns this model as an array.