This interface allows you to get and create coupon codes.
Plenty\Modules\Order\Coupon\Campaign\Code\Contracts
public getByCode(string $code, array $with = []):CouponCampaignCode
Gets a coupon code. The code string must be specified.
string | $code | |
array | $with |
public deleteCode(string $code, bool $withoutUsed = false):bool
Delete a coupon code.
string | $code | |
bool | $withoutUsed |
public create(array $data):CouponCampaignCode
Creates a coupon code.
array | $data |
public setDisabledByCode(string $code, int $disabled):int
Disable or enable coupon
string | $code | |
int | $disabled |
The CouponCodeRepositoryContract is the interface for the coupon code repository. This interface allows you to redeem coupons.
Plenty\Modules\Order\Coupon\Code\Contracts
public redeem(int $orderId, string $coupon):bool
Redeem coupon codes
int | $orderId | The ID of the order |
string | $coupon | The coupon code to be redeemed |
The CouponCampaignCode model contains information about coupon codes. Each code belongs to one campaign only.
Plenty\Modules\Order\Coupon\Campaign\Code\Models
Type | Name | Description |
---|---|---|
string | code | The coupon code |
int | campaignId | The ID of the campaign that the code belongs to |
int | disable | Flag that indicates if a code is active or deactivated.
|
int | consumed | Flag that indicates if a code was redeemed or not.
|
int | usedCount | How many times a code has been redeemed |
float | usedAmount | The amount that is already redeemed. The total amount that can be redeemed is defined in the campaign as coupon value, because the value applies to all codes of a campaign. |
Carbon | generatedAt | The date and time that the code was generated |
Carbon | lastUsedAt | The date and time that the code was redeemed last. This date will be set if the coupon amount has not been fully used. |
Carbon | consumedAt | The date and time that the coupon amount of this code was fully consumed |
Carbon | expiresAt | The date and time that the code will expire or has expired |
float | value | The value of the coupon if it differs from the campaign value. The value is null if the campaign value is used. |
CouponCampaign | campaign | The coupon campaign and all information about the campaign that this code belongs to |
public toArray()
Returns this model as an array.
Model that holds gift card codes.
Plenty\Modules\Order\Coupon\Campaign\Code\Order\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the gift card code |
int | orderItemId | The order item ID |
int | campaignId | The campaign ID |
string | code | The coupon code |
string | sender | The name of the sender |
string | receiver | The name of the receiver |
string | message | The message |
public toArray()
Returns this model as an array.
The CouponCodeOrder model.
Plenty\Modules\Order\Coupon\Code\Order\Models
Type | Name | Description |
---|---|---|
int | corderItemId | The ID of the order item that the coupon was redeemed for |
int | campaignId | The ID of the campaign that the coupon belongs to |
string | code | The coupon code |
string | type | The display type of the redeemed coupon
The following display types are available:
|
float | amount | The redeemed amount of the coupon |
string | vatRate | The redeemed vat rate of the coupon |
public toArray()
Returns this model as an array.
The model of the order.
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order |
int | typeId | The ID of the order type
It is possible to define individual order types. However,
the following types are available by default:
|
int | methodOfPaymentId | The ID of the order's payment method (read only) |
int | shippingProfileId | The ID of the order's shipping profile (read only) |
string | paymentStatus | The payment status of the order (read only) |
float | statusId | The ID of the order status |
string | statusName | The name for the status ID (read only) |
int | ownerId | The user ID of the order's owner |
float | referrerId | The referrer ID of the order |
createdAt | The date that the order was created | |
updatedAt | The date that the order was updated last | |
int | plentyId | The plenty ID of the client that the order belongs to |
int | locationId | The ID of the location that the order belongs to |
bool | roundTotalsOnly | True means only the order's total amounts are rounded, false the order item price is rounded too. (read-only) |
int | numberOfDecimals | The number of decimals this order was rounded with. (read-only) |
string | lockStatus | The lock status of the order. The following statuses are available:
|
bool | hasTaxRelevantDocuments | |
Address | billingAddress | The invoice address of the order |
Address | deliveryAddress | The delivery address of the order |
User | owner | The owner of the order |
bool | hasDeliveryOrders | Has the order delivery orders? |
addresses | The address objects that are associated with the order. | |
addressRelations | The address relations for this order. | |
orderItems | The order items that are associated with the order. | |
properties | The order properties that are associated with the order. | |
relations | The order relation reference instances that are associated with the order. | |
amounts | The order amounts that are associated with the order. | |
comments | The order comments. | |
AccountingLocation | location | The accounting location of the order. |
payments | The payments that are associated with the order. | |
orderReferences | The order references. | |
reverseOrderReferences | The sub order references showing on the current order . | |
originOrderReferences | The references of other orders, e.g. returns or credit notes, associated with the order. | |
shippingPackages | The shipping packages that are associated with the order. | |
documents | The documents that are associated with the order. | |
returnLabels | The order returns documents that are associated with the order. | |
dates | The dates of the order. Can contain many different dates with their types like:
|
|
Order | originOrder | The origin order of this order. If this order is the origin, this attribute is null. (deprecated) |
Order | parentOrder | The parent order of this order. If this order has no parent, this attribute is null. (deprecated) |
originOrders | The origin orders of this order. | |
parentOrders | The parent orders of this order. | |
childOrders | All orders referencing the current order as parent. | |
OrderAmount | systemAmount | The order amount in the system currency. |
OrderAmount | amount | The order amount in foreign currency if exists. Otherwise the amount in system currency. |
Contact | contactSender | The associated contact for the contact-sender relation. |
Contact | contactReceiver | The associated contact for the contact-receiver relation. |
Warehouse | warehouseSender | The associated warehouse for the warehouse-sender relation. |
Warehouse | warehouseReceiver | The associated warehouse for the warehouse-receiver relation. |
OrderTransactionSums | transactionSums | The sums of all order item transactions. |
OrderPaymentTerms | paymentTerms | The payment terms of this order. |
public toArray()
Returns this model as an array.
The order amount model.
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order amount. |
int | orderId | The ID of the order that the amount belongs to. |
bool | isSystemCurrency | Flag that states if the current currency is the same as system currency or not. |
bool | isNet | Flag that states if the invoice is net or not. If the invoice is not net, it is gross. |
string | currency | The currency of the amounts. |
float | exchangeRate | The exchange rate for converting the current currency into the system currency. |
float | netTotal | The total net amount of the order. |
float | grossTotal | The total gross amount of the order. |
float | vatTotal | The total vat amount of the order. |
float | invoiceTotal | The total invoice amount. |
float | paidAmount | The order amount that is already paid. |
float | prepaidAmount | This is deprecated and will be removed in the next version. Please use $giftCardAmount instead. |
float | giftCardAmount | The amount that comes from gift cards that were redeemed when placing the order The gift cards amount does not reduce the invoice total, but reduces the amount that still needs to be paid. The amount that still needs to paid is not an own parameter because the amount can be calculated by subtracting the gift cards amount from the invoice total. |
float | shippingCostsGross | The gross shipping costs. |
float | shippingCostsNet | The net shipping costs. |
float | taxlessAmount | The taxless amount of the order. Portion of the total invoice amount without taxes. |
createdAt | The date that the amount was created. | |
updatedAt | The date that the amount was updated last. | |
Order | order | The order that this amount belongs to. |
vats | The vat amounts |
public toArray()
Returns this model as an array.
The order amount vat model.
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the VAT information of an order amount |
int | orderAmountId | The ID of the order amount that the VAT information belong to |
int | countryVatId | The ID of the VAT configuration |
int | vatField | The ID of the VAT rate's field [0,1,2,3]. |
float | vatRate | The actual VAT rate that was used, e.g. 19%. |
float | value | The VAT amount of money given in the same currency as the order amount. |
float | netTotal | The net amount for the current vat rate. |
float | grossTotal | The gross amount for the current vat rate. |
createdAt | The date that the VAT was created. | |
updatedAt | The date that the VAT was updated last. | |
OrderAmount | orderAmount | The OrderAmount model that the OrderAmountVat belongs to. |
public toArray()
Returns this model as an array.
The order item model. Items, shipping costs, coupons, surcharges etc. are all displayed as order items.
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order item |
int | orderId | The ID of the order that the order item belongs to |
int | typeId | The ID of the order item type
|
float | referrerId | The ID of order item referrer |
int | itemVariationId | The ID of the item variation |
float | quantity | The quantity. |
string | orderItemName | The name of the order item |
string | attributeValues | The attribute value names |
int | shippingProfileId | The ID of the order item's shipping profile |
int | countryVatId | The ID of the country vat |
int | vatField | The vat id (0-3). |
float | vatRate | The vat amount, e.g. 19.0 for 19% VAT. |
int | position | The order items position in the order. |
int | warehouseId | The ID of the warehouse. |
createdAt | The date at which the order item was created. | |
updatedAt | The date that the order item was last updated. | |
OrderItemAmount | systemAmount | The order item's amount in the system currency. |
OrderItemAmount | amount | The order item's amount in the order currency. If the order currency is the same as the system currency this amount is the same. |
Order | order | The order that the property belongs to. |
OrderItemType | type | The order item type |
Vat | countryVat | The country vat instance. |
Variation | variation | The item variation in the position. |
amounts | The order item amounts that belong to the order item. | |
properties | The order item properties that belong to the order item. | |
orderProperties | The order item order properties that belong to the order item. | |
orderDates | The dates of the associated order. | |
dates | The dates of the order item. Can contain many different dates with their types. The following types are currently available:
|
|
references | The order item references. | |
referencedBy | The order item references which reference this order item. | |
giftCardCodes | The gift card codes that belong to the order item. | |
array | transactions | The transactions that belong to the order item |
array | serialNumbers | The serial numbers that belong to the order item |
array | variationBarcodes | The barcodes that belong to the variation of the order item |
comments | The order item comments. | |
warehouselocations | DEPRECATED The order items warehouse locations. | |
OrderItemTransactionSums | transactionSums | The sums of all order item transactions. |
couponReferences | The coupon references. |
public toArray()
Returns this model as an array.
The order item amount model. Order item amount refers to amounts of money.
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order item amount. |
int | orderItemId | The ID of the order item that the amount belongs to. |
bool | isSystemCurrency | Flag that indicates if the current currency is the same as the system currency or not. |
string | currency | The currency of the amounts. |
float | exchangeRate | The exchange rate for converting the current currency into the system currency. |
float | purchasePrice | The purchase price of the variation. |
float | priceOriginalGross | The original gross price without any surcharges or discounts. |
float | priceOriginalNet | The original net price without any surcharges or discounts. |
float | priceGross | The total gross price including surcharges and discounts [READONLY]. |
float | priceNet | The total net price including surcharges and discounts [READONLY]. |
float | surcharge | The surcharge as gross amount. |
float | discount | The discount can be a percentage or a fixed value. |
bool | isPercentage | Flag that indicates if a discount is given as a percentage or as a fixed value. |
createdAt | The date that the amount was created. | |
updatedAt | The date that the amount was last updated. | |
OrderItem | orderItem | The order item that the amount belongs to. |
public toArray()
Returns this model as an array.
This model contains the order properties that are assigned to order items.
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | propertyId | The ID of the order property |
int | orderItemId | The ID of the order item of the current order item order property |
string | value | The value for the order property |
string | fileUrl | The URL of the order property |
string | name | The name of the order property |
string | type | The type of the order property |
public toArray()
Returns this model as an array.
The order item transaction sums model.
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | orderItemId | The ID of the order item |
float | quantityTransactionsInRegular | The summed up quantity of all transactions with direction 'in' and status 'regular' |
float | quantityTransactionsOutRegular | The summed up quantity of all transactions with direction 'out' and status 'regular' |
float | quantityTransactionsInCancelled | The summed up quantity of all transactions with direction 'in' and status 'cancelled' |
float | quantityTransactionsOutCancelled | The summed up quantity of all transactions with direction 'out' and status 'cancelled' |
float | priceTotalTransactionsInRegular | The summed up price (in the currency of the order) of all transactions with direction 'in' and status 'regular' |
float | priceTotalTransactionsOutRegular | The summed up price (in the currency of the order) of all transactions with direction 'in' and status 'regular' |
float | priceTotalTransactionsInCancelled | The summed up price (in the currency of the order) of all transactions with direction 'out' and status 'cancelled' |
float | priceTotalTransactionsOutCancelled | The summed up price (in the currency of the order) of all transactions with direction 'out' and status 'cancelled' |
bool | areTransactionsInComplete | Flag that indicates if the item has transactions with direction 'in' of the full item quantity |
bool | areTransactionsOutComplete | Flag that indicates if the item has transactions with direction 'out' of the full item quantity |
public toArray()
Returns this model as an array.
The order item type model.
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order item type. The following types are currently available:
|
bool | isErasable | Flag that indicates if this type can be deleted or not |
int | position | The position for sorting |
names | The names of the order item types |
public toArray()
Returns this model as an array.
The order item type name model.
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the type name |
int | typeId | The related type id. |
string | name | The type name. |
string | lang | The ISO 639-1 language code for the name, e.g. "en" for English |
OrderItemType | type | The order item type instance. |
public toArray()
Returns this model as an array.
<b>DEPRECATED</b> The order item warehouse location model. Order item warehouse locations
refer to the location of an order item, in a specific warehouse.
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | orderItemId | The Id of the order item, that the warehouse location is associated with. |
int | warehouseLocationId | The Id of the warehouse location, this order item is associated with. |
float | quantity | The quantity stored at the warehouse location |
string | bestBeforeDate | The best before date |
string | batch | The batch |
WarehouseLocation | warehouseLocation | The warehouse location of the item |
public toArray()
Returns this model as an array.
The order payment terms model.
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the early payment discount. |
int | orderId | The ID of the order. |
float | earlyPaymentDiscount | The early payment discount in percent. |
int | earlyPaymentDiscountDays | The allowed number of days for the discount. |
int | valutaDays | The valuta given in days. |
int | paymentAllowedDays | The allowed number of days for the payment. |
createdAt | The date the model was created. | |
updatedAt | The date the model was last updated. | |
Order | order | The order of this early payment discount. |
public toArray()
Returns this model as an array.
The order reference model. Each OrderReference has an origin order (the most top order) and a referenced order ('parent' or 'reorder').
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | id | The id of the order reference entry. |
int | orderId | The order id. |
int | originOrderId | The id of the origin order. |
int | referenceOrderId | The id of the referenced order. |
string | referenceType | The reference type ("parent" or "reorder") of the referenced order. |
Order | order | |
Order | originOrder | The origin order of the order. |
Order | referenceOrder | The referenced order of the order. |
public toArray()
Returns this model as an array.
The order transaction sums model.
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | orderId | The ID of the order |
float | quantityAllItems | The summed up quantity of all items |
float | quantityTransactionsInRegular | The summed up quantity of all transactions with direction 'in' and status 'regular' |
float | quantityTransactionsOutRegular | The summed up quantity of all transactions with direction 'out' and status 'regular' |
float | quantityTransactionsInCancelled | The summed up quantity of all transactions with direction 'in' and status 'cancelled' |
float | quantityTransactionsOutCancelled | The summed up quantity of all transactions with direction 'out' and status 'cancelled' |
float | priceTotalTransactionsInRegular | The summed up price (in the currency of the order) of all transactions with direction 'in' and status 'regular' |
float | priceTotalTransactionsOutRegular | The summed up price (in the currency of the order) of all transactions with direction 'in' and status 'regular' |
float | priceTotalTransactionsInCancelled | The summed up price (in the currency of the order) of all transactions with direction 'out' and status 'cancelled' |
float | priceTotalTransactionsOutCancelled | The summed up price (in the currency of the order) of all transactions with direction 'out' and status 'cancelled' |
bool | areTransactionsInComplete | Flag that indicates if all items have transactions with direction 'in' of the full item quantity |
bool | areTransactionsOutComplete | Flag that indicates if all items have transactions with direction 'out' of the full item quantity |
public toArray()
Returns this model as an array.
The order type model.
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order type |
bool | isErasable | Flag that states if this type can be deleted or not. |
int | position | The position for sorting |
names | The names of the order item types. |
public toArray()
Returns this model as an array.
The order type name model.
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the type name |
int | typeId | The ID of the type |
string | name | The type name. |
string | lang | The ISO 639-1 language code for the name, e.g. "en" for English |
OrderType | type | The order type instance. |
public toArray()
Returns this model as an array.
price calculation result item
Plenty\Modules\Order\Models
Type | Name | Description |
---|---|---|
float | total | |
float | totalNet | |
float | totalGross | |
float | totalVat | |
int | highestVatId | |
array | netAmountsMap | |
array | vatAmountsMap |
public toArray()
Returns this model as an array.
This interface allows you to get and list order amounts and their vats.
Plenty\Modules\Order\Contracts
public getByOrderId(int $orderId, string $currency = null):OrderAmount
Get an order amount for an order in a currency. The ID of the order must be specified. The currency is optional. If no currency is specified, the order amount entry will be returned in the default system currency.
int | $orderId | The ID of the order |
string | $currency | The currency of the order amount |
public getById(int $id):OrderAmount
Get an order amount. The ID of the order amount must be specified.
int | $id | The ID of the order amount |
public listByOrderId(int $orderId):array
List all order amounts of an order. The ID of the order must be specified.
int | $orderId | The ID of the order |
The OrderItemRepositoryContract is the interface for the order item repository. This interface allows you to find, create and update order items. An order item can be e.g. items, surcharges and coupons. Each order item is given a unique id, which links it to a specific order.
Plenty\Modules\Order\Contracts
public getOrderItem(int $orderItemId):OrderItem
Get an order item
int | $orderItemId | The ID of the order item |
public deleteOrderItem(int $orderId, int $orderItemId):bool
Delete an order item
int | $orderId | The ID of the order that the item belongs to. |
int | $orderItemId | The ID of the order item to be deleted. |
public search(int $orderId, int $page = 1, int $itemsPerPage = 50, array $with = [], string $sortBy = "id", string $sortOrder = "asc"):PaginatedResult
Search order items
int | $orderId | |
int | $page | |
int | $itemsPerPage | |
array | $with | |
string | $sortBy | |
string | $sortOrder |
public setFilters(array $filters = []):void
Sets the filter array.
array | $filters |
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.
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.
The OrderRepositoryContract is the interface for the order repository. This interface allows you to find, create and update orders. There are many different order types and the data returned depends on the order type.
Plenty\Modules\Order\Contracts
public findOrderById(int $orderId, array $with = []):Order
Get an order
int | $orderId | The ID of the order |
array | $with | The relations to load in the order instance, one of "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments". |
public findOrderByExternalOrderId(string $externalOrderId, array $with = []):Order
Get an order by external order ID
string | $externalOrderId | |
array | $with |
public createOrder(array $data, string $coupon = null):Order
Create an order
array | $data | The order data. The properties that are required to create an order can be found in the order model. |
string | $coupon | A coupon code or a list of coupon codes to be redeemed in the order. |
public updateOrder(array $data, int $orderId):Order
Update an order
array | $data | The order data. The properties that are required to update an order can be found in the order model. |
int | $orderId | The ID of the order |
public deleteOrder(int $orderId):bool
Delete an order
int | $orderId | The ID of the order |
public undeleteOrder(int $orderId, float $status):Order
Restore an order
int | $orderId | The ID of the order |
float | $status | The status of the order |
public isDeleted(int $orderId):bool
Checks whether an order has been deleted or not.
int | $orderId | The ID of the order |
public findSchedulerById(int $schedulerId):OrderScheduler
Get a scheduler order
int | $schedulerId | The ID of the scheduler order |
public allOrdersByContact(int $contactId, int $page = 1, int $itemsPerPage = 50, array $with = []):PaginatedResult
List orders of a contact
int | $contactId | The ID of the contact |
int | $page | The page to get. The default page that will be returned is page 1. |
int | $itemsPerPage | The number of orders to be displayed per page. The default number of orders per page is 50. |
array | $with | The relations to load in the Order instance. Valid are "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments". |
public allOrdersBySupplier(int $contactId, int $page = 1, int $itemsPerPage = 50, array $with = []):PaginatedResult
List orders that include one or more variations from a supplier
int | $contactId | The ID of the contact (supplier id) |
int | $page | The page to get. The default page that will be returned is page 1. |
int | $itemsPerPage | The number of orders to be displayed per page. The default number of orders per page is 50. |
array | $with | The relations to load in the Order instance. Valid are "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments". |
public allOrdersByContactSender(int $contactId, int $page = 1, int $itemsPerPage = 50, array $with = []):PaginatedResult
List orders sent by a contact
int | $contactId | The ID of the contact |
int | $page | The page to get. The default page that will be returned is page 1. |
int | $itemsPerPage | The number of orders to be displayed per page. The default number of orders per page is 50. |
array | $with | The relations to load in the Order instance. Valid are "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments". |
public getLatestOrderByContactId(int $contactId, array $with = []):Order
Get latest order of a contact
int | $contactId | The ID of the contact |
array | $with | The relations to load in the Order instance. The relations available are: "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments". If you want to load relations, you need to include at least one, but you can also include several or all. |
public searchOrders(int $page = 1, int $itemsPerPage = 50, array $with = []):PaginatedResult
Lists orders
int | $page | The page to get. The default page that will be returned is page 1. |
int | $itemsPerPage | The number of orders to be displayed per page. The default number of orders per page is 50. |
array | $with | The relations to load in the Order instance. Valid are "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments". |
public getPackageNumbers(int $orderId):array
List package numbers of an order
int | $orderId | The ID of the order |
public cancelOrder(int $orderId, array $data):void
Cancel an order
int | $orderId | The ID of the order |
array | $data | The request data |
public findOrderByAccessKey(int $orderId, string $accessKey):Order
Find the order for the given order ID and access key.
int | $orderId | The ID of the order to be checked. |
string | $accessKey | The access key, that belongs to the order. |
public generateAccessKey(int $orderId):string
Generate an access key for the given order ID.
int | $orderId |
public completeOrder(int $orderId, array $data = []):Order
Complete an incomplete order.
int | $orderId | The ID of the order |
array | $data | Additional data. Currently only the statusId can be specified. |
public createMultiOrderByContact(int $contactId):Order
Creates a multi order for a specific contact
int | $contactId |
public setOrderStatus45(int $orderId):Order
Deprecated : Set order status to 4 or 5
int | $orderId |
public setFilters(array $filters = []):void
Sets the filter array.
array | $filters |
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.
An event class fired after a new order is created. The order type is not relevant.
Plenty\Modules\Order\Events
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
A base event class for all order events. Each order event expects an order instance.
Plenty\Modules\Order\Events
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
An Event class fired after a payment assignment when the order is fully paid.
Plenty\Modules\Order\Events
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
An event class will be fired after a payment is assigned and if the order is overpaid.
Plenty\Modules\Order\Events
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
A base Event class for all order paid events.
Plenty\Modules\Order\Events
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
An Event class fired after a payment is assigned and if the order is only partly paid.
Plenty\Modules\Order\Events
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
An Event class fired after a payment was assigned to an order.
Plenty\Modules\Order\Events
public __construct(Order $order, Payment $payment):void
OrderPaymentAssigned constructor.
Order | $order | |
Payment | $payment |
public getPayment():Payment
Get the payment.
public getOrder():Order
Get the order instance.
An Event class fired after a payment is assigned and if the order is paid in advance.
Plenty\Modules\Order\Events
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
An event class fired after a new order for a subscription is created. The order type is not relevant.
Plenty\Modules\Order\Events
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
Exception when duplicate order is created.
Plenty\Modules\Order\Exceptions
public getMessage():void
public getCode():void
public getFile():void
public getLine():void
public getTrace():void
public getPrevious():void
public getTraceAsString():void
This class is used as an event listener as well as a service for registering events. The class allows to register event classes to extend the OrderCreated event for custom order types.
Plenty\Modules\Order\Services
public handle(OrderCreated $created):void
Reacts upon the OrderCreated event
OrderCreated | $created | The event instance. |
public static addEventForType(int $typeId, string $className):void
Create event class for a custom order type
int | $typeId | The ID of the custom order type. |
string | $className | The name of the event class. |
public static removeEventForType(int $typeId, string $className):void
Delete event class from a custom order type
int | $typeId | The ID of the custom order type. |
string | $className | The name of the event class. |
This is the contract for the coupon campaign repository. It allows you to get coupon campaigns.
Plenty\Modules\Order\Coupon\Campaign\Contracts
public findById($id):CouponCampaign
Get a coupon campaign
$id | The ID of the coupon campaign |
public findByEmailPlaceholder(string $placeholder):CouponCampaign
Get the CouponCampaign model from the database by emailPlaceholder.
string | $placeholder | The email placeholder to search the database by |
public findByCouponCode(string $couponCode):CouponCampaign
Get the coupon campaign of a coupon code
string | $couponCode | The coupon code to search the database by |
public getCouponDisplayType(CouponCodeValidation $couponCodeValidation):string
Get the display type of a coupon
CouponCodeValidation | $couponCodeValidation |
public create(array $data):CouponCampaign
Create a coupon campaign
array | $data |
public modifyCampaignUsage(int $couponCampaignId, string $operator, string $field):void
Modifies the two counter 'used' and 'unused'
int | $couponCampaignId | ID of the Coupon Campaign |
string | $operator | How should the usage been modified ( '+' or '-' ) |
string | $field | Usage type to modify ( 'used' or 'unused' ) |
public delete(int $couponCampaignId):bool
Delete a coupon campaign
int | $couponCampaignId | The ID of the coupon campaign |
public update(array $data):CouponCampaign
update a coupon campaign
array | $data |
The CouponCampaign model contains all information of a campaign.
Plenty\Modules\Order\Coupon\Campaign\Models
Type | Name | Description |
---|---|---|
int | id | The ID of a coupon campaign |
string | externalId | DEPRECATED! The external ID of a coupon campaign |
string | name | The name of the coupon campaign |
int | variable | The variable to display coupon codes in emails. There are only 10 variables available. A variable may only be used for one campaign. The variable names follow this pattern: CouponCode + Number e.g. CouponCode1. |
bool | isPermittedForExternalReferrers | Flag that indicates whether or not coupons can be redeemed if a customer enters the online store from an external referrer.
|
bool | includeShipping | The discount also applies to shipping costs. The property will be only be set if the discount type fixed is set. |
int | unusedCodesCount | The number of codes that have been redeemed |
int | usedCodesCount | The number of codes that have not been redeemed |
string | endsAt | The date that the campaign ends |
string | startsAt | The date that the campaign starts |
float | minOrderValue | The minimum order value that needs to be reached for the coupon to be redeemed. If the value is not reached the coupon will not be redeemed. |
int | codeDurationWeeks | The number of weeks that codes of this campaign can be redeemed after they have been generated. |
string | codeAssignment | The code assignment is only relevant for vouchers. Codes can either be generated every time a voucher is bought or a code from a previously created list of codes can be used. The two options available are generate and use_existing.
|
string | codeLength | There are 3 different length available. The code can be 6, 16, 24 or 32 characters long. |
string | usage | The usage defines what the coupon codes from this campaign can be used for. There are three options available:
|
string | concept | The campaign concept defines how many codes belong to a campaign. The concept interacts with the redeem type that is explained next. There are two concept options available:
|
string | redeemType | The redeem type defines how many times a code of a campaign can be redeemed. There are 4 redeem types available:
|
string | discountType | There are 4 discount types available:
|
int | itemDiscountToPay | The number of items that the customer has to pay for. This number needs to be compared to the number of items the customer receives, itemDiscountToBuy |
int | itemDiscountToBuy | The number of items that the customer receives, but he or she only has to pay for the number of items set with itemDiscountToPay. |
string | campaignType | The two campaign types available are coupon or voucher. |
string | couponType | The coupon type is only for campaigns that have the campaign type coupon. The two coupon types available are promotion and sales. |
string | description | The description of the campaign |
float | value | The actual discount value of a coupon. The value needs to be set for the two discount types fixed and percent. |
Collection | codes | The codes and information about the codes that belong to this CouponCampaign |
Collection | references | These references are available
|
public toArray()
Returns this model as an array.
This is the contract for the coupon campaign reference repository. It allows you to get and create coupon campaigns references.
Plenty\Modules\Order\Coupon\Campaign\Reference\Contracts
public findByCouponCampaignId(int $couponCampaignId):Collection
Get a coupon campaign
int | $couponCampaignId | The ID of the coupon campaign |
public create(array $data):Collection
Create a Coupon Campaign reference
array | $data |
The CouponCampaignReference model contains all information of a campaign reference.
Plenty\Modules\Order\Coupon\Campaign\Reference\Models
Type | Name | Description |
---|---|---|
int | campaignId | The ID of a coupon campaign |
string | referenceType | The reference type defines the type of the reference. There are five reference types available:
|
int | value | The name of the coupon campaign |
public toArray()
Returns this model as an array.
This is the contract for the coupon codes by contacts repository. It allows you to list coupon codes redeemed by a contact as well as to create, update and delete redeemed coupon codes.
Plenty\Modules\Order\Coupon\Code\Contact\Contracts
public create(array $data):CouponCodeContact
Create redeemed coupons for a contact.
array | $data | The redeemed coupon data. The properties that are required to create an entry can be found in the CouponCodeContact model. |
public update(int $contactId, int $campaignId, string $coupon, array $data):CouponCodeContact
Update a redeemed coupon of a contact.
int | $contactId | The ID of the contact that redeemed the coupon code |
int | $campaignId | The ID of the coupon campaign |
string | $coupon | The coupon code |
array | $data | The redeemed coupon data. The properties that are required to update an entry can be found in the CouponCodeContact model |
public find(int $contactId, int $campaignId, string $coupon):CouponCodeContact
Get a redeemed coupon for a contact
int | $contactId | The ID of the contact which redeemed the coupon code |
int | $campaignId | The ID of the coupon campaign |
string | $coupon | The coupon code |
public findByContact(int $contactId, int $page = 1, int $itemsPerPage = 50):PaginatedResult
List redeemed coupons for a contact
int | $contactId | The contact ID as filter for redeemed coupons. |
int | $page | The page to get. The default page that will be returned is page 1. |
int | $itemsPerPage | The number of coupons to be displayed per page. The default number of coupons per page is 50. |
public findByCampaign(int $campaignId, int $page = 1, int $itemsPerPage = 50):PaginatedResult
List redeemed coupons of a campaign.
int | $campaignId | The campaign ID as filter for redeemed coupons. |
int | $page | The page to get. The default page that will be returned is page 1. |
int | $itemsPerPage | The number of coupons to be displayed per page. The default number of coupons per page is 50. |
public findByCoupon(string $coupon, int $page = 1, int $itemsPerPage = 50):PaginatedResult
List redeemed coupons of a coupon code
string | $coupon | The coupon code |
int | $page | The page to get. The default page that will be returned is page 1. |
int | $itemsPerPage | The number of coupons to be displayed per page. The default number of coupons per page is 50. |
The CouponCodeContact model.
Plenty\Modules\Order\Coupon\Code\Contact\Models
Type | Name | Description |
---|---|---|
string | code | The coupon code |
int | contactId | The ID of the contact that redeemed the coupon |
float | openAmount | The coupon amount that can still be redeemed |
int | redeemCount | How many times a coupon code has already been redeemed |
updatedAt | The date that the coupon code was updated last. | |
int | campaignId | The ID of the campaign that the coupon belongs to |
int | externalTransactionId | The ID that is assigned to a coupon by the external coupon service provider, when the coupon is redeemed. |
public toArray()
Returns this model as an array.
CouponCodeValidatorContract is the interface for the coupon code validation repository. This interface provides the functionality to validate coupon data.
Plenty\Modules\Order\Coupon\Code\Validation\Contracts
public validate(CouponCodeValidation $validationData):CouponCodeValidation
Validate a coupon code
CouponCodeValidation | $validationData | The data to validate a coupon |
The CouponCodeValidation data model contains all data necessary for validating a coupon.
Plenty\Modules\Order\Coupon\Code\Validation\Models
Type | Name | Description |
---|---|---|
int | campaignId | The ID of the campaign |
string | validationType | The type of the campaign. Currently the only type available is plentymarkets. |
items | The list of items or variations to be validated | |
int | contactId | The ID of the contact that wants to redeem the coupon |
string | couponCode | The coupon code |
string | currency | The currency of the purchase |
float | exchangeRate | The exchange rate of the purchase (optional, is loaded from settings if not given) |
float | referrer | The order referrer |
float | salesDiscount | The total discount from a coupon applied to an order. The discount is given as gross amount. |
float | salesDiscountNet | The net discount from a coupon applied to an order. The net discount is the total discount minus the vat amount. |
float | itemDiscount | The discount amount applied to items. |
float | itemDiscountNet | The net discount applied to items. |
float | shippingDiscount | The discount applied to shipping costs. |
float | shippingDiscountNet | The net discount applied to shipping costs. |
array | usedVatFields | The vat fields used for the validation |
float | restCouponAmount | The remaining coupon amount |
array | checkedItems | The list of variations that passed the validation |
array | validateParams | Validation parameters |
string | couponCampaignType | The campaign type |
public toArray()
Returns this model as an array.
The CouponCodeValidationItem model contains all item data needed for validating whether the coupon can be redeemed for these items or not.
Plenty\Modules\Order\Coupon\Code\Validation\Models
Type | Name | Description |
---|---|---|
float | amount | The price of a variation multiplied by the quantity |
int | noCoupon | Flag that indicates whether a variation can be bought with a coupon, can exclusively be bought with a coupon or can not be bought with a coupon. |
int | quantity | The quantity of the variation |
float | singlePrice | The price of a single variation |
int | itemId | The ID of the item |
int | vatField | The field of the VAT rate |
public toArray()
Returns this model as an array.
Provides methods for currency conversion data.
Plenty\Modules\Order\Currency\Contracts
public getCurrencyConversionList():array
Gets the currency conversion setting.
Provides methods for currency data.
Plenty\Modules\Order\Currency\Contracts
public getCurrency(string $currencyIso, array $columns = [], array $with = []):Currency
Get a currency
string | $currencyIso | The currency ISO 4217 code, e.g. "EUR". |
array | $columns | The attributes to be loaded in the currency instance. |
array | $with | The relations to be loaded in the currency instance. Valid relations are "names" or "countries"). |
public getCurrencyList(array $columns = [], array $with = []):void
Get all currencies supported in the system.
array | $columns | The attributes to be loaded in the currency instances. |
array | $with | The relations to be loaded in the currency instance. Valid relations are "names" or "countries". |
public getCurrencyCountries(string $currencyIso, array $columns = []):void
List countries for a currency
string | $currencyIso | The currency ISO 4217 code, e.g. "EUR". |
array | $columns | The attributes to be loaded in the country instances. |
public getCountryCurrency(int $countryId, array $columns = [], array $with = []):Currency
Get a currency for a country
int | $countryId | The country id. |
array | $columns | The attributes to be loaded in the currency instance. |
array | $with | The relations to be loaded in the currency instance ("names" or "countries"). |
public getExchangeRate(string $currencyIso):CurrencyExchangeRate
Get the exchange rate for a currency
string | $currencyIso |
public getExchangeRatesFrom(string $currencyIso):array
List exchange rates from a currency
string | $currencyIso | The currency ISO 4217 code, e.g. "EUR". |
public getExchangeRatesTo(string $currencyIso):array
List exchange rates to a currency
string | $currencyIso | The currency ISO 4217 code, e.g. "EUR". |
The currency model. The model includes information like the ISO 4217 code and the related currency symbols as well as the countries that a currency is used in.
Plenty\Modules\Order\Currency\Models
Type | Name | Description |
---|---|---|
string | currency | The ISO 4217 code and id of the currency. |
string | htmlCode | The html code (entity) for the currency. |
string | unicodeSign | The unicode symbol for the currency. If no unicode symbol exists, the html code will be used. |
bool | isActive | Flag that indicates if the currency is active in the system or not. Currencies are activated per sales price. |
bool | isErasable | Flag that indicates if this currency can be deleted or not.
|
float | exchangeRate | The current exchange rate for this currency. |
countries | A list of countries that use the currency. | |
names | A list of names in different languages for the currency. |
public toArray()
Returns this model as an array.
The CurrencyCountryRelation model indicates which currency is related to which country.
Plenty\Modules\Order\Currency\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the relation |
string | currency | The currency |
int | countryId | The ID of the country |
Country | country | The related country information |
Currency | currencyInstance | The related currency information |
public toArray()
Returns this model as an array.
The currency exchange rate model.
Plenty\Modules\Order\Currency\Models
Type | Name | Description |
---|---|---|
float | exchangeRate | The exchange rate |
public toArray()
Returns this model as an array.
The currency name model.
Plenty\Modules\Order\Currency\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the currency name |
string | currency | The currency |
string | lang | The language of the currency name |
string | name | The name in the language |
Currency | currencyInstance | The currency instance. |
public toArray()
Returns this model as an array.
The export model for IDEA exports.
Plenty\Modules\Order\Export\Pos\Idea\Models
Type | Name | Description |
---|---|---|
int | id | The id of the export entry. |
string | token | The token generated for the export entry. |
float | progress | The progress of the export process. |
string | currentModule | The currently exporting module of the export process. |
string | state | The current state of the export process. |
string | filename | The filename of the export content. |
Carbon | createdAt | Specifies the creation date of the export entry. |
Carbon | updatedAt | Specifies the last update date of the export entry. |
Collection | modules | The modules to be used by the export process. |
Collection | options | The options for the export process. Currently only "year" is supported as option key. |
public toArray()
Returns this model as an array.
Repository Contract for PaymentMethod
Plenty\Modules\Order\Payment\Method\Contracts
public getPaymentMethods(int $countryId, int $plentyId = null, string $lang = "de"):array
Gets a list of payment methods
int | $countryId | |
int | $plentyId | |
string | $lang |
public activatePaymentMethod(int $id):PaymentMethod
Activate a legacy payment method.
int | $id |
The payment method model
Plenty\Modules\Order\Payment\Method\Models
Type | Name | Description |
---|---|---|
int | id | |
string | name | |
float | minimumGross | |
int | priority | |
bool | active | |
int | showBankDetails | |
int | infoPageType | |
int | infoPageExternalUrl | |
float | feeDomesticFlatRateWebstore | |
float | feeDomesticFlatRateInternal | |
float | feeDomesticPercentageWebstore | |
float | feeDomesticPercentageInternal | |
float | feeForeignFlatRateWebstore | |
float | feeForeignFlatRateInternal | |
float | feeForeignPercentageWebstore | |
float | feeForeignPercentageInternal | |
array | informations | |
array | webstores | |
array | coutries | |
PaymentMethodInformation | information |
public toArray()
Returns this model as an array.
The payment method information model
Plenty\Modules\Order\Payment\Method\Models
Type | Name | Description |
---|---|---|
int | id | |
string | lang | |
string | name | |
int | infoPageType | |
int | infoPageInternalContent | |
string | infoPageExternalUrl | |
string | logo | |
int | showLogo |
public toArray()
Returns this model as an array.
The OrderPdfGenerationEvent triggered before a pdf is generated for an order.
Plenty\Modules\Order\Pdf\Events
public getOrder():Order
Get the
public getDocType():string
Get the
public addOrderPdfGeneration(OrderPdfGeneration $orderPdfGeneration):Events
OrderPdfGeneration | $orderPdfGeneration |
The OrderPdfGeneration Model
Plenty\Modules\Order\Pdf\Models
Type | Name | Description |
---|---|---|
string | language | |
string | advice | |
array | sums | |
string | link | |
string | image | |
int | imageHeight | |
int | imageWidth |
public toArray()
Returns this model as an array.
Provides methods for processing order referrers. An order referrer indicates where a purchase was made originally.
Plenty\Modules\Order\Referrer\Contracts
public getList(array $columns = []):void
List order referrers
array | $columns | The columns (attributes) to load in the instances. |
public create(array $data, float $parentReferrerId = null):OrderReferrer
Create an order referrer
array | $data | The order referrer data. The properties that are required to create an order referrer can be found in the order referrer model. |
float | $parentReferrerId | If a parent referrer ID is specified, the new referrer will be created as a sub referrer to this one and will be assigned a sub referrer ID. Sub referrer IDs are build of an integer part and a fractional part. The integer part is the parent ID followed by a 2 character long fractional part. This way the relation between a sub referrer and the parent referrer can be seen easily. |
public update(array $data, float $referrerId):OrderReferrer
Update an order referrer
array | $data | The order referrer data. The properties that are required to update an order referrer can be found in the order referrer model. |
float | $referrerId | The ID of the order referrer |
public getReferrerById(float $referrerId, array $columns = []):OrderReferrer
Get an order referrer
float | $referrerId | The ID of the order referrer |
array | $columns | The columns (attributes) to load in the instances. |
public delete(float $referrerId):bool
Delete an order referrer.
float | $referrerId | The ID of the order referrer |
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.
The order referrer model. An order referrer shows where a purchase was originally made.
Plenty\Modules\Order\Referrer\Models
Type | Name | Description |
---|---|---|
float | id | The ID of the order referrer |
bool | isEditable | Flag that indicates if this referrer can be updated as well as deleted or not
|
string | backendName | The backend name of the referrer |
string | name | The public name of the referrer as it is displayed e.g. on documents |
int | orderOwnerId | The user ID of whoever owns new orders from this referrer |
bool | isFilterable | Flag that indicates if this referrer can be used as a filter or not
|
string | origin | The origin of this referrer |
public toArray()
Returns this model as an array.
The legacy order model
Plenty\Modules\Order\Scheduler\Models
Type | Name | Description |
---|---|---|
int | id | The order id. |
int | contactId | The contact id. |
int | methodOfPayment | |
start | ||
last | ||
end | ||
Address | deliveryAddress | |
Address | billingAddress | |
Collection | addresses | |
Collection | addressRelations |
public toArray()
Returns this model as an array.
List serial numbers for orders
Plenty\Modules\Order\SerialNumber\Contracts
public listSerialNumbersByOrder(int $orderId):void
List serial numbers of an order
int | $orderId | The ID of the order |
public listSerialNumbersByOrderItem(int $orderItemId):void
List serial numbers if an order item
int | $orderItemId | The ID of the order item |
The order serial number model
Plenty\Modules\Order\SerialNumber\Models
Type | Name | Description |
---|---|---|
int | serialNumberId | The ID of the serial number |
int | orderId | The ID of the order |
int | orderItemId | The ID of the order item |
string | serialNumber | The serial number |
ItemSerialNumber | itemSerialNumber |
public toArray()
Returns this model as an array.
The EUCountryCodesServiceContract model
Plenty\Modules\Order\Shipping\Contracts
public isEUCountry(int $countryId, string $date = null):bool
int | $countryId | |
string | $date | [optional, default=null, date in format "0000-00-00"/"Y-m-d"] |
public hasCommunityTax(int $countryId, string $date = null):bool
int | $countryId | |
string | $date | [optional, default=null, date in format "0000-00-00"/"Y-m-d"] |
public getTaxTerritory(int $countryId, string $date = null):int
int | $countryId | |
string | $date | [optional, default=null, date in format "0000-00-00"/"Y-m-d"] |
public hasCommunityToll(int $countryId, string $date = null):bool
int | $countryId | |
string | $date | [optional, default=null, date in format "0000-00-00"/"Y-m-d"] |
public getTollTerritory(int $countryId, string $date = null):int
int | $countryId | |
string | $date | [optional, default=null, date in format "0000-00-00"/"Y-m-d"] |
public isExportDelivery(int $countryId, int $merchandCountryId = null, string $date = null):bool
int | $countryId | |
int | $merchandCountryId | |
string | $date | [optional, default=null, date in format "0000-00-00"/"Y-m-d"] |
The ParcelServicePresetRepositoryContract is the interface for the shipping profile repository. This interface allows to get a shipping profile by the ID or list all shipping profiles.
Plenty\Modules\Order\Shipping\Contracts
public getPresetList(array $columns = [], string $with = null, string $parcelServiceName = null, array $filters = []):void
Lists shipping profiles.
array | $columns | The columns (attributes) to retrieve |
string | $with | The parameter contains the name of an relation |
string | $parcelServiceName | Filter that restricts the search result to parcel service presets with a specified service name (e.g. 'DHL' for DHL) |
array | $filters | Possible attributes are updatedAtBefore and updatedAtAfter (yyyy-mm-dd or yyyy-mm-dd hh:mm:ss) |
public getPresetById(int $presetId, array $columns = []):ParcelServicePreset
Gets a shipping profile. The ID of the shipping profile must be specified.
int | $presetId | The ID of the shipping profile |
array | $columns | The columns (attributes) to retrieve |
public getPresetNamesById(int $presetId):array
Gets a shipping profile names in all langauges. The ID of the shipping profile must be specified.
int | $presetId | The ID of the shipping profile |
public getLastWeightedPresetCombinations(Basket $basket, int $contactClass, array $customParams = []):array
Calculate shipping costs and list last weighted preset combinations.
Basket | $basket | The basket |
int | $contactClass | The ID of the contact class |
array | $customParams | User-defined parameters |
public getPreviewList(string $language = null, bool $useBackendName = false):array
Get an array with all parcel service preset with the ID as key and the name as value.
string | $language | The names will be returned in this language. |
bool | $useBackendName | Use the backend name instead of the external name? |
public create(array $data):ParcelServicePreset
Creates an parcel service preset
array | $data | The data as an associative array |
public update(array $data, int $id):ParcelServicePreset
Update an parcel service preset
array | $data | The data as an associative array |
int | $id | The ID of the shipping profile |
public delete(int $id):ParcelServicePreset
Delete a parcel service preset
int | $id | The ID of parcel service preset |
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(array $filters = []):void
Sets the filter array.
array | $filters |
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.
An event class fired after the shipping calculation is done. Listeners can add fees to the shipping costs.
Plenty\Modules\Order\Shipping\Events
public getShippingServiceProvider():int
Get the shipping service provider
public __construct(string $shippingServiceProvider, int $orderId, int $shippingProfileId):void
AfterShippingCostCalculated constructor.
string | $shippingServiceProvider | The name of the shipping service provider |
int | $orderId | The ID of the order |
int | $shippingProfileId | The ID of the shipping profile |
public getOrderId():int
Get the ID of the order.
public getAdditonalFee():float
Get the additional fee.
public addAdditionalFee(float $additionalFee):AfterShippingCostCalculated
Set the additional fee.
float | $additionalFee | The additional fee |
public getShippingProfileId():int
Get the ID of the shipping profile.
public setShippingProfileId(int $shippingProfileId):void
Set the ID of the shipping profile.
int | $shippingProfileId | The ID of the shipping profile |
The Default Shipping model is used to define the standard referrer, the standard shipping region and the payment methods.
Plenty\Modules\Order\Shipping\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the entry |
float | referrerId | The ID of the referrer |
int | shippingDestinationId | The ID of the shipping region |
int | position | The position |
int | paymentMethod1 | The first payment method |
int | paymentMethod2 | The second payment method |
int | paymentMethod3 | The third payment method |
public toArray()
Returns this model as an array.
Repository for Country
Plenty\Modules\Order\Shipping\Countries\Contracts
public findIsoCode(int $countryId, string $isoCodeType):string
Finds the ISO-Code
int | $countryId | |
string | $isoCodeType |
public getCountryById(int $countryId):Country
Gets a country
int | $countryId |
public getCountriesList(int $active, array $with):Collection
Get countries
int | $active | |
array | $with |
public getActiveCountriesList():Collection
Get active countries
public getActiveCountryNameMap(string $language):array
Get names of countries
string | $language |
public getCountryByIso(string $isoCode, string $isoType):void
Gets a country.
string | $isoCode | |
string | $isoType | ('isoCode2', 'isoCode3') |
public getCountryStateByIso(int $countryId, string $isoCode):CountryState
Gets a country state
int | $countryId | |
string | $isoCode |
public activateCountry(int $countryId):Country
Activates a country
int | $countryId |
public deactivateCountry(int $countryId):Country
Deactivates a country
int | $countryId |
The country model representing a country with allocated states and a list of names in different languages.
Plenty\Modules\Order\Shipping\Countries\Models
Type | Name | Description |
---|---|---|
int | id | The country id. |
string | name | The system country name. |
int | shippingDestinationId | The shipping destination (region) id. |
int | active | The active flag (1: active, 2: backend active, 3: supplier active |
int | storehouseId | The id of the main warehouse in this country. |
string | isoCode2 | The ISO 3166 ALPHA-2 code of the country. |
string | isoCode3 | The ISO 3166 ALPHA-3 code of the country. |
string | lang | The main language spoken in the country. |
bool | isCountryStateMandatory | Flag that states if a country state is mandatory for the country. |
array | states | An array with country states. |
array | names | An array with country names in different languages. |
public toArray()
Returns this model as an array.
The CountryName model containing a name of a country in a specified language.
Plenty\Modules\Order\Shipping\Countries\Models
Type | Name | Description |
---|---|---|
int | id | |
string | language | |
string | name |
public toArray()
Returns this model as an array.
The CountryState model representing a state which belongs to a country specified by the countryId.
Plenty\Modules\Order\Shipping\Countries\Models
Type | Name | Description |
---|---|---|
int | id | |
int | countryId | |
string | isoCode | |
string | name | |
string | isoCode3166 |
public toArray()
Returns this model as an array.
Repository for Export Documents
Plenty\Modules\Order\Shipping\ExportDocuments\Contracts
public listExportDocumentsByOrderId(int $orderId):ExportDocument
List export documents by order ID
int | $orderId |
The Export Document model
Plenty\Modules\Order\Shipping\ExportDocuments\Models
Type | Name | Description |
---|---|---|
int | id | |
int | orderId | |
int | packageNumber | |
int | base64Content |
public toArray()
Returns this model as an array.
The ShippingInformationRepositoryContract is the interface for the shipping information repository. This interface allows to get shipping information by order ID, create new shipping information or update shipping information.
Plenty\Modules\Order\Shipping\Information\Contracts
public getShippingInformationByOrderId(int $orderId):ShippingInformation
Get Shipping Information by an order ID
int | $orderId | The ID of the Order |
public getOrdersShippingInformation(array $searchParams):array
Get all the orders with their shipping information
array | $searchParams |
public resetShippingInformation(int $orderId):void
Delete Shipping Information by an order ID
int | $orderId | The ID of the Order |
public saveShippingInformation(array $data):ShippingInformation
Create Shipping Information
array | $data | The shipping information data as associative array. |
public updateAdditionalData(array $data, int $orderId):ShippingInformation
Update Additional Data of Shipping Information by Order ID
array | $data | The additional data as associative array. |
int | $orderId | The ID of the order. |
public updateShippingStatus(array $data, int $orderId):ShippingInformation
Update Shipping Status of Shipping Information by Order ID
array | $data | The status data as associative array. |
int | $orderId | The ID of the order. |
The ShippingInformationModel represents additional shipping information for an order.
Plenty\Modules\Order\Shipping\Information\Models
Type | Name | Description |
---|---|---|
int | orderId | The ID of the order |
string | shippingServiceProvider | The name of the shipping service provider |
string | transactionId | The ID of the transaction |
string | shippingStatus | The shipping status. Possible values are 'open', 'prepared' and 'registered'. |
float | shippingCosts | The shipping costs |
string | additionalData | The additional data. Depending on the shipping service provider selected, this data may contain different information, e.g. shipping service, email address and order ID. |
int | registrationAt | The date and time the shipment was registered |
int | shipmentAt | The date the items will be shipped |
public toArray()
Returns this model as an array.
Create and get items in packages from order
Plenty\Modules\Order\Shipping\Package\Contracts
public getItemsForPackage(int $packageId, int $page = 1, int $perPage = 1000, string $sortBy = "id", string $sortOrder = "desc"):OrderShippingPackageItems
Get items for a package
int | $packageId | The ID of the package |
int | $page | [optional, default=1] |
int | $perPage | [optional, default=1000] |
string | $sortBy | [optional, default=id] |
string | $sortOrder | [optional, default=desc] |
public getItemsInPackagesPalletsPaginated(int $orderId, int $page = 1, int $perPage = 1000, string $sortBy = "id", string $sortOrder = "asc"):OrderShippingPackageItems
Get all the packed items in the packages in the pallets in the order
int | $orderId | The ID of the order |
int | $page | [optional, default=1] |
int | $perPage | [optional, default=1000] |
string | $sortBy | [optional, default=id] |
string | $sortOrder | [optional, default=asc] |
public getItemsFromPackagesForOrder(int $orderId):OrderShippingPackageItems
Get items for an order
int | $orderId | The ID of the order |
public getPackedItemsPerPackageForOrder(int $orderId):array
Get packed items in an order
int | $orderId | The ID of the order |
public getUnpackedItemsFromPackagesForOrder(int $orderId):array
Get unpacked items for an order
int | $orderId | The ID of the order |
public createItemsForPackageOrder(array $data, int $packageId, bool $isCallFromLegacyCode = false):array
Create items for a package
array | $data | Array with data including item id, variation id and the quantity of the item in package |
int | $packageId | The ID of the package. This ID is optional. If the ID is not provided, it must be present in the $data array |
bool | $isCallFromLegacyCode | Optional. Flag to see if the call of this method is from legacy code or new code |
public updateItemsInOrderShippingPackage(int $id, array $data):int
Update package, variation or quantity for an order
int | $id | The ID of the order package item variation |
array | $data | Array with data including package id, item id, variation id and/or the quantity of the item in package |
public deleteItemsInOrderShippingPackage(int $id):int
Delete a variation of an item from package in an order
int | $id | The ID of the order package item variation |
public updateItemsFromPackage(int $packageId, int $itemId, int $variationId, array $data):int
Update items in a package
int | $packageId | The ID of the package |
int | $itemId | The ID of the item |
int | $variationId | The ID of the variation |
array | $data | Array with data including item id, variation id and the quantity of the item in package |
public deleteItemsFromPackage(int $packageId, int $itemId, int $variationId):DeleteResponse
Delete a variation of an item from package in order
int | $packageId | The ID of the package |
int | $itemId | The ID of the item |
int | $variationId | The ID of the variation |
Create, get, update and delete order shipping packages.
Plenty\Modules\Order\Shipping\Package\Contracts
public getOrderShippingPackage(int $orderShippingPackageId, array $columns = [], int $orderId = null):OrderShippingPackage
Get an order shipping package
int | $orderShippingPackageId | The ID of the order shipping package |
array | $columns | The properties to be loaded |
int | $orderId | The ID of an order |
public listOrderShippingPackages(int $orderId, array $columns = [], array $with = []):array
List order shipping packages
int | $orderId | The ID of the order |
array | $columns | The properties to be loaded |
array | $with | (optional) Possible value is 'labelBase64' to get the label with the response |
public createOrderShippingPackage(int $orderId, array $data):OrderShippingPackage
Create an order shipping package
int | $orderId | The ID of the order |
array | $data | The request data |
public updateOrderShippingPackage(int $orderShippingPackageId, array $data):OrderShippingPackage
Update an order shipping package
int | $orderShippingPackageId | The ID of the order shipping package |
array | $data | The request data |
public deleteOrderShippingPackage(int $orderShippingPackageId):void
Delete an order shipping package
int | $orderShippingPackageId | The ID of the order shipping package |
public deleteAllPackagesInPallet(int $orderId, int $palletId):void
Delete all order shipping packages in a pallet
int | $orderId | The ID of the order shipping package |
int | $palletId | The ID of the pallet |
public updateAllPackagesInPallet(int $orderId, int $palletId, array $data):void
Update all the packages in a pallet.
int | $orderId | |
int | $palletId | |
array | $data |
The order shipping package model
Plenty\Modules\Order\Shipping\Package\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order shipping package |
int | orderId | The ID of the order |
int | packageId | The ID of the package |
int | weight | The weight of the package in grams |
string | packageNumber | The package number |
string | labelPath | The path to the label |
string | labelBase64 | The base64 encoded label |
string | exportLabelBase64 | The base64 encoded export label |
string | returnPackageNumber | The return package number |
int | packageType | The type of the package. The following types are valid:
|
float | volume | The volume of the package |
int | palletId | The id of the pallet of which the package belong to |
bool | isClosed | Flag to say if the package is editable or not |
string | createdAt | |
string | updatedAt | |
Order | order | The order the package belongs to |
public toArray()
Returns this model as an array.
The relation between package, item and variation model
Plenty\Modules\Order\Shipping\Package\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order shipping package item. Primary key auto-increment |
int | packageId | The ID of the package (id column from plenty_package_type2order) |
int | itemId | The ID of the item (plenty_item_variation_base_item_id column from plenty_item_variation_base) |
int | variationId | The ID of the variation (plenty_item_variation_base_id column from plenty_item_variation_base) |
float | itemQuantity | The quantity of the item in the package |
public toArray()
Returns this model as an array.
The ShippingPackageTypeRepositoryContract is the interface for the shipping package type repository. This interface allows to list all shipping package types or to get a shipping package type by the ID.
Plenty\Modules\Order\Shipping\PackageType\Contracts
public findShippingPackageTypeById(int $shippingPackageTypeId):ShippingPackageType
Gets a shipping package type. The ID of the shipping package type must be specified.
int | $shippingPackageTypeId | The ID of the shipping package type |
public listShippingPackageTypes():array
Lists shipping packages types.
The shipping package type model.
Plenty\Modules\Order\Shipping\PackageType\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the shipping package type |
string | name | The name of the shipping package type |
int | width | The width of the shipping package type |
int | height | The height of the shipping package type |
int | length | The length of the shipping package type |
string | unit | The unit of the shipping package type dimension |
int | maxWeight | The maximum weight of the shipping package type |
int | maxVolume | The maximum volume of the shipping package type |
int | volumeType | The volume type of the shipping package type |
public toArray()
Returns this model as an array.
Create, get, update and delete order shipping pallet.
Plenty\Modules\Order\Shipping\Pallet\Contracts
public getOrderShippingPallet(int $orderShippingPalletId):OrderShippingPallet
Get an order shipping pallet
int | $orderShippingPalletId | The ID of the order shipping pallet |
public listOrderShippingPallets(array $filters, array $with):array
List order shipping pallets
array | $filters | |
array | $with |
public listPalletPackages(int $orderShippingPalletId, int $orderId):array
Get all the packages in a pallet
int | $orderShippingPalletId | |
int | $orderId |
public createOrderShippingPallet(array $data):OrderShippingPallet
Create an order shipping pallet
array | $data | The request data |
public updateOrderShippingPallet(int $orderShippingPalletId, array $data):OrderShippingPallet
Update an order shipping pallet
int | $orderShippingPalletId | The ID of the order shipping pallet |
array | $data | The request data |
public deleteOrderShippingPallet(int $orderShippingPalletId):OrderShippingPallet
Delete an order shipping pallet
int | $orderShippingPalletId | The ID of the order shipping pallet |
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(array $filters = []):void
Sets the filter array.
array | $filters |
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.
The order shipping pallet model.
Plenty\Modules\Order\Shipping\Pallet\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order shipping pallet |
float | weight | The weight of the order shipping pallet, including it's contents |
float | individualWeight | The weight of the order shipping pallet |
float | width | The width of the order shipping pallet |
float | height | The height of the order shipping pallet |
float | length | The length of the order shipping pallet |
bool | isStackable | Flag to tell if the pallet is stackable or not. If true, another pallet can be placed over the current one |
int | additionalInfo | Additional info |
string | barcode | The barcode |
bool | isClosed | Flag to tell if the pallet is closed or not. If true, the information within the pallet should not be changed anymore |
public toArray()
Returns this model as an array.
The ParcelServiceConstraintRepositoryContract is the interface for the parcel service constraint type repository.
Plenty\Modules\Order\Shipping\ParcelService\Contracts
public create(array $data):void
Create a new parcel service constraint entry
array | $data |
public getById(int $id):void
Fetch parcel service constraint by ID
int | $id |
public delete(int $id):void
Delete a parcel service constant by ID
int | $id |
The Parcel Service Model
Plenty\Modules\Order\Shipping\ParcelService\Models
Type | Name | Description |
---|---|---|
int | id | |
string | backendName | |
string | trackingUrl | |
int | shippingServiceProviderId | |
string | shippingServiceProviderAddress | |
int | splitTrackingUrl | |
string | splitDelimiter | |
ShippingServiceProvider | shippingServiceProvider | |
parcelServiceNames |
public toArray()
Returns this model as an array.
The Parcel Service Constraint Model
Plenty\Modules\Order\Shipping\ParcelService\Models
Type | Name | Description |
---|---|---|
int | parcelServiceRegionId | |
int | constraintType | |
int | subConstraintType | |
int | constraintLimit | |
int | cost | |
int | startValue |
public toArray()
Returns this model as an array.
The Parcel Service Name Model
Plenty\Modules\Order\Shipping\ParcelService\Models
Type | Name | Description |
---|---|---|
int | parcelServiceId | |
string | name | |
string | lang |
public toArray()
Returns this model as an array.
The Parcel Service Preset Model
Plenty\Modules\Order\Shipping\ParcelService\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the shipping profile (autoincrement value) |
int | parcelServiceId | The ID of the shipping service provider |
string | backendName | The back end name of the shipping profile |
int | flag | The icon of the shipping profile |
int | priority | The priority of the shipping profile |
int | category | The category of the shipping profile |
int | useArticlePorto | Flag that indicates if the extra shipping charge saved in the item data record is used |
int | isInsured | Flag that indicates if the shipping profile is insured |
int | isExpress | Flag that indicates if the shipping profile is used for express delivery |
int | isPostident | Flag that indicates if the shipping profile includes an authority verification |
int | isDefaultEnabled | Flag that indicates if the shipping profile is automatically assigned to new items |
float | islandFee | The extra charge for islands saved in the shipping profile |
int | isCod | Flag that indicates Cash on Delivery |
array | supportedMultishop | The clients (stores) that are activated for the shipping profile |
array | supportedReferrer | The order referrers that are activated for the shipping profile |
array | subreferrerSupport | This field is currently without any function. |
array | excludedPaymentMethods | The blocked payment methods that are not offered for the shipping profile |
array | excludedCustomerGroups | The blocked customer groups for the shipping profile. Blocked customer groups cannot select the shipping profile during checkout. |
string | shippingGroup | The group of the shipping profile |
string | dispatchIdentifier | This field is currently without any function. |
int | auctionType | The eBay listing type for the shipping profile |
array | supportedLoyaltyPrograms | The loyalty programs that are supported by the shipping profile |
string | updatedAt | The date the shipping profile was last updated |
array | parcelServicePresetNames | |
array | parcelServiceNames | |
int | showDataPrivacyAgreementHint | |
string | transmitPrivacyRule | |
string | alternativeEmail | |
string | alternativePhone | |
int | isParcelBox | Indicates whether the e.g. paketshop is supported |
int | isPostOffice | Indicates whether the e.g. postfiliale is supported |
ParcelService | parcelService | The parcel service. |
ParcelServiceRegion | parcelServiceRegionConstraint | The parcel service region constraint |
public toArray()
Returns this model as an array.
The Parcel Service Preset Name Model
Plenty\Modules\Order\Shipping\ParcelService\Models
Type | Name | Description |
---|---|---|
int | presetId | |
string | name | |
string | lang |
public toArray()
Returns this model as an array.
Get parcel service region name
Plenty\Modules\Order\Shipping\ParcelServiceRegion\Contracts
public create(array $data):ParcelServiceRegionName
Creates a Region
array | $data |
public getAllRegions():array
Return all the regions
Get parcel service region
Plenty\Modules\Order\Shipping\ParcelServiceRegion\Contracts
public create(array $data):ParcelServiceRegion
Creates a ParcelServiceRegion
array | $data |
public delete(int $id):void
Deletes a ParcelServiceRegion
int | $id |
public getParcelServiceRegion(int $parcelServiceRegionId, array $columns = []):ParcelServiceRegion
Get a parcel service region
int | $parcelServiceRegionId | The ID of the parcel service region. |
array | $columns |
public listParcelServiceRegions(int $parcelServicePresetId, array $columns = []):array
Lists parcel service regions by parcel service preset id.
int | $parcelServicePresetId | The ID of the parcel service preset. |
array | $columns |
The parcel service region model.
Plenty\Modules\Order\Shipping\ParcelServiceRegion\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the parcel service region |
int | shippingRegionId | The ID of the shipping region |
int | parcelServicePresetId | The ID of the parcel service preset |
string | shippingRegionName | The name of the shipping region |
int | serviceType | Type of the parcel service |
public toArray()
Returns this model as an array.
The parcel service region name model.
Plenty\Modules\Order\Shipping\ParcelServiceRegion\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the parcel service region name |
int | name | The name of the shipping region |
public toArray()
Returns this model as an array.
The ReturnsRepositoryContract is the interface for the order returns repository. This interface allows to register, assign to order and list order returns.
Plenty\Modules\Order\Shipping\Returns\Contracts
public registerReturns(string $pluginName, array $orderIds):RegisterReturnsResult
Register a new return
string | $pluginName | |
array | $orderIds |
public getReturnsLabelById(int $labelId, array $with):PaginatedResult
Get return label by ID
int | $labelId | |
array | $with |
public assignLabel2Return(int $orderId, int $returnsId):OrderReturns
Assign return label to order
int | $orderId | |
int | $returnsId |
public getOrderReturns(int $orderId, array $with = [], int $page = 1, int $itemsPerPage = 50):PaginatedResult
Get a paginated list of all order returns
int | $orderId | |
array | $with | |
int | $page | |
int | $itemsPerPage |
The ReturnsServiceProviderRepositoryContract is the interface for the returns service provider repository. This interface allows to list returns service providers.
Plenty\Modules\Order\Shipping\Returns\Contracts
public getReturnsServiceProviderList(array $columns = [], int $page = 1, int $itemsPerPage = 50, array $filters = [], array $with = []):PaginatedResult
Get a paginated list of returns services providers
array | $columns | |
int | $page | |
int | $itemsPerPage | |
array | $filters | |
array | $with |
public findById(int $returnsServiceProviderId):ReturnsServiceProvider
Find a returns service provider by ID
int | $returnsServiceProviderId |
public findByName(string $returnsServiceProviderName):array
Find a returns service provider by name
string | $returnsServiceProviderName |
public saveReturnsServiceProvider(string $pluginName, string $returnProviderAlias = null):ReturnsServiceProvider
Save a returns service provider
string | $pluginName | |
string | $returnProviderAlias |
public getReturnsServiceProvider(int $orderId):ReturnsServiceProvider
Get the returns service provider for an order
int | $orderId |
public pluginList():void
The FailedRegisterOrderReturns model.
Plenty\Modules\Order\Shipping\Returns\Models
public addErrorMessage(string $errorMessage):void
Add a new error message
string | $errorMessage |
public setOrderId(int $orderId):void
Set the order ID variable
int | $orderId |
public addException(Exception $exception):void
Add a new exception object
Exception | $exception |
public get(string $key):void
string | $key |
public hasGetMutator(string $key):bool
Determine if a get mutator exists for an attribute.
string | $key |
public setAttributes($attributes):void
$attributes |
public setAttribute(string $key, $value):Models
Set a given attribute on the model.
string | $key | |
$value |
public hasSetMutator(string $key):bool
Determine if a set mutator exists for an attribute.
string | $key |
public changeValue(string $key, callable $callback):void
string | $key | |
callable | $callback |
public offsetExists($offset):bool
$offset |
public offsetGet($offset):void
$offset |
public offsetSet($offset, $value):void
$offset | ||
$value |
public offsetUnset($offset):void
$offset |
public toArray(bool $translate = false):array
bool | $translate | Flag indicating if values should be translated. |
public toJson(int $options):string
int | $options |
public jsonSerialize():void
public fill(array $attributes):Models
Fill the model with an array of attributes.
array | $attributes |
public isFillable(string $key):bool
Determine if the given attribute may be mass assigned.
string | $key |
public getFillable():array
Get the fillable attributes for the model.
public fillable(array $fillable):Models
Set the fillable attributes for the model.
array | $fillable |
public hasCast(string $key, $types = null):bool
Determine whether an attribute should be cast to a native type.
string | $key | |
$types |
public fromJson(string $value, bool $asObject = false):void
Decode the given JSON back into an array or object.
string | $value | |
bool | $asObject |
The model for OrderReturns
Plenty\Modules\Order\Shipping\Returns\Models
Type | Name | Description |
---|---|---|
int | id | |
int | orderId | |
int | returnsOrderId | |
int | providerId | |
Carbon | createdAt | |
string | fileName | |
string | externalNumber | |
string | externalData | |
Carbon | availableUntil |
public toArray()
Returns this model as an array.
The RegisterOrderReturnsResponse model.
Plenty\Modules\Order\Shipping\Returns\Models
public addSuccessfullyRegisteredReturns(SuccessfullyRegisteredOrderReturns $successfullyRegisteredReturn):void
Add successfully registered order returns
SuccessfullyRegisteredOrderReturns | $successfullyRegisteredReturn |
public addFailedRegisterOrderReturns(FailedRegisterOrderReturns $failedRegisterOrderReturn):void
Add failed registered order returns
FailedRegisterOrderReturns | $failedRegisterOrderReturn |
public get(string $key):void
string | $key |
public hasGetMutator(string $key):bool
Determine if a get mutator exists for an attribute.
string | $key |
public setAttributes($attributes):void
$attributes |
public setAttribute(string $key, $value):Models
Set a given attribute on the model.
string | $key | |
$value |
public hasSetMutator(string $key):bool
Determine if a set mutator exists for an attribute.
string | $key |
public changeValue(string $key, callable $callback):void
string | $key | |
callable | $callback |
public offsetExists($offset):bool
$offset |
public offsetGet($offset):void
$offset |
public offsetSet($offset, $value):void
$offset | ||
$value |
public offsetUnset($offset):void
$offset |
public toArray(bool $translate = false):array
bool | $translate | Flag indicating if values should be translated. |
public toJson(int $options):string
int | $options |
public jsonSerialize():void
public fill(array $attributes):Models
Fill the model with an array of attributes.
array | $attributes |
public isFillable(string $key):bool
Determine if the given attribute may be mass assigned.
string | $key |
public getFillable():array
Get the fillable attributes for the model.
public fillable(array $fillable):Models
Set the fillable attributes for the model.
array | $fillable |
public hasCast(string $key, $types = null):bool
Determine whether an attribute should be cast to a native type.
string | $key | |
$types |
public fromJson(string $value, bool $asObject = false):void
Decode the given JSON back into an array or object.
string | $value | |
bool | $asObject |
The model for RegisterReturnsResult
Plenty\Modules\Order\Shipping\Returns\Models
Type | Name | Description |
---|---|---|
array | orderReturnsList | |
array | failedRegisterOrderReturnsList |
public toArray()
Returns this model as an array.
The ReturnsServiceProvider model.
Plenty\Modules\Order\Shipping\Returns\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the returns service provider |
string | name | The name of the returns service provider |
int | pluginId | The optional ID of the plugin when the returns service provider is registered as a plugin |
createdAt | The time the returns service provider was created | |
updatedAt | The time the returns service provider was updated |
public toArray()
Returns this model as an array.
The model for SuccessfullyRegisteredOrderReturns
Plenty\Modules\Order\Shipping\Returns\Models
public setOrderId(int $orderId):void
Set orderId variable
int | $orderId |
public setFileName(string $fileName):void
Set fileName variable
string | $fileName |
public setExternalNumber(string $externalNumber):void
Set externalNumber variable
string | $externalNumber |
public setExternalData(array $externalData):void
Set externalData variable
array | $externalData |
public setAvailableUntil(string $availiableUntil):void
Set availableUntil variable
string | $availiableUntil |
public setLabelBase64(string $labelBase64):void
Set labelBase64 variable
string | $labelBase64 |
public setReturnsOrderId(int $returnsOrderId):void
Set returnsOrderId variable
int | $returnsOrderId |
public get(string $key):void
string | $key |
public hasGetMutator(string $key):bool
Determine if a get mutator exists for an attribute.
string | $key |
public setAttributes($attributes):void
$attributes |
public setAttribute(string $key, $value):Models
Set a given attribute on the model.
string | $key | |
$value |
public hasSetMutator(string $key):bool
Determine if a set mutator exists for an attribute.
string | $key |
public changeValue(string $key, callable $callback):void
string | $key | |
callable | $callback |
public offsetExists($offset):bool
$offset |
public offsetGet($offset):void
$offset |
public offsetSet($offset, $value):void
$offset | ||
$value |
public offsetUnset($offset):void
$offset |
public toArray(bool $translate = false):array
bool | $translate | Flag indicating if values should be translated. |
public toJson(int $options):string
int | $options |
public jsonSerialize():void
public fill(array $attributes):Models
Fill the model with an array of attributes.
array | $attributes |
public isFillable(string $key):bool
Determine if the given attribute may be mass assigned.
string | $key |
public getFillable():array
Get the fillable attributes for the model.
public fillable(array $fillable):Models
Set the fillable attributes for the model.
array | $fillable |
public hasCast(string $key, $types = null):bool
Determine whether an attribute should be cast to a native type.
string | $key | |
$types |
public fromJson(string $value, bool $asObject = false):void
Decode the given JSON back into an array or object.
string | $value | |
bool | $asObject |
The RegisterReturnsService class offers the possibility to register returns, get returns label and persist returns label.
Plenty\Modules\Order\Shipping\Returns\Services
public registerReturns(string $pluginName, array $orderIds):RegisterReturnsResult
Register returns for each order ID
string | $pluginName | |
array | $orderIds |
public persistLabel(string $labelBase64, OrderReturns $returns):Document
Save the return label in base64
string | $labelBase64 | |
OrderReturns | $returns |
public getLabel(OrderReturns $orderReturns):string
Get the return label
OrderReturns | $orderReturns |
The ReturnsServiceProviderService class offers the possibility to register a returns service provider class and method that can be called by plentymarkets returns controllers.
Plenty\Modules\Order\Shipping\Returns\Services
public registerReturnsProvider(string $returnsServiceProviderCode, string $returnsServiceProviderLabel, string $returnsServiceProviderClass, bool $useParentOrderId = true):bool
Register returns service provider
string | $returnsServiceProviderCode | |
string | $returnsServiceProviderLabel | |
string | $returnsServiceProviderClass | |
bool | $useParentOrderId |
public getReturnsServiceProviderEntryById(int $providerId):ReturnsServiceProviderEntry
Get returns service provider by id
int | $providerId |
public hasReturnsServiceProviderMethod(string $returnsServiceProviderCode, string $methodName):bool
Returns boolean whether the returns service provider has or has not the given method
string | $returnsServiceProviderCode | |
string | $methodName |
The returns provider entry contains all information needed to use module returns in plentymarkets returns .
Plenty\Modules\Order\Shipping\Returns\Services\Entries
public getReturnsServiceProviderLabel():string
Get the returns service provider label
public setReturnsServiceProviderLabel(string $returnsServiceProviderLabel):ReturnsServiceProviderEntry
Set the returns service provider label
string | $returnsServiceProviderLabel |
public getReturnsServiceProviderCode():string
Get the return service provider code
public setReturnsServiceProviderCode(string $returnsServiceProviderCode):ReturnsServiceProviderEntry
Set the returns service provider code
string | $returnsServiceProviderCode |
public getReturnsServiceProviderClass(string $methodName):string
Get the returns service provider class
string | $methodName |
public methodExists(string $methodName):bool
Check if method exists in returnsServiceProviderClass
string | $methodName |
public getProviderId():int
Get the provider ID
public getUseParentOrderId():bool
Get setting for using parent order ID
The shipping provider entry contains all information needed to use module shipping in plentymarkets shipping .
Plenty\Modules\Order\Shipping\ServiceProvider\Services\Entries
public getShippingServiceProviderClasses():array
Get the shipping service provider classes
public getShippingServiceProviderNames():void
Get the shipping service provider names
public setShippingServiceProviderNames(array $shippingServiceProviderNames):ShippingServiceProviderEntry
Set the shipping service provider names
array | $shippingServiceProviderNames |
public getShippingServiceProviderCode():string
Get the shipping service provider code
public setShippingServiceProviderCode(string $shippingServiceProviderCode):ShippingServiceProviderEntry
Set the shipping service provider entry
string | $shippingServiceProviderCode |
public getShippingServiceProviderClass(string $methodName):string
Get the shipping service provider class
string | $methodName |
public methodExists(string $methodName):bool
Check if method exists in shipping service provider classes
string | $methodName |
The ShippingServiceProviderPluginRepositoryContract is the interface for the shipping service provider plugin repository. This interface allows to list shipping service provider plugins.
Plenty\Modules\Order\Shipping\ServiceProvider\Contracts
public plugins():void
Return list of shipping service provider plugins
public filteredPluginList(string $filter):void
Return list of shipping service provider plugins using a filter
string | $filter | Filter that restricts the search result |
The ShippingServiceProviderRepositoryContract is the interface for the shipping service provider repository. This interface allows to list shipping service providers.
Plenty\Modules\Order\Shipping\ServiceProvider\Contracts
public all(array $columns = [], int $page = 1, int $itemsPerPage = 50, array $filters = [], array $with = []):void
Lists shipping service providers.
array | $columns | The columns to retrieve |
int | $page | The page of results to search for |
int | $itemsPerPage | The number of items to list per page |
array | $filters | Filters that restrict the search result |
array | $with | The releations to be loaded with the shipping service provider |
public find(int $shippingServiceProviderId):ShippingServiceProvider
Gets a shipping service provider. The ID of the shipping service provider must be specified.
int | $shippingServiceProviderId | The ID of the shipping service provider |
public findByName(string $shippingServiceProviderName):ShippingServiceProvider
Gets a shipping service provider. The name of the shipping service provider must be specified.
string | $shippingServiceProviderName | The name of the shipping service provider |
public saveShippingServiceProvider(string $pluginName, string $shippingServiceProviderName, string $icon = null):ShippingServiceProvider
Creates a shipping service provider or updates it if already existing
string | $pluginName | The plugin name the plugin is registered with |
string | $shippingServiceProviderName | The name of the shipping service provider |
string | $icon | The path of the icon |
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.
The FailedRegisterShipment model.
Plenty\Modules\Order\Shipping\ServiceProvider\Models
public addErrorMessage(string $errorMessage):void
string | $errorMessage |
public addException(Exception $exception):void
Exception | $exception |
public setOrderId(int $orderId):void
int | $orderId |
public get(string $key):void
string | $key |
public hasGetMutator(string $key):bool
Determine if a get mutator exists for an attribute.
string | $key |
public setAttributes($attributes):void
$attributes |
public setAttribute(string $key, $value):Models
Set a given attribute on the model.
string | $key | |
$value |
public hasSetMutator(string $key):bool
Determine if a set mutator exists for an attribute.
string | $key |
public changeValue(string $key, callable $callback):void
string | $key | |
callable | $callback |
public offsetExists($offset):bool
$offset |
public offsetGet($offset):void
$offset |
public offsetSet($offset, $value):void
$offset | ||
$value |
public offsetUnset($offset):void
$offset |
public toArray(bool $translate = false):array
bool | $translate | Flag indicating if values should be translated. |
public toJson(int $options):string
int | $options |
public jsonSerialize():void
public fill(array $attributes):Models
Fill the model with an array of attributes.
array | $attributes |
public isFillable(string $key):bool
Determine if the given attribute may be mass assigned.
string | $key |
public getFillable():array
Get the fillable attributes for the model.
public fillable(array $fillable):Models
Set the fillable attributes for the model.
array | $fillable |
public hasCast(string $key, $types = null):bool
Determine whether an attribute should be cast to a native type.
string | $key | |
$types |
public fromJson(string $value, bool $asObject = false):void
Decode the given JSON back into an array or object.
string | $value | |
bool | $asObject |
The RegisterShipmentResponse model.
Plenty\Modules\Order\Shipping\ServiceProvider\Models
public addSuccessfullyRegisteredShipment(SuccessfullyRegisteredShipment $successfullyRegisteredShipment):void
SuccessfullyRegisteredShipment | $successfullyRegisteredShipment | Object containing data for successfully registering a shipment |
public addFailedRegisterShipment(FailedRegisterShipment $failedRegisterShipment):void
FailedRegisterShipment | $failedRegisterShipment | Object containing data when shipment registration was not successful, e.g. incorrect or missing postcode |
public get(string $key):void
string | $key |
public hasGetMutator(string $key):bool
Determine if a get mutator exists for an attribute.
string | $key |
public setAttributes($attributes):void
$attributes |
public setAttribute(string $key, $value):Models
Set a given attribute on the model.
string | $key | |
$value |
public hasSetMutator(string $key):bool
Determine if a set mutator exists for an attribute.
string | $key |
public changeValue(string $key, callable $callback):void
string | $key | |
callable | $callback |
public offsetExists($offset):bool
$offset |
public offsetGet($offset):void
$offset |
public offsetSet($offset, $value):void
$offset | ||
$value |
public offsetUnset($offset):void
$offset |
public toArray(bool $translate = false):array
bool | $translate | Flag indicating if values should be translated. |
public toJson(int $options):string
int | $options |
public jsonSerialize():void
public fill(array $attributes):Models
Fill the model with an array of attributes.
array | $attributes |
public isFillable(string $key):bool
Determine if the given attribute may be mass assigned.
string | $key |
public getFillable():array
Get the fillable attributes for the model.
public fillable(array $fillable):Models
Set the fillable attributes for the model.
array | $fillable |
public hasCast(string $key, $types = null):bool
Determine whether an attribute should be cast to a native type.
string | $key | |
$types |
public fromJson(string $value, bool $asObject = false):void
Decode the given JSON back into an array or object.
string | $value | |
bool | $asObject |
The service provider model
Plenty\Modules\Order\Shipping\ServiceProvider\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the shipping service provider |
string | name | The name of the shipping service provider |
int | pluginId | The optional ID of the plugin when the shipping service provider is registered as a plugin |
string | icon | The optional path of the icon |
createdAt | The time the shipping service provider was created | |
updatedAt | The time the shipping service provider was updated |
public toArray()
Returns this model as an array.
The SuccessfullyRegisteredShipment model.
Plenty\Modules\Order\Shipping\ServiceProvider\Models
public setOrderId(int $orderId):void
Set the order ID.
int | $orderId | The ID of the order |
public setHasNewPackageNumber(bool $hasNewPackageNumber):void
Set the variable $hasNewPackageNumber.
bool | $hasNewPackageNumber | Flag that indicates whether the order has a new package number |
public addMessage(string $message):void
Add a message.
string | $message | The message |
public addPackage(OrderShippingPackage $package):void
Add a package.
OrderShippingPackage | $package | The order shipping package |
public get(string $key):void
string | $key |
public hasGetMutator(string $key):bool
Determine if a get mutator exists for an attribute.
string | $key |
public setAttributes($attributes):void
$attributes |
public setAttribute(string $key, $value):Models
Set a given attribute on the model.
string | $key | |
$value |
public hasSetMutator(string $key):bool
Determine if a set mutator exists for an attribute.
string | $key |
public changeValue(string $key, callable $callback):void
string | $key | |
callable | $callback |
public offsetExists($offset):bool
$offset |
public offsetGet($offset):void
$offset |
public offsetSet($offset, $value):void
$offset | ||
$value |
public offsetUnset($offset):void
$offset |
public toArray(bool $translate = false):array
bool | $translate | Flag indicating if values should be translated. |
public toJson(int $options):string
int | $options |
public jsonSerialize():void
public fill(array $attributes):Models
Fill the model with an array of attributes.
array | $attributes |
public isFillable(string $key):bool
Determine if the given attribute may be mass assigned.
string | $key |
public getFillable():array
Get the fillable attributes for the model.
public fillable(array $fillable):Models
Set the fillable attributes for the model.
array | $fillable |
public hasCast(string $key, $types = null):bool
Determine whether an attribute should be cast to a native type.
string | $key | |
$types |
public fromJson(string $value, bool $asObject = false):void
Decode the given JSON back into an array or object.
string | $value | |
bool | $asObject |
The ShippingServiceProviderService class offers the possibility to register a shipping provider class and method that can be called by plentymarkets shipping controllers.
Plenty\Modules\Order\Shipping\ServiceProvider\Services
public registerShippingProvider(string $shippingServiceProviderCode, $shippingServiceProviderNames, $shippingServiceProviderClasses):bool
Registers a new shipping provider
string | $shippingServiceProviderCode | |
$shippingServiceProviderNames | ||
$shippingServiceProviderClasses |
public hasShippingServiceProviderMethod(string $shippingServiceProviderCode, string $methodName):bool
Check if shipping service provider has specified method
string | $shippingServiceProviderCode | |
string | $methodName |
The OrderAddressRepositoryContract is the interface for the order address repository. This interface allows you to get, create, update and delete addresses of an order.
Plenty\Modules\Order\Address\Contracts
public findAddressByType(int $orderId, int $typeId):Address
Get an address of an order
int | $orderId | The ID of the order |
int | $typeId | The ID of the address type |
public findSchedulerAddressByType(int $schedulerId, int $typeId):Address
Get an address of a scheduler order
int | $schedulerId | The ID of the scheduler |
int | $typeId | The ID of the address type |
public createOrderAddress(array $data, int $orderId, int $typeId = \Plenty\Modules\Account\Address\Models\AddressRelationType::BILLING_ADDRESS):Address
Create an address for an order
array | $data | The address data |
int | $orderId | The ID of the order |
int | $typeId | [optional] The ID of the address type. The default ID is 1 for billing address. The types available are:
|
public updateOrderAddress(array $data, int $addressId, int $orderId, int $typeId):Address
Update an address of an order
array | $data | The address data |
int | $addressId | The ID of address |
int | $orderId | The ID of the order |
int | $typeId | The ID of the address type. The types available are:
|
public getAddress(int $addressId, array $with = []):Address
Get an address
int | $addressId | The ID of the address |
array | $with | The relations to load in the address instance. The relations available are "options", "contacts", "orders", "country". |
public findAddresses(int $orderId):Collection
List addresses of an an order
int | $orderId | The ID of the order |
public getAddressOfOrder(int $addressId, int $orderId, int $typeId):Address
Get an address of an order
int | $addressId | The ID of the address |
int | $orderId | The ID of the order |
int | $typeId | The ID of the address type. The types available are:
|
public getAddressOfScheduler(int $addressId, int $schedulerId, int $typeId):Address
Get an address of a scheduler
int | $addressId | The ID of the address |
int | $schedulerId | The ID of the scheduler |
int | $typeId | The ID of the address type. The types available are:
|
public addOrderAddress(int $addressId, int $orderId, int $typeId):void
Create an address relation from an order to an address
int | $addressId | The ID of the address |
int | $orderId | The ID of the order |
int | $typeId | The ID of the address type. The types available are:
|
public addSchedulerAddress(int $addressId, int $schedulerId, int $typeId):void
Create an address relation from a scheduler to an address
int | $addressId | The ID of the address |
int | $schedulerId | The ID of the scheduler |
int | $typeId | The ID of the address type. The types available are:
|
public deleteOrderAddress(int $addressId, int $orderId, int $typeId):bool
Delete an address relation from an order
int | $addressId | The ID of the address |
int | $orderId | The ID of the order |
int | $typeId | The ID of the address type. The types available are:
|
Book orders, order items and order item transactions.
Plenty\Modules\Order\Booking\Contracts
public bookOrder(int $orderId, string $deliveryNoteNumber = null):OrderBooking
Book an order
int | $orderId | |
string | $deliveryNoteNumber |
public bookOrderItem(int $orderItemId, string $deliveryNoteNumber = null):OrderBooking
Book an order item
int | $orderItemId | |
string | $deliveryNoteNumber |
public bookOrderItemTransactions(array $transactionIds, int $warehouseId = null, string $deliveryNoteNumber = null):OrderBooking
Book order item transactions
array | $transactionIds | |
int | $warehouseId | |
string | $deliveryNoteNumber |
The order booking model.
Plenty\Modules\Order\Booking\Models
Type | Name | Description |
---|---|---|
array | success | The successfully booked transactions |
array | failed | The transactions which failed to book |
public toArray()
Returns this model as an array.
This interface allows you to get and create contact wishes.
Plenty\Modules\Order\ContactWish\Contracts
public getContactWish(int $orderId):ContactWish
Get the contact wish
int | $orderId | The ID of the order |
public createContactWish(int $orderId, string $text):ContactWish
Create a contact wish
int | $orderId | The ID of the order |
string | $text | The text for the contact wish |
The contact wish model.
Plenty\Modules\Order\ContactWish\Models
Type | Name | Description |
---|---|---|
string | text | The text of the contact wish |
public toArray()
Returns this model as an array.
The OrderDateRepositoryContract contains the functionality to find available OrderDateTypes with their names in a specific language. Furthermore it is possible to create new OrderDateTypes, to update or delete existing date types and to create date type names for a language.
Plenty\Modules\Order\Date\Contracts
public findNamesByTypeId(int $typeId):void
List names of a date type
int | $typeId | The ID of the date type |
public findNameByTypeIdAndLang(int $typeId, string $lang):OrderDateTypeName
Get a name of a date type
int | $typeId | The ID of the date type |
string | $lang | The language ISO 639-1 code, e.g. "en" for English |
public findTypes(array $languages = []):void
List date types
array | $languages | The languages to load |
public findTypeById(int $typeId):OrderDateType
Get a date type
int | $typeId | The ID of the date type |
public create(array $data = []):OrderDate
Create an order date
array | $data | The order date data. The properties that are required to create an order can be found in the OrderDate model. |
public update(array $data, int $orderDateId):OrderDate
Update a date
array | $data | The order date data. The properties that are required to create an order can be found in the OrderDate model. |
int | $orderDateId | The ID of the order date |
public save(array $data = []):OrderDate
Create or update an order date
array | $data | The order date data. The properties that are required to create an order can be found in the OrderDate model. |
public delete(int $orderDateId):bool
Delete a date
int | $orderDateId | The ID of the order date |
public deleteByOrderIdAndType(int $orderId, int $typeId):void
Delete an order date from an order by the type of the order date
int | $orderId | The ID of the order |
int | $typeId | The ID of the date type. |
public findByOrderIdAndTypeId(int $orderId, int $typeId):OrderDate
Get an order date from an order by the type of the order date
int | $orderId | The ID of the order |
int | $typeId | The ID of the date type |
public findByOrderId(int $orderId):void
List order dates of an order
int | $orderId | The ID of the order |
The OrderItemDateRepositoryContract contains the functionality to get, create, update and delete OrderItemDate instances.
Plenty\Modules\Order\Date\Contracts
public find(int $id):OrderItemDate
Get an order item date
int | $id | The ID of the order item date. |
public create(array $data = []):OrderItemDate
Create an order item date
array | $data | The order item date data. The properties that are required to create an order item can be found in the OrderItemDate model. |
public update(array $data, int $id):OrderItemDate
Update an order date
array | $data | The order item date data. The properties that are required to create an order item can be found in the OrderItemDate model. |
int | $id | The ID of the order item date |
public save(array $data = []):OrderItemDate
Create or update an order item date
array | $data | The order item date data. The properties that are required to create or update an order can be found in the OrderItemDate model. |
public delete(int $id):bool
Delete a date
int | $id | The ID of the order item date |
public findByOrderItemIdAndTypeId(int $orderItemId, int $typeId):OrderItemDate
Get an order item date by an order item and an order date type.
int | $orderItemId | The ID of the order item |
int | $typeId | The ID of the date type |
public createByOrderItemIdAndTypeId(array $data, int $orderItemId, int $typeId):OrderItemDate
Create an order item date by an order item and an order date type.
array | $data | The order item date data. The properties that are required to create an order can be found in the OrderItemDate model. |
int | $orderItemId | The ID of the order item |
int | $typeId | The ID of the date type |
public updateByOrderItemIdAndTypeId(array $data, int $orderItemId, int $typeId):OrderItemDate
Update an order item date by an order item and an order date type.
array | $data | The order item date data. The properties that are required to update an order can be found in the OrderItemDate model. |
int | $orderItemId | The ID of the order item |
int | $typeId | The ID of the date type |
public deleteByOrderItemIdAndTypeId(int $orderItemId, int $typeId):bool
Delete an order item date by an order item and an order date type.
int | $orderItemId | The ID of the order item |
int | $typeId | The ID of the date type |
public findByOrderItemId(int $orderItemId):void
List order item dates of an order item.
int | $orderItemId | The ID of the order |
The OrderDate model.
Plenty\Modules\Order\Date\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order date |
int | orderId | The ID of the order that the date belongs to |
int | typeId | The ID of the date type. The following types are available:
|
Carbon | date | The date plus hours, minutes and seconds. The date format must comply with the W3C standard. |
createdAt | The date when the date was created | |
updatedAt | The date when the date was last updated | |
OrderDateType | type | The type of date |
public toArray()
Returns this model as an array.
The OrderDateType model.
Plenty\Modules\Order\Date\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order date type. The following date types are available:
|
bool | isErasable | Flag that indicates if this type can be deleted or not. |
int | position | The position for sorting |
names | The names for this OrderDateType | |
orderDates | The actual dates that belong to the order date type |
public toArray()
Returns this model as an array.
The OrderDateTypeName model. Order date types can have several names. One name per language. Each name has a unique ID.
Plenty\Modules\Order\Date\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order date type name |
int | typeId | The ID of the date type that this name belongs to. The following date types are available:
|
string | lang | The ISO 639-1 language code for the name, e.g. "en" for English |
string | name | The name of the order date type |
OrderDateType | type | The date type that this name belongs to |
public toArray()
Returns this model as an array.
The OrderItemDate model.
Plenty\Modules\Order\Date\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order date |
int | orderItemId | The ID of the order item that the date belongs to |
int | typeId | The ID of the date type. The following types are available:
|
Carbon | date | The date plus hours, minutes and seconds. The date format must comply with the W3C standard. |
createdAt | The date when the date was created | |
updatedAt | The date when the date was last updated | |
OrderDateType | type | The type of the date. The following date types are available:
|
OrderItem | orderItem | The order item the date belongs to. |
public toArray()
Returns this model as an array.
The DeliveryOrderRepositoryContract is the interface for the delivery order repository. This interface allows you to create, update or delete delivery orders. A delivery order will be created according to a parent order and can either be created manually or automatically.
Plenty\Modules\Order\DeliveryOrder\Contracts
public create(array $data):Order
Create a delivery order
array | $data |
public update(int $orderId, array $data):Order
Update a delivery order
int | $orderId | |
array | $data |
public delete(int $orderId):void
Delete a delivery order
int | $orderId |
public deleteOrderItem(int $orderItemId):bool
Delete an order item from a delivery
int | $orderItemId |
public createFromParent(int $orderId, array $data):Order
Create a delivery order from a parent order
int | $orderId | The ID of the parent order, for which the delivery should be created. |
array | $data | The order item Ids with quantities to be added to the delivery order. |
public createAllAutomaticallyFromParent(int $orderId):Collection
Create delivery orders automatically for all order items
int | $orderId | The ID of the parent order, for which the delivery should be created. |
public updateCurrency(int $orderId, array $data):Order
Update currency
int | $orderId | |
array | $data |
Get document accounting summaries.
Plenty\Modules\Order\Documents\Contracts
public list(int $page = 1, int $itemsPerPage = 10):PaginatedResult
Lists document accounting summaries. A document accounting summary is saved along with each reversal document (for invoice and credit note). It contains accounting information about the order for this point in time. The summary is saved because an order can be updated after a reversal_document is generated. The information about the order before the update is needed for accounting.
int | $page | The page to get. The default page that will be returned is page 1. |
int | $itemsPerPage | The number of summaries to be displayed per page. The default number of orders per page is 10. |
public setFilters(array $filters = []):void
Sets the filter array.
array | $filters |
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.
Provides methods to store, get and delete order document files. The files are stored on an AWS S3 storage by default. The implementation for this contract can be replaced by your own implementation.
Plenty\Modules\Order\Documents\Contracts
public fileExists(string $path):bool
Check if the file path exists on the storage.
string | $path | The file path |
public put(string $path, string $file):void
Store a file on the storage.
string | $path | The file path |
string | $file | The file to store. Can be either a file path on the file system or an object. |
public get(string $path):StorageObject
Get a file from the storage
string | $path | The file path |
public delete(string $path):bool
Delete a file from the storage.
string | $path | The file path |
An event class fired after an order is canceled.
Plenty\Modules\Order\Events\Canceled
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
An event class fired before an order will be canceled.
Plenty\Modules\Order\Events\Canceled
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
An event class fired after the status of an order has changed.
Plenty\Modules\Order\Events\Changed
public __construct(Order $order, float $oldStatus):void
OrderStatusChanged constructor.
Order | $order | |
float | $oldStatus |
public getOldStatus():float
Get the old order status.
public getOrder():Order
Get the order instance.
An event class fired after a new credit note is created.
Plenty\Modules\Order\Events\Created
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
An event class fired after a new delivery order is created.
Plenty\Modules\Order\Events\Created
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
An event class fired after a new multi credit note is created.
Plenty\Modules\Order\Events\Created
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
An event class fired after a new multi order is created.
Plenty\Modules\Order\Events\Created
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
An event class fired after a new repair is created.
Plenty\Modules\Order\Events\Created
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
An event class fired after a new returns is created.
Plenty\Modules\Order\Events\Created
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
An event class fired after a new sales order is created.
Plenty\Modules\Order\Events\Created
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
An event class fired after a new warranty is created.
Plenty\Modules\Order\Events\Created
public __construct(Order $order):void
OrderEvent constructor.
Order | $order |
public getOrder():Order
Get the order instance.
Contract for injections on create.
Plenty\Modules\Order\Injection\Contracts
public handle(array $data):array
Manipulate the order data on create.
array | $data |
Contract for injections on update.
Plenty\Modules\Order\Injection\Contracts
public handle(Order $order, array $data):array
Manipulate the order data on update.
Order | $order | |
array | $data |
Service to register injections for order creation.
Plenty\Modules\Order\Injection\Contracts
public registerOnCreateBeforeValidation(array $orderTypeIds, string $class):void
Register an injection on create before the validation.
array | $orderTypeIds | |
string | $class |
public registerOnCreateBeforeSumsCalculation(array $orderTypeIds, string $class):void
Register an injection on create before the sums calculation.
array | $orderTypeIds | |
string | $class |
public registerOnCreateAfterSumsCalculation(array $orderTypeIds, string $class):void
Register an injection on create after the sums calculation.
array | $orderTypeIds | |
string | $class |
public registerOnUpdateBeforeValidation(array $orderTypeIds, string $class):void
Register an injection on update before the validation.
array | $orderTypeIds | |
string | $class |
public registerOnUpdateBeforeSumsCalculation(array $orderTypeIds, string $class):void
Register an injection on update before the sums calculation.
array | $orderTypeIds | |
string | $class |
public registerOnUpdateAfterSumsCalculation(array $orderTypeIds, string $class):void
Register an injection on update after the sums calculation.
array | $orderTypeIds | |
string | $class |
public inject(string $saveType, string $injectionPoint, array $data, Order $order = null):array
Inject the data.
string | $saveType | |
string | $injectionPoint | |
array | $data | |
Order | $order |
The legacy order model
Plenty\Modules\Order\Models\Legacy
Type | Name | Description |
---|---|---|
int | id | The Id of an order |
string | orderType | The type of an order type |
int | contactId | The ID of the contact |
float | referrerId | The referrer |
float | status | The status |
int | userId | The owner of an order |
string | entryDate | The date that the order was entered |
int | webstoreId | The ID of the webstore |
int | warehouseId | The ID of the warehouse |
string | sellerAccount | The seller account |
Address | deliveryAddress | |
Address | billingAddress | |
Collection | addresses | |
Collection | addressRelations |
public toArray()
Returns this model as an array.
The event is triggered after the order is placed within the manual order creation.
Plenty\Modules\Order\Payment\Events
public setType(string $type):ManualOrderExecutePayment
string | $type |
public getType():string
Gets the content type.
public setValue(string $value):ManualOrderExecutePayment
Set the value of the content type.
string | $value | The value of the content type |
public getValue():string
Gets the value of the content type.
public setOrderId(int $orderId):ManualOrderExecutePayment
Set the order id.
int | $orderId |
public getOrderId():int
Gets the order id.
public getAdditionalData():array
public setAdditionalData(array $additionalData):ManualOrderExecutePayment
array | $additionalData |
The event is triggered before the order is placed within the manual order creation.
Plenty\Modules\Order\Payment\Events
public setType(string $type):ManualOrderPreparePayment
string | $type |
public getType():string
Gets the content type.
public setValue(string $value):ManualOrderPreparePayment
Set the value of the content type.
string | $value | The value of the content type |
public getValue():string
Gets the value of the content type.
public setOrderData(array $orderData):ManualOrderPreparePayment
Set the order data.
array | $orderData |
public getOrderData():array
Gets the order data.
The OrderItemPropertyRepositoryContract contains the functionality to find, create, update and delete OrderItemProperty instances.
Plenty\Modules\Order\Property\Contracts
public find(int $id):OrderItemProperty
Find an order item property by its ID.
int | $id | The ID of the order item property. |
public create(array $data = []):OrderItemProperty
Create an order item property
array | $data | The order item property data. The properties that are required to create an order item can be found in the OrderItemProperty model. |
public update(array $data, int $id):OrderItemProperty
Update an order item property
array | $data | The order item property data. The properties that are required to create an order item can be found in the OrderItemProperty model. |
int | $id | The ID of the order item property |
public save(array $data = []):OrderItemProperty
Create or update an order item property
array | $data | The order item property data. The properties that are required to create an order can be found in the OrderItemProperty model. |
public delete(int $id):bool
Delete an order item property
int | $id | The ID of the order item property |
public findByOrderItemIdAndTypeId(int $orderItemId, int $typeId):OrderItemProperty
Get an order item property by an order item ID and an order property type ID.
int | $orderItemId | The ID of the order item |
int | $typeId | The ID of the property type |
public createByOrderItemIdAndTypeId(array $data, int $orderItemId, int $typeId):OrderItemProperty
Create an order item property by an order item ID and an order property type ID.
array | $data | The order item property data. The properties that are required to create an order can be found in the OrderItemProperty model. |
int | $orderItemId | The ID of the order item |
int | $typeId | The ID of the property type |
public updateByOrderItemIdAndTypeId(array $data, int $orderItemId, int $typeId):OrderItemProperty
Update an order item property by an order item ID and an order property type ID.
array | $data | The order item property data. The properties that are required to create an order can be found in the OrderItemProperty model. |
int | $orderItemId | The ID of the order item |
int | $typeId | The ID of the property type |
public deleteByOrderItemIdAndTypeId(int $orderItemId, int $typeId):bool
Delete an order item property by an order item ID and an order property type ID.
int | $orderItemId | The ID of the order item |
int | $typeId | The ID of the property type |
public findByOrderItemId(int $orderItemId):void
List order item properties of an order item.
int | $orderItemId | The ID of the order |
The OrderPropertyRepositoryContract contains the functionality to get, list, create, update and delete OrderPropertyTypes and OrderProperties as well as OrderProperties. Order properties contain information that are additional to an order. Each property has a type and each type can have several names, but only one name per language. An order can only have one property of each property type.
Plenty\Modules\Order\Property\Contracts
public create(array $data = []):OrderProperty
Create an order property
array | $data | The order property data. The properties that are required to create an order can be found in the OrderProperty model. |
public update(array $data, int $orderPropertyId = null):OrderProperty
Update an order property
array | $data | The order property data. The properties that are required to create an order can be found in the OrderProperty model. |
int | $orderPropertyId | The ID of the order property. |
public delete($data = []):bool
Deletes an order property. The ID of the order property must be specified.
$data | Either the ID of the property or an array holding the composite key composed of the order ID and the type ID. |
public findByOrderId(int $orderId, int $typeId = null):void
List order properties of an order
int | $orderId | The ID of the order. |
int | $typeId | The ID of the type. |
public getType(int $typeId, array $languages = []):OrderPropertyType
Get a property type
int | $typeId | The ID of the property type |
array | $languages | The languages to load |
public getTypes(array $languages = []):void
List order property types
array | $languages | The languages to load |
public createType(array $data = []):OrderPropertyType
Create an order property type
array | $data | The order property type data. The properties that are required to create a type can be found in the OrderPropertyType model. |
public updateType(array $data, int $id):OrderPropertyType
Update an order property type
array | $data | The order property type data. |
int | $id | The ID of the order property type. |
public deleteType(int $id):bool
Delete an order property type
int | $id | The ID of the order property type |
The order item property model.
Plenty\Modules\Order\Property\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order item property. |
int | orderItemId | The ID of the order item that the property belongs to. |
int | typeId | The ID of the property type.
|
string | value | The value of the property. The value depends on type. |
createdAt | The date that the property was created. | |
updatedAt | The date that the property was last updated. | |
OrderItem | orderItem | The order item that the property belongs to. |
OrderPropertyType | type | The type of the property. |
public toArray()
Returns this model as an array.
The order properties model. Each order property has a type.
Plenty\Modules\Order\Property\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order property |
int | orderId | The ID of the order that the property belongs to |
int | typeId | The ID of the property type. The following types are available:
|
string | value | The value of the property. The value depends on the type. |
createdAt | The date that the property was created. | |
updatedAt | The date that the property was updated last. | |
Order | order | The order that the property belongs to. |
OrderPropertyType | type | The property type instance |
public toArray()
Returns this model as an array.
The OrderPropertyType model. Each order property must have a property type. An order can have one property of each property type. The default property types provided by plentymarkets are listed here.
Plenty\Modules\Order\Property\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the property type |
bool | isErasable | Flag that states if this type can be deleted or not. |
int | position | The position for sorting |
string | cast | The data type of the values of this property type. Valid types are:
|
array | names | The names of the order property types. |
public toArray()
Returns this model as an array.
The order property type name model. Each order property type can have one name per language.
Plenty\Modules\Order\Property\Models
Type | Name | Description |
---|---|---|
int | id | The ID of type name |
int | typeId | The ID of the property type |
string | name | The name of property type |
string | lang | The language of the type name |
OrderPropertyType | type | The property type instance. |
public toArray()
Returns this model as an array.
Create and update redistributions.
Plenty\Modules\Order\Redistribution\Contracts
public create(array $data):Order
Create a redistribution
array | $data |
public update(int $orderId, array $data):Order
Update a redistribution
int | $orderId | |
array | $data |
public delete(int $orderId):void
Delete a redistribution
int | $orderId |
public deleteOrderItem(int $orderItemId):bool
Delete an order item from a redistribution
int | $orderItemId |
public updateCurrency(int $orderId, array $data):Order
Update currency
int | $orderId | |
array | $data |
Get, create, update and delete order relation references.
Plenty\Modules\Order\RelationReference\Contracts
public find(int $id):OrderRelationReference
Get a relation reference by ID
int | $id | The ID of the relation reference |
public findByComposite(int $orderId, string $referenceType, string $relation):OrderRelationReference
Get a relation reference by composite key
int | $orderId | The ID of the order |
string | $referenceType | The reference type. Valid types are:
|
string | $relation | The relation. Valid relations are:
|
public findByOrderId(int $orderId):void
List relation references by order ID
int | $orderId | The ID of the order |
public findByAnyValues(array $values, int $page = 1, int $itemsPerPage = 50):PaginatedResult
List relation references by any values
array | $values | The array with the given filter values. E.g. ['referenceType' => 'contact']. Valid filters are:
|
int | $page | The page to get |
int | $itemsPerPage | The items per page |
public create(array $data):OrderRelationReference
Create a relation reference
array | $data | The request data |
public update(int $id, array $data):OrderRelationReference
Update a relation reference by ID
int | $id | The ID of the relation reference |
array | $data | The request data |
public updateByComposite(int $orderId, string $referenceType, string $relation, array $data):OrderRelationReference
Update a relation reference by composite key
int | $orderId | The ID of the order |
string | $referenceType | The reference type. Valid types are:
|
string | $relation | The relation. Valid relations are:
|
array | $data | The request data |
public delete(int $id):bool
Delete a relation reference by ID
int | $id | The ID of the relation reference |
public deleteByComposite(int $orderId, string $referenceType, string $relation):bool
Delete a relation reference by composite key
int | $orderId | The ID of the order |
string | $referenceType | The reference type. Valid types are:
|
string | $relation | The relation. Valid relations are:
|
The order relation reference model specifies how references and orders are related to one another.
Plenty\Modules\Order\RelationReference\Models
Type | Name | Description |
---|---|---|
int | id | The relation reference id. |
int | orderId | The order id. |
string | referenceType | The reference type.
The reference types available are the following:
|
int | referenceId | The reference id. |
string | relation | The relation between a reference and an order.
The relation types available are the following:
|
Order | order | The order that the reference belongs to. |
Contact | contactReceiver | The Contact referenced with relation "receiver". |
Contact | contactSender | The Contact referenced with relation "sender". |
Account | accountReceiver | The Account referenced with relation "receiver". |
Account | accountSender | The Account referenced with relation "sender". |
public toArray()
Returns this model as an array.
Create and update reorders.
Plenty\Modules\Order\Reorder\Contracts
public create(array $data):Order
Create a reorder
array | $data |
public update(int $orderId, array $data):Order
Update a reorder
int | $orderId | |
array | $data |
public delete(int $orderId):void
Delete a reorder
int | $orderId |
public deleteOrderItem(int $orderItemId):bool
Delete an order item from a reorder
int | $orderItemId |
public updateCurrency(int $orderId, array $data):Order
Update currency
int | $orderId | |
array | $data |
public getDeliveryDate(int $orderId):Carbon
Get the date when the reorder will probably be delivered.
int | $orderId |
public updateDeliveryDates(int $orderId):Order
Calculate and save the delivery dates
int | $orderId |
Use this interface to retrieve order return reasons.
Plenty\Modules\Order\ReturnReason\Contracts
public all():array
Get all return reasons.
public get(int $id):ReturnReason
Get a return reason.
int | $id | The ID of the return reason. |
The return reason model.
Plenty\Modules\Order\ReturnReason\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the return reason. |
string | reason | The specified reason. |
public toArray()
Returns this model as an array.
aggregation for order status
Plenty\Modules\Order\Search\Aggregations
public getName():string
public getField():string
public getAggregation():array
public setInclude(string $string):void
string | $string |
public toArray():array
public process(array $data):array
array | $data |
public addAggregation(AggregationInterface $aggregation):void
AggregationInterface | $aggregation |
public addSource(SourceInterface $source):AggregationInterface
SourceInterface | $source |
public setPage(int $page, int $rowsPerPage):AggregationInterface
int | $page | |
int | $rowsPerPage |
public getSources():void
aggregation processor for order status
Plenty\Modules\Order\Search\Aggregations
public process(array $data):array
array | $data |
public getName():void
public getDependencies():array
public addMutator(MutatorInterface $mutator):Processor
MutatorInterface | $mutator |
public addCondition(ConditionInterface $conditions):Processor
ConditionInterface | $conditions |
This interface is deprecated and will be removed in the next version.
Plenty\Modules\Order\Search\Contracts
public hasNext():bool
public setNumberOfDocumentsPerShard(int $size):void
int | $size |
public setIndex(IndexInterface $index):ElasticSearchSearchRepositoryContract
IndexInterface | $index |
public addSearch($search):ElasticSearchSearchRepositoryContract
$search |
public execute():array
The OrderStatusRepositoryContract is the interface for the order status repository. This interface allows you to get a single order status or to list order statuses as well as to create, update or delete.
Plenty\Modules\Order\Status\Contracts
public get(float $statusId):OrderStatus
Get an order status.
float | $statusId | The number of the order status. |
public search(int $page = 1, int $itemsPerPage = 50):PaginatedResult
Search order status.
int | $page | The page to get. The default page that will be returned is page 1. |
int | $itemsPerPage | The number of order statuses to be displayed per page. The default number per page is 50. |
public all():Collection
List order statuses.
public create(array $data):OrderStatus
Create an order status.
array | $data | The order status data to be created. |
public update(float $statusId, array $data):OrderStatus
Update an order status.
float | $statusId | The number of the order status to be updated. |
array | $data | The order status data, which is updated. |
public delete(float $statusId):void
Delete an order status.
float | $statusId | The number of the order status, to be deleted. |
public setFilters(array $filters = []):void
Sets the filter array.
array | $filters |
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.
The order status model
Plenty\Modules\Order\Status\Models
Type | Name | Description |
---|---|---|
float | statusId | The ID of the status. |
bool | isErasable | Flag that indicates whether the status is erasable or not. |
createdAt | The date, when the status was created. | |
updatedAt | The date, when the status was updated. | |
bool | isFrontendVisible | Indicates visibility in frontend. |
bool | isReorderVisible | Indicates visibility in reorder. |
bool | isRedistributionVisible | Indicates visibility in redistribution. |
string | color | The color of the status. |
Collection | names | The names of the order status. |
public toArray()
Returns this model as an array.
This interface allows you to get the status history of an order and to list the status histories of all orders.
Plenty\Modules\Order\StatusHistory\Contracts
public getStatusHistoryByOrderId(int $orderId, array $columns = []):Collection
Get the status history of an order
int | $orderId | The ID of the order |
array | $columns | The columns to get |
public getStatusHistory(array $columns = [], int $page = 1, int $itemsPerPage = 50):PaginatedResult
List status histories
array | $columns | The columns to get |
int | $page | The page to get |
int | $itemsPerPage | The number of entries from status histories listed per page |
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(array $filters = []):void
Sets the filter array.
array | $filters |
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.
The status history entry model
Plenty\Modules\Order\StatusHistory\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the status history entry |
int | orderId | The ID of the order |
float | statusId | The ID of the status |
createdAt | The date when the entry was created | |
int | userId | The ID of the user |
string | procedureText | The information text of the procedure that created the entry |
public toArray()
Returns this model as an array.
The SubscriptionOrderRepositoryContract allows you to find subscriptions, that due either today or on any given date, so that corresponding orders are created for them.
Plenty\Modules\Order\Subscription\Contracts
public runToday():bool
Finds all subscriptions that are due today and creates corresponding orders for them.
public runAnyDate(string $runDate):bool
Finds all subscriptions that are due on the given date and creates corresponding orders for them.
string | $runDate | The date that the subscriptions are due on. Given in the following format: Y-m-d |
public manualRun(int $orderId, bool $skipNextRun = false):Order
Create an order for today for a given subscription.
int | $orderId | The ID of the subscription. |
bool | $skipNextRun | If true, the next run of this subscription will be skipped. |
The TaricVatAssignmentRepositoryContract contains the functionality to get, list, create, update, and delete the taricVatAssignment. Taric identifiers contain information that are necessary to determine the exact vat rate. Taric codes are linked in a variation. A taric vat assignment can only have one entry of each taric code / country ID combination.
Plenty\Modules\Order\TaricVatAssignment\Contracts
public create(array $data = []):TaricVatAssignment
Create a taric vat assignment.
array | $data | The taric vat assignment data. |
public update(array $data):TaricVatAssignment
Update a taric vat assignment
array | $data | The taric vat assignment data. |
public delete(array $data = []):bool
Deletes a taric vat assignment.
array | $data | Either the ID of the taric vat assignment or an array holding the composite key composed of the taric code and the country ID. |
public search(int $page = 1, int $itemsPerPage = \Plenty\Modules\Order\TaricVatAssignment\Models\TaricVatAssignment::MAX_ITEMS_PER_PAGE, array $with = []):PaginatedResult
Search taric vat assignments.
int | $page | The page to get. The default page that will be returned is page 1. |
int | $itemsPerPage | The number of order statuses to be displayed per page. The default number per page is 50. |
array | $with |
public findByTaricCodeAndCountryId(string $taricCode, int $countryNumber):TaricVatAssignment
List taric vat assignment of a taric code
string | $taricCode | The number of the taric code. |
int | $countryNumber | The ID of the country. |
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(array $filters = []):void
Sets the filter array.
array | $filters |
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.
The taric vat assignment model.
Plenty\Modules\Order\TaricVatAssignment\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the taric vat assignment |
int | taricCode | The taric code |
int | countryId | The ID of the country that the taric code configuration belongs to |
string | vatField | The ID of the VAT rate of the taric code / country id combination. |
createdAt | The date that the taric vat assignment was created. | |
updatedAt | The date that the taric vat assignment was updated last. | |
TaricVatAssignmentUsed | taricVatAssignmentUsed | Is the Taric code is used by a variation |
public toArray()
Returns this model as an array.
The taric code use model.
Plenty\Modules\Order\TaricVatAssignment\Models
Type | Name | Description |
---|---|---|
string | taricCode | The taric code |
bool | isUsed | Flag indicating whether a taric code is used by a variation |
public toArray()
Returns this model as an array.
List and create order item transactions.
Plenty\Modules\Order\Transaction\Contracts
public list(int $orderItemId, array $columns = [], array $with = []):Collection
List transactions
int | $orderItemId | |
array | $columns | |
array | $with |
public create(array $data):OrderItemTransaction
Create a transaction
array | $data |
public update(int $transactionId, array $data):OrderItemTransaction
Update a transaction
int | $transactionId | |
array | $data |
public delete(int $transactionId):bool
Delete a transaction
int | $transactionId |
public search(int $page = 1, int $itemsPerPage = 50, array $columns = [], array $with = [], string $sortBy = "orderItemId", string $sortOrder = "asc"):PaginatedResult
Search transactions
int | $page | |
int | $itemsPerPage | |
array | $columns | |
array | $with | |
string | $sortBy | |
string | $sortOrder |
public createForOrder(int $orderId, array $data):Collection
Create transactions for order
int | $orderId | |
array | $data |
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(array $filters = []):void
Sets the filter array.
array | $filters |
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.
The order item transaction model.
Plenty\Modules\Order\Transaction\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the transaction |
int | orderItemId | The ID of the order item |
float | quantity | The quantity |
int | userId | The ID of the user |
string | identification | External identification. Can be an arbitrary string. |
string | direction | The direction. Possible values are 'in' and 'out'. |
string | status | The status. Possible values are 'regular' and 'cancelled'. |
int | receiptId | The receipt ID |
int | warehouseLocationId | The ID of the warehouse location |
string | batch | The batch |
string | bestBeforeDate | The best before date |
int | batchBestBeforeDateId | Deprecated. Replaced by $batch and $bestBeforeDate. |
createdAt | The date the transaction was created | |
updatedAt | The date the transaction was last updated | |
OrderItem | orderItem | The order item the transaction belongs to |
public toArray()
Returns this model as an array.