Plentymarkets interface documentation

Code

Contracts

CouponCampaignCodeRepositoryContract

This interface allows you to get and create coupon codes.

Namespace

Plenty\Modules\Order\Coupon\Campaign\Code\Contracts

Methods
public getByCode($code, $with = []):Plenty\Modules\Order\Coupon\Campaign\Code\Models\CouponCampaignCode
Return type: CouponCampaignCode

Gets a coupon code. The code string must be specified.

Parameters

Name

Type

Description

$code

string

$with

array

public deleteCode($code, $withoutUsed = false):bool

Delete a coupon code.

Parameters

Name

Type

Description

$code

string

$withoutUsed

bool

public create($data):Plenty\Modules\Order\Coupon\Campaign\Code\Models\CouponCampaignCode
Return type: CouponCampaignCode

Creates a coupon code.

Parameters

Name

Type

Description

$data

array

public setDisabledByCode($code, $disabled):int

Disable or enable coupon

Parameters

Name

Type

Description

$code

string

$disabled

int

CouponCodeRepositoryContract

The CouponCodeRepositoryContract is the interface for the coupon code repository. This interface allows you to redeem coupons.

Namespace

Plenty\Modules\Order\Coupon\Code\Contracts

Methods
public redeem($orderId, $coupon):bool

Redeem coupon codes

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$coupon

string

The coupon code to be redeemed

Models

CouponCampaignCode

The CouponCampaignCode model contains information about coupon codes. Each code belongs to one campaign only.

Namespace

Plenty\Modules\Order\Coupon\Campaign\Code\Models

Properties
Name Type Description

code

string

The coupon code

campaignId

int

The ID of the campaign that the code belongs to

disable

int

Flag that indicates if a code is active or deactivated. <ul><li>True = the code is deactivated</li> <li>False = the code is active</li></ul>

consumed

int

Flag that indicates if a code was redeemed or not. <ul><li>True = the code was redeemed</li> <li>False = the code is not redeemed</li></ul>

usedCount

int

How many times a code has been redeemed

usedAmount

float

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.

generatedAt

Carbon

The date and time that the code was generated

lastUsedAt

Carbon

The date and time that the code was redeemed last. This date will be set if the coupon amount has not been fully used.

consumedAt

Carbon

The date and time that the coupon amount of this code was fully consumed

expiresAt

Carbon

The date and time that the code will expire or has expired

value

float

The value of the coupon if it differs from the campaign value. The value is null if the campaign value is used.

campaign

CouponCampaign

The coupon campaign and all information about the campaign that this code belongs to

Methods
public toArray()

Returns this model as an array.

Order

Models

GiftCardCode

Model that holds gift card codes.

Namespace

Plenty\Modules\Order\Coupon\Campaign\Code\Order\Models

Properties
Name Type Description

id

int

The ID of the gift card code

orderItemId

int

The order item ID

campaignId

int

The campaign ID

code

string

The coupon code

sender

string

The name of the sender

receiver

string

The name of the receiver

message

string

The message

Methods
public toArray()

Returns this model as an array.

CouponCodeOrder

The CouponCodeOrder model.

Namespace

Plenty\Modules\Order\Coupon\Code\Order\Models

Properties
Name Type Description

corderItemId

int

The ID of the order item that the coupon was redeemed for

campaignId

int

The ID of the campaign that the coupon belongs to

code

string

The coupon code

type

string

The display type of the redeemed coupon The following display types are available:<ul> <li>disposable</li> <li>fixed_vat</li> <li>fixed</li> <li>percental</li> <li>undefined</li> </ul>

amount

float

The redeemed amount of the coupon

vatRate

string

The redeemed vat rate of the coupon

Methods
public toArray()

Returns this model as an array.

Order

The model of the order.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

id

int

The ID of the order

typeId

int

The ID of the order type It is possible to define individual order types. However, the following types are available by default:

  • 1 = Sales order

  • 2 = Delivery

  • 3 = Returns

  • 4 = Credit note

  • 5 = Warranty

  • 6 = Repair

  • 7 = Offer

  • 8 = Advance order

  • 9 = Multi-order

  • 10 = Multi credit note

  • 11 = Multi delivery

  • 12 = Reorder

  • 13 = Partial delivery

  • 14 = Subscription

  • 15 = Redistribution

methodOfPaymentId

int

The ID of the order’s payment method (read only)

shippingProfileId

int

The ID of the order’s shipping profile (read only)

paymentStatus

string

The payment status of the order (read only)

statusId

float

The ID of the order status

statusName

string

The name for the status ID (read only)

ownerId

int

The user ID of the order’s owner

referrerId

float

The referrer ID of the order

createdAt

The date that the order was created

updatedAt

The date that the order was updated last

plentyId

int

The plenty ID of the client that the order belongs to

locationId

int

The ID of the location that the order belongs to

roundTotalsOnly

bool

True means only the order’s total amounts are rounded, false the order item price is rounded too. (read-only)

numberOfDecimals

int

The number of decimals this order was rounded with. (read-only)

lockStatus

string

The lock status of the order. The following statuses are available:

  • unlocked

  • permanentlyLocked

  • reversibleLocked

isLocked

bool

True, if the order has the lock status "unlocked". False otherwise.

hasTaxRelevantDocuments

bool

billingAddress

Address

The invoice address of the order

deliveryAddress

Address

The delivery address of the order

owner

User

The owner of the order

hasDeliveryOrders

bool

Has the order delivery orders?

legacyOrderType

string

The legacy order type as string

client

Webstore

The client data

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.

sortedOrderItems

The order items that are associated with the order sorted by relations.

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.

location

AccountingLocation

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.

shippingPallets

The shipping pallets that are 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:

  • 1 = Delete date

  • 2 = Entry date

  • 3 = Payment date

  • 4 = Last update

  • 5 = Completed date

  • 6 = Return date

  • 7 = Payment due date

  • 8 = Estimated shipping date

  • 9 = Start date

  • 10 = End date

  • 11 = Estimated delivery date

  • 12 = Market transfer date

  • 13 = Subscription cancelled on

  • 14 = Subscription last run

  • 15 = Subscription next run

  • 16 = Purchase date

  • 17 = Finish date

originOrder

Order

The origin order of this order. If this order is the origin, this attribute is null. (deprecated)

parentOrder

Order

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.

systemAmount

OrderAmount

The order amount in the system currency.

amount

OrderAmount

The order amount in foreign currency if exists. Otherwise the amount in system currency.

contactSenderId

int

contactSender

Contact

The associated contact for the contact-sender relation.

contactReceiverId

int

contactReceiver

Contact

The associated contact for the contact-receiver relation.

warehouseSenderId

int

warehouseSender

Warehouse

The associated warehouse for the warehouse-sender relation.

warehouseReceiverId

int

warehouseReceiver

Warehouse

The associated warehouse for the warehouse-receiver relation.

transactionSums

OrderTransactionSums

The sums of all order item transactions.

orderItemSummary

OrderItemSummary

The order item summary

paymentTerms

OrderPaymentTerms

The payment terms of this order.

shippingInformation

ShippingInformation

The shipping information for this order.

tags

The order tags.

Methods
public toArray()

Returns this model as an array.

OrderAmount

The order amount model.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

id

int

The ID of the order amount.

orderId

int

The ID of the order that the amount belongs to.

isSystemCurrency

bool

Flag that states if the current currency is the same as system currency or not.

isNet

bool

Flag that states if the invoice is net or not. If the invoice is not net, it is gross.

currency

string

The currency of the amounts.

exchangeRate

float

The exchange rate for converting the current currency into the system currency.

netTotal

float

The total net amount of the order.

grossTotal

float

The total gross amount of the order.

vatTotal

float

The total vat amount of the order.

invoiceTotal

float

The total invoice amount.

paidAmount

float

The order amount that is already paid.

prepaidAmount

float

This is deprecated and will be removed in the next version. Please use <code>$giftCardAmount</code> instead.

giftCardAmount

float

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.

shippingCostsGross

float

The gross shipping costs.

shippingCostsNet

float

The net shipping costs.

taxlessAmount

float

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

Methods
public toArray()

Returns this model as an array.

OrderAmountVat

The order amount vat model.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

id

int

The ID of the VAT information of an order amount

orderAmountId

int

The ID of the order amount that the VAT information belong to

countryVatId

int

The ID of the VAT configuration

vatField

int

The ID of the VAT rate’s field [0,1,2,3,4,5].

vatRate

float

The actual VAT rate that was used, e.g. 19%.

value

float

The VAT amount of money given in the same currency as the order amount.

netTotal

float

The net amount for the current vat rate.

grossTotal

float

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.

countryVat

Vat

The country vat instance.

Methods
public toArray()

Returns this model as an array.

OrderItem

The order item model. Items, shipping costs, coupons, surcharges etc. are all displayed as order items.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

id

int

The ID of the order item

orderId

int

The ID of the order that the order item belongs to

typeId

int

The ID of the order item type

  • VARIATION = 1

  • ITEM_BUNDLE = 2

  • BUNDLE_COMPONENT = 3

  • PROMOTIONAL_COUPON = 4

  • GIFT_CARD = 5

  • SHIPPING_COSTS = 6

  • PAYMENT_SURCHARGE = 7

  • GIFT_WRAP = 8

  • UNASSIGEND_VARIATION = 9

  • DEPOSIT = 10

  • ORDER = 11

  • DUNNING_CHARGE = 12

  • ITEM_SET = 13

  • SET_COMPONENT = 14

  • ORDER_PROPERTY = 15

referrerId

float

The ID of order item referrer

itemVariationId

int

The ID of the item variation

quantity

float

The quantity.

orderItemName

string

The name of the order item

attributeValues

string

The attribute value names

shippingProfileId

int

The ID of the order item’s shipping profile

countryVatId

int

The ID of the country vat

vatField

int

The vat id (0-5).

vatRate

float

The vat amount, e.g. 19.0 for 19% VAT.

position

int

The order items position in the order.

warehouseId

int

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.

systemAmount

OrderItemAmount

The order item’s amount in the system currency.

amount

OrderItemAmount

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.

type

OrderItemType

The order item type

countryVat

Vat

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:

  • Deleted on = 1

  • Created on = 2

  • Paid date = 3

  • Last update = 4

  • Completed on = 5

  • Return date = 6

  • Payment due date = 7

  • Estimated shipping date = 8

  • Start date = 9

  • End date = 10

  • Possible delivery date = 11

  • Market transfer date = 12

orderPropertyItems

A collection with order items referencing the current order item with type 'order_property'.

referencedOrderPropertyItem

OrderItem

The referenced order item with type 'order_property'.

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.

transactions

array

The transactions that belong to the order item

serialNumbers

array

The serial numbers that belong to the order item

variationBarcodes

array

The barcodes that belong to the variation of the order item

comments

The order item comments.

warehouselocations

<b>DEPRECATED</b> The order items warehouse locations.

transactionSums

OrderItemTransactionSums

The sums of all order item transactions.

couponReferences

The coupon references.

Methods
public toArray()

Returns this model as an array.

OrderItemAmount

The order item amount model. Order item amount refers to amounts of money.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

id

int

The ID of the order item amount.

orderItemId

int

The ID of the order item that the amount belongs to.

isSystemCurrency

bool

Flag that indicates if the current currency is the same as the system currency or not.

currency

string

The currency of the amounts.

exchangeRate

float

The exchange rate for converting the current currency into the system currency.

purchasePrice

float

The purchase price of the variation.

priceOriginalGross

float

The original gross price without any surcharges or discounts.

priceOriginalNet

float

The original net price without any surcharges or discounts.

priceGross

float

The total gross price including surcharges and discounts [READONLY].

priceNet

float

The total net price including surcharges and discounts [READONLY].

surcharge

float

The surcharge as gross amount.

discount

float

The discount can be a percentage or a fixed value.

isPercentage

bool

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.

Methods
public toArray()

Returns this model as an array.

OrderItemOrderProperty

This model contains the order properties that are assigned to order items.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

propertyId

int

The ID of the order property

orderItemId

int

The ID of the order item of the current order item order property

value

string

The value for the order property

fileUrl

string

The URL of the order property

name

string

The name of the order property

type

string

The type of the order property

Methods
public toArray()

Returns this model as an array.

OrderItemReference

The order item reference model. Each OrderItemReference has a referenced OrderItem and a referenced type ('parent','bundle','campaign','reorder','set','order_property').

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

id

int

The ID of the reference

orderItemId

int

The ID of the order item that the reference belongs to

referenceOrderItemId

int

The ID of the order item that is referred to

referenceType

string

The type of the reference

createdAt

The date that the reference was created

updatedAt

The date that the reference was updated last

orderItem

OrderItem

The order item the reference belongs to

referencedOrderItem

OrderItem

The referenced order item

Methods
public toArray()

Returns this model as an array.

OrderItemSummary

The order item summary model.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

orderId

int

The ID of the order

quantity

float

The summed up quantity of all order items visible in the UI

count

array

The count of all order items visible in the UI.

weight

float

The summed up weight (property type ID 11) of all order items

warehouses

array

A list of all order items warehouses

profitMarginSystemCurrency

float

The summed up profit margin of all order items in system currency

profitMarginOrderCurrency

float

The summed up profit margin of all order items in order currency

orderCommentCount

int

The number of order comments

Methods
public toArray()

Returns this model as an array.

OrderItemTransactionSums

The order item transaction sums model.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

orderItemId

int

The ID of the order item

quantityTransactionsInRegular

float

The summed up quantity of all transactions with direction 'in' and status 'regular'

quantityTransactionsOutRegular

float

The summed up quantity of all transactions with direction 'out' and status 'regular'

quantityTransactionsInCancelled

float

The summed up quantity of all transactions with direction 'in' and status 'cancelled'

quantityTransactionsOutCancelled

float

The summed up quantity of all transactions with direction 'out' and status 'cancelled'

priceTotalTransactionsInRegular

float

The summed up price (in the currency of the order) of all transactions with direction 'in' and status 'regular'

priceTotalTransactionsOutRegular

float

The summed up price (in the currency of the order) of all transactions with direction 'in' and status 'regular'

priceTotalTransactionsInCancelled

float

The summed up price (in the currency of the order) of all transactions with direction 'out' and status 'cancelled'

priceTotalTransactionsOutCancelled

float

The summed up price (in the currency of the order) of all transactions with direction 'out' and status 'cancelled'

areTransactionsInComplete

bool

Flag that indicates if the item has transactions with direction 'in' of the full item quantity

areTransactionsOutComplete

bool

Flag that indicates if the item has transactions with direction 'out' of the full item quantity

Methods
public toArray()

Returns this model as an array.

OrderItemType

The order item type model.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

id

int

The ID of the order item type. The following types are currently available: <br />

  • VARIATION = 1

  • ITEM_BUNDLE = 2

  • BUNDLE_COMPONENT = 3

  • PROMOTIONAL_COUPON = 4

  • GIFT_CARD = 5

  • SHIPPING_COSTS = 6

  • PAYMENT_SURCHARGE = 7

  • GIFT_WRAP = 8

  • UNASSIGEND_VARIATION = 9

  • DEPOSIT = 10

  • ORDER = 11

isErasable

bool

Flag that indicates if this type can be deleted or not

position

int

The position for sorting

names

The names of the order item types

Methods
public toArray()

Returns this model as an array.

OrderItemTypeName

The order item type name model.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

id

int

The ID of the type name

typeId

int

The related type id.

name

string

The type name.

lang

string

The ISO 639-1 language code for the name, e.g. "en" for English

type

OrderItemType

The order item type instance.

Methods
public toArray()

Returns this model as an array.

OrderItemWarehouseLocation

<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.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

orderItemId

int

The Id of the order item, that the warehouse location is associated with.

warehouseLocationId

int

The Id of the warehouse location, this order item is associated with.

quantity

float

The quantity stored at the warehouse location

bestBeforeDate

string

The best before date

batch

string

The batch

warehouseLocation

WarehouseLocation

The warehouse location of the item

Methods
public toArray()

Returns this model as an array.

OrderPaymentTerms

The order payment terms model.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

id

int

The ID of the early payment discount.

orderId

int

The ID of the order.

earlyPaymentDiscount

float

The early payment discount in percent.

earlyPaymentDiscountDays

int

The allowed number of days for the discount.

valutaDays

int

The valuta given in days.

paymentAllowedDays

int

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.

Methods
public toArray()

Returns this model as an array.

OrderReference

The order reference model. Each OrderReference has an origin order (the most top order) and a referenced order.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

id

int

The id of the order reference entry.

orderId

int

The order id.

originOrderId

int

The id of the origin order.

referenceOrderId

int

The id of the referenced order.

referenceType

string

The reference type ("parent", "reorder", "grouped", "split", "multi_order") of the referenced order.

order

Order

originOrder

Order

The origin order of the order.

referenceOrder

Order

The referenced order of the order.

Methods
public toArray()

Returns this model as an array.

OrderTransactionSums

The order transaction sums model.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

orderId

int

The ID of the order

quantityAllItems

float

The summed up quantity of all items

quantityTransactionsInRegular

float

The summed up quantity of all transactions with direction 'in' and status 'regular'

quantityTransactionsOutRegular

float

The summed up quantity of all transactions with direction 'out' and status 'regular'

quantityTransactionsInCancelled

float

The summed up quantity of all transactions with direction 'in' and status 'cancelled'

quantityTransactionsOutCancelled

float

The summed up quantity of all transactions with direction 'out' and status 'cancelled'

quantityTransactionsInBooked

float

The summed up quantity of all transactions with direction 'in' and status 'regular' and is booked

quantityTransactionsOutBooked

float

The summed up quantity of all transactions with direction 'out' and status 'regular' and is booked

priceTotalTransactionsInRegular

float

The summed up price (in the currency of the order) of all transactions with direction 'in' and status 'regular'

priceTotalTransactionsOutRegular

float

The summed up price (in the currency of the order) of all transactions with direction 'in' and status 'regular'

priceTotalTransactionsInCancelled

float

The summed up price (in the currency of the order) of all transactions with direction 'out' and status 'cancelled'

priceTotalTransactionsOutCancelled

float

The summed up price (in the currency of the order) of all transactions with direction 'out' and status 'cancelled'

areTransactionsInComplete

bool

Flag that indicates if all items have transactions with direction 'in' of the full item quantity

areTransactionsOutComplete

bool

Flag that indicates if all items have transactions with direction 'out' of the full item quantity

Methods
public toArray()

Returns this model as an array.

OrderType

The order type model.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

id

int

The ID of the order type

isErasable

bool

Flag that states if this type can be deleted or not.

position

int

The position for sorting

names

The names of the order item types.

Methods
public toArray()

Returns this model as an array.

OrderTypeName

The order type name model.

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

id

int

The ID of the type name

typeId

int

The ID of the type

name

string

The type name.

lang

string

The ISO 639-1 language code for the name, e.g. "en" for English

type

OrderType

The order type instance.

Methods
public toArray()

Returns this model as an array.

PriceCalculationResultItem

price calculation result item

Namespace

Plenty\Modules\Order\Models

Properties
Name Type Description

total

float

totalNet

float

totalGross

float

totalVat

float

highestVatId

int

netAmountsMap

array

vatAmountsMap

array

Methods
public toArray()

Returns this model as an array.

Template

OrderFilterBuilderFactory

This factory provides methods to retrieve all available catalog order filter builders.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template

Methods
public orderWarehouseFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderWarehouseFilterBuilder
Return type: OrderWarehouseFilterBuilder
public orderStatusFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderStatusFilterBuilder
Return type: OrderStatusFilterBuilder
public orderTypeFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderTypeFilterBuilder
Return type: OrderTypeFilterBuilder
public orderReferrerFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderReferrerFilterBuilder
Return type: OrderReferrerFilterBuilder
public orderPaymentMethodFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderPaymentMethodFilterBuilder
Return type: OrderPaymentMethodFilterBuilder
public orderOwnerFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderOwnerFilterBuilder
Return type: OrderOwnerFilterBuilder
public orderItemVariationIdFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderOwnerFilterBuilder
Return type: OrderOwnerFilterBuilder
public orderClientFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderClientFilterBuilder
Return type: OrderClientFilterBuilder
public orderItemTypeFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderItemTypeFilterBuilder
Return type: OrderItemTypeFilterBuilder
public orderIdFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderIdFilterBuilder
Return type: OrderIdFilterBuilder
public orderCreatedAtFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderCreatedAtFilterBuilder
Return type: OrderCreatedAtFilterBuilder
public orderUpdatedAtFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderUpdatedAtFilterBuilder
Return type: OrderUpdatedAtFilterBuilder
public orderPaidAtFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderPaidAtFilterBuilder
Return type: OrderPaidAtFilterBuilder
public orderCompletedAtFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderCompletedAtFilterBuilder
Return type: OrderCompletedAtFilterBuilder
public orderReceivedDateFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderReceivedDateFilterBuilder
Return type: OrderReceivedDateFilterBuilder
public orderShippingProfileFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderShippingProfileFilterBuilder
Return type: OrderShippingProfileFilterBuilder
public orderExcludeMainOrdersFilterBuilder():Plenty\Modules\Order\Catalogues\Order\Template\Filters\OrderShippingProfileFilterBuilder

Contracts

OrderAmountRepositoryContract

This interface allows you to get and list order amounts and their vats.

Namespace

Plenty\Modules\Order\Contracts

Methods
public getByOrderId($orderId, $currency = null):Plenty\Modules\Order\Models\OrderAmount
Return type: 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.

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$currency

string

The currency of the order amount

public getById($id):Plenty\Modules\Order\Models\OrderAmount
Return type: OrderAmount

Get an order amount. The ID of the order amount must be specified.

Parameters

Name

Type

Description

$id

int

The ID of the order amount

public listByOrderId($orderId):array

List all order amounts of an order. The ID of the order must be specified.

Parameters

Name

Type

Description

$orderId

int

The ID of the order

OrderItemRepositoryContract

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.

Namespace

Plenty\Modules\Order\Contracts

