OrderItem

Extends \NextEvent\PHPSDK\Model\BasketItem

OrderItem model

Model class representing a single item of a NextEvent order

see
package

NextEvent\PHPSDK\Model

Methods

Supports getX or hasX Methods for properties which are yet unknown.

__call(string $name, array $args) : mixed
inherited

If the source of your model contains, e.g. a property named 'my_property', you can call getMyProperty() to retrieve it's value.

Arguments

$name

string

$args

array

Response

mixed

Model constructor

__construct(array $source) 
inherited

Parse source data.

Throws
\NextEvent\PHPSDK\Exception\InvalidModelDataException

Arguments

$source

array

The source data as received from the API

Register the given BasketItem as a child element

addChildItem(\NextEvent\PHPSDK\Model\BasketItem $item) 
inherited

Get the value for the given variable.

get(string $var) : mixed
inherited

Should be used, if you expect the model to have custom properties which are not known/covered by the known getters

Arguments

$var

string

Response

mixed

Get the associated category model

getCategory() : \NextEvent\PHPSDK\Model\Category
inherited

Getter for child items

getChildren() : array
inherited

Child items represent additional basket items like ticket options, side events, etc. which are coupled with the given basket item and cannot be booked individually.

They also contribute to the overall price and may or may not be listed in a basket summary.

Response

array

List of nested BasketItems

Get a description for this order item

getDescription(string $delimiter = ' - ') : string
inherited

The description is composed from the associated category and price titles

Arguments

$delimiter

string

Character(s) used to separate description segments

Response

string

Get the model for discount information

getDiscountCode() : \NextEvent\PHPSDK\Model\DiscountCode|null
inherited

Getter for edit steps listing

getEditSteps() : array
inherited

Response

array

List with hash arrays describing available editing steps: ['label' => '', 'action' => '', 'url' => '<"link" argument for embed widget>']

Get the event identifier this item refers to

getEventId() : string
inherited

Response

string

eventId

Get the title of the event this item refers to

getEventTitle() : string
inherited

Response

string

Get the unique identifier of this item

getId() : integer
inherited

Response

integer

Getter for additional item information

getInfo() : string|null
inherited

Response

string|null

Get the order/basket identifier this item is associated with

getOrderId() : integer
inherited

Response

integer

orderId

Get the model for price information

getPrice() : \NextEvent\PHPSDK\Model\Price
inherited

Getter for seat information

getSeat() : \NextEvent\PHPSDK\Model\Seat|null
inherited
deprecated

since 1.4.0

Response

\NextEvent\PHPSDK\Model\Seat|null

Get the type of the basket/order item

getType() : string
inherited

Response

string

Either 'ticket' or 'addition'

Get the globally unique identifier of this item

getUuid() : string
inherited

Response

string

UUID

Determine whether this basket item has additional information assigned

hasInfo() : boolean
inherited

Response

boolean

True if additional information is available

Determine whether this basket item has seat information assigned

hasSeat() : boolean
inherited
deprecated

since 1.4.0

Response

boolean

True if this is a seated ticket and seat information is available

Getter for the deleted flag

isDeleted() : boolean
inherited

Rebookig items have the deleted flag set if they are subject to be cancelled from the order.

Response

boolean

True if this item has been flagged for deletion

Check model state if it is valid

isValid() : boolean
inherited abstract

Response

boolean

String representation of object

serialize() : string
inherited

Implements Serializable interface

Response

string

Convert model to an Array

toArray() : array
inherited

Response

array

Convert the model for logging

toLogContext() : array
inherited

Implements the LogContextInterface interface

Response

array

Represent the model as string

toString() : string
inherited

Response

string

Constructs the object from a string

unserialize( $serialized) 
inherited

Implements Serializable interface

Arguments

$serialized