Methods
public getOrderItem($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\OrderItem
Return type: OrderItem

Get an order item

Parameters

Name

Type

Description

$orderItemId

int

The ID of the order item

$with

array

The relations to load

$lazyLoaded

bool

Load order item instance without default relations

public deleteOrderItem($orderId, $orderItemId):bool

Delete an order item

Parameters

Name

Type

Description

$orderId

int

The ID of the order that the item belongs to.

$orderItemId

int

The ID of the order item to be deleted.

Return type: PaginatedResult

Search order items

Parameters

Name

Type

Description

$orderId

int

$page

int

$itemsPerPage

int

$with

array

$sortBy

string

$sortOrder

string

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

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.

OrderRepositoryContract

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.

Namespace

Plenty\Modules\Order\Contracts

Methods
public findOrderById($orderId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Deprecated! (since 2021-04)

Please use OrderRepositoryContract::findById instead

Return type: Order

Get an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$with

array

The relations to load in the order instance, one of "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments".

$lazyLoaded

bool

Load order instance without default relations

public findById($orderId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Get an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$with

array

The relations to load in the order instance

$lazyLoaded

bool

Load order instance without default relations

public getByIds($orderIds, $with = [], $lazyLoaded = false):Illuminate\Support\Collection
Return type: Collection

Get orders

Parameters

Name

Type

Description

$orderIds

array

$with

array

$lazyLoaded

bool

public findOrderByExternalOrderId($externalOrderId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Deprecated! (since 2021-04)

Please use OrderRepositoryContract::getByExternalOrderId instead

Return type: Order

Get an order by external order ID

Parameters

Name

Type

Description

$externalOrderId

string

$with

array

$lazyLoaded

bool

Load order instance without default relations

public getByExternalOrderId($externalOrderId, $with = [], $lazyLoaded = false):Illuminate\Support\Collection
Return type: Collection

List orders by external order ID

Parameters

Name

Type

Description

$externalOrderId

string

$with

array

$lazyLoaded

bool

Load order instance without default relations

public createOrder($data, $coupon = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Deprecated! (since 2021-04)

Please use OrderRepositoryContract::create instead

Return type: Order

Create an order

Parameters

Name

Type

Description

$data

array

The order data. The properties that are required to create an order can be found in the order model.

$coupon

string

A coupon code or a list of coupon codes to be redeemed in the order.

$with

array

$lazyLoaded

bool

public create($data, $coupons = [], $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Create an order

Parameters

Name

Type

Description

$data

array

The order data

$coupons

array

Coupon codes to be redeemed in the order

$with

array

$lazyLoaded

bool

public updateOrder($data, $orderId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Deprecated! (since 2021-04)

Please use OrderRepositoryContract::update instead

Return type: Order

Update an order

Parameters

Name

Type

Description

$data

array

The order data. The properties that are required to update an order can be found in the order model.

$orderId

int

The ID of the order

$with

array

$lazyLoaded

bool

public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Update an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$data

array

The order data

$with

array

$lazyLoaded

bool

public deleteOrder($orderId):bool
Deprecated! (since 2021-04)

Please use OrderRepositoryContract::delete instead

Delete an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

public delete($orderId):void

Delete an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

public undeleteOrder($orderId, $status):Plenty\Modules\Order\Models\Order
Deprecated! (since 2021-03)

Method won't be supported in the future

Return type: Order

Restore an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$status

float

The status of the order

public isDeleted($orderId):bool

Checks whether an order has been deleted or not.

Parameters

Name

Type

Description

$orderId

int

The ID of the order

public findSchedulerById($schedulerId):Plenty\Modules\Order\Scheduler\Models\OrderScheduler
Deprecated! (since 2021-03)

Method won't be supported in the future

Return type: OrderScheduler

Get a scheduler order

Parameters

Name

Type

Description

$schedulerId

int

The ID of the scheduler order

public allOrdersByContact($contactId, $page = 1, $itemsPerPage = 50, $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

List orders of a contact

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$page

int

The page to get. The default page that will be returned is page 1.

$itemsPerPage

int

The number of orders to be displayed per page. The default number of orders per page is 50.

$with

array

The relations to load in the Order instance. Valid are "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments".

public allOrdersBySupplier($contactId, $page = 1, $itemsPerPage = 50, $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

List orders that include one or more variations from a supplier

Parameters

Name

Type

Description

$contactId

int

The ID of the contact (supplier id)

$page

int

The page to get. The default page that will be returned is page 1.

$itemsPerPage

int

The number of orders to be displayed per page. The default number of orders per page is 50.

$with

array

The relations to load in the Order instance. Valid are "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments".

public allOrdersByContactSender($contactId, $page = 1, $itemsPerPage = 50, $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

List orders sent by a contact

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$page

int

The page to get. The default page that will be returned is page 1.

$itemsPerPage

int

The number of orders to be displayed per page. The default number of orders per page is 50.

$with

array

The relations to load in the Order instance. Valid are "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments".

public getLatestOrderByContactId($contactId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Get latest order of a contact

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$with

array

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.

$lazyLoaded

bool

public searchOrders($page = 1, $itemsPerPage = 50, $with = [], $lazyLoaded = false):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Lists orders

Parameters

Name

Type

Description

$page

int

The page to get. The default page that will be returned is page 1.

$itemsPerPage

int

The number of orders to be displayed per page. The default number of orders per page is 50.

$with

array

The relations to load in the Order instance. Valid are "addresses", "events", "dates", "relation", "reference", "location", "payments", "documents" and "comments".

$lazyLoaded

bool

Load order instance without default relations

public getPackageNumbers($orderId):array

List package numbers of an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

public cancelOrder($orderId, $data):void
Deprecated! (since 2021-04)

Please use OrderRepositoryContract::cancel instead

Cancel an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$data

array

The request data

public cancel($orderId, $data = []):void

Cancel an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$data

array

The request data

public findOrderByAccessKey($orderId, $accessKey):Plenty\Modules\Order\Models\Order
Return type: Order

Find the order for the given order ID and access key.

Parameters

Name

Type

Description

$orderId

int

The ID of the order to be checked.

$accessKey

string

The access key, that belongs to the order.

public generateAccessKey($orderId, $regenerate = false):string

Generate an access key for the given order ID.

Parameters

Name

Type

Description

$orderId

int

$regenerate

bool

public completeOrder($orderId, $data = []):Plenty\Modules\Order\Models\Order
Deprecated! (since 2021-04)

Please use OrderRepositoryContract::complete instead

Return type: Order

Complete an incomplete order.

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$data

array

Additional data. Currently only the statusId can be specified.

public complete($orderId, $data = []):Plenty\Modules\Order\Models\Order
Return type: Order

Complete an incomplete order.

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$data

array

Additional data. Currently only the statusId can be specified.

public createMultiOrderByContact($contactId):Plenty\Modules\Order\Models\Order
Return type: Order

Creates a multi order for a specific contact

Parameters

Name

Type

Description

$contactId

int

public setOrderStatus45($orderId):Plenty\Modules\Order\Models\Order
Deprecated! (since 2021-03)

Method won't be supported in the future

Return type: Order

Set order status to 4 or 5

Parameters

Name

Type

Description

$orderId

int

public getMyAccountUrl($orderId):string

Get My Account url of the order

Parameters

Name

Type

Description

$orderId

int

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

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.

Events

OrderCreated

An event class fired after a new order is created. The order type is not relevant. * At the same time also type depended events will be fired, like ReturnsCreated or CreditNoteCreated.

Namespace

Plenty\Modules\Order\Events

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

OrderEvent

A base event class for all order events. Each order event expects an order instance.

Namespace

Plenty\Modules\Order\Events

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

OrderFullyPaid

An Event class fired after a payment assignment when the order is fully paid.

Namespace

Plenty\Modules\Order\Events

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

OrderOverpaid

An event class will be fired after a payment is assigned and if the order is overpaid.

Namespace

Plenty\Modules\Order\Events

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

OrderPaidEvent

A base Event class for all order paid events.

Namespace

Plenty\Modules\Order\Events

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

OrderPartlyPaid

An Event class fired after a payment is assigned and if the order is only partly paid.

Namespace

Plenty\Modules\Order\Events

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

OrderPaymentAssigned

An Event class fired after a payment was assigned to an order. * After this event one of the following events will be fired, depending the payment status of the order: * OrderPrepaid, OrderPartlyPaid, OrderFullyPaid, OrderOverpaid.

Namespace

Plenty\Modules\Order\Events

Methods
public __construct($order, $payment):void

OrderPaymentAssigned constructor.

Parameters

Name

Type

Description

$order

Order

$payment

Payment

public getPayment():Plenty\Modules\Payment\Models\Payment
Return type: Payment

Get the payment.

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

OrderPrepaid

An Event class fired after a payment is assigned and if the order is paid in advance.

Namespace

Plenty\Modules\Order\Events

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

SubscriptionChildOrderCreated

An event class fired after a new order for a subscription is created. The order type is not relevant. * At the same time also type depended events will be fired, like ReturnsCreated or CreditNoteCreated.

Namespace

Plenty\Modules\Order\Events

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

Exceptions

OrderDuplicateException

Exception when duplicate order is created.

Namespace

Plenty\Modules\Order\Exceptions

Methods
public getMessage():void
public getCode():void
public getFile():void
public getLine():void
public getTrace():void
public getPrevious():void
public getTraceAsString():void

Services

OrderCreatedTypeService

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.

Namespace

Plenty\Modules\Order\Services

Methods
public handle($created):void

Reacts upon the OrderCreated event

Parameters

Name

Type

Description

$created

OrderCreated

The event instance.

public static addEventForType($typeId, $className):void

Create event class for a custom order type

Parameters

Name

Type

Description

$typeId

int

The ID of the custom order type.

$className

string

The name of the event class.

public static removeEventForType($typeId, $className):void

Delete event class from a custom order type

Parameters

Name

Type

Description

$typeId

int

The ID of the custom order type.

$className

string

The name of the event class.

Campaign

Contracts

CouponCampaignRepositoryContract

This is the contract for the coupon campaign repository. It allows you to get coupon campaigns.

Namespace

Plenty\Modules\Order\Coupon\Campaign\Contracts

Methods
public findById($id):Plenty\Modules\Order\Coupon\Campaign\Models\CouponCampaign
Return type: CouponCampaign

Get a coupon campaign

Parameters

Name

Type

Description

$id

The ID of the coupon campaign

public findByEmailPlaceholder($placeholder):Plenty\Modules\Order\Coupon\Campaign\Models\CouponCampaign
Return type: CouponCampaign

Get the CouponCampaign model from the database by emailPlaceholder.

Parameters

Name

Type

Description

$placeholder

string

The email placeholder to search the database by

public findByCouponCode($couponCode):Plenty\Modules\Order\Coupon\Campaign\Models\CouponCampaign
Return type: CouponCampaign

Get the coupon campaign of a coupon code

Parameters

Name

Type

Description

$couponCode

string

The coupon code to search the database by

public getCouponDisplayType($couponCodeValidation):string

Get the display type of a coupon

Parameters

Name

Type

Description

$couponCodeValidation

CouponCodeValidation

public create($data):Plenty\Modules\Order\Coupon\Campaign\Models\CouponCampaign
Return type: CouponCampaign

Create a coupon campaign

Parameters

Name

Type

Description

$data

array

public modifyCampaignUsage($couponCampaignId, $operator, $field):void

Modifies the two counter 'used' and 'unused'

Parameters

Name

Type

Description

$couponCampaignId

int

ID of the Coupon Campaign

$operator

string

How should the usage been modified ( '+' or '-' )

$field

string

Usage type to modify ( 'used' or 'unused' )

public delete($couponCampaignId):bool

Delete a coupon campaign

Parameters

Name

Type

Description

$couponCampaignId

int

The ID of the coupon campaign

public update($data):Plenty\Modules\Order\Coupon\Campaign\Models\CouponCampaign
Return type: CouponCampaign

update a coupon campaign

Parameters

Name

Type

Description

$data

array

Models

CouponCampaign

The CouponCampaign model contains all information of a campaign.

Namespace

Plenty\Modules\Order\Coupon\Campaign\Models

Properties
Name Type Description

id

int

The ID of a coupon campaign

externalId

string

DEPRECATED! The external ID of a coupon campaign

name

string

The name of the coupon campaign

variable

int

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.

isPermittedForExternalReferrers

bool

Flag that indicates whether or not coupons can be redeemed if a customer enters the online store from an external referrer. <ul><li>TRUE = The coupon can be redeemed if the customer enters the online store from an external referrer
</li> <li>FALSE = The coupon can not be redeemed</li></ul>

includeShipping

bool

The discount also applies to shipping costs. The property will be only be set if the discount type fixed is set.

unusedCodesCount

int

The number of codes that have been redeemed

usedCodesCount

int

The number of codes that have not been redeemed

endsAt

string

The date that the campaign ends

startsAt

string

The date that the campaign starts

minOrderValue

float

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.

codeDurationWeeks

int

The number of weeks that codes of this campaign can be redeemed after they have been generated.

codeAssignment

string

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 three options available are generate, use_existing and only_use_existing. <ul><li>generate = a new code is generated on demand</li> <li>use_existing = the code already exists and is taken from a previously entered list of codes, in case of vouchers a new code will be generated for each item purchased that has associated a campaign ID</li> <li>only_use_existing = the code already exists and is taken from a previously entered list of codes, for vouchers no additional code will be generated for items purchased, only existing codes will be used</li></ul>

codeLength

string

There are 3 different length available. The code can be 6, 16, 24 or 32 characters long.

usage

string

The usage defines what the coupon codes from this campaign can be used for. There are three options available: <ul><li>single_and_subscription = The codes can be used for single orders and subscription orders</li> <li>single_order = The codes can be used for single orders only</li> <li>subscription = The codes can be used for subscriptions only</li></ul>

concept

string

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: <ul><li>single_code = The campaign has only one code</li> <li>multi_code = The campaign has several codes</li></ul>

redeemType

string

The redeem type defines how many times a code of a campaign can be redeemed. There are 4 redeem types available: <ul><li>multi_redeem_per_user = Each customer is allowed to redeem the same code several times</li> <li>single_redeem_per_user = Each customer can only redeem the same code once</li> <li>redeem_until_value_reached = A code can be entered several times by the same customer or by different customers, but only until the coupon value is depleted</li> <li>unique_redeem = The code can be redeemed once. If several customers get the same code, only the first customer to enter the code can use it.</li></ul> The redeem type interacts with the concept. Pay attention to the combination these two options form.

discountType

string

There are 4 discount types available: <ul><li>fixed = The coupon value is a fixed amount of money. This discount type is the only one that makes sense for coupons that are sold in the online store. The actual amount of money needs to be set with the value property.</li> <li>percent = The discount is given as percentage and the actual value depends on the purchase. The actual number of percent need to be set with the value property.</li> <li>item = The discount applies to entire items. A typical example would be - Buy 1 get 1 free - or in other words - Get 2 for the price of 1. The number of items the customer gets and the number of items the customer has to pay for need to be set with itemDiscountToPay and itemDiscountToBuy.</li> <li>shipping = The shipping does not cost anything. The cost will be set to zero no matter what the actual shipping costs are.</li></ul>

itemDiscountToPay

int

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

itemDiscountToBuy

int

The number of items that the customer receives, but he or she only has to pay for the number of items set with itemDiscountToPay.

campaignType

string

The two campaign types available are coupon or voucher.

couponType

string

The coupon type is only for campaigns that have the campaign type coupon. The two coupon types available are promotion and sales.

description

string

The description of the campaign

value

float

The actual discount value of a coupon. The value needs to be set for the two discount types fixed and percent.

codes

Collection

The codes and information about the codes that belong to this CouponCampaign

references

Collection

These references are available <ul> <li>category =</li> <li>item =</li> <li>webstore =</li> <li>customer_group =</li> <li>customer_type =</li> </ul>

Methods
public toArray()

Returns this model as an array.

Reference

Contracts

CouponCampaignReferenceRepositoryContract

This is the contract for the coupon campaign reference repository. It allows you to get and create coupon campaigns references.

Namespace

Plenty\Modules\Order\Coupon\Campaign\Reference\Contracts

Methods
public findByCouponCampaignId($couponCampaignId):Illuminate\Support\Collection
Return type: Collection

Get a coupon campaign

Parameters

Name

Type

Description

$couponCampaignId

int

The ID of the coupon campaign

public create($data):Illuminate\Support\Collection
Return type: Collection

Create a Coupon Campaign reference

Parameters

Name

Type

Description

$data

array

Models

CouponCampaignReference

The CouponCampaignReference model contains all information of a campaign reference.

Namespace

Plenty\Modules\Order\Coupon\Campaign\Reference\Models

Properties
Name Type Description

campaignId

int

The ID of a coupon campaign

referenceType

string

The reference type defines the type of the reference. There are five reference types available: <ul> <li>category =</li> <li>item =</li> <li>webstore =</li> <li>customer_group =</li> <li>customer_type =</li> </ul>

value

int

The name of the coupon campaign

Methods
public toArray()

Returns this model as an array.

Contact

Contracts

CouponCodeContactRepositoryContract

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.

Namespace

Plenty\Modules\Order\Coupon\Code\Contact\Contracts

Methods
public create($data):Plenty\Modules\Order\Coupon\Code\Contact\Models\CouponCodeContact
Return type: CouponCodeContact

Create redeemed coupons for a contact.

Parameters

Name

Type

Description

$data

array

The redeemed coupon data. The properties that are required to create an entry can be found in the CouponCodeContact model.

public update($contactId, $campaignId, $coupon, $data):Plenty\Modules\Order\Coupon\Code\Contact\Models\CouponCodeContact
Return type: CouponCodeContact

Update a redeemed coupon of a contact.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact that redeemed the coupon code

$campaignId

int

The ID of the coupon campaign

$coupon

string

The coupon code

$data

array

The redeemed coupon data. The properties that are required to update an entry can be found in the CouponCodeContact model

public find($contactId, $campaignId, $coupon):Plenty\Modules\Order\Coupon\Code\Contact\Models\CouponCodeContact
Return type: CouponCodeContact

Get a redeemed coupon for a contact

Parameters

Name

Type

Description

$contactId

int

The ID of the contact which redeemed the coupon code

$campaignId

int

The ID of the coupon campaign

$coupon

string

The coupon code

public findByContact($contactId, $page = 1, $itemsPerPage = 50):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

List redeemed coupons for a contact

Parameters

Name

Type

Description

$contactId

int

The contact ID as filter for redeemed coupons.

$page

int

The page to get. The default page that will be returned is page 1.

$itemsPerPage

int

The number of coupons to be displayed per page. The default number of coupons per page is 50.

public findByCampaign($campaignId, $page = 1, $itemsPerPage = 50):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

List redeemed coupons of a campaign.

Parameters

Name

Type

Description

$campaignId

int

The campaign ID as filter for redeemed coupons.

$page

int

The page to get. The default page that will be returned is page 1.

$itemsPerPage

int

The number of coupons to be displayed per page. The default number of coupons per page is 50.

public findByCoupon($coupon, $page = 1, $itemsPerPage = 50):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

List redeemed coupons of a coupon code

Parameters

Name

Type

Description

$coupon

string

The coupon code

$page

int

The page to get. The default page that will be returned is page 1.

$itemsPerPage

int

The number of coupons to be displayed per page. The default number of coupons per page is 50.

Models

CouponCodeContact

The CouponCodeContact model.

Namespace

Plenty\Modules\Order\Coupon\Code\Contact\Models

Properties
Name Type Description

code

string

The coupon code

contactId

int

The ID of the contact that redeemed the coupon

openAmount

float

The coupon amount that can still be redeemed

redeemCount

int

How many times a coupon code has already been redeemed

updatedAt

The date that the coupon code was updated last.

campaignId

int

The ID of the campaign that the coupon belongs to

externalTransactionId

int

The ID that is assigned to a coupon by the external coupon service provider, when the coupon is redeemed.

Methods
public toArray()

Returns this model as an array.

Validation

Contracts

CouponCodeValidatorContract

CouponCodeValidatorContract is the interface for the coupon code validation repository. This interface provides the functionality to validate coupon data.

Namespace

Plenty\Modules\Order\Coupon\Code\Validation\Contracts

Methods
public validate($validationData):Plenty\Modules\Order\Coupon\Code\Validation\Models\CouponCodeValidation
Return type: CouponCodeValidation

Validate a coupon code

Parameters

Name

Type

Description

$validationData

CouponCodeValidation

The data to validate a coupon

Models

CouponCodeValidation

The CouponCodeValidation data model contains all data necessary for validating a coupon.

Namespace

Plenty\Modules\Order\Coupon\Code\Validation\Models

Properties
Name Type Description

campaignId

int

The ID of the campaign

validationType

string

The type of the campaign. Currently the only type available is plentymarkets.

items

The list of items or variations to be validated

contactId

int

The ID of the contact that wants to redeem the coupon

couponCode

string

The coupon code

currency

string

The currency of the purchase

exchangeRate

float

The exchange rate of the purchase (optional, is loaded from settings if not given)

referrer

float

The order referrer

salesDiscount

float

The total discount from a coupon applied to an order. The discount is given as gross amount.

salesDiscountNet

float

The net discount from a coupon applied to an order. The net discount is the total discount minus the vat amount.

itemDiscount

float

The discount amount applied to items.

itemDiscountNet

float

The net discount applied to items.

shippingDiscount

float

The discount applied to shipping costs.

shippingDiscountNet

float

The net discount applied to shipping costs.

usedVatFields

array

The vat fields used for the validation

restCouponAmount

float

The remaining coupon amount

checkedItems

array

The list of variations that passed the validation

validateParams

array

Validation parameters

couponCampaignType

string

The campaign type

Methods
public toArray()

Returns this model as an array.

CouponCodeValidationItem

The CouponCodeValidationItem model contains all item data needed for validating whether the coupon can be redeemed for these items or not.

Namespace

Plenty\Modules\Order\Coupon\Code\Validation\Models

Properties
Name Type Description

amount

float

The price of a variation multiplied by the quantity

noCoupon

int

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.

quantity

int

The quantity of the variation

singlePrice

float

The price of a single variation

itemId

int

The ID of the item

vatField

int

The field of the VAT rate

itemHash

string

The hash for items with new order properties

hashReference

string

The reference to itemHash in new order property items

itemVariationId

int

The ID of the variation

Methods
public toArray()

Returns this model as an array.

Currency

Contracts

CurrencyConversionSettingsRepositoryContract

Provides methods for currency conversion data.

Namespace

Plenty\Modules\Order\Currency\Contracts

Methods
public getCurrencyConversionList():array

Gets the currency conversion setting.

CurrencyRepositoryContract

Provides methods for currency data.

Namespace

Plenty\Modules\Order\Currency\Contracts

Methods
public getCurrency($currencyIso, $columns = [], $with = []):Plenty\Modules\Order\Currency\Models\Currency
Return type: Currency

Get a currency

Parameters

Name

Type

Description

$currencyIso

string

The currency ISO 4217 code, e.g. "EUR".

$columns

array

The attributes to be loaded in the currency instance.

$with

array

The relations to be loaded in the currency instance. Valid relations are "names" or "countries").

public getCurrencyList($columns = [], $with = []):void

Get all currencies supported in the system.

Parameters

Name

Type

Description

$columns

array

The attributes to be loaded in the currency instances.

$with

array

The relations to be loaded in the currency instance. Valid relations are "names" or "countries".

public getCurrencyCountries($currencyIso, $columns = []):void

List countries for a currency

Parameters

Name

Type

Description

$currencyIso

string

The currency ISO 4217 code, e.g. "EUR".

$columns

array

The attributes to be loaded in the country instances.

public getCountryCurrency($countryId, $columns = [], $with = []):Plenty\Modules\Order\Currency\Models\Currency
Return type: Currency

Get a currency for a country

Parameters

Name

Type

Description

$countryId

int

The country id.

$columns

array

The attributes to be loaded in the currency instance.

$with

array

The relations to be loaded in the currency instance ("names" or "countries").

public getExchangeRate($currencyIso):Plenty\Modules\Order\Currency\Models\CurrencyExchangeRate
Return type: CurrencyExchangeRate

Get the exchange rate for a currency

Parameters

Name

Type

Description

$currencyIso

string

public getExchangeRatesFrom($currencyIso):array

List exchange rates from a currency

Parameters

Name

Type

Description

$currencyIso

string

The currency ISO 4217 code, e.g. "EUR".

public getExchangeRatesTo($currencyIso):array

List exchange rates to a currency

Parameters

Name

Type

Description

$currencyIso

string

The currency ISO 4217 code, e.g. "EUR".

Models

Currency

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.

Namespace

Plenty\Modules\Order\Currency\Models

Properties
Name Type Description

currency

string

The ISO 4217 code and id of the currency.

htmlCode

string

The html code (entity) for the currency.

unicodeSign

string

The unicode symbol for the currency. If no unicode symbol exists, the html code will be used.

isActive

bool

Flag that indicates if the currency is active in the system or not. Currencies are activated per sales price.

isErasable

bool

Flag that indicates if this currency can be deleted or not. <ul><li>False = Currency cannot be deleted</li><li>True = Currency can be deleted</li></ul>

exchangeRate

float

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.

Methods
public toArray()

Returns this model as an array.

CurrencyCountryRelation

The CurrencyCountryRelation model indicates which currency is related to which country.

Namespace

Plenty\Modules\Order\Currency\Models

Properties
Name Type Description

id

int

The ID of the relation

currency

string

The currency

countryId

int

The ID of the country

country

Country

The related country information

currencyInstance

Currency

The related currency information

Methods
public toArray()

Returns this model as an array.

CurrencyExchangeRate

The currency exchange rate model.

Namespace

Plenty\Modules\Order\Currency\Models

Properties
Name Type Description

exchangeRate

float

The exchange rate

Methods
public toArray()

Returns this model as an array.

CurrencyName

The currency name model.

Namespace

Plenty\Modules\Order\Currency\Models

Properties
Name Type Description

id

int

The ID of the currency name

currency

string

The currency

lang

string

The language of the currency name

name

string

The name in the language

currencyInstance

Currency

The currency instance.

Methods
public toArray()

Returns this model as an array.

Idea

Models

Export

The export model for IDEA exports.

Namespace

Plenty\Modules\Order\Export\Pos\Idea\Models

Properties
Name Type Description

id

int

The id of the export entry.

token

string

The token generated for the export entry.

progress

float

The progress of the export process.

currentModule

string

The currently exporting module of the export process.

state

string

The current state of the export process.

filename

string

The filename of the export content.

createdAt

Carbon

Specifies the creation date of the export entry.

updatedAt

Carbon

Specifies the last update date of the export entry.

modules

Collection

The modules to be used by the export process.

options

Collection

The options for the export process. Currently only "year" is supported as option key.

Methods
public toArray()

Returns this model as an array.

Method

Contracts

PaymentMethodRepositoryContract

Repository Contract for PaymentMethod

Namespace

Plenty\Modules\Order\Payment\Method\Contracts

Methods
public getPaymentMethods($countryId, $plentyId = null, $lang = &quot;de&quot;):array

Gets a list of payment methods

Parameters

Name

Type

Description

$countryId

int

$plentyId

int

$lang

string

public activatePaymentMethod($id):Plenty\Modules\Order\Payment\Method\Models\PaymentMethod
Return type: PaymentMethod

Activate a legacy payment method.

Parameters

Name

Type

Description

$id

int

Models

PaymentMethod

The payment method model

Namespace

Plenty\Modules\Order\Payment\Method\Models

Properties
Name Type Description

id

int

name

string

minimumGross

float

priority

int

active

bool

showBankDetails

int

infoPageType

int

infoPageExternalUrl

int

feeDomesticFlatRateWebstore

float

feeDomesticFlatRateInternal

float

feeDomesticPercentageWebstore

float

feeDomesticPercentageInternal

float

feeForeignFlatRateWebstore

float

feeForeignFlatRateInternal

float

feeForeignPercentageWebstore

float

feeForeignPercentageInternal

float

informations

array

webstores

array

coutries

array

information

PaymentMethodInformation

Methods
public toArray()

Returns this model as an array.

PaymentMethodInformation

The payment method information model

Namespace

Plenty\Modules\Order\Payment\Method\Models

Properties
Name Type Description

id

int

lang

string

name

string

infoPageType

int

infoPageInternalContent

int

infoPageExternalUrl

string

logo

string

showLogo

int

Methods
public toArray()

Returns this model as an array.

Pdf

Events

OrderPdfGenerationEvent

The OrderPdfGenerationEvent triggered before a pdf is generated for an order.

Namespace

Plenty\Modules\Order\Pdf\Events

Methods
public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the

public getDocType():string

Get the

public addOrderPdfGeneration($orderPdfGeneration):Plenty\Modules\Order\Pdf\Events\OrderPdfGenerationEvent
Return type: OrderPdfGenerationEvent
Parameters

Name

Type

Description

$orderPdfGeneration

OrderPdfGeneration

Models

OrderPdfGeneration

The OrderPdfGeneration Model

Namespace

Plenty\Modules\Order\Pdf\Models

Properties
Name Type Description

language

string

advice

string

sums

array

link

string

image

string

imageHeight

int

imageWidth

int

Methods
public toArray()

Returns this model as an array.

Referrer

Contracts

OrderReferrerRepositoryContract

Provides methods for processing order referrers. An order referrer indicates where a purchase was made originally.

Namespace

Plenty\Modules\Order\Referrer\Contracts

Methods
public getList($columns = [], $filterable = false):void

List order referrers

Parameters

Name

Type

Description

$columns

array

The columns (attributes) to load in the instances.

$filterable

bool

Return type: PaginatedResult

Search for referrers

Parameters

Name

Type

Description

$page

int

$itemsPerPage

int

$sortBy

string

$sortOrder

string

public create($data, $parentReferrerId = null):Plenty\Modules\Order\Referrer\Models\OrderReferrer
Return type: OrderReferrer

Create an order referrer

Parameters

Name

Type

Description

$data

array

The order referrer data. The properties that are required to create an order referrer can be found in the order referrer model.

$parentReferrerId

float

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($data, $referrerId):Plenty\Modules\Order\Referrer\Models\OrderReferrer
Return type: OrderReferrer

Update an order referrer

Parameters

Name

Type

Description

$data

array

The order referrer data. The properties that are required to update an order referrer can be found in the order referrer model.

$referrerId

float

The ID of the order referrer

public getReferrerById($referrerId, $columns = []):Plenty\Modules\Order\Referrer\Models\OrderReferrer
Return type: OrderReferrer

Get an order referrer

Parameters

Name

Type

Description

$referrerId

float

The ID of the order referrer

$columns

array

The columns (attributes) to load in the instances.

public delete($referrerId):bool

Delete an order referrer.

Parameters

Name

Type

Description

$referrerId

float

The ID of the order referrer

public getNextFreeMainReferrerId():float

Get next free main referrer ID

public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

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.

Models

OrderReferrer

The order referrer model. An order referrer shows where a purchase was originally made.

Namespace

Plenty\Modules\Order\Referrer\Models

Properties
Name Type Description

id

float

The ID of the order referrer

isEditable

bool

Flag that indicates if this referrer can be updated as well as deleted or not <ul><li>True = the referrer can be edited and deleted</li> <li>False = the referrer can neither be edited nor deleted</li></ul>

backendName

string

The backend name of the referrer

name

string

The public name of the referrer as it is displayed e.g. on documents

orderOwnerId

int

The user ID of whoever owns new orders from this referrer

isFilterable

bool

Flag that indicates if this referrer can be used as a filter or not <ul><li>True = Can be used as a filter</li> <li>False = Cannot be used as a filter</li></ul>

origin

string

The origin of this referrer

showInLeads

bool

Referrer is showed in list when creating a new lead

Methods
public toArray()

Returns this model as an array.

Scheduler

Models

OrderScheduler

The legacy order model

Namespace

Plenty\Modules\Order\Scheduler\Models

Properties
Name Type Description

id

int

The order id.

contactId

int

The contact id.

methodOfPayment

int

start

last

end

deliveryAddress

Address

billingAddress

Address

addresses

Collection

addressRelations

Collection

Methods
public toArray()

Returns this model as an array.

SerialNumber

Contracts

OrderSerialNumberRepositoryContract

List serial numbers for orders

Namespace

Plenty\Modules\Order\SerialNumber\Contracts

Methods
public listSerialNumbersByOrder($orderId):void

List serial numbers of an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

public listSerialNumbersByOrderItem($orderItemId):void

List serial numbers if an order item

Parameters

Name

Type

Description

$orderItemId

int

The ID of the order item

public addSerialNumberToOrderItem($orderSerialNumber):Plenty\Modules\Order\SerialNumber\Models\OrderSerialNumber
Return type: OrderSerialNumber

Create item serial number and bind it to order item

Parameters

Name

Type

Description

$orderSerialNumber

array

Order serial number data

Models

OrderSerialNumber

The order serial number model

Namespace

Plenty\Modules\Order\SerialNumber\Models

Properties
Name Type Description

serialNumberId

int

The ID of the serial number

orderId

int

The ID of the order

orderItemId

int

The ID of the order item

serialNumber

string

The serial number

itemSerialNumber

ItemSerialNumber

Methods
public toArray()

Returns this model as an array.

Shipping

Contracts

EUCountryCodesServiceContract

The EUCountryCodesServiceContract model

Namespace

Plenty\Modules\Order\Shipping\Contracts

Methods
public isEUCountry($countryId, $date = null):bool
Parameters

Name

Type

Description

$countryId

int

$date

string

public hasCommunityTax($countryId, $date = null):bool
Parameters

Name

Type

Description

$countryId

int

$date

string

public getTaxTerritory($countryId, $date = null):int
Parameters

Name

Type

Description

$countryId

int

$date

string

public hasCommunityToll($countryId, $date = null):bool
Parameters

Name

Type

Description

$countryId

int

$date

string

public getTollTerritory($countryId, $date = null):int
Parameters

Name

Type

Description

$countryId

int

$date

string

public isExportDelivery($countryId, $merchandCountryId = null, $date = null):bool
Parameters

Name

Type

Description

$countryId

int

$merchandCountryId

int

$date

string

ParcelServicePresetRepositoryContract

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.

Namespace

Plenty\Modules\Order\Shipping\Contracts

Methods
public getPresetList($columns = [], $with = null, $parcelServiceName = null, $filters = []):void

Lists shipping profiles.

Parameters

Name

Type

Description

$columns

array

The columns (attributes) to retrieve

$with

string

The parameter contains the name of an relation

$parcelServiceName

string

Filter that restricts the search result to parcel service presets with a specified service name (e.g. 'DHL' for DHL)

$filters

array

Possible attributes are updatedAtBefore and updatedAtAfter (yyyy-mm-dd or yyyy-mm-dd hh:mm:ss)

public getPresetById($presetId, $columns = []):Plenty\Modules\Order\Shipping\ParcelService\Models\ParcelServicePreset
Return type: ParcelServicePreset

Gets a shipping profile. The ID of the shipping profile must be specified.

Parameters

Name

Type

Description

$presetId

int

The ID of the shipping profile

$columns

array

The columns (attributes) to retrieve

public getPresetNamesById($presetId):array

Gets a shipping profile names in all langauges. The ID of the shipping profile must be specified.

Parameters

Name

Type

Description

$presetId

int

The ID of the shipping profile

public getLastWeightedPresetCombinations($basket, $contactClass, $customParams = []):array

Calculate shipping costs and list last weighted preset combinations.

Parameters

Name

Type

Description

$basket

Basket

The basket

$contactClass

int

The ID of the contact class

$customParams

array

User-defined parameters

public getPreviewList($language = null, $useBackendName = false):array

Get an array with all parcel service preset with the ID as key and the name as value.

Parameters

Name

Type

Description

$language

string

The names will be returned in this language.

$useBackendName

bool

Use the backend name instead of the external name?

public create($data):Plenty\Modules\Order\Shipping\ParcelService\Models\ParcelServicePreset
Return type: ParcelServicePreset

Creates an parcel service preset

Parameters

Name

Type

Description

$data

array

The data as an associative array

public update($data, $id):Plenty\Modules\Order\Shipping\ParcelService\Models\ParcelServicePreset
Return type: ParcelServicePreset

Update an parcel service preset

Parameters

Name

Type

Description

$data

array

The data as an associative array

$id

int

The ID of the shipping profile

public delete($id):Plenty\Modules\Order\Shipping\ParcelService\Models\ParcelServicePreset
Return type: ParcelServicePreset

Delete a parcel service preset

Parameters

Name

Type

Description

$id

int

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($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

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.

Events

AfterShippingCostCalculated

An event class fired after the shipping calculation is done. Listeners can add fees to the shipping costs. * The shipping provider type name is mandatory. The ID of the order is optional.

Namespace

Plenty\Modules\Order\Shipping\Events

Methods
public getShippingServiceProvider():int

Get the shipping service provider

public __construct($shippingServiceProvider, $orderId, $shippingProfileId):void

AfterShippingCostCalculated constructor.

Parameters

Name

Type

Description

$shippingServiceProvider

string

The name of the shipping service provider

$orderId

int

The ID of the order

$shippingProfileId

int

The ID of the shipping profile

public getOrderId():int

Get the ID of the order.

public getAdditonalFee():float

Get the additional fee.

public addAdditionalFee($additionalFee):Plenty\Modules\Order\Shipping\Events\AfterShippingCostCalculated
Return type: AfterShippingCostCalculated

Set the additional fee.

Parameters

Name

Type

Description

$additionalFee

float

The additional fee

public getShippingProfileId():int

Get the ID of the shipping profile.

public setShippingProfileId($shippingProfileId):void

Set the ID of the shipping profile.

Parameters

Name

Type

Description

$shippingProfileId

int

The ID of the shipping profile

Models

DefaultShipping

The Default Shipping model is used to define the standard referrer, the standard shipping region and the payment methods.

Namespace

Plenty\Modules\Order\Shipping\Models

Properties
Name Type Description

id

int

The ID of the entry

referrerId

float

The ID of the referrer

shippingDestinationId

int

The ID of the shipping region

position

int

The position

paymentMethod1

int

The first payment method

paymentMethod2

int

The second payment method

paymentMethod3

int

The third payment method

Methods
public toArray()

Returns this model as an array.

Countries

Contracts

CountryRepositoryContract

Repository for Country

Namespace

Plenty\Modules\Order\Shipping\Countries\Contracts

Methods
public findIsoCode($countryId, $isoCodeType):string

Finds the ISO-Code

Parameters

Name

Type

Description

$countryId

int

$isoCodeType

string

public getCountryById($countryId):Plenty\Modules\Order\Shipping\Countries\Models\Country
Return type: Country

Gets a country

Parameters

Name

Type

Description

$countryId

int

public getCountriesList($active, $with, $onlyEUCountries = null):Illuminate\Support\Collection
Return type: Collection

Get countries

Parameters

Name

Type

Description

$active

int

$with

array

$onlyEUCountries

int

public getActiveCountriesList():Illuminate\Support\Collection
Return type: Collection

Get active countries

public getActiveCountryNameMap($language):array

Get names of countries

Parameters

Name

Type

Description

$language

string

public getCountryByIso($isoCode, $isoType):void

Gets a country.

Parameters

Name

Type

Description

$isoCode

string

$isoType

string

('isoCode2', 'isoCode3')

public getCountryStateByIso($countryId, $isoCode):Plenty\Modules\Order\Shipping\Countries\Models\CountryState
Return type: CountryState

Gets a country state

Parameters

Name

Type

Description

$countryId

int

$isoCode

string

public activateCountry($countryId):Plenty\Modules\Order\Shipping\Countries\Models\Country
Return type: Country

Activates a country

Parameters

Name

Type

Description

$countryId

int

public deactivateCountry($countryId):Plenty\Modules\Order\Shipping\Countries\Models\Country
Return type: Country

Deactivates a country

Parameters

Name

Type

Description

$countryId

int

public shouldKeepEUCountry($country):void
Parameters

Name

Type

Description

$country

Models

Country

The country model representing a country with allocated states and a list of names in different languages.

Namespace

Plenty\Modules\Order\Shipping\Countries\Models

Properties
Name Type Description

id

int

The country id.

name

string

The system country name.

shippingDestinationId

int

The shipping destination (region) id.

active

int

The active flag (1: active, 2: backend active, 3: supplier active

storehouseId

int

The id of the main warehouse in this country.

isoCode2

string

The ISO 3166 ALPHA-2 code of the country.

isoCode3

string

The ISO 3166 ALPHA-3 code of the country.

lang

string

The main language spoken in the country.

isCountryStateMandatory

bool

Flag that states if a country state is mandatory for the country.

states

array

An array with country states.

names

array

An array with country names in different languages.

vatCodes

array

An array with country vat codes.

region

ParcelServiceRegionName

The region of the country.

currencies

Methods
public toArray()

Returns this model as an array.

CountryName

The CountryName model containing a name of a country in a specified language.

Namespace

Plenty\Modules\Order\Shipping\Countries\Models

Properties
Name Type Description

id

int

language

string

name

string

Methods
public toArray()

Returns this model as an array.

CountryState

The CountryState model representing a state which belongs to a country specified by the countryId.

Namespace

Plenty\Modules\Order\Shipping\Countries\Models

Properties
Name Type Description

id

int

countryId

int

isoCode

string

name

string

isoCode3166

string

Methods
public toArray()

Returns this model as an array.

ExportDocuments

Contracts

ExportDocumentsContract

Repository for Export Documents

Namespace

Plenty\Modules\Order\Shipping\ExportDocuments\Contracts

Methods
public listExportDocumentsByOrderId($orderId):Plenty\Modules\Order\Shipping\ExportDocuments\Models\ExportDocument
Return type: ExportDocument

List export documents by order ID

Parameters

Name

Type

Description

$orderId

int

Models

ExportDocument

The Export Document model

Namespace

Plenty\Modules\Order\Shipping\ExportDocuments\Models

Properties
Name Type Description

id

int

orderId

int

packageNumber

int

base64Content

int

Methods
public toArray()

Returns this model as an array.

Information

Contracts

ShippingInformationRepositoryContract

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.

Namespace

Plenty\Modules\Order\Shipping\Information\Contracts

Methods
public getShippingInformationByOrderId($orderId):Plenty\Modules\Order\Shipping\Information\Models\ShippingInformation
Return type: ShippingInformation

Get Shipping Information by an order ID.

Parameters

Name

Type

Description

$orderId

int

The ID of the Order

public getShippingExportLabelByOrderId($orderId):void

Get export label for an order ID.

Parameters

Name

Type

Description

$orderId

int

The ID of the order

public getOrdersShippingInformation($searchParams):array

Get all the orders with their shipping information

Parameters

Name

Type

Description

$searchParams

array

public listOrdersShippingInformation($searchParams, $itemsPerPage = null, $page = null):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Get all the orders with their shipping information in a paginated form

Parameters

Name

Type

Description

$searchParams

array

$itemsPerPage

int

$page

int

public resetShippingInformation($orderId):void

Delete Shipping Information by an order ID

Parameters

Name

Type

Description

$orderId

int

The ID of the Order

public saveShippingInformation($data):Plenty\Modules\Order\Shipping\Information\Models\ShippingInformation
Return type: ShippingInformation

Create Shipping Information

Parameters

Name

Type

Description

$data

array

The shipping information data as associative array.

public updateAdditionalData($data, $orderId):Plenty\Modules\Order\Shipping\Information\Models\ShippingInformation
Return type: ShippingInformation

Update Additional Data of Shipping Information by Order ID

Parameters

Name

Type

Description

$data

array

The additional data as associative array.

$orderId

int

The ID of the order.

public updateShippingStatus($data, $orderId):Plenty\Modules\Order\Shipping\Information\Models\ShippingInformation
Return type: ShippingInformation

Update Shipping Status of Shipping Information by Order ID

Parameters

Name

Type

Description

$data

array

The status data as associative array.

$orderId

int

The ID of the order.

Models

ShippingInformation

The ShippingInformationModel represents additional shipping information for an order.

Namespace

Plenty\Modules\Order\Shipping\Information\Models

Properties
Name Type Description

orderId

int

The ID of the order

shippingServiceProvider

string

The name of the shipping service provider

transactionId

string

The ID of the transaction

shippingStatus

string

The shipping status. Possible values are 'open', 'prepared' and 'registered'.

shippingCosts

float

The shipping costs

additionalData

string

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.

registrationAt

int

The date and time the shipment was registered

shipmentAt

int

The date the items will be shipped

Methods
public toArray()

Returns this model as an array.

Package

Contracts

OrderShippingPackageItemsRepositoryContract

Create and get items in packages from order

Namespace

Plenty\Modules\Order\Shipping\Package\Contracts

Methods
public getItemsForPackage($packageId, $page = 1, $perPage = 1000, $sortBy = &quot;id&quot;, $sortOrder = &quot;desc&quot;):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackageItems
Return type: OrderShippingPackageItems

Get items for a package

Parameters

Name

Type

Description

$packageId

int

The ID of the package

$page

int

$perPage

int

$sortBy

string

$sortOrder

string

public getItemsInPackagesPalletsPaginated($orderId, $page = 1, $perPage = 1000, $sortBy = &quot;id&quot;, $sortOrder = &quot;asc&quot;):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackageItems
Return type: OrderShippingPackageItems

Get all the packed items in the packages in the pallets in the order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$page

int

$perPage

int

$sortBy

string

$sortOrder

string

public getItemsFromPackagesForOrder($orderId):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackageItems
Return type: OrderShippingPackageItems

Get items for an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

public getPackedItemsPerPackageForOrder($orderId):array

Get packed items in an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

public getPackedItemsFromPackage($packageId, $with = [], $page = 1, $perPage = 25, $sortBy = &quot;variationId&quot;, $sortOrder = &quot;asc&quot;):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackageItems
Return type: OrderShippingPackageItems

Get packed items in a package

Parameters

Name

Type

Description

$packageId

int

The ID of the package for which you want to get the items for

$with

array

Possible value is 'images' to get also the images for the items

$page

int

The page to get. By default, we take the first page

$perPage

int

The number of variations to get per each page. By default, we take 25 variations per page

$sortBy

string

The column for which to sort the values with. Default value is 'variationId'

$sortOrder

string

The order in which to sort the values. Possible values are 'asc' and 'desc'. Default value is ascending

public getUnpackedItemsFromPackagesForOrder($orderId):array

Get unpacked items for an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

public getUnpackedItemsForOrderPaginated($orderId, $page = 1, $perPage = 25, $sortBy = &quot;itemVariationId&quot;, $sortOrder = &quot;asc&quot;):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackageItems
Return type: OrderShippingPackageItems

Get all the unpacked items in the order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$page

int

The page to get. By default, we take the first page

$perPage

int

The number of variations to get per each page. By default, we take 25 variations per page

$sortBy

string

The column for which to sort the values with. Default value is 'itemVariationId'

$sortOrder

string

The order in which to sort the values. Possible values are 'asc' and 'desc'. Default value is ascending

public createItemsForPackageOrder($data, $packageId, $isCallFromLegacyCode = false):array

Create items for a package

Parameters

Name

Type

Description

$data

array

Array with data including item id, variation id and the quantity of the item in package

$packageId

int

The ID of the package. This ID is optional. If the ID is not provided, it must be present in the $data array

$isCallFromLegacyCode

bool

Optional. Flag to see if the call of this method is from legacy code or new code

public updateItemsInOrderShippingPackage($id, $data):int

Update package, variation or quantity for an order

Parameters

Name

Type

Description

$id

int

The ID of the order package item variation

$data

array

Array with data including package id, item id, variation id and/or the quantity of the item in package

public deleteItemsInOrderShippingPackage($id):int

Delete a variation of an item from package in an order

Parameters

Name

Type

Description

$id

int

The ID of the order package item variation

public updateItemsFromPackage($packageId, $itemId, $variationId, $data):int
Deprecated!

This method will not be supported in the future. Please refrain from using it as soon as possible.

Update items in a package

Parameters

Name

Type

Description

$packageId

int

The ID of the package

$itemId

int

The ID of the item

$variationId

int

The ID of the variation

$data

array

Array with data including item id, variation id and the quantity of the item in package

public deleteItemsFromPackage($packageId, $itemId, $variationId):Plenty\Repositories\Models\DeleteResponse
Deprecated!

This method will not be supported in the future. Please refrain from using it as soon as possible.

Return type: DeleteResponse

Delete a variation of an item from package in order

Parameters

Name

Type

Description

$packageId

int

The ID of the package

$itemId

int

The ID of the item

$variationId

int

The ID of the variation

OrderShippingPackageRepositoryContract

Create, get, update and delete order shipping packages.

Namespace

Plenty\Modules\Order\Shipping\Package\Contracts

Methods
public getOrderShippingPackage($orderShippingPackageId, $columns = [], $orderId = null):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackage
Return type: OrderShippingPackage

Get an order shipping package

Parameters

Name

Type

Description

$orderShippingPackageId

int

The ID of the order shipping package

$columns

array

The properties to be loaded

$orderId

int

The ID of an order

public listOrderShippingPackages($orderId, $columns = [], $with = [], $packageInputData = []):array

List order shipping packages

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$columns

array

The properties to be loaded

$with

array

(optional) Possible value is 'labelBase64' to get the label with the response

$packageInputData

array

(optional) The package data which is being added by the user in the UI

public getOrderShippingPackagesPaginated($orderId, $with = [], $page = 1, $perPage = 1000, $sortBy = &quot;id&quot;, $sortOrder = &quot;desc&quot;):array

Get all the packages for the given order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$with

array

(Optional) Possible values are 'labelBase64', 'items' to get the label and/or the items with the response

$page

int

$perPage

int

$sortBy

string

$sortOrder

string

public getPackagesFromPallet($palletId, $with = [], $page = 1, $perPage = 1000, $sortBy = &quot;id&quot;, $sortOrder = &quot;desc&quot;):array
Parameters

Name

Type

Description

$palletId

int

$with

array

$page

int

$perPage

int

$sortBy

string

$sortOrder

string

public createOrderShippingPackage($orderId, $data):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackage
Return type: OrderShippingPackage

Create an order shipping package

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$data

array

The request data

public updateOrderShippingPackage($orderShippingPackageId, $data):Plenty\Modules\Order\Shipping\Package\Models\OrderShippingPackage
Return type: OrderShippingPackage

Update an order shipping package

Parameters

Name

Type

Description

$orderShippingPackageId

int

The ID of the order shipping package

$data

array

The request data

public deleteOrderShippingPackage($orderShippingPackageId):void

Delete an order shipping package

Parameters

Name

Type

Description

$orderShippingPackageId

int

The ID of the order shipping package

public deleteAllPackagesInPallet($orderId, $palletId):void

Delete all order shipping packages in a pallet

Parameters

Name

Type

Description

$orderId

int

The ID of the order shipping package

$palletId

int

The ID of the pallet

public updateAllPackagesInPallet($orderId, $palletId, $data):void

Update all the packages in a pallet.

Parameters

Name

Type

Description

$orderId

int

$palletId

int

$data

array

Models

OrderShippingPackage

The order shipping package model

Namespace

Plenty\Modules\Order\Shipping\Package\Models

Properties
Name Type Description

id

int

The ID of the order shipping package

orderId

int

The ID of the order

packageId

int

The ID of the package

weight

int

The weight of the package in grams

extraWeight

int

The extra weight of the package in grams

itemsWeight

int

The items weight of the package in grams

packageNumber

string

The package number

labelPath

string

The path to the label

labelBase64

string

The base64 encoded label

exportLabelBase64

string

The base64 encoded export label

returnPackageNumber

string

The return package number

packageType

int

The type of the package. The following types are valid: <ul> <li>0: unpacked</li> <li>1: Bale</li> <li>2: Dispenser</li> <li>3: Coil</li> <li>4: Roll pallet</li> <li>5: Colli</li> <li>6: Container</li> <li>7: Bucket</li> <li>8: Cask</li> <li>9: Bottles</li> <li>10: European flat pallet</li> <li>11: Structural frame</li> <li>12: Gas cylinder</li> <li>13: Pallet cage</li> <li>14: Hobbock</li> <li>15: Half pallet</li> <li>16: Pallet of food items</li> <li>17: Wooden coaster</li> <li>18: IBC container</li> <li>19: Pitcher</li> <li>20: Wicker bottle</li> <li>21: Case</li> <li>22: Canister</li> <li>23: Customer pallet</li> <li>24: Cardboard box</li> <li>25: Composite packaging</li> <li>26: Package</li> <li>27: Ring</li> <li>28: Role</li> <li>29: Sack</li> <li>30: units</li> <li>31: Tank</li> <li>32: Drum</li> <li>34: Crate</li> <li>35: Quarter pallet</li> <li>36: Other pallets</li> <li>37: Bin</li> <li>38: One-way pallet</li> <li>39: Foil bag</li> </ul>

volume

float

The volume of the package

palletId

int

The id of the pallet of which the package belong to

isClosed

bool

Flag to say if the package is editable or not

createdAt

string

updatedAt

string

packageSscc

string

Amazon Vendor PackageSscc

mrn

string

Movement Reference Number (MRN)

atlasRegistration

int

ATLAS export declaration

order

Order

The order the package belongs to

items

OrderShippingPackageItems

The items inside the package.

Methods
public toArray()

Returns this model as an array.

OrderShippingPackageItems

The relation between package, item and variation model

Namespace

Plenty\Modules\Order\Shipping\Package\Models

Properties
Name Type Description

id

int

The ID of the order shipping package item. Primary key auto-increment

packageId

int

The ID of the package (id column from plenty_package_type2order)

itemId

int

The ID of the item (plenty_item_variation_base_item_id column from plenty_item_variation_base)

variationId

int

The ID of the variation (plenty_item_variation_base_id column from plenty_item_variation_base)

itemQuantity

float

The quantity of the item in the package

Methods
public toArray()

Returns this model as an array.

PackageType

Contracts

ShippingPackageTypeRepositoryContract

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.

Namespace

Plenty\Modules\Order\Shipping\PackageType\Contracts

Methods
public findShippingPackageTypeById($shippingPackageTypeId):Plenty\Modules\Order\Shipping\PackageType\Models\ShippingPackageType
Return type: ShippingPackageType

Gets a shipping package type. The ID of the shipping package type must be specified.

Parameters

Name

Type

Description

$shippingPackageTypeId

int

The ID of the shipping package type

public listShippingPackageTypes():array

Lists shipping packages types.

Models

ShippingPackageType

The shipping package type model.

Namespace

Plenty\Modules\Order\Shipping\PackageType\Models

Properties
Name Type Description

id

int

The ID of the shipping package type

name

string

The name of the shipping package type

width

int

The width of the shipping package type

individualWeight

int

The individual weight of the shipping package type

height

int

The height of the shipping package type

length

int

The length of the shipping package type

unit

string

The unit of the shipping package type dimension

maxWeight

int

The maximum weight of the shipping package type

maxVolume

int

The maximum volume of the shipping package type

volumeType

int

The volume type of the shipping package type

Methods
public toArray()

Returns this model as an array.

Pallet

Contracts

OrderShippingPalletRepositoryContract

Create, get, update and delete order shipping pallet.

Namespace

Plenty\Modules\Order\Shipping\Pallet\Contracts

Methods
public getOrderShippingPallet($orderShippingPalletId):Plenty\Modules\Order\Shipping\Pallet\Models\OrderShippingPallet
Return type: OrderShippingPallet

Get an order shipping pallet

Parameters

Name

Type

Description

$orderShippingPalletId

int

The ID of the order shipping pallet

public listOrderShippingPallets($filters, $with):array

List order shipping pallets

Parameters

Name

Type

Description

$filters

array

$with

array

public listPalletPackages($orderShippingPalletId, $orderId):array

Get all the packages in a pallet

Parameters

Name

Type

Description

$orderShippingPalletId

int

$orderId

int

public getPalletsFromOrders($orderIds):array

Get all pallets from given order IDs

Parameters

Name

Type

Description

$orderIds

array

public createOrderShippingPallet($data):Plenty\Modules\Order\Shipping\Pallet\Models\OrderShippingPallet
Return type: OrderShippingPallet

Create an order shipping pallet

Parameters

Name

Type

Description

$data

array

The request data

public updateOrderShippingPallet($orderShippingPalletId, $data):Plenty\Modules\Order\Shipping\Pallet\Models\OrderShippingPallet
Return type: OrderShippingPallet

Update an order shipping pallet

Parameters

Name

Type

Description

$orderShippingPalletId

int

The ID of the order shipping pallet

$data

array

The request data

public deleteOrderShippingPallet($orderShippingPalletId):Plenty\Modules\Order\Shipping\Pallet\Models\OrderShippingPallet
Return type: OrderShippingPallet

Delete an order shipping pallet

Parameters

Name

Type

Description

$orderShippingPalletId

int

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($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

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.

Models

OrderShippingPallet

The order shipping pallet model.

Namespace

Plenty\Modules\Order\Shipping\Pallet\Models

Properties
Name Type Description

id

int

The ID of the order shipping pallet

weight

float

The weight of the order shipping pallet, including it’s contents

individualWeight

float

The weight of the order shipping pallet

width

float

The width of the order shipping pallet

height

float

The height of the order shipping pallet

length

float

The length of the order shipping pallet

isStackable

bool

Flag to tell if the pallet is stackable or not. If true, another pallet can be placed over the current one

additionalInfo

int

Additional info

barcode

string

The barcode

isClosed

bool

Flag to tell if the pallet is closed or not. If true, the information within the pallet should not be changed anymore

palletSscc

string

Amazon Vendor PalletSscc

orderId

int

The id of the order

Methods
public toArray()

Returns this model as an array.

ParcelService

Contracts

ParcelServiceConstraintRepositoryContract

The ParcelServiceConstraintRepositoryContract is the interface for the parcel service constraint type repository.

Namespace

Plenty\Modules\Order\Shipping\ParcelService\Contracts

Methods
public create($data):void

Create a new parcel service constraint entry

Parameters

Name

Type

Description

$data

array

public getById($id):void

Fetch parcel service constraint by ID

Parameters

Name

Type

Description

$id

int

public delete($id):void

Delete a parcel service constant by ID

Parameters

Name

Type

Description

$id

int

Models

ParcelService

The Parcel Service Model

Namespace

Plenty\Modules\Order\Shipping\ParcelService\Models

Properties
Name Type Description

id

int

backendName

string

trackingUrl

string

shippingServiceProviderId

int

shippingServiceProviderAddress

string

splitTrackingUrl

int

splitDelimiter

string

shippingServiceProvider

ShippingServiceProvider

parcelServiceNames

Methods
public toArray()

Returns this model as an array.

ParcelServiceConstraint

The Parcel Service Constraint Model

Namespace

Plenty\Modules\Order\Shipping\ParcelService\Models

Properties
Name Type Description

parcelServiceRegionId

int

constraintType

int

subConstraintType

int

constraintLimit

int

cost

int

startValue

int

Methods
public toArray()

Returns this model as an array.

ParcelServiceName

The Parcel Service Name Model

Namespace

Plenty\Modules\Order\Shipping\ParcelService\Models

Properties
Name Type Description

parcelServiceId

int

name

string

lang

string

Methods
public toArray()

Returns this model as an array.

ParcelServicePreset

The Parcel Service Preset Model

Namespace

Plenty\Modules\Order\Shipping\ParcelService\Models

Properties
Name Type Description

id

int

The ID of the shipping profile (autoincrement value)

parcelServiceId

int

The ID of the shipping service provider

backendName

string

The back end name of the shipping profile

flag

int

The icon of the shipping profile

priority

int

The priority of the shipping profile

category

int

The category of the shipping profile

useArticlePorto

int

Flag that indicates if the extra shipping charge saved in the item data record is used

isInsured

int

Flag that indicates if the shipping profile is insured

isExpress

int

Flag that indicates if the shipping profile is used for express delivery

isPostident

int

Flag that indicates if the shipping profile includes an authority verification

isDefaultEnabled

int

Flag that indicates if the shipping profile is automatically assigned to new items

islandFee

float

The extra charge for islands saved in the shipping profile

isCod

int

Flag that indicates Cash on Delivery

supportedMultishop

array

The clients (stores) that are activated for the shipping profile

supportedReferrer

array

The order referrers that are activated for the shipping profile

subreferrerSupport

array

This field is currently without any function.

excludedPaymentMethods

array

The blocked payment methods that are not offered for the shipping profile

excludedCustomerGroups

array

The blocked customer groups for the shipping profile. Blocked customer groups cannot select the shipping profile during checkout.

shippingGroup

string

The group of the shipping profile

dispatchIdentifier

string

This field is currently without any function.

auctionType

int

The eBay listing type for the shipping profile

supportedLoyaltyPrograms

array

The loyalty programs that are supported by the shipping profile

updatedAt

string

The date the shipping profile was last updated

parcelServicePresetNames

array

parcelServiceNames

array

showDataPrivacyAgreementHint

int

transmitPrivacyRule

string

alternativeEmail

string

alternativePhone

string

isParcelBox

int

Indicates whether the e.g. paketshop is supported

isPostOffice

int

Indicates whether the e.g. postfiliale is supported

parcelService

ParcelService

The parcel service.

parcelServiceRegionConstraint

ParcelServiceRegion

The parcel service region constraint

Methods
public toArray()

Returns this model as an array.

ParcelServicePresetName

The Parcel Service Preset Name Model

Namespace

Plenty\Modules\Order\Shipping\ParcelService\Models

Properties
Name Type Description

presetId

int

name

string

lang

string

Methods
public toArray()

Returns this model as an array.

ParcelServiceRegion

Contracts

ParcelServiceRegionNameRepositoryContract

Get parcel service region name

Namespace

Plenty\Modules\Order\Shipping\ParcelServiceRegion\Contracts

Methods
public create($data):Plenty\Modules\Order\Shipping\ParcelServiceRegion\Models\ParcelServiceRegionName
Return type: ParcelServiceRegionName

Creates a Region

Parameters

Name

Type

Description

$data

array

public getAllRegions():array

Return all the regions

ParcelServiceRegionRepositoryContract

Get parcel service region

Namespace

Plenty\Modules\Order\Shipping\ParcelServiceRegion\Contracts

Methods
public create($data):Plenty\Modules\Order\Shipping\ParcelServiceRegion\Models\ParcelServiceRegion
Return type: ParcelServiceRegion

Creates a ParcelServiceRegion

Parameters

Name

Type

Description

$data

array

public delete($id):void

Deletes a ParcelServiceRegion

Parameters

Name

Type

Description

$id

int

public getParcelServiceRegion($parcelServiceRegionId, $columns = []):Plenty\Modules\Order\Shipping\ParcelServiceRegion\Models\ParcelServiceRegion
Return type: ParcelServiceRegion

Get a parcel service region

Parameters

Name

Type

Description

$parcelServiceRegionId

int

The ID of the parcel service region.

$columns

array

public listParcelServiceRegions($parcelServicePresetId, $columns = []):array

Lists parcel service regions by parcel service preset id.

Parameters

Name

Type

Description

$parcelServicePresetId

int

The ID of the parcel service preset.

$columns

array

Models

ParcelServiceRegion

The parcel service region model.

Namespace

Plenty\Modules\Order\Shipping\ParcelServiceRegion\Models

Properties
Name Type Description

id

int

The ID of the parcel service region

shippingRegionId

int

The ID of the shipping region

parcelServicePresetId

int

The ID of the parcel service preset

shippingRegionName

string

The name of the shipping region

serviceType

int

Type of the parcel service

Methods
public toArray()

Returns this model as an array.

ParcelServiceRegionName

The parcel service region name model.

Namespace

Plenty\Modules\Order\Shipping\ParcelServiceRegion\Models

Properties
Name Type Description

id

int

The ID of the parcel service region name

name

int

The name of the shipping region

Methods
public toArray()

Returns this model as an array.

Returns

Contracts

ReturnsRepositoryContract

The ReturnsRepositoryContract is the interface for the order returns repository. This interface allows to register, assign to order and list order returns.

Namespace

Plenty\Modules\Order\Shipping\Returns\Contracts

Methods
public registerReturns($pluginName, $orderIds):Plenty\Modules\Order\Shipping\Returns\Models\RegisterReturnsResult
Return type: RegisterReturnsResult

Register a new return

Parameters

Name

Type

Description

$pluginName

string

$orderIds

array

public getReturnsLabelById($labelId, $with):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Get return label by ID

Parameters

Name

Type

Description

$labelId

int

$with

array

public assignLabel2Return($orderId, $returnsId):Plenty\Modules\Order\Shipping\Returns\Models\OrderReturns
Return type: OrderReturns

Assign return label to order

Parameters

Name

Type

Description

$orderId

int

$returnsId

int

public getOrderReturns($orderId, $with = [], $page = 1, $itemsPerPage = 50, $sortBy = &quot;id&quot;, $sortOrder = &quot;desc&quot;):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Get a paginated list of all order returns

Parameters

Name

Type

Description

$orderId

int

$with

array

$page

int

$itemsPerPage

int

$sortBy

string

$sortOrder

string

public getOrderReturnsByReturnsOrderId($returnsOrderId, $with = [], $page = 1, $itemsPerPage = 50, $sortBy = &quot;id&quot;, $sortOrder = &quot;desc&quot;):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Get a paginated list of all order returns

Parameters

Name

Type

Description

$returnsOrderId

int

$with

array

$page

int

$itemsPerPage

int

$sortBy

string

$sortOrder

string

public createReturnsOrder($orderId, $data):void

Create a return

Parameters

Name

Type

Description

$orderId

int

$data

array

public updateReturnsOrder($returnsOrderId, $data):void

Update existing return

Parameters

Name

Type

Description

$returnsOrderId

int

$data

array

public deleteReturnsByReturnsOrderId($returnsOrderId):void
Parameters

Name

Type

Description

$returnsOrderId

int

ReturnsServiceProviderRepositoryContract

The ReturnsServiceProviderRepositoryContract is the interface for the returns service provider repository. This interface allows to list returns service providers.

Namespace

Plenty\Modules\Order\Shipping\Returns\Contracts

Methods
public getReturnsServiceProviderList($columns = [], $page = 1, $itemsPerPage = 50, $filters = [], $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Get a paginated list of returns services providers

Parameters

Name

Type

Description

$columns

array

$page

int

$itemsPerPage

int

$filters

array

$with

array

public findById($returnsServiceProviderId):Plenty\Modules\Order\Shipping\Returns\Models\ReturnsServiceProvider
Return type: ReturnsServiceProvider

Find a returns service provider by ID

Parameters

Name

Type

Description

$returnsServiceProviderId

int

public findByName($returnsServiceProviderName):array

Find a returns service provider by name

Parameters

Name

Type

Description

$returnsServiceProviderName

string

public saveReturnsServiceProvider($pluginName, $returnProviderAlias = null):Plenty\Modules\Order\Shipping\Returns\Models\ReturnsServiceProvider
Return type: ReturnsServiceProvider

Save a returns service provider

Parameters

Name

Type

Description

$pluginName

string

$returnProviderAlias

string

public getReturnsServiceProvider($orderId):Plenty\Modules\Order\Shipping\Returns\Models\ReturnsServiceProvider
Return type: ReturnsServiceProvider

Get the returns service provider for an order

Parameters

Name

Type

Description

$orderId

int

public pluginList():void

Models

FailedRegisterOrderReturns

The FailedRegisterOrderReturns model.

Namespace

Plenty\Modules\Order\Shipping\Returns\Models

Methods
public addErrorMessage($errorMessage):void

Add a new error message

Parameters

Name

Type

Description

$errorMessage

string

public setOrderId($orderId):void

Set the order ID variable

Parameters

Name

Type

Description

$orderId

int

public addException($exception):void

Add a new exception object

Parameters

Name

Type

Description

$exception

public get($key):void
Parameters

Name

Type

Description

$key

string

public hasGetMutator($key):bool

Determine if a get mutator exists for an attribute.

Parameters

Name

Type

Description

$key

string

public setAttributes($attributes):void
Parameters

Name

Type

Description

$attributes

public setAttribute($key, $value):Plenty\Repositories\Models\DataModel
Return type: DataModel

Set a given attribute on the model.

Parameters

Name

Type

Description

$key

string

$value

public hasSetMutator($key):bool

Determine if a set mutator exists for an attribute.

Parameters

Name

Type

Description

$key

string

public changeValue($key, $callback):void
Parameters

Name

Type

Description

$key

string

$callback

callable

public offsetExists($offset):bool
Parameters

Name

Type

Description

$offset

public offsetGet($offset):void
Parameters

Name

Type

Description

$offset

public offsetSet($offset, $value):void
Parameters

Name

Type

Description

$offset

$value

public offsetUnset($offset):void
Parameters

Name

Type

Description

$offset

public toArray($translate = false):array
Parameters

Name

Type

Description

$translate

bool

Flag indicating if values should be translated.

public toJson($options):string
Parameters

Name

Type

Description

$options

int

public jsonSerialize():void
public fill($attributes):Plenty\Repositories\Models\DataModel
Return type: DataModel

Fill the model with an array of attributes.

Parameters

Name

Type

Description

$attributes

array

public isFillable($key):bool

Determine if the given attribute may be mass assigned.

Parameters

Name

Type

Description

$key

string

public getFillable():array

Get the fillable attributes for the model.

public fillable($fillable):Plenty\Repositories\Models\DataModel
Return type: DataModel

Set the fillable attributes for the model.

Parameters

Name

Type

Description

$fillable

array

public hasCast($key, $types = null):bool

Determine whether an attribute should be cast to a native type.

Parameters

Name

Type

Description

$key

string

$types

public fromJson($value, $asObject = false):void

Decode the given JSON back into an array or object.

Parameters

Name

Type

Description

$value

string

$asObject

bool

OrderReturns

The model for OrderReturns

Namespace

Plenty\Modules\Order\Shipping\Returns\Models

Properties
Name Type Description

id

int

orderId

int

returnsOrderId

int

providerId

int

createdAt

Carbon

fileName

string

externalNumber

string

externalData

string

availableUntil

Carbon

Methods
public toArray()

Returns this model as an array.

RegisterOrderReturnsResponse

The RegisterOrderReturnsResponse model.

Namespace

Plenty\Modules\Order\Shipping\Returns\Models

Methods
public addSuccessfullyRegisteredReturns($successfullyRegisteredReturn):void

Add successfully registered order returns

Parameters

Name

Type

Description

$successfullyRegisteredReturn

SuccessfullyRegisteredOrderReturns

public addFailedRegisterOrderReturns($failedRegisterOrderReturn):void

Add failed registered order returns

Parameters

Name

Type

Description

$failedRegisterOrderReturn

FailedRegisterOrderReturns

public get($key):void
Parameters

Name

Type

Description

$key

string

public hasGetMutator($key):bool

Determine if a get mutator exists for an attribute.

Parameters

Name

Type

Description

$key

string

public setAttributes($attributes):void
Parameters

Name

Type

Description

$attributes

public setAttribute($key, $value):Plenty\Repositories\Models\DataModel
Return type: DataModel

Set a given attribute on the model.

Parameters

Name

Type

Description

$key

string

$value

public hasSetMutator($key):bool

Determine if a set mutator exists for an attribute.

Parameters

Name

Type

Description

$key

string

public changeValue($key, $callback):void
Parameters

Name

Type

Description

$key

string

$callback

callable

public offsetExists($offset):bool
Parameters

Name

Type

Description

$offset

public offsetGet($offset):void
Parameters

Name

Type

Description

$offset

public offsetSet($offset, $value):void
Parameters

Name

Type

Description

$offset

$value

public offsetUnset($offset):void
Parameters

Name

Type

Description

$offset

public toArray($translate = false):array
Parameters

Name

Type

Description

$translate

bool

Flag indicating if values should be translated.

public toJson($options):string
Parameters

Name

Type

Description

$options

int

public jsonSerialize():void
public fill($attributes):Plenty\Repositories\Models\DataModel
Return type: DataModel

Fill the model with an array of attributes.

Parameters

Name

Type

Description

$attributes

array

public isFillable($key):bool

Determine if the given attribute may be mass assigned.

Parameters

Name

Type

Description

$key

string

public getFillable():array

Get the fillable attributes for the model.

public fillable($fillable):Plenty\Repositories\Models\DataModel
Return type: DataModel

Set the fillable attributes for the model.

Parameters

Name

Type

Description

$fillable

array

public hasCast($key, $types = null):bool

Determine whether an attribute should be cast to a native type.

Parameters

Name

Type

Description

$key

string

$types

public fromJson($value, $asObject = false):void

Decode the given JSON back into an array or object.

Parameters

Name

Type

Description

$value

string

$asObject

bool

RegisterReturnsResult

The model for RegisterReturnsResult

Namespace

Plenty\Modules\Order\Shipping\Returns\Models

Properties
Name Type Description

orderReturnsList

array

failedRegisterOrderReturnsList

array

Methods
public toArray()

Returns this model as an array.

ReturnsServiceProvider

The ReturnsServiceProvider model.

Namespace

Plenty\Modules\Order\Shipping\Returns\Models

Properties
Name Type Description

id

int

The ID of the returns service provider

name

string

The name of the returns service provider

pluginId

int

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

Methods
public toArray()

Returns this model as an array.

SuccessfullyRegisteredOrderReturns

The model for SuccessfullyRegisteredOrderReturns

Namespace

Plenty\Modules\Order\Shipping\Returns\Models

Methods
public setOrderId($orderId):void

Set orderId variable

Parameters

Name

Type

Description

$orderId

int

public setFileName($fileName):void

Set fileName variable

Parameters

Name

Type

Description

$fileName

string

public setExternalNumber($externalNumber):void

Set externalNumber variable

Parameters

Name

Type

Description

$externalNumber

string

public setExternalData($externalData):void

Set externalData variable

Parameters

Name

Type

Description

$externalData

array

public setAvailableUntil($availiableUntil):void

Set availableUntil variable

Parameters

Name

Type

Description

$availiableUntil

string

public setLabelBase64($labelBase64):void

Set labelBase64 variable

Parameters

Name

Type

Description

$labelBase64

string

public setReturnsOrderId($returnsOrderId):void

Set returnsOrderId variable

Parameters

Name

Type

Description

$returnsOrderId

int

public get($key):void
Parameters

Name

Type

Description

$key

string

public hasGetMutator($key):bool

Determine if a get mutator exists for an attribute.

Parameters

Name

Type

Description

$key

string

public setAttributes($attributes):void
Parameters

Name

Type

Description

$attributes

public setAttribute($key, $value):Plenty\Repositories\Models\DataModel
Return type: DataModel

Set a given attribute on the model.

Parameters

Name

Type

Description

$key

string

$value

public hasSetMutator($key):bool

Determine if a set mutator exists for an attribute.

Parameters

Name

Type

Description

$key

string

public changeValue($key, $callback):void
Parameters

Name

Type

Description

$key

string

$callback

callable

public offsetExists($offset):bool
Parameters

Name

Type

Description

$offset

public offsetGet($offset):void
Parameters

Name

Type

Description

$offset

public offsetSet($offset, $value):void
Parameters

Name

Type

Description

$offset

$value

public offsetUnset($offset):void
Parameters

Name

Type

Description

$offset

public toArray($translate = false):array
Parameters

Name

Type

Description

$translate

bool

Flag indicating if values should be translated.

public toJson($options):string
Parameters

Name

Type

Description

$options

int

public jsonSerialize():void
public fill($attributes):Plenty\Repositories\Models\DataModel
Return type: DataModel

Fill the model with an array of attributes.

Parameters

Name

Type

Description

$attributes

array

public isFillable($key):bool

Determine if the given attribute may be mass assigned.

Parameters

Name

Type

Description

$key

string

public getFillable():array

Get the fillable attributes for the model.

public fillable($fillable):Plenty\Repositories\Models\DataModel
Return type: DataModel

Set the fillable attributes for the model.

Parameters

Name

Type

Description

$fillable

array

public hasCast($key, $types = null):bool

Determine whether an attribute should be cast to a native type.

Parameters

Name

Type

Description

$key

string

$types

public fromJson($value, $asObject = false):void

Decode the given JSON back into an array or object.

Parameters

Name

Type

Description

$value

string

$asObject

bool

Services

RegisterReturnsService

The RegisterReturnsService class offers the possibility to register returns, get returns label and persist returns label.

Namespace

Plenty\Modules\Order\Shipping\Returns\Services

Methods
public registerReturns($pluginName, $orderIds):Plenty\Modules\Order\Shipping\Returns\Models\RegisterReturnsResult
Return type: RegisterReturnsResult

Register returns for each order ID

Parameters

Name

Type

Description

$pluginName

string

$orderIds

array

public persistLabel($labelBase64, $returns):Plenty\Modules\Document\Models\Document
Return type: Document

Save the return label in base64

Parameters

Name

Type

Description

$labelBase64

string

$returns

OrderReturns

public getLabel($orderReturns):string

Get the return label

Parameters

Name

Type

Description

$orderReturns

OrderReturns

ReturnsServiceProviderService

The ReturnsServiceProviderService class offers the possibility to register a returns service provider class and method that can be called by plentymarkets returns controllers.

Namespace

Plenty\Modules\Order\Shipping\Returns\Services

Methods
public registerReturnsProvider($returnsServiceProviderCode, $returnsServiceProviderLabel, $returnsServiceProviderClass, $useParentOrderId = true):bool

Register returns service provider

Parameters

Name

Type

Description

$returnsServiceProviderCode

string

$returnsServiceProviderLabel

string

$returnsServiceProviderClass

string

$useParentOrderId

bool

public getReturnsServiceProviderEntryById($providerId):Plenty\Modules\Order\Shipping\Returns\Services\Entries\ReturnsServiceProviderEntry
Return type: ReturnsServiceProviderEntry

Get returns service provider by id

Parameters

Name

Type

Description

$providerId

int

public hasReturnsServiceProviderMethod($returnsServiceProviderCode, $methodName):bool

Returns boolean whether the returns service provider has or has not the given method

Parameters

Name

Type

Description

$returnsServiceProviderCode

string

$methodName

string

Services

Entries

ReturnsServiceProviderEntry

The returns provider entry contains all information needed to use module returns in plentymarkets returns .

Namespace

Plenty\Modules\Order\Shipping\Returns\Services\Entries

Methods
public getReturnsServiceProviderLabel():string

Get the returns service provider label

public setReturnsServiceProviderLabel($returnsServiceProviderLabel):Plenty\Modules\Order\Shipping\Returns\Services\Entries\ReturnsServiceProviderEntry
Return type: ReturnsServiceProviderEntry

Set the returns service provider label

Parameters

Name

Type

Description

$returnsServiceProviderLabel

string

public getReturnsServiceProviderCode():string

Get the return service provider code

public setReturnsServiceProviderCode($returnsServiceProviderCode):Plenty\Modules\Order\Shipping\Returns\Services\Entries\ReturnsServiceProviderEntry
Return type: ReturnsServiceProviderEntry

Set the returns service provider code

Parameters

Name

Type

Description

$returnsServiceProviderCode

string

public getReturnsServiceProviderClass($methodName):string

Get the returns service provider class

Parameters

Name

Type

Description

$methodName

string

public methodExists($methodName):bool

Check if method exists in returnsServiceProviderClass

Parameters

Name

Type

Description

$methodName

string

public getProviderId():int

Get the provider ID

public getUseParentOrderId():bool

Get setting for using parent order ID

ShippingServiceProviderEntry

The shipping provider entry contains all information needed to use module shipping in plentymarkets shipping .

Namespace

Plenty\Modules\Order\Shipping\ServiceProvider\Services\Entries

Methods
public getShippingServiceProviderClasses():array

Get the shipping service provider classes

public getShippingServiceProviderNames():void

Get the shipping service provider names

public setShippingServiceProviderNames($shippingServiceProviderNames):Plenty\Modules\Order\Shipping\ServiceProvider\Services\Entries\ShippingServiceProviderEntry
Return type: ShippingServiceProviderEntry

Set the shipping service provider names

Parameters

Name

Type

Description

$shippingServiceProviderNames

array

public getShippingServiceProviderCode():string

Get the shipping service provider code

public setShippingServiceProviderCode($shippingServiceProviderCode):Plenty\Modules\Order\Shipping\ServiceProvider\Services\Entries\ShippingServiceProviderEntry
Return type: ShippingServiceProviderEntry

Set the shipping service provider entry

Parameters

Name

Type

Description

$shippingServiceProviderCode

string

public getShippingServiceProviderClass($methodName):string

Get the shipping service provider class

Parameters

Name

Type

Description

$methodName

string

public methodExists($methodName):bool

Check if method exists in shipping service provider classes

Parameters

Name

Type

Description

$methodName

string

Tax

TaxInformation

This model holds all information about the data used to detect the order taxes.

Namespace

Plenty\Modules\Order\Legacy\Services\Tax

Methods
public getLocationId():int

Get the location ID.

public getBillingCountryId():int

Get the billing country ID.

public getDeliveryCountryId():int

Get the delivery country ID.

public getBillingTaxIdNumber():string

Get the tax id number of the billing address.

public getDeliveryTaxIdNumber():string

Get the tax id number of the delivery address.

public getDate():string

Get the date.

public getHasEntryCertificate():bool

Get whether the delivery address ha sn entry cerificat or not.

ServiceProvider

Contracts

ShippingServiceProviderPluginRepositoryContract

The ShippingServiceProviderPluginRepositoryContract is the interface for the shipping service provider plugin repository. This interface allows to list shipping service provider plugins.

Namespace

Plenty\Modules\Order\Shipping\ServiceProvider\Contracts

Methods
public plugins():void

Return list of shipping service provider plugins

public filteredPluginList($filter):void

Return list of shipping service provider plugins using a filter

Parameters

Name

Type

Description

$filter

string

Filter that restricts the search result

ShippingServiceProviderRepositoryContract

The ShippingServiceProviderRepositoryContract is the interface for the shipping service provider repository. This interface allows to list shipping service providers.

Namespace

Plenty\Modules\Order\Shipping\ServiceProvider\Contracts

Methods
public all($columns = [], $page = 1, $itemsPerPage = 50, $filters = [], $with = []):void

Lists shipping service providers.

Parameters

Name

Type

Description

$columns

array

The columns to retrieve

$page

int

The page of results to search for

$itemsPerPage

int

The number of items to list per page

$filters

array

Filters that restrict the search result

$with

array

The releations to be loaded with the shipping service provider

public find($shippingServiceProviderId):Plenty\Modules\Order\Shipping\ServiceProvider\Models\ShippingServiceProvider
Return type: ShippingServiceProvider

Gets a shipping service provider. The ID of the shipping service provider must be specified.

Parameters

Name

Type

Description

$shippingServiceProviderId

int

The ID of the shipping service provider

public findByName($shippingServiceProviderName):Plenty\Modules\Order\Shipping\ServiceProvider\Models\ShippingServiceProvider
Return type: ShippingServiceProvider

Gets a shipping service provider. The name of the shipping service provider must be specified.

Parameters

Name

Type

Description

$shippingServiceProviderName

string

The name of the shipping service provider

public saveShippingServiceProvider($pluginName, $shippingServiceProviderName, $icon = null):Plenty\Modules\Order\Shipping\ServiceProvider\Models\ShippingServiceProvider
Return type: ShippingServiceProvider

Creates a shipping service provider or updates it if already existing

Parameters

Name

Type

Description

$pluginName

string

The plugin name the plugin is registered with

$shippingServiceProviderName

string

The name of the shipping service provider

$icon

string

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.

Models

FailedRegisterShipment

The FailedRegisterShipment model.

Namespace

Plenty\Modules\Order\Shipping\ServiceProvider\Models

Methods
public addErrorMessage($errorMessage):void
Parameters

Name

Type

Description

$errorMessage

string

public addException($exception):void
Parameters

Name

Type

Description

$exception

public setOrderId($orderId):void
Parameters

Name

Type

Description

$orderId

int

public get($key):void
Parameters

Name

Type

Description

$key

string

public hasGetMutator($key):bool

Determine if a get mutator exists for an attribute.

Parameters

Name

Type

Description

$key

string

public setAttributes($attributes):void
Parameters

Name

Type

Description

$attributes

public setAttribute($key, $value):Plenty\Repositories\Models\DataModel
Return type: DataModel

Set a given attribute on the model.

Parameters

Name

Type

Description

$key

string

$value

public hasSetMutator($key):bool

Determine if a set mutator exists for an attribute.

Parameters

Name

Type

Description

$key

string

public changeValue($key, $callback):void
Parameters

Name

Type

Description

$key

string

$callback

callable

public offsetExists($offset):bool
Parameters

Name

Type

Description

$offset

public offsetGet($offset):void
Parameters

Name

Type

Description

$offset

public offsetSet($offset, $value):void
Parameters

Name

Type

Description

$offset

$value

public offsetUnset($offset):void
Parameters

Name

Type

Description

$offset

public toArray($translate = false):array
Parameters

Name

Type

Description

$translate

bool

Flag indicating if values should be translated.

public toJson($options):string
Parameters

Name

Type

Description

$options

int

public jsonSerialize():void
public fill($attributes):Plenty\Repositories\Models\DataModel
Return type: DataModel

Fill the model with an array of attributes.

Parameters

Name

Type

Description

$attributes

array

public isFillable($key):bool

Determine if the given attribute may be mass assigned.

Parameters

Name

Type

Description

$key

string

public getFillable():array

Get the fillable attributes for the model.

public fillable($fillable):Plenty\Repositories\Models\DataModel
Return type: DataModel

Set the fillable attributes for the model.

Parameters

Name

Type

Description

$fillable

array

public hasCast($key, $types = null):bool

Determine whether an attribute should be cast to a native type.

Parameters

Name

Type

Description

$key

string

$types

public fromJson($value, $asObject = false):void

Decode the given JSON back into an array or object.

Parameters

Name

Type

Description

$value

string

$asObject

bool

RegisterShipmentResponse

The RegisterShipmentResponse model.

Namespace

Plenty\Modules\Order\Shipping\ServiceProvider\Models

Methods
public addSuccessfullyRegisteredShipment($successfullyRegisteredShipment):void
Parameters

Name

Type

Description

$successfullyRegisteredShipment

SuccessfullyRegisteredShipment

Object containing data for successfully registering a shipment

public addFailedRegisterShipment($failedRegisterShipment):void
Parameters

Name

Type

Description

$failedRegisterShipment

FailedRegisterShipment

Object containing data when shipment registration was not successful, e.g. incorrect or missing postcode

public get($key):void
Parameters

Name

Type

Description

$key

string

public hasGetMutator($key):bool

Determine if a get mutator exists for an attribute.

Parameters

Name

Type

Description

$key

string

public setAttributes($attributes):void
Parameters

Name

Type

Description

$attributes

public setAttribute($key, $value):Plenty\Repositories\Models\DataModel
Return type: DataModel

Set a given attribute on the model.

Parameters

Name

Type

Description

$key

string

$value

public hasSetMutator($key):bool

Determine if a set mutator exists for an attribute.

Parameters

Name

Type

Description

$key

string

public changeValue($key, $callback):void
Parameters

Name

Type

Description

$key

string

$callback

callable

public offsetExists($offset):bool
Parameters

Name

Type

Description

$offset

public offsetGet($offset):void
Parameters

Name

Type

Description

$offset

public offsetSet($offset, $value):void
Parameters

Name

Type

Description

$offset

$value

public offsetUnset($offset):void
Parameters

Name

Type

Description

$offset

public toArray($translate = false):array
Parameters

Name

Type

Description

$translate

bool

Flag indicating if values should be translated.

public toJson($options):string
Parameters

Name

Type

Description

$options

int

public jsonSerialize():void
public fill($attributes):Plenty\Repositories\Models\DataModel
Return type: DataModel

Fill the model with an array of attributes.

Parameters

Name

Type

Description

$attributes

array

public isFillable($key):bool

Determine if the given attribute may be mass assigned.

Parameters

Name

Type

Description

$key

string

public getFillable():array

Get the fillable attributes for the model.

public fillable($fillable):Plenty\Repositories\Models\DataModel
Return type: DataModel

Set the fillable attributes for the model.

Parameters

Name

Type

Description

$fillable

array

public hasCast($key, $types = null):bool

Determine whether an attribute should be cast to a native type.

Parameters

Name

Type

Description

$key

string

$types

public fromJson($value, $asObject = false):void

Decode the given JSON back into an array or object.

Parameters

Name

Type

Description

$value

string

$asObject

bool

ShippingServiceProvider

The service provider model

Namespace

Plenty\Modules\Order\Shipping\ServiceProvider\Models

Properties
Name Type Description

id

int

The ID of the shipping service provider

name

string

The name of the shipping service provider

pluginId

int

The optional ID of the plugin when the shipping service provider is registered as a plugin

icon

string

The optional path of the icon

createdAt

The time the shipping service provider was created

updatedAt

The time the shipping service provider was updated

Methods
public toArray()

Returns this model as an array.

SuccessfullyRegisteredShipment

The SuccessfullyRegisteredShipment model.

Namespace

Plenty\Modules\Order\Shipping\ServiceProvider\Models

Methods
public setOrderId($orderId):void

Set the order ID.

Parameters

Name

Type

Description

$orderId

int

The ID of the order

public setHasNewPackageNumber($hasNewPackageNumber):void

Set the variable $hasNewPackageNumber.

Parameters

Name

Type

Description

$hasNewPackageNumber

bool

Flag that indicates whether the order has a new package number

public addMessage($message):void

Add a message.

Parameters

Name

Type

Description

$message

string

The message

public addPackage($package):void

Add a package.

Parameters

Name

Type

Description

$package

OrderShippingPackage

The order shipping package

public get($key):void
Parameters

Name

Type

Description

$key

string

public hasGetMutator($key):bool

Determine if a get mutator exists for an attribute.

Parameters

Name

Type

Description

$key

string

public setAttributes($attributes):void
Parameters

Name

Type

Description

$attributes

public setAttribute($key, $value):Plenty\Repositories\Models\DataModel
Return type: DataModel

Set a given attribute on the model.

Parameters

Name

Type

Description

$key

string

$value

public hasSetMutator($key):bool

Determine if a set mutator exists for an attribute.

Parameters

Name

Type

Description

$key

string

public changeValue($key, $callback):void
Parameters

Name

Type

Description

$key

string

$callback

callable

public offsetExists($offset):bool
Parameters

Name

Type

Description

$offset

public offsetGet($offset):void
Parameters

Name

Type

Description

$offset

public offsetSet($offset, $value):void
Parameters

Name

Type

Description

$offset

$value

public offsetUnset($offset):void
Parameters

Name

Type

Description

$offset

public toArray($translate = false):array
Parameters

Name

Type

Description

$translate

bool

Flag indicating if values should be translated.

public toJson($options):string
Parameters

Name

Type

Description

$options

int

public jsonSerialize():void
public fill($attributes):Plenty\Repositories\Models\DataModel
Return type: DataModel

Fill the model with an array of attributes.

Parameters

Name

Type

Description

$attributes

array

public isFillable($key):bool

Determine if the given attribute may be mass assigned.

Parameters

Name

Type

Description

$key

string

public getFillable():array

Get the fillable attributes for the model.

public fillable($fillable):Plenty\Repositories\Models\DataModel
Return type: DataModel

Set the fillable attributes for the model.

Parameters

Name

Type

Description

$fillable

array

public hasCast($key, $types = null):bool

Determine whether an attribute should be cast to a native type.

Parameters

Name

Type

Description

$key

string

$types

public fromJson($value, $asObject = false):void

Decode the given JSON back into an array or object.

Parameters

Name

Type

Description

$value

string

$asObject

bool

Services

ShippingServiceProviderService

The ShippingServiceProviderService class offers the possibility to register a shipping provider class and method that can be called by plentymarkets shipping controllers.

Namespace

Plenty\Modules\Order\Shipping\ServiceProvider\Services

Methods
public registerShippingProvider($shippingServiceProviderCode, $shippingServiceProviderNames, $shippingServiceProviderClasses):bool

Registers a new shipping provider

Parameters

Name

Type

Description

$shippingServiceProviderCode

string

$shippingServiceProviderNames

$shippingServiceProviderClasses

public hasShippingServiceProviderMethod($shippingServiceProviderCode, $methodName):bool

Check if shipping service provider has specified method

Parameters

Name

Type

Description

$shippingServiceProviderCode

string

$methodName

string

Address

Contracts

OrderAddressRepositoryContract

The OrderAddressRepositoryContract is the interface for the order address repository. This interface allows you to get, create, update and delete addresses of an order.

Namespace

Plenty\Modules\Order\Address\Contracts

Methods
public findAddressByType($orderId, $typeId):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Get an address of an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$typeId

int

The ID of the address type

public findSchedulerAddressByType($schedulerId, $typeId):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Get an address of a scheduler order

Parameters

Name

Type

Description

$schedulerId

int

The ID of the scheduler

$typeId

int

The ID of the address type

public createOrderAddress($data, $orderId, $typeId = \Plenty\Modules\Account\Address\Models\AddressRelationType::BILLING_ADDRESS):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Create an address for an order

Parameters

Name

Type

Description

$data

array

The address data

$orderId

int

The ID of the order

$typeId

int

[optional] The ID of the address type. The default ID is 1 for billing address. The types available are:

  • Billing address = 1

  • Delivery address = 2

  • Sender address = 3

  • Return address = 4

  • Client address = 5

  • Contractor address = 6

  • Warehouse address = 7

public updateOrderAddress($data, $addressId, $orderId, $typeId):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Update an address of an order

Parameters

Name

Type

Description

$data

array

The address data

$addressId

int

The ID of address

$orderId

int

The ID of the order

$typeId

int

The ID of the address type. The types available are:

  • Billing address = 1

  • Delivery address = 2

  • Sender address = 3

  • Return address = 4

  • Client address = 5

  • Contractor address = 6

  • Warehouse address = 7

public getAddress($addressId, $with = []):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Get an address

Parameters

Name

Type

Description

$addressId

int

The ID of the address

$with

array

The relations to load in the address instance. The relations available are "options", "contacts", "orders", "country".

public findAddresses($orderId):Illuminate\Database\Eloquent\Collection
Return type: Collection

List addresses of an an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

public getAddressOfOrder($addressId, $orderId, $typeId):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Get an address of an order

Parameters

Name

Type

Description

$addressId

int

The ID of the address

$orderId

int

The ID of the order

$typeId

int

The ID of the address type. The types available are:

  • Billing address = 1

  • Delivery address = 2

  • Sender address = 3

  • Return address = 4

  • Client address = 5

  • Contractor address = 6

  • Warehouse address = 7

public getAddressOfScheduler($addressId, $schedulerId, $typeId):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Get an address of a scheduler

Parameters

Name

Type

Description

$addressId

int

The ID of the address

$schedulerId

int

The ID of the scheduler

$typeId

int

The ID of the address type. The types available are:

  • Billing address = 1

  • Delivery address = 2

  • Sender address = 3

  • Return address = 4

  • Client address = 5

  • Contractor address = 6

  • Warehouse address = 7

public addOrderAddress($addressId, $orderId, $typeId):void

Create an address relation from an order to an address

Parameters

Name

Type

Description

$addressId

int

The ID of the address

$orderId

int

The ID of the order

$typeId

int

The ID of the address type. The types available are:

  • Billing address = 1

  • Delivery address = 2

  • Sender address = 3

  • Return address = 4

  • Client address = 5

  • Contractor address = 6

  • Warehouse address = 7

public addSchedulerAddress($addressId, $schedulerId, $typeId):void

Create an address relation from a scheduler to an address

Parameters

Name

Type

Description

$addressId

int

The ID of the address

$schedulerId

int

The ID of the scheduler

$typeId

int

The ID of the address type. The types available are:

  • Billing address = 1

  • Delivery address = 2

  • Sender address = 3

  • Return address = 4

  • Client address = 5

  • Contractor address = 6

  • Warehouse address = 7

public deleteOrderAddress($addressId, $orderId, $typeId):bool

Delete an address relation from an order

Parameters

Name

Type

Description

$addressId

int

The ID of the address

$orderId

int

The ID of the order

$typeId

int

The ID of the address type. The types available are:

  • Billing address = 1

  • Delivery address = 2

  • Sender address = 3

  • Return address = 4

  • Client address = 5

  • Contractor address = 6

  • Warehouse address = 7

AdvanceOrder

Contracts

AdvanceOrderRepositoryContract

The AdvanceOrderRepositoryContract is the interface for the advance order repository. This interface allows you to create and update advance orders.

Namespace

Plenty\Modules\Order\AdvanceOrder\Contracts

Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Create an advance order

Parameters

Name

Type

Description

$data

array

$with

array

$lazyLoaded

bool

public createWithCoupons($data, $coupons = [], $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Create an advance order with coupon codes

Parameters

Name

Type

Description

$data

array

$coupons

array

$with

array

$lazyLoaded

bool

public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Update an advance order

Parameters

Name

Type

Description

$orderId

int

$data

array

$with

array

$lazyLoaded

bool

public delete($orderId):void

Delete an advance order

Parameters

Name

Type

Description

$orderId

int

public deleteOrderItem($orderItemId):bool

Delete an order item from an advance order

Parameters

Name

Type

Description

$orderItemId

int

public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Create an advance order from a parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update currency

Parameters

Name

Type

Description

$orderId

int

$data

array

public convertFromSalesOrder($orderId):Plenty\Modules\Order\Models\Order
Return type: Order

Convert sales order into advance order

Parameters

Name

Type

Description

$orderId

int

The order ID

public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "variation" to "unassigned variation".

Parameters

Name

Type

Description

$orderItemId

int

$with

array

$lazyLoaded

bool

public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "unassigned variation" to "variation".

Parameters

Name

Type

Description

$orderItemId

int

$variationId

int

$warehouseId

int

$with

array

$lazyLoaded

bool

public previewCreate($data):array

Get an advance order create preview for the given order data.

Parameters

Name

Type

Description

$data

array

public previewCreateWithCoupons($data, $coupons = []):array

Get an advance order create preview for the given order data with coupon codes.

Parameters

Name

Type

Description

$data

array

$coupons

array

public previewUpdate($orderId, $data):array

Get an advance order update preview for the given order data.

Parameters

Name

Type

Description

$orderId

int

$data

array

Booking

Contracts

OrderBookingRepositoryContract

Book orders, order items and order item transactions.

Namespace

Plenty\Modules\Order\Booking\Contracts

Methods
public bookOrder($orderId, $deliveryNoteNumber = null):Plenty\Modules\Order\Booking\Models\OrderBooking
Return type: OrderBooking

Book an order

Parameters

Name

Type

Description

$orderId

int

$deliveryNoteNumber

string

public bookOrderItem($orderItemId, $deliveryNoteNumber = null):Plenty\Modules\Order\Booking\Models\OrderBooking
Return type: OrderBooking

Book an order item

Parameters

Name

Type

Description

$orderItemId

int

$deliveryNoteNumber

string

public bookOrderItemTransactions($transactionIds, $warehouseId = null, $deliveryNoteNumber = null):Plenty\Modules\Order\Booking\Models\OrderBooking
Return type: OrderBooking

Book order item transactions

Parameters

Name

Type

Description

$transactionIds

array

$warehouseId

int

$deliveryNoteNumber

string

Models

OrderBooking

The order booking model.

Namespace

Plenty\Modules\Order\Booking\Models

Properties
Name Type Description

success

array

The successfully booked transactions

failed

array

The transactions which failed to book

Methods
public toArray()

Returns this model as an array.

Template

Filters

OrderClientFilterBuilder

Used to represent the order client filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

OrderCompletedAtFilterBuilder

Used to represent the order completed at filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

OrderCreatedAtFilterBuilder

Used to represent the order created at filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

OrderExcludeMainOrdersFilterBuilder

Used to represent the exclude main orders filter.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

OrderIdFilterBuilder

Used to represent the order id filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():string

Returns an identifier for the filter

public setFilterData($filterData):void

This method will be filled by the specified values in a catalog. It should be used to provide the necessary manipulation so the filter that is returned by getFilter can be consumed by the export.

Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void

Returns the filter that will be given to the export

Parameters

Name

Type

Description

$settings

array

public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter

Returns the UI representation of the filter

OrderItemTypeFilterBuilder

Used to represent the order item type filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

OrderItemVariationIdFilterBuilder

Used to represent the order item variation filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():string

Returns an identifier for the filter

public setFilterData($filterData):void

This method will be filled by the specified values in a catalog. It should be used to provide the necessary manipulation so the filter that is returned by getFilter can be consumed by the export.

Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void

Returns the filter that will be given to the export

Parameters

Name

Type

Description

$settings

array

public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter

Returns the UI representation of the filter

OrderOwnerFilterBuilder

Used to represent the order owner filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

OrderPaidAtFilterBuilder

Used to represent the order paid at filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

OrderPaymentMethodFilterBuilder

Used to represent the order payment method filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

OrderReceivedDateFilterBuilder

Used to represent the order date filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

OrderReferrerFilterBuilder

Used to represent the order referrer filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

OrderShippingProfileFilterBuilder

Used to represent the shipping profile filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

OrderStatusFilterBuilder

Used to represent the order status filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

OrderTypeFilterBuilder

Used to represent the order status type in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

OrderUpdatedAtFilterBuilder

Used to represent the order updated at filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

OrderWarehouseFilterBuilder

Used to represent the order warehouse filter in both the catalog export and UI.

Namespace

Plenty\Modules\Order\Catalogues\Order\Template\Filters

Methods
public getKey():void
public getUiFilter():Plenty\Modules\Catalog\Models\Filters\CatalogUiFilter
Return type: CatalogUiFilter
public setFilterData($filterData):void
Parameters

Name

Type

Description

$filterData

public getFilter($settings = []):void
Parameters

Name

Type

Description

$settings

array

ContactWish

Contracts

ContactWishRepositoryContract

This interface allows you to get and create contact wishes.

Namespace

Plenty\Modules\Order\ContactWish\Contracts

Methods
public getContactWish($orderId):Plenty\Modules\Order\ContactWish\Models\ContactWish
Return type: ContactWish

Get the contact wish

Parameters

Name

Type

Description

$orderId

int

The ID of the order

public createContactWish($orderId, $text):Plenty\Modules\Order\ContactWish\Models\ContactWish
Return type: ContactWish

Create a contact wish

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$text

string

The text for the contact wish

Models

ContactWish

The contact wish model.

Namespace

Plenty\Modules\Order\ContactWish\Models

Properties
Name Type Description

text

string

The text of the contact wish

Methods
public toArray()

Returns this model as an array.

CreditNote

Contracts

CreditNoteRepositoryContract

The CreditNoteRepositoryContract is the interface for the credit note repository. This interface allows you to create and update credit notes.

Namespace

Plenty\Modules\Order\CreditNote\Contracts

Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Create a credit note

Parameters

Name

Type

Description

$data

array

$with

array

$lazyLoaded

bool

public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Update a credit note

Parameters

Name

Type

Description

$orderId

int

$data

array

$with

array

$lazyLoaded

bool

public delete($orderId):void

Delete a credit note

Parameters

Name

Type

Description

$orderId

int

public deleteOrderItem($orderItemId):bool

Delete an order item from a credit note

Parameters

Name

Type

Description

$orderItemId

int

public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Create a credit note from a parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

public validateFromParent($orderId, $data = []):array

Validate order items for create a credit note from a parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update currency

Parameters

Name

Type

Description

$orderId

int

$data

array

public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "variation" to "unassigned variation".

Parameters

Name

Type

Description

$orderItemId

int

$with

array

$lazyLoaded

bool

public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "unassigned variation" to "variation".

Parameters

Name

Type

Description

$orderItemId

int

$variationId

int

$warehouseId

int

$with

array

$lazyLoaded

bool

public previewCreate($data):array

Get a credit note create preview for the given order data.

Parameters

Name

Type

Description

$data

array

public previewUpdate($orderId, $data):array

Get a credit note update preview for the given order data.

Parameters

Name

Type

Description

$orderId

int

$data

array

Settings

Models

CreditNoteSettings

The model of the creditNote order settings.

Namespace

Plenty\Modules\Order\CreditNote\Settings\Models

Properties
Name Type Description

defaultStatusId

float

setShippingCostsToZero

bool

copyShippingCostsFromOriginOrder

bool

validateQuantityFromParent

bool

defaultOrderStatus

float

Deprecated, not filled anymore. Use $defaultStatusId instead.

int

defaultCreditNoteReasonId

Methods
public toArray()

Returns this model as an array.

OfferSettings

The model of the offer settings.

Namespace

Plenty\Modules\Order\Offer\Settings\Models

Properties
Name Type Description

validDays

int

Methods
public toArray()

Returns this model as an array.

RepairSettings

The model of the repair order settings.

Namespace

Plenty\Modules\Order\Repair\Settings\Models

Properties
Name Type Description

defaultStatusId

float

defaultOrderStatus

float

Deprecated, not filled anymore. Use $defaultStatusId instead.

resetOutgoingItemsStatusId

float

Values: -1: no status change, 0: last status , >0: defined status

int

defaultRepairReasonId

int

defaultRepairStatusId

Methods
public toArray()

Returns this model as an array.

ReturnOrderSettings

The model of the return order settings.

Namespace

Plenty\Modules\Order\ReturnOrder\Settings\Models

Properties
Name Type Description

defaultStatusId

float

defaultOrderStatus

float

Deprecated, not filled anymore. Use $defaultStatusId instead.

int

defaultReturnReasonId

int

defaultReturnStatusId

setShippingCostsToZero

bool

copyShippingCostsFromOriginOrder

bool

Methods
public toArray()

Returns this model as an array.

OrderSettings

The model of the order settings.

Namespace

Plenty\Modules\Order\Settings\Models

Properties
Name Type Description

warehouseAssignment

string

Possible values: 'order', 'order_row'

warehouseSelection

string

Possible values: 'shipping_country', 'primary_storehouse', 'maximum_stock', 'minimum_stock', 'highest_priority_warehouse', 'lowest_priority_warehouse', 'highest_priority_warehouse_fallback_primary_warehouse', 'lowest_priority_warehouse_fallback_primary_warehouse'

orderItemPrefixes

array

cancelStatusFrom

float

cancelStatusTo

float

reservationStatusFrom

float

reservationStatusTo

float

reservationOnlyPaidOrders

bool

noStockStatus4

bool

stockChangeStatusFrom

float

stockChangeStatusTo

float

defaultVariationIdForDunningFees

int

defaultReferrerId

float

showInactivePaymentMethods

bool

downPayment

float

useNewOrderUi

bool

oldUiDisplayAddress

string

oldUiDisplayPricesNet

bool

oldUiChangeableBundleQuantity

bool

Methods
public toArray()

Returns this model as an array.

StoreOrderSettings

The model of the store order settings.

Namespace

Plenty\Modules\Order\Settings\Models

Properties
Name Type Description

defaultLanguage

string

defaultParcelServiceId

int

defaultParcelServicePresetId

int

defaultMethodOfPaymentId

int

defaultCustomerClassId

int

Methods
public toArray()

Returns this model as an array.

WarrantySettings

The model of the warranty order settings.

Namespace

Plenty\Modules\Order\Warranty\Settings\Models

Properties
Name Type Description

defaultStatusId

float

setShippingCostsToZero

bool

copyShippingCostsFromOriginOrder

bool

validateQuantityFromParent

bool

resetOutgoingItemsStatusId

float

Values: -1: no status change, 0: last status , >0: defined status

Methods
public toArray()

Returns this model as an array.

Contracts

OrderSettingsRepositoryContract

Get settings for orders.

Namespace

Plenty\Modules\Order\Settings\Contracts

Methods
public get():Plenty\Modules\Order\Settings\Models\OrderSettings
Return type: OrderSettings

Get basic order settings

public set($data):Plenty\Modules\Order\Settings\Models\OrderSettings
Return type: OrderSettings

Update basic order settings

Parameters

Name

Type

Description

$data

array

public getStoreSettings($storeId):Plenty\Modules\Order\Settings\Models\StoreOrderSettings
Return type: StoreOrderSettings

Get order settings for store

Parameters

Name

Type

Description

$storeId

int

CreditNoteReason

Contracts

CreditNoteReasonRepositoryContract

Use this interface to retrieve order credit note reasons.

Namespace

Plenty\Modules\Order\CreditNoteReason\Contracts

Methods
public all():array

Get all credit note reasons.

public get($id):Plenty\Modules\Order\CreditNoteReason\Models\CreditNoteReason
Return type: CreditNoteReason

Get a credit note reason.

Parameters

Name

Type

Description

$id

int

The ID of the credit note reason.

public set($data):array

Set a credit note reason.

Parameters

Name

Type

Description

$data

array

public delete($id):bool

Delete an order credit note reason

Parameters

Name

Type

Description

$id

int

Models

CreditNoteReason

The credit note reason model.

Namespace

Plenty\Modules\Order\CreditNoteReason\Models

Properties
Name Type Description

id

int

The ID of the credit note reason.

reason

string

The specified reason in system language.

names

array

The specified reason in different languages.

Methods
public toArray()

Returns this model as an array.

CreditNoteReasonName

The credit note reason name model.

Namespace

Plenty\Modules\Order\CreditNoteReason\Models

Properties
Name Type Description

id

int

The ID of the credit note reason.

reason

string

The specified reason.

lang

string

The language of the reason.

Methods
public toArray()

Returns this model as an array.

Date

Contracts

OrderDateRepositoryContract

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.

Namespace

Plenty\Modules\Order\Date\Contracts

Methods
public findNamesByTypeId($typeId):void

List names of a date type

Parameters

Name

Type

Description

$typeId

int

The ID of the date type

public findNameByTypeIdAndLang($typeId, $lang):Plenty\Modules\Order\Date\Models\OrderDateTypeName
Return type: OrderDateTypeName

Get a name of a date type

Parameters

Name

Type

Description

$typeId

int

The ID of the date type

$lang

string

The language ISO 639-1 code, e.g. "en" for English

public findTypes($languages = []):void

List date types

Parameters

Name

Type

Description

$languages

array

The languages to load

public findTypeById($typeId):Plenty\Modules\Order\Date\Models\OrderDateType
Return type: OrderDateType

Get a date type

Parameters

Name

Type

Description

$typeId

int

The ID of the date type

public create($data = []):Plenty\Modules\Order\Date\Models\OrderDate
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder instead

Return type: OrderDate

Create an order date

Parameters

Name

Type

Description

$data

array

The order date data. The properties that are required to create an order can be found in the OrderDate model.

public update($data, $orderDateId):Plenty\Modules\Order\Date\Models\OrderDate
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder instead

Return type: OrderDate

Update a date

Parameters

Name

Type

Description

$data

array

The order date data. The properties that are required to create an order can be found in the OrderDate model.

$orderDateId

int

The ID of the order date

public save($data = []):Plenty\Modules\Order\Date\Models\OrderDate
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder instead

Return type: OrderDate

Create or update an order date

Parameters

Name

Type

Description

$data

array

The order date data. The properties that are required to create an order can be found in the OrderDate model.

public delete($orderDateId):bool
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder instead

Delete a date

Parameters

Name

Type

Description

$orderDateId

int

The ID of the order date

public deleteByOrderIdAndType($orderId, $typeId):void
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder instead

Delete an order date from an order by the type of the order date

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$typeId

int

The ID of the date type.

public findByOrderIdAndTypeId($orderId, $typeId):Plenty\Modules\Order\Date\Models\OrderDate
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::findOrderById instead

Return type: OrderDate

Get an order date from an order by the type of the order date

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$typeId

int

The ID of the date type

public findByOrderId($orderId):void
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::findOrderById instead

List order dates of an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

public createType($data):Plenty\Modules\Order\Date\Models\OrderDateType
Return type: OrderDateType

Create an order date type.

Parameters

Name

Type

Description

$data

array

public updateType($id, $data):Plenty\Modules\Order\Date\Models\OrderDateType
Return type: OrderDateType

Update an order date type.

Parameters

Name

Type

Description

$id

int

$data

array

public deleteType($id):bool

Delete an order date type.

Parameters

Name

Type

Description

$id

int

OrderItemDateRepositoryContract

The OrderItemDateRepositoryContract contains the functionality to get, create, update and delete OrderItemDate instances.

Namespace

Plenty\Modules\Order\Date\Contracts

Methods
public find($id):Plenty\Modules\Order\Date\Models\OrderItemDate
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::findOrderById order instead

Return type: OrderItemDate

Get an order item date

Parameters

Name

Type

Description

$id

int

The ID of the order item date.

public create($data = []):Plenty\Modules\Order\Date\Models\OrderItemDate
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder order instead

Return type: OrderItemDate

Create an order item date

Parameters

Name

Type

Description

$data

array

The order item date data. The properties that are required to create an order item can be found in the OrderItemDate model.

public update($data, $id):Plenty\Modules\Order\Date\Models\OrderItemDate
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder order instead

Return type: OrderItemDate

Update an order date

Parameters

Name

Type

Description

$data

array

The order item date data. The properties that are required to create an order item can be found in the OrderItemDate model.

$id

int

The ID of the order item date

public save($data = []):Plenty\Modules\Order\Date\Models\OrderItemDate
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder order instead

Return type: OrderItemDate

Create or update an order item date

Parameters

Name

Type

Description

$data

array

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($id):bool
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder order instead

Delete a date

Parameters

Name

Type

Description

$id

int

The ID of the order item date

public findByOrderItemIdAndTypeId($orderItemId, $typeId):Plenty\Modules\Order\Date\Models\OrderItemDate
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::findOrderById order instead

Return type: OrderItemDate

Get an order item date by an order item and an order date type.

Parameters

Name

Type

Description

$orderItemId

int

The ID of the order item

$typeId

int

The ID of the date type

public createByOrderItemIdAndTypeId($data, $orderItemId, $typeId):Plenty\Modules\Order\Date\Models\OrderItemDate
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder order instead

Return type: OrderItemDate

Create an order item date by an order item and an order date type.

Parameters

Name

Type

Description

$data

array

The order item date data. The properties that are required to create an order can be found in the OrderItemDate model.

$orderItemId

int

The ID of the order item

$typeId

int

The ID of the date type

public updateByOrderItemIdAndTypeId($data, $orderItemId, $typeId):Plenty\Modules\Order\Date\Models\OrderItemDate
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder order instead

Return type: OrderItemDate

Update an order item date by an order item and an order date type.

Parameters

Name

Type

Description

$data

array

The order item date data. The properties that are required to update an order can be found in the OrderItemDate model.

$orderItemId

int

The ID of the order item

$typeId

int

The ID of the date type

public deleteByOrderItemIdAndTypeId($orderItemId, $typeId):bool
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder order instead

Delete an order item date by an order item and an order date type.

Parameters

Name

Type

Description

$orderItemId

int

The ID of the order item

$typeId

int

The ID of the date type

public findByOrderItemId($orderItemId):void
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::findOrderById order instead

List order item dates of an order item.

Parameters

Name

Type

Description

$orderItemId

int

The ID of the order

Models

OrderDate

The OrderDate model.

Namespace

Plenty\Modules\Order\Date\Models

Properties
Name Type Description

id

int

The ID of the order date

orderId

int

The ID of the order that the date belongs to

typeId

int

The ID of the date type. The following types are available:

  • Deleted on = 1

  • Created on = 2

  • Paid date = 3

  • Last update = 4

  • Completed date = 5

  • Return date = 6

  • Payment due date = 7

  • Estimated shipping date = 8

  • Start date = 9

  • End date = 10

  • Estimated delivery date = 11

  • Market transfer date = 12

  • Subscription cancelled on = 13

  • Subscription last run = 14

  • Subscription next run = 15

  • Purchase date = 16

  • Finish date = 17

date

Carbon

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

type

OrderDateType

The type of date

Methods
public toArray()

Returns this model as an array.

OrderDateType

The OrderDateType model.

Namespace

Plenty\Modules\Order\Date\Models

Properties
Name Type Description

id

int

The ID of the order date type. The following date types are available:

  • Deleted on = 1

  • Created on = 2

  • Paid date = 3

  • Last update = 4

  • Completed on = 5

  • Return date = 6

  • Payment due date = 7

  • Estimated shipping date = 8

  • Start date = 9

  • End date = 10

  • Possible delivery date = 11

  • Market transfer date = 12

  • Subscription cancelled on = 13

  • Subscription last run = 14

  • Subscription next run = 15

  • Confirmation link valid until = 19

isErasable

bool

Flag that indicates if this type can be deleted or not.

position

int

The position for sorting

names

The names for this OrderDateType

orderDates

The actual dates that belong to the order date type

Methods
public toArray()

Returns this model as an array.

OrderDateTypeName

The OrderDateTypeName model. Order date types can have several names. One name per language. Each name has a unique ID.

Namespace

Plenty\Modules\Order\Date\Models

Properties
Name Type Description

id

int

The ID of the order date type name

typeId

int

The ID of the date type that this name belongs to. The following date types are available:

  • Deleted on = 1

  • Created on = 2

  • Paid date = 3

  • Last update = 4

  • Completed on = 5

  • Return date = 6

  • Payment due date = 7

  • Estimated shipping date = 8

  • Start date = 9

  • End date = 10

  • Possible delivery date = 11

  • Market transfer date = 12

lang

string

The ISO 639-1 language code for the name, e.g. "en" for English

name

string

The name of the order date type

type

OrderDateType

The date type that this name belongs to

Methods
public toArray()

Returns this model as an array.

OrderItemDate

The OrderItemDate model.

Namespace

Plenty\Modules\Order\Date\Models

Properties
Name Type Description

id

int

The ID of the order date

orderItemId

int

The ID of the order item that the date belongs to

typeId

int

The ID of the date type. The following types are available:

  • Start date = 9

  • End date = 10

  • Estimated delivery date = 11

date

Carbon

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

type

OrderDateType

The type of the date. The following date types are available:

  • Deleted on = 1

  • Created on = 2

  • Paid date = 3

  • Last update = 4

  • Completed on = 5

  • Return date = 6

  • Payment due date = 7

  • Estimated shipping date = 8

  • Start date = 9

  • End date = 10

  • Possible delivery date = 11

  • Market transfer date = 12

orderItem

OrderItem

The order item the date belongs to.

Methods
public toArray()

Returns this model as an array.

DeliveryOrder

Contracts

DeliveryOrderRepositoryContract

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.

Namespace

Plenty\Modules\Order\DeliveryOrder\Contracts

Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Create a delivery order

Parameters

Name

Type

Description

$data

array

$with

array

$lazyLoaded

bool

public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Update a delivery order

Parameters

Name

Type

Description

$orderId

int

$data

array

$with

array

$lazyLoaded

bool

public delete($orderId):void

Delete a delivery order

Parameters

Name

Type

Description

$orderId

int

public deleteOrderItem($orderItemId):bool

Delete an order item from a delivery

Parameters

Name

Type

Description

$orderItemId

int

public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Create a delivery order from a parent order

Parameters

Name

Type

Description

$orderId

int

The ID of the parent order, for which the delivery should be created.

$data

array

The order item Ids with quantities to be added to the delivery order.

public validateFromParent($orderId, $data = []):array

Validate order items for create a delivery order from a parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

public createAllAutomaticallyFromParent($orderId):Illuminate\Support\Collection
Return type: Collection

Create delivery orders automatically for all order items

Parameters

Name

Type

Description

$orderId

int

The ID of the parent order, for which the delivery should be created.

public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update currency

Parameters

Name

Type

Description

$orderId

int

$data

array

public validateCancelBooking($orderId):array

Validate cancellation of the booking of an order

Parameters

Name

Type

Description

$orderId

int

public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "variation" to "unassigned variation".

Parameters

Name

Type

Description

$orderItemId

int

$with

array

$lazyLoaded

bool

public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "unassigned variation" to "variation".

Parameters

Name

Type

Description

$orderItemId

int

$variationId

int

$warehouseId

int

$with

array

$lazyLoaded

bool

public previewCreate($data):array

Get a delivery order create preview for the given order data.

Parameters

Name

Type

Description

$data

array

public previewUpdate($orderId, $data):array

Get a delivery order update preview for the given order data.

Parameters

Name

Type

Description

$orderId

int

$data

array

Documents

Contracts

DocumentAccountingSummaryRepositoryContract

Get document accounting summaries.

Namespace

Plenty\Modules\Order\Documents\Contracts

Methods
public list($page = 1, $itemsPerPage = 10):Plenty\Repositories\Models\PaginatedResult
Return type: 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.

Parameters

Name

Type

Description

$page

int

The page to get. The default page that will be returned is page 1.

$itemsPerPage

int

The number of summaries to be displayed per page. The default number of orders per page is 10.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

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.

OrderDocumentStorageContract

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.

Namespace

Plenty\Modules\Order\Documents\Contracts

Methods
public fileExists($path):bool

Check if the file path exists on the storage.

Parameters

Name

Type

Description

$path

string

The file path

public put($path, $file):void

Store a file on the storage.

Parameters

Name

Type

Description

$path

string

The file path

$file

string

The file to store. Can be either a file path on the file system or an object.

public get($path):Plenty\Modules\Cloud\Storage\Models\StorageObject
Return type: StorageObject

Get a file from the storage

Parameters

Name

Type

Description

$path

string

The file path

public delete($path):bool

Delete a file from the storage.

Parameters

Name

Type

Description

$path

string

The file path

Events

Canceled

AfterOrderCanceled

An event class fired after an order is canceled.

Namespace

Plenty\Modules\Order\Events\Canceled

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

BeforeOrderCanceled

An event class fired before an order will be canceled.

Namespace

Plenty\Modules\Order\Events\Canceled

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

Changed

OrderStatusChanged

An event class fired after the status of an order has changed.

Namespace

Plenty\Modules\Order\Events\Changed

Methods
public __construct($order, $oldStatus):void

OrderStatusChanged constructor.

Parameters

Name

Type

Description

$order

Order

$oldStatus

float

public getOldStatus():float

Get the old order status.

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

Created

CreditNoteCreated

An event class fired after a new credit note is created.

Namespace

Plenty\Modules\Order\Events\Created

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

DeliveryOrderCreated

An event class fired after a new delivery order is created.

Namespace

Plenty\Modules\Order\Events\Created

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

MultiCreditNoteCreated

An event class fired after a new multi credit note is created.

Namespace

Plenty\Modules\Order\Events\Created

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

MultiOrderCreated

An event class fired after a new multi order is created.

Namespace

Plenty\Modules\Order\Events\Created

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

RepairCreated

An event class fired after a new repair is created.

Namespace

Plenty\Modules\Order\Events\Created

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

ReturnCreated

An event class fired after a new returns is created.

Namespace

Plenty\Modules\Order\Events\Created

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

SalesOrderCreated

An event class fired after a new sales order is created.

Namespace

Plenty\Modules\Order\Events\Created

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

WarrantyCreated

An event class fired after a new warranty is created.

Namespace

Plenty\Modules\Order\Events\Created

Methods
public __construct($order):void

OrderEvent constructor.

Parameters

Name

Type

Description

$order

Order

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Get the order instance.

public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void

Injection

Contracts

OrderInjectionOnCreateContract

Contract for injections on create.

Namespace

Plenty\Modules\Order\Injection\Contracts

Methods
public handle($data):array

Manipulate the order data on create.

Parameters

Name

Type

Description

$data

array

OrderInjectionOnUpdateContract

Contract for injections on update.

Namespace

Plenty\Modules\Order\Injection\Contracts

Methods
public handle($order, $data):array

Manipulate the order data on update.

Parameters

Name

Type

Description

$order

Order

$data

array

OrderInjectionServiceContract

Service to register injections for order creation.

Namespace

Plenty\Modules\Order\Injection\Contracts

Methods
public registerOnCreateBeforeValidation($orderTypeIds, $class):void

Register an injection on create before the validation.

Parameters

Name

Type

Description

$orderTypeIds

array

$class

string

public registerOnCreateBeforeSumsCalculation($orderTypeIds, $class):void

Register an injection on create before the sums calculation.

Parameters

Name

Type

Description

$orderTypeIds

array

$class

string

public registerOnCreateAfterSumsCalculation($orderTypeIds, $class):void

Register an injection on create after the sums calculation.

Parameters

Name

Type

Description

$orderTypeIds

array

$class

string

public registerOnUpdateBeforeValidation($orderTypeIds, $class):void

Register an injection on update before the validation.

Parameters

Name

Type

Description

$orderTypeIds

array

$class

string

public registerOnUpdateBeforeSumsCalculation($orderTypeIds, $class):void

Register an injection on update before the sums calculation.

Parameters

Name

Type

Description

$orderTypeIds

array

$class

string

public registerOnUpdateAfterSumsCalculation($orderTypeIds, $class):void

Register an injection on update after the sums calculation.

Parameters

Name

Type

Description

$orderTypeIds

array

$class

string

public inject($saveType, $injectionPoint, $data, $order = null):array

Inject the data.

Parameters

Name

Type

Description

$saveType

string

$injectionPoint

string

$data

array

$order

Order

Models

Legacy

Order

The legacy order model

Namespace

Plenty\Modules\Order\Models\Legacy

Properties
Name Type Description

id

int

The Id of an order

orderType

string

The type of an order type

contactId

int

The ID of the contact

referrerId

float

The referrer

status

float

The status

userId

int

The owner of an order

entryDate

string

The date that the order was entered

webstoreId

int

The ID of the webstore

warehouseId

int

The ID of the warehouse

sellerAccount

string

The seller account

deliveryAddress

Address

billingAddress

Address

addresses

Collection

addressRelations

Collection

Methods
public toArray()

Returns this model as an array.

MultiCreditNote

Contracts

MultiCreditNoteRepositoryContract

The MultiCreditNoteRepositoryContract is the interface for the multi credit note repository. This interface allows you to update multi credit notes.

Namespace

Plenty\Modules\Order\MultiCreditNote\Contracts

Methods
public update($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update a multi credit note

Parameters

Name

Type

Description

$orderId

int

$data

array

public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update currency

Parameters

Name

Type

Description

$orderId

int

$data

array

public delete($orderId):void

Delete a multi credit note

Parameters

Name

Type

Description

$orderId

int

MultiSalesOrder

Contracts

MultiSalesOrderRepositoryContract

The MultiSalesOrderRepositoryContract is the interface for the multi sales order repository. This interface allows you to update multi orders.

Namespace

Plenty\Modules\Order\MultiSalesOrder\Contracts

Methods
public update($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update a multi sales order

Parameters

Name

Type

Description

$orderId

int

$data

array

public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update currency

Parameters

Name

Type

Description

$orderId

int

$data

array

public delete($orderId):void

Delete a multi sales order

Parameters

Name

Type

Description

$orderId

int

Offer

Contracts

OfferRepositoryContract

The OfferRepositoryContract is the interface for the offer repository. This interface allows you to create and update offers.

Namespace

Plenty\Modules\Order\Offer\Contracts

Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Create an offer

Parameters

Name

Type

Description

$data

array

$with

array

$lazyLoaded

bool

public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Update an offer

Parameters

Name

Type

Description

$orderId

int

$data

array

$with

array

$lazyLoaded

bool

public delete($orderId):void

Delete an offer

Parameters

Name

Type

Description

$orderId

int

public deleteOrderItem($orderItemId):bool

Delete an order item from an offer

Parameters

Name

Type

Description

$orderItemId

int

public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Create an offer from a parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

public previewCreate($data):array

Get an offer create preview for the given order data.

Parameters

Name

Type

Description

$data

array

The order data for the create preview.

public previewUpdate($orderId, $data):array

Get an offer update preview for the given order data.

Parameters

Name

Type

Description

$orderId

int

$data

array

public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update currency

Parameters

Name

Type

Description

$orderId

int

$data

array

public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "variation" to "unassigned variation".

Parameters

Name

Type

Description

$orderItemId

int

$with

array

$lazyLoaded

bool

public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "unassigned variation" to "variation".

Parameters

Name

Type

Description

$orderItemId

int

$variationId

int

$warehouseId

int

$with

array

$lazyLoaded

bool

Payment

Contracts

OrderPaymentRepositoryContract

The OrderPaymentRepositoryContract is the interface for the order payment repository. This interface allows you to update the paid amount of orders.

Namespace

Plenty\Modules\Order\Payment\Contracts

Methods
public addPaidAmount($orderId, $paidAmount, $currency = null, $date = null, $options = []):Plenty\Modules\Order\Models\Order
Return type: Order

Add a given paid amount to the already existing paid amount of an order.

Parameters

Name

Type

Description

$orderId

int

$paidAmount

float

$currency

string

$date

Carbon

$options

array

public overwritePaidAmount($orderId, $paidAmount, $currency = null, $date = null, $options = []):Plenty\Modules\Order\Models\Order
Return type: Order

Overwrite already existing paid amount of an order with a given paid amount.

Parameters

Name

Type

Description

$orderId

int

$paidAmount

float

$currency

string

$date

Carbon

$options

array

Events

ManualOrderExecutePayment

The event is triggered after the order is placed within the manual order creation.

Namespace

Plenty\Modules\Order\Payment\Events

Methods
public setType($type):Plenty\Modules\Order\Payment\Events\ManualOrderExecutePayment
Return type: ManualOrderExecutePayment
Parameters

Name

Type

Description

$type

string

public getType():string

Gets the content type.

public setValue($value):Plenty\Modules\Order\Payment\Events\ManualOrderExecutePayment
Return type: ManualOrderExecutePayment

Set the value of the content type.

Parameters

Name

Type

Description

$value

string

The value of the content type

public getValue():string

Gets the value of the content type.

public setOrderId($orderId):Plenty\Modules\Order\Payment\Events\ManualOrderExecutePayment
Return type: ManualOrderExecutePayment

Set the order id.

Parameters

Name

Type

Description

$orderId

int

public getOrderId():int

Gets the order id.

public getAdditionalData():array
public setAdditionalData($additionalData):Plenty\Modules\Order\Payment\Events\ManualOrderExecutePayment
Return type: ManualOrderExecutePayment
Parameters

Name

Type

Description

$additionalData

array

ManualOrderPreparePayment

The event is triggered before the order is placed within the manual order creation.

Namespace

Plenty\Modules\Order\Payment\Events

Methods
public setType($type):Plenty\Modules\Order\Payment\Events\ManualOrderPreparePayment
Return type: ManualOrderPreparePayment
Parameters

Name

Type

Description

$type

string

public getType():string

Gets the content type.

public setValue($value):Plenty\Modules\Order\Payment\Events\ManualOrderPreparePayment
Return type: ManualOrderPreparePayment

Set the value of the content type.

Parameters

Name

Type

Description

$value

string

The value of the content type

public getValue():string

Gets the value of the content type.

public setOrderData($orderData):Plenty\Modules\Order\Payment\Events\ManualOrderPreparePayment
Return type: ManualOrderPreparePayment

Set the order data.

Parameters

Name

Type

Description

$orderData

array

public getOrderData():array

Gets the order data.

Property

Contracts

OrderItemPropertyRepositoryContract

The OrderItemPropertyRepositoryContract contains the functionality to find, create, update and delete OrderItemProperty instances.

Namespace

Plenty\Modules\Order\Property\Contracts

Methods
public find($id):Plenty\Modules\Order\Property\Models\OrderItemProperty
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::findOrderById order instead

Return type: OrderItemProperty

Find an order item property by its ID.

Parameters

Name

Type

Description

$id

int

The ID of the order item property.

public create($data = []):Plenty\Modules\Order\Property\Models\OrderItemProperty
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder order instead

Return type: OrderItemProperty

Create an order item property

Parameters

Name

Type

Description

$data

array

The order item property data. The properties that are required to create an order item can be found in the OrderItemProperty model.

public update($data, $id):Plenty\Modules\Order\Property\Models\OrderItemProperty
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder order instead

Return type: OrderItemProperty

Update an order item property

Parameters

Name

Type

Description

$data

array

The order item property data. The properties that are required to create an order item can be found in the OrderItemProperty model.

$id

int

The ID of the order item property

public save($data = []):Plenty\Modules\Order\Property\Models\OrderItemProperty
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder order instead

Return type: OrderItemProperty

Create or update an order item property

Parameters

Name

Type

Description

$data

array

The order item property data. The properties that are required to create an order can be found in the OrderItemProperty model.

public delete($id):bool
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder order instead

Delete an order item property

Parameters

Name

Type

Description

$id

int

The ID of the order item property

public findByOrderItemIdAndTypeId($orderItemId, $typeId):Plenty\Modules\Order\Property\Models\OrderItemProperty
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::findOrderById order instead

Return type: OrderItemProperty

Get an order item property by an order item ID and an order property type ID.

Parameters

Name

Type

Description

$orderItemId

int

The ID of the order item

$typeId

int

The ID of the property type

public createByOrderItemIdAndTypeId($data, $orderItemId, $typeId):Plenty\Modules\Order\Property\Models\OrderItemProperty
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder order instead

Return type: OrderItemProperty

Create an order item property by an order item ID and an order property type ID.

Parameters

Name

Type

Description

$data

array

The order item property data. The properties that are required to create an order can be found in the OrderItemProperty model.

$orderItemId

int

The ID of the order item

$typeId

int

The ID of the property type

public updateByOrderItemIdAndTypeId($data, $orderItemId, $typeId):Plenty\Modules\Order\Property\Models\OrderItemProperty
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder order instead

Return type: OrderItemProperty

Update an order item property by an order item ID and an order property type ID.

Parameters

Name

Type

Description

$data

array

The order item property data. The properties that are required to create an order can be found in the OrderItemProperty model.

$orderItemId

int

The ID of the order item

$typeId

int

The ID of the property type

public deleteByOrderItemIdAndTypeId($orderItemId, $typeId):bool
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder order instead

Delete an order item property by an order item ID and an order property type ID.

Parameters

Name

Type

Description

$orderItemId

int

The ID of the order item

$typeId

int

The ID of the property type

public findByOrderItemId($orderItemId):void
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::findOrderById order instead

List order item properties of an order item.

Parameters

Name

Type

Description

$orderItemId

int

The ID of the order

OrderPropertyRepositoryContract

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.

Namespace

Plenty\Modules\Order\Property\Contracts

Methods
public create($data = []):Plenty\Modules\Order\Property\Models\OrderProperty
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder instead

Return type: OrderProperty

Create an order property

Parameters

Name

Type

Description

$data

array

The order property data. The properties that are required to create an order can be found in the OrderProperty model.

public update($data, $orderPropertyId = null):Plenty\Modules\Order\Property\Models\OrderProperty
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder instead

Return type: OrderProperty

Update an order property

Parameters

Name

Type

Description

$data

array

The order property data. The properties that are required to create an order can be found in the OrderProperty model.

$orderPropertyId

int

The ID of the order property.

public delete($data = []):bool
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::updateOrder instead

Deletes an order property. The ID of the order property must be specified.

Parameters

Name

Type

Description

$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($orderId, $typeId = null):void
Deprecated! (since 2019-09)

Please use OrderRepositoryContract::findOrderById instead

List order properties of an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order.

$typeId

int

The ID of the type.

public getType($typeId, $languages = []):Plenty\Modules\Order\Property\Models\OrderPropertyType
Return type: OrderPropertyType

Get a property type

Parameters

Name

Type

Description

$typeId

int

The ID of the property type

$languages

array

The languages to load

public getTypes($languages = []):void

List order property types

Parameters

Name

Type

Description

$languages

array

The languages to load

public createType($data = []):Plenty\Modules\Order\Property\Models\OrderPropertyType
Return type: OrderPropertyType

Create an order property type

Parameters

Name

Type

Description

$data

array

The order property type data. The properties that are required to create a type can be found in the OrderPropertyType model.

public updateType($data = [], $id = null):Plenty\Modules\Order\Property\Models\OrderPropertyType
Return type: OrderPropertyType

Update an order property type

Parameters

Name

Type

Description

$data

array

The order property type data.

$id

int

The ID of the order property type.

public deleteType($id):bool

Delete an order property type

Parameters

Name

Type

Description

$id

int

The ID of the order property type

Models

OrderItemProperty

The order item property model.

Namespace

Plenty\Modules\Order\Property\Models

Properties
Name Type Description

id

int

The ID of the order item property.

orderItemId

int

The ID of the order item that the property belongs to.

typeId

int

The ID of the property type.

  • WAREHOUSE = 1

  • SHIPPING_PROFILE = 2

  • PAYMENT_METHOD = 3

  • WEIGHT = 11

  • WIDTH = 12

  • LENGTH = 13

  • HEIGHT = 14

  • EXTERNAL_TOKEN_ID = 16

  • EXTERNAL_ITEM_ID = 17

  • COUPON_CODE = 18

  • COUPON_TYPE = 19

  • ORIGINAL_WAREHOUSE = 20

  • ORIGINAL_QUANTITY = 21

  • CATEGORY_ID = 22

  • MARKET_FEE = 23

  • STOCK_REVERSING = 24

  • DISPUTE_STATUS = 25

  • NO_CHANGE_BY_CONTACT = 26

  • SIZE = 29

  • LOCATION_RESERVED = 30

  • EXTERNAL_SHIPMENT_ITEM_ID = 31

  • PARTIAL_SHIPPING_COSTS = 32

  • MAIN_DOCUMENT_NUMBER = 33

  • SALES_TAX_ID_NUMBER = 34

  • RETURNS_REASON = 35

  • RETURNS_ITEM_STATUS = 36

  • FULFILLMENT_CENTER_ID = 37

  • FULFILLMENT_CENTER_COUNTRY_ISO = 38

  • REORDER_ITEM_ID = 39

  • LISTING_TYPE = 40

  • SOLD_COUPON_CODE = 46

  • ORDER_ITEM_STATE = 48

  • SAP_ORDER_NUMBER = 50

  • DISCOUNT = 52

  • REORDER_ITEM_PACKAGE_UNIT = 53

  • REORDER_ITEM_MINIMUM_PURCHASE = 54

  • REORDER_ITEM_DELIVERY_TIME_IN_DAYS = 55

  • REORDER_ITEM_DISCOUNTABLE = 56

  • RETURNS_REMAINING_PERCENTAGE = 57

  • ORDER_PROPERTY_ID = 81

  • ORDER_PROPERTY_VALUE = 82

  • ORDER_PROPERTY_GROUP_ID = 83

  • WEEE_PICK_UP = 92

value

string

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.

type

OrderPropertyType

The type of the property.

Methods
public toArray()

Returns this model as an array.

OrderProperty

The order properties model. Each order property has a type.

Namespace

Plenty\Modules\Order\Property\Models

Properties
Name Type Description

id

int

The ID of the order property

orderId

int

The ID of the order that the property belongs to

typeId

int

The ID of the property type. The following types are available:

  • WAREHOUSE = 1

  • SHIPPING_PROFILE = 2

  • PAYMENT_METHOD = 3

  • PAYMENT_STATUS = 4

  • EXTERNAL_SHIPPING_PROFILE = 5

  • DOCUMENT_LANGUAGE = 6

  • EXTERNAL_ORDER_ID = 7

  • CUSTOMER_SIGN = 8

  • DUNNING_LEVEL = 9

  • SELLER_ACCOUNT = 10

  • WEIGHT = 11

  • WIDTH = 12

  • LENGTH = 13

  • HEIGHT = 14

  • FLAG = 15

  • EXTERNAL_TOKEN_ID = 16

  • EXTERNAL_ITEM_ID = 17

  • COUPON_CODE = 18

  • COUPON_TYPE = 19

  • SALES_TAX_ID_NUMBER = 34

  • MAIN_DOCUMENT_NUMBER = 33

  • PAYMENT_TRANSACTION_ID = 45

  • EXTERNAL_TAX_SERVICE = 47

  • MERCHANT_ID = 60

  • REPORT_ID = 61

  • PREFERRED_STORAGE_LOCATION_ID = 63

  • AMAZON_SHIPPING_LABEL = 64

  • MARKET_TAX_ID = 88

  • MARKET_EORI = 89

  • IS_REVERSE_CHARGED = 90

  • DISALLOW_INTERNAL_TAX_RELEVANT_DOCUMENTS = 91

  • EBAY_PLUS = 994

  • FULFILLMENT_SERVICE = 995

value

string

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.

type

OrderPropertyType

The property type instance

Methods
public toArray()

Returns this model as an array.

OrderPropertyType

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.

Namespace

Plenty\Modules\Order\Property\Models

Properties
Name Type Description

id

int

The ID of the property type

isErasable

bool

Flag that states if this type can be deleted or not.

position

int

The position for sorting

cast

string

The data type of the values of this property type. Valid types are:

  • string

  • int

  • numeric

  • bool

  • enum(val1,val2,val3,…​)

names

array

The names of the order property types.

Methods
public toArray()

Returns this model as an array.

OrderPropertyTypeName

The order property type name model. Each order property type can have one name per language.

Namespace

Plenty\Modules\Order\Property\Models

Properties
Name Type Description

id

int

The ID of type name

typeId

int

The ID of the property type

name

string

The name of property type

lang

string

The language of the type name

type

OrderPropertyType

The property type instance.

Methods
public toArray()

Returns this model as an array.

Redistribution

Contracts

RedistributionRepositoryContract

Create and update redistributions.

Namespace

Plenty\Modules\Order\Redistribution\Contracts

Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Create a redistribution

Parameters

Name

Type

Description

$data

array

$with

array

$lazyLoaded

bool

public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Update a redistribution

Parameters

Name

Type

Description

$orderId

int

$data

array

$with

array

$lazyLoaded

bool

public delete($orderId):void

Delete a redistribution

Parameters

Name

Type

Description

$orderId

int

public deleteOrderItem($orderItemId):bool

Delete an order item from a redistribution

Parameters

Name

Type

Description

$orderItemId

int

public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Create a redistribution from a parent order

Parameters

Name

Type

Description

$orderId

int

The ID of the parent order, for which the reorder should be created.

$data

array

The order item Ids with quantities to be added to the reorder.

public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update currency

Parameters

Name

Type

Description

$orderId

int

$data

array

public previewCreate($data):array

Get a redistribution create preview for the given order data.

Parameters

Name

Type

Description

$data

array

public previewUpdate($orderId, $data):array

Get a redistribution update preview for the given order data.

Parameters

Name

Type

Description

$orderId

int

$data

array

RelationReference

Contracts

OrderRelationReferenceRepositoryContract

Get, create, update and delete order relation references.

Namespace

Plenty\Modules\Order\RelationReference\Contracts

Methods
public find($id):Plenty\Modules\Order\RelationReference\Models\OrderRelationReference
Return type: OrderRelationReference

Get a relation reference by ID

Parameters

Name

Type

Description

$id

int

The ID of the relation reference

public findByComposite($orderId, $referenceType, $relation):Plenty\Modules\Order\RelationReference\Models\OrderRelationReference
Return type: OrderRelationReference

Get a relation reference by composite key

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$referenceType

string

The reference type. Valid types are:

  • contact

  • warehouse

  • account

$relation

string

The relation. Valid relations are:

  • sender

  • receiver

public findByOrderId($orderId):void

List relation references by order ID

Parameters

Name

Type

Description

$orderId

int

The ID of the order

public findByAnyValues($values, $page = 1, $itemsPerPage = 50):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

List relation references by any values

Parameters

Name

Type

Description

$values

array

The array with the given filter values. E.g. ['referenceType' ⇒ 'contact']. Valid filters are:

  • id

  • orderId

  • referenceType

  • referenceId

  • relation

$page

int

The page to get

$itemsPerPage

int

The items per page

public create($data):Plenty\Modules\Order\RelationReference\Models\OrderRelationReference
Return type: OrderRelationReference

Create a relation reference

Parameters

Name

Type

Description

$data

array

The request data

public update($id, $data):Plenty\Modules\Order\RelationReference\Models\OrderRelationReference
Return type: OrderRelationReference

Update a relation reference by ID

Parameters

Name

Type

Description

$id

int

The ID of the relation reference

$data

array

The request data

public updateByComposite($orderId, $referenceType, $relation, $data):Plenty\Modules\Order\RelationReference\Models\OrderRelationReference
Return type: OrderRelationReference

Update a relation reference by composite key

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$referenceType

string

The reference type. Valid types are:

  • contact

  • warehouse

  • account

$relation

string

The relation. Valid relations are:

  • sender

  • receiver

$data

array

The request data

public delete($id):bool

Delete a relation reference by ID

Parameters

Name

Type

Description

$id

int

The ID of the relation reference

public deleteByComposite($orderId, $referenceType, $relation):bool

Delete a relation reference by composite key

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$referenceType

string

The reference type. Valid types are:

  • contact

  • warehouse

  • account

$relation

string

The relation. Valid relations are:

  • sender

  • receiver

Models

OrderRelationReference

The order relation reference model specifies how references and orders are related to one another.

Namespace

Plenty\Modules\Order\RelationReference\Models

Properties
Name Type Description

id

int

The relation reference id.

orderId

int

The order id.

referenceType

string

The reference type. The reference types available are the following:

  • contact

  • account

  • warehouse

referenceId

int

The reference id.

relation

string

The relation between a reference and an order. The relation types available are the following:

  • sender

  • receiver

order

Order

The order that the reference belongs to.

contactReceiver

Contact

The Contact referenced with relation "receiver".

contactSender

Contact

The Contact referenced with relation "sender".

accountReceiver

Account

The Account referenced with relation "receiver".

accountSender

Account

The Account referenced with relation "sender".

Methods
public toArray()

Returns this model as an array.

Reorder

Contracts

ReorderRepositoryContract

Create and update reorders.

Namespace

Plenty\Modules\Order\Reorder\Contracts

Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Create a reorder

Parameters

Name

Type

Description

$data

array

$with

array

$lazyLoaded

bool

public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Update a reorder

Parameters

Name

Type

Description

$orderId

int

$data

array

$with

array

$lazyLoaded

bool

public delete($orderId):void

Delete a reorder

Parameters

Name

Type

Description

$orderId

int

public deleteOrderItem($orderItemId):bool

Delete an order item from a reorder

Parameters

Name

Type

Description

$orderItemId

int

public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Create a reorder from a parent order

Parameters

Name

Type

Description

$orderId

int

The ID of the parent order, for which the reorder should be created.

$data

array

The order item Ids with quantities to be added to the reorder.

public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update currency

Parameters

Name

Type

Description

$orderId

int

$data

array

public getDeliveryDate($orderId):Carbon\Carbon
Return type: Carbon

Get the date when the reorder will probably be delivered.

Parameters

Name

Type

Description

$orderId

int

public updateDeliveryDates($orderId, $date = null, $transferToOrderItems = null):Plenty\Modules\Order\Models\Order
Return type: Order

Calculate and save the delivery dates

Parameters

Name

Type

Description

$orderId

int

$date

Carbon

$transferToOrderItems

string

public generateFromOrder($orderId, $data):array

Create reorder(s) for an order

Parameters

Name

Type

Description

$orderId

int

$data

array

public generateFromOrderItems($orderId, $data):array

Create / update reorder(s) for order items

Parameters

Name

Type

Description

$orderId

int

$data

array

public validateGenerateFromOrder($orderId):array

Validate order items for create a reorder from a sales order, delivery order, repair and warranty

Parameters

Name

Type

Description

$orderId

int

public previewCreate($data):array

Get a reorder create preview for the given order data.

Parameters

Name

Type

Description

$data

array

public previewUpdate($orderId, $data):array

Get a reorder update preview for the given order data.

Parameters

Name

Type

Description

$orderId

int

$data

array

public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "variation" to "unassigned variation".

Parameters

Name

Type

Description

$orderItemId

int

$with

array

$lazyLoaded

bool

public assignVariation($orderItemId, $variationId, $variationSupplierId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "unassigned variation" to "variation".

Parameters

Name

Type

Description

$orderItemId

int

$variationId

int

$variationSupplierId

int

$with

array

$lazyLoaded

bool

Repair

Contracts

RepairRepositoryContract

The RepairRepositoryContract is the interface for the repair repository. This interface allows you to create and update repairs.

Namespace

Plenty\Modules\Order\Repair\Contracts

Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Create a repair

Parameters

Name

Type

Description

$data

array

$with

array

$lazyLoaded

bool

public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Update a repair

Parameters

Name

Type

Description

$orderId

int

$data

array

$with

array

$lazyLoaded

bool

public delete($orderId):void

Delete a repair

Parameters

Name

Type

Description

$orderId

int

public deleteOrderItem($orderItemId):bool

Delete an order item from a repair

Parameters

Name

Type

Description

$orderItemId

int

public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Create a repair from a parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

public validateFromParent($orderId, $data = []):array

Validate order items for create a repair from a parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update currency

Parameters

Name

Type

Description

$orderId

int

$data

array

public book($orderId, $data = []):bool

Book order.

Parameters

Name

Type

Description

$orderId

int

$data

array

public cancelBooking($orderId, $data = []):bool

Cancellation the booking of an order. The ID of the order must be specified.

Parameters

Name

Type

Description

$orderId

int

$data

array

public validateCancelBooking($orderId):array

alidate cancellation of the booking of an order

Parameters

Name

Type

Description

$orderId

int

public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "variation" to "unassigned variation".

Parameters

Name

Type

Description

$orderItemId

int

$with

array

$lazyLoaded

bool

public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "unassigned variation" to "variation".

Parameters

Name

Type

Description

$orderItemId

int

$variationId

int

$warehouseId

int

$with

array

$lazyLoaded

bool

public previewCreate($data):array

Get a repair order create preview for the given order data.

Parameters

Name

Type

Description

$data

array

public previewUpdate($orderId, $data):array

Get a repair order update preview for the given order data.

Parameters

Name

Type

Description

$orderId

int

$data

array

RepairReason

Contracts

RepairReasonRepositoryContract

Use this interface to retrieve order repair reasons.

Namespace

Plenty\Modules\Order\RepairReason\Contracts

Methods
public all():array

Get all repair reasons.

public get($id):Plenty\Modules\Order\RepairReason\Models\RepairReason
Return type: RepairReason

Get a repair reason.

Parameters

Name

Type

Description

$id

int

The ID of the repair reason.

public set($data):array

Set a repair reason.

Parameters

Name

Type

Description

$data

array

public delete($id):bool

Delete an order repair reason

Parameters

Name

Type

Description

$id

int

Models

RepairReason

The repair reason model.

Namespace

Plenty\Modules\Order\RepairReason\Models

Properties
Name Type Description

id

int

The ID of the repair reason.

reason

string

The specified reason in system language.

names

array

The specified reason in different languages.

Methods
public toArray()

Returns this model as an array.

RepairReasonName

The repair reason name model.

Namespace

Plenty\Modules\Order\RepairReason\Models

Properties
Name Type Description

id

int

The ID of the repair reason.

reason

string

The specified reason.

lang

string

The language of the reason.

Methods
public toArray()

Returns this model as an array.

RepairStatus

Contracts

RepairStatusRepositoryContract

Use this interface to retrieve order repair status.

Namespace

Plenty\Modules\Order\RepairStatus\Contracts

Methods
public all():array

Get all repair status.

public get($id):Plenty\Modules\Order\RepairStatus\Models\RepairStatus
Return type: RepairStatus

Get a repair status.

Parameters

Name

Type

Description

$id

int

The ID of the repair status.

public set($data):array

Set a repair status.

Parameters

Name

Type

Description

$data

array

public delete($id):bool

Delete an order repair status

Parameters

Name

Type

Description

$id

int

Models

RepairStatus

The repair status model.

Namespace

Plenty\Modules\Order\RepairStatus\Models

Properties
Name Type Description

id

int

The ID of the repair status.

status

string

The specified status in system language.

names

array

The specified status in different languages.

Methods
public toArray()

Returns this model as an array.

RepairStatusName

The repair status name model.

Namespace

Plenty\Modules\Order\RepairStatus\Models

Properties
Name Type Description

id

int

The ID of the repair status.

status

string

The specified status.

lang

string

The language of the status.

Methods
public toArray()

Returns this model as an array.

ReturnOrder

Contracts

ReturnOrderRepositoryContract

The ReturnOrderRepositoryContract is the interface for the return order repository. This interface allows you to create and update return orders.

Namespace

Plenty\Modules\Order\ReturnOrder\Contracts

Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Create a return

Parameters

Name

Type

Description

$data

array

$with

array

$lazyLoaded

bool

public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Update a return

Parameters

Name

Type

Description

$orderId

int

$data

array

$with

array

$lazyLoaded

bool

public delete($orderId):void

Delete a return

Parameters

Name

Type

Description

$orderId

int

public deleteOrderItem($orderItemId):bool

Delete an order item from a return

Parameters

Name

Type

Description

$orderItemId

int

public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Create a return from a parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

public validateFromParent($orderId, $data = []):array

Validate order items for create a return from a parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update currency

Parameters

Name

Type

Description

$orderId

int

$data

array

public book($orderId, $data = []):void

Book order items of return

Parameters

Name

Type

Description

$orderId

int

$data

array

public validateBook($orderId):array

Validate booking of an return

Parameters

Name

Type

Description

$orderId

int

public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "variation" to "unassigned variation".

Parameters

Name

Type

Description

$orderItemId

int

$with

array

$lazyLoaded

bool

public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "unassigned variation" to "variation".

Parameters

Name

Type

Description

$orderItemId

int

$variationId

int

$warehouseId

int

$with

array

$lazyLoaded

bool

public previewCreate($data):array

Get a return create preview for the given order data.

Parameters

Name

Type

Description

$data

array

public previewUpdate($orderId, $data):array

Get a return update preview for the given order data.

Parameters

Name

Type

Description

$orderId

int

$data

array

ReturnReason

Contracts

ReturnReasonRepositoryContract

Use this interface to retrieve order return reasons.

Namespace

Plenty\Modules\Order\ReturnReason\Contracts

Methods
public all():array

Get all return reasons.

public get($id):Plenty\Modules\Order\ReturnReason\Models\ReturnReason
Return type: ReturnReason

Get a return reason.

Parameters

Name

Type

Description

$id

int

The ID of the return reason.

public set($data):array

Set a return reason.

Parameters

Name

Type

Description

$data

array

public delete($id):bool

Delete an order return reason

Parameters

Name

Type

Description

$id

int

Models

ReturnReason

The return reason model.

Namespace

Plenty\Modules\Order\ReturnReason\Models

Properties
Name Type Description

id

int

The ID of the return reason.

reason

string

The specified reason in system language.

names

array

The specified reason in different languages.

Methods
public toArray()

Returns this model as an array.

ReturnReasonName

The return reason name model.

Namespace

Plenty\Modules\Order\ReturnReason\Models

Properties
Name Type Description

id

int

The ID of the return reason.

reason

string

The specified reason.

lang

string

The language of the reason.

Methods
public toArray()

Returns this model as an array.

ReturnStatus

Contracts

ReturnStatusRepositoryContract

Use this interface to retrieve order return status.

Namespace

Plenty\Modules\Order\ReturnStatus\Contracts

Methods
public all():array

Get all return status.

public get($id):Plenty\Modules\Order\ReturnStatus\Models\ReturnStatus
Return type: ReturnStatus

Get a return status.

Parameters

Name

Type

Description

$id

int

The ID of the return status.

public set($data):array

Set a return status.

Parameters

Name

Type

Description

$data

array

public delete($id):bool

Delete an order return status

Parameters

Name

Type

Description

$id

int

Models

ReturnStatus

The return status model.

Namespace

Plenty\Modules\Order\ReturnStatus\Models

Properties
Name Type Description

id

int

The ID of the return status.

status

string

The specified status in system language.

names

array

The specified status in different languages.

Methods
public toArray()

Returns this model as an array.

ReturnStatusName

The return status name model.

Namespace

Plenty\Modules\Order\ReturnStatus\Models

Properties
Name Type Description

id

int

The ID of the return status.

status

string

The specified status.

lang

string

The language of the status.

Methods
public toArray()

Returns this model as an array.

SalesOrder

Contracts

SalesOrderRepositoryContract

The SalesOrderRepositoryContract is the interface for the sales order repository. This interface allows you to create and update sales orders.

Namespace

Plenty\Modules\Order\SalesOrder\Contracts

Methods
public create($with = [], $lazyLoaded = false, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Create a sales order

Parameters

Name

Type

Description

$with

array

$lazyLoaded

bool

$data

array

public createWithCoupons($data, $coupons = [], $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Create a sales order with coupon codes

Parameters

Name

Type

Description

$data

array

$coupons

array

$with

array

$lazyLoaded

bool

public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Update a sales order

Parameters

Name

Type

Description

$orderId

int

$data

array

$with

array

The relations to load in the order instance

$lazyLoaded

bool

Load order instance without default relations

public delete($orderId):void

Delete a sales order

Parameters

Name

Type

Description

$orderId

int

public deleteOrderItem($orderItemId):bool

Delete an order item from a sales order

Parameters

Name

Type

Description

$orderItemId

int

public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Create a sales order from a parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

public validateFromParent($orderId, $data = []):array

Validate order items for create a sales order from a parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

public previewCreate($data):array

Get a sales order create preview for the given order data.

Parameters

Name

Type

Description

$data

array

The order data for the preview.

public previewCreateWithCoupons($data, $coupons = []):array

Get a sales order create preview for the given order data with coupon codes

Parameters

Name

Type

Description

$data

array

$coupons

array

public previewUpdate($orderId, $data):array

Get an sales order update preview for the given order data.

Parameters

Name

Type

Description

$orderId

int

$data

array

public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update currency

Parameters

Name

Type

Description

$orderId

int

$data

array

public book($orderId, $data = []):bool

Book order.

Parameters

Name

Type

Description

$orderId

int

$data

array

public cancelBooking($orderId, $data = []):bool

Cancellation the booking of an order. The ID of the order must be specified.

Parameters

Name

Type

Description

$orderId

int

$data

array

public validateCancelBooking($orderId):array

Validate cancellation of the booking of an order

Parameters

Name

Type

Description

$orderId

int

public convertFromAdvanceOrder($orderId):Plenty\Modules\Order\Models\Order
Return type: Order

Convert advance order into sales order

Parameters

Name

Type

Description

$orderId

int

The order ID

public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "variation" to "unassigned variation".

Parameters

Name

Type

Description

$orderItemId

int

$with

array

$lazyLoaded

bool

public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "unassigned variation" to "variation".

Parameters

Name

Type

Description

$orderItemId

int

$variationId

int

$warehouseId

int

$with

array

$lazyLoaded

bool

Aggregations

StatusAggregation

aggregation for order status

Namespace

Plenty\Modules\Order\Search\Aggregations

Methods
public getName():string
public getField():string
public getAggregation():array
public setInclude($string):void
Parameters

Name

Type

Description

$string

string

public toArray():array
public process($data):array
Parameters

Name

Type

Description

$data

array

public addAggregation($aggregation):void
Parameters

Name

Type

Description

$aggregation

AggregationInterface

public addSource($source):Plenty\Modules\Cloud\ElasticSearch\Lib\Search\Aggregation\AggregationInterface
Return type: AggregationInterface
Parameters

Name

Type

Description

$source

SourceInterface

public setPage($page, $rowsPerPage):Plenty\Modules\Cloud\ElasticSearch\Lib\Search\Aggregation\AggregationInterface
Return type: AggregationInterface
Parameters

Name

Type

Description

$page

int

$rowsPerPage

int

public getSources():void

StatusAggregationProcessor

aggregation processor for order status

Namespace

Plenty\Modules\Order\Search\Aggregations

Methods
public process($data):array
Parameters

Name

Type

Description

$data

array

public getName():void
public getDependencies():array
public addMutator($mutator):Plenty\Modules\Cloud\ElasticSearch\Lib\Processor\BaseProcessor
Return type: BaseProcessor
Parameters

Name

Type

Description

$mutator

MutatorInterface

public addCondition($conditions):Plenty\Modules\Cloud\ElasticSearch\Lib\Processor\BaseProcessor
Return type: BaseProcessor
Parameters

Name

Type

Description

$conditions

ConditionInterface

Contracts

OrderElasticSearchScrollRepositoryContract

This interface is deprecated and will be removed in the next version.

Deprecated!

This class will not be supported in the future. Please refrain from using it as soon as possible.

Namespace

Plenty\Modules\Order\Search\Contracts

Methods
public hasNext():bool
public setNumberOfDocumentsPerShard($size):void
Parameters

Name

Type

Description

$size

int

public clear():void
public setIndex($index):Plenty\Modules\Cloud\ElasticSearch\Contracts\ElasticSearchSearchRepositoryContract
Return type: ElasticSearchSearchRepositoryContract
Parameters

Name

Type

Description

$index

IndexInterface

public addSearch($search):Plenty\Modules\Cloud\ElasticSearch\Contracts\ElasticSearchSearchRepositoryContract
Return type: ElasticSearchSearchRepositoryContract
Parameters

Name

Type

Description

$search

public execute():array

ShippingProfiles

Contracts

OrderShippingProfilesRepositoryContract

Order shipping profile repository contract to load the shipping profile combinations for an order or for the given order data as an array

Namespace

Plenty\Modules\Order\ShippingProfiles\Contracts

Methods
public getCombinations($orderId, $uniqueMainShippingProfiles = false):array

Get the shipping profile combinations for an order.

Parameters

Name

Type

Description

$orderId

int

$uniqueMainShippingProfiles

bool

When true, only one result per main shipping profile is returned

public getCombinationsForOrderData($data, $uniqueMainShippingProfiles = false):array

Get the shipping profile combinations for the given order data.

Parameters

Name

Type

Description

$data

array

The (basket) data.

$uniqueMainShippingProfiles

bool

When true, only one result per main shipping profile is returned

Status

Contracts

OrderStatusRepositoryContract

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.

Namespace

Plenty\Modules\Order\Status\Contracts

Methods
public get($statusId):Plenty\Modules\Order\Status\Models\OrderStatus
Return type: OrderStatus

Get an order status.

Parameters

Name

Type

Description

$statusId

float

The number of the order status.

Return type: PaginatedResult

Search order status.

Parameters

Name

Type

Description

$page

int

The page to get. The default page that will be returned is page 1.

$itemsPerPage

int

The number of order statuses to be displayed per page. The default number per page is 50.

public all():Illuminate\Database\Eloquent\Collection
Return type: Collection

List order statuses.

public create($data):Plenty\Modules\Order\Status\Models\OrderStatus
Return type: OrderStatus

Create an order status.

Parameters

Name

Type

Description

$data

array

The order status data to be created.

public update($statusId, $data):Plenty\Modules\Order\Status\Models\OrderStatus
Return type: OrderStatus

Update an order status.

Parameters

Name

Type

Description

$statusId

float

The number of the order status to be updated.

$data

array

The order status data, which is updated.

public delete($statusId):void

Delete an order status.

Parameters

Name

Type

Description

$statusId

float

The number of the order status, to be deleted.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

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.

Models

OrderStatus

The order status model

Namespace

Plenty\Modules\Order\Status\Models

Properties
Name Type Description

statusId

float

The ID of the status.

isErasable

bool

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.

isFrontendVisible

bool

Indicates visibility in frontend.

isReorderVisible

bool

Indicates visibility in reorder.

isRedistributionVisible

bool

Indicates visibility in redistribution.

color

string

The color of the status.

names

Collection

The names of the order status.

Methods
public toArray()

Returns this model as an array.

StatusHistory

Contracts

StatusHistoryRepositoryContract

This interface allows you to get the status history of an order and to list the status histories of all orders.

Namespace

Plenty\Modules\Order\StatusHistory\Contracts

Methods
public getStatusHistoryByOrderId($orderId, $columns = []):Illuminate\Database\Eloquent\Collection
Return type: Collection

Get the status history of an order

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$columns

array

The columns to get

public getStatusHistory($columns = [], $page = 1, $itemsPerPage = 50):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

List status histories

Parameters

Name

Type

Description

$columns

array

The columns to get

$page

int

The page to get

$itemsPerPage

int

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($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

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.

Models

StatusHistoryEntry

The status history entry model

Namespace

Plenty\Modules\Order\StatusHistory\Models

Properties
Name Type Description

id

int

The ID of the status history entry

orderId

int

The ID of the order

statusId

float

The ID of the status

createdAt

The date when the entry was created

userId

int

The ID of the user

procedureText

string

The information text of the procedure that created the entry

Methods
public toArray()

Returns this model as an array.

Subscription

Contracts

SubscriptionOrderRepositoryContract

The SubscriptionOrderRepositoryContract allows you to find subscriptions, that due either today or on any given date, so that corresponding orders are created for them.

Namespace

Plenty\Modules\Order\Subscription\Contracts

Methods
public runToday():bool

Finds all subscriptions that are due today and creates corresponding orders for them.

public runAnyDate($runDate):bool

Finds all subscriptions that are due on the given date and creates corresponding orders for them.

Parameters

Name

Type

Description

$runDate

string

The date that the subscriptions are due on. Given in the following format: Y-m-d

public manualRun($orderId, $skipNextRun = false, $data = []):Plenty\Modules\Order\Models\Order
Return type: Order

Create an order for today for a given subscription.

Parameters

Name

Type

Description

$orderId

int

The ID of the subscription.

$skipNextRun

bool

If true, the next run of this subscription will be skipped. Is only used when not given in $data.

$data

array

Defines the order items that should be taken in the order. If empty, all items are taken.

SubscriptionRepositoryContract

The SubscriptionRepositoryContract is the interface for the subscription repository. This interface allows you to create and update subscriptions.

Namespace

Plenty\Modules\Order\Subscription\Contracts

Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Create a subscription

Parameters

Name

Type

Description

$data

array

$with

array

$lazyLoaded

bool

public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Update a subscription

Parameters

Name

Type

Description

$orderId

int

$data

array

$with

array

$lazyLoaded

bool

public delete($orderId):void

Delete a subscription

Parameters

Name

Type

Description

$orderId

int

public deleteOrderItem($orderItemId):bool

Delete an order item from a subscription

Parameters

Name

Type

Description

$orderItemId

int

public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update currency

Parameters

Name

Type

Description

$orderId

int

$data

array

public previewCreate($data):array

Get a subscription create preview for the given order data.

Parameters

Name

Type

Description

$data

array

public previewUpdate($orderId, $data):array

Get a subscription update preview for the given order data.

Parameters

Name

Type

Description

$orderId

int

$data

array

public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Create a subscription from a parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

public validateFromParent($orderId, $data = []):array

Validate order items for subscription creation from parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

TaricVatAssignment

Contracts

TaricVatAssignmentRepositoryContract

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.

Namespace

Plenty\Modules\Order\TaricVatAssignment\Contracts

Methods
public create($data = []):Plenty\Modules\Order\TaricVatAssignment\Models\TaricVatAssignment
Return type: TaricVatAssignment

Create a taric vat assignment.

Parameters

Name

Type

Description

$data

array

The taric vat assignment data.

public update($data):Plenty\Modules\Order\TaricVatAssignment\Models\TaricVatAssignment
Return type: TaricVatAssignment

Update a taric vat assignment

Parameters

Name

Type

Description

$data

array

The taric vat assignment data.

public delete($data = []):bool

Deletes a taric vat assignment.

Parameters

Name

Type

Description

$data

array

Either the ID of the taric vat assignment or an array holding the composite key composed of the taric code and the country ID.

Return type: PaginatedResult

Search taric vat assignments.

Parameters

Name

Type

Description

$page

int

The page to get. The default page that will be returned is page 1.

$itemsPerPage

int

The number of order statuses to be displayed per page. The default number per page is 50.

$with

array

public findByTaricCodeAndCountryId($taricCode, $countryNumber):Plenty\Modules\Order\TaricVatAssignment\Models\TaricVatAssignment
Return type: TaricVatAssignment

List taric vat assignment of a taric code

Parameters

Name

Type

Description

$taricCode

string

The number of the taric code.

$countryNumber

int

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($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

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.

Models

TaricVatAssignment

The taric vat assignment model.

Namespace

Plenty\Modules\Order\TaricVatAssignment\Models

Properties
Name Type Description

id

int

The ID of the taric vat assignment

taricCode

int

The taric code

countryId

int

The ID of the country that the taric code configuration belongs to

vatField

string

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

Methods
public toArray()

Returns this model as an array.

TaricVatAssignmentUsed

The taric code use model.

Namespace

Plenty\Modules\Order\TaricVatAssignment\Models

Properties
Name Type Description

taricCode

string

The taric code

isUsed

bool

Flag indicating whether a taric code is used by a variation

Methods
public toArray()

Returns this model as an array.

Transaction

Contracts

OrderItemTransactionRepositoryContract

List and create order item transactions.

Namespace

Plenty\Modules\Order\Transaction\Contracts

Methods
public list($orderItemId, $columns = [], $with = []):Illuminate\Database\Eloquent\Collection
Return type: Collection

List transactions

Parameters

Name

Type

Description

$orderItemId

int

$columns

array

$with

array

public create($data):Plenty\Modules\Order\Transaction\Models\OrderItemTransaction
Return type: OrderItemTransaction

Create a transaction

Parameters

Name

Type

Description

$data

array

public createMany($data):array

Create multiple transactions

Parameters

Name

Type

Description

$data

array

public update($transactionId, $data):Plenty\Modules\Order\Transaction\Models\OrderItemTransaction
Return type: OrderItemTransaction

Update a transaction

Parameters

Name

Type

Description

$transactionId

int

$data

array

public delete($transactionId):bool

Delete a transaction

Parameters

Name

Type

Description

$transactionId

int

Return type: PaginatedResult

Search transactions

Parameters

Name

Type

Description

$page

int

$itemsPerPage

int

$columns

array

$with

array

$sortBy

string

$sortOrder

string

public createForOrder($orderId, $data):Illuminate\Database\Eloquent\Collection
Return type: Collection

Create transactions for order

Parameters

Name

Type

Description

$orderId

int

$data

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.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

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.

Models

OrderItemTransaction

The order item transaction model.

Namespace

Plenty\Modules\Order\Transaction\Models

Properties
Name Type Description

id

int

The ID of the transaction

orderItemId

int

The ID of the order item

quantity

float

The quantity

userId

int

The ID of the user

identification

string

External identification. Can be an arbitrary string.

direction

string

The direction. Possible values are 'in' and 'out'.

status

string

The status. Possible values are 'regular' and 'cancelled'.

receiptId

int

The receipt ID

warehouseLocationId

int

The ID of the warehouse location

batch

string

The batch

bestBeforeDate

string

The best before date

deliveryNoteNumber

string

The delivery note number

batchBestBeforeDateId

int

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

warehouseLocation

WarehouseLocation

The related warehouse location

Methods
public toArray()

Returns this model as an array.

WarehouseLocation

Contracts

OrderWarehouseLocationRepositoryContract

The OrderWarehouseLocationRepositoryContract is the interface for the order warehouse location repository. This interface allows you to attach and detach warehouse locations.

Namespace

Plenty\Modules\Order\WarehouseLocation\Contracts

Methods
public attach($orderId):void

Attach warehouse locations.

Parameters

Name

Type

Description

$orderId

int

public detach($orderId):void

Detach warehouse locations.

Parameters

Name

Type

Description

$orderId

int

Warranty

Contracts

WarrantyRepositoryContract

The WarrantyRepositoryContract is the interface for the warranty repository. This interface allows you to create and update warranties.

Namespace

Plenty\Modules\Order\Warranty\Contracts

Methods
public create($data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Create a warranty

Parameters

Name

Type

Description

$data

array

$with

array

$lazyLoaded

bool

public update($orderId, $data, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Update a warranty

Parameters

Name

Type

Description

$orderId

int

$data

array

$with

array

$lazyLoaded

bool

public delete($orderId):void

Delete a warranty

Parameters

Name

Type

Description

$orderId

int

public deleteOrderItem($orderItemId):bool

Delete an order item from a warranty

Parameters

Name

Type

Description

$orderItemId

int

public createFromParent($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Create a warranty from a parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

public validateFromParent($orderId, $data = []):array

Validate order items for create a warranty from a parent order

Parameters

Name

Type

Description

$orderId

int

$data

array

public updateCurrency($orderId, $data):Plenty\Modules\Order\Models\Order
Return type: Order

Update currency

Parameters

Name

Type

Description

$orderId

int

$data

array

public book($orderId, $data = []):bool

Book order.

Parameters

Name

Type

Description

$orderId

int

$data

array

public cancelBooking($orderId, $data = []):bool

Cancellation the booking of an order. The ID of the order must be specified.

Parameters

Name

Type

Description

$orderId

int

$data

array

public validateCancelBooking($orderId):array

Validate cancellation of the booking of an order

Parameters

Name

Type

Description

$orderId

int

public detachVariation($orderItemId, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "variation" to "unassigned variation".

Parameters

Name

Type

Description

$orderItemId

int

$with

array

$lazyLoaded

bool

public assignVariation($orderItemId, $variationId, $warehouseId = null, $with = [], $lazyLoaded = false):Plenty\Modules\Order\Models\Order
Return type: Order

Change an order item of type "unassigned variation" to "variation".

Parameters

Name

Type

Description

$orderItemId

int

$variationId

int

$warehouseId

int

$with

array

$lazyLoaded

bool

public previewCreate($data):array

Get a warranty create preview for the given order data.

Parameters

Name

Type

Description

$data

array

public previewUpdate($orderId, $data):array

Get a warranty update preview for the given order data.

Parameters

Name

Type

Description

$orderId

int

$data

array