Order

Extends \NextEvent\PHPSDK\Model\Model

Order model

Represents an order record retrieved from the API.

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

Check if tickets have all be issued

allTicketsIssued() : boolean

As opposed to hasTickets(), this only returns true if tickets for this order are available AND have been issued as PDF documents.

Response

boolean

Check if documents/tickets can be expected to be issued for this order

expectDocuments() : boolean

Response

boolean

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

Getter for the currency code of this order

getCurrency() : string

Response

string

ISO 4217 currency code

Getter for order documents

getDocuments() : array

Response

array

of OrderDocument models

Getter for the orders's expiration date

getExpires() : \NextEvent\PHPSDK\Model\DateTime|null

Can be null if the orders has no specific expiration date

Response

\NextEvent\PHPSDK\Model\DateTime|null

Getter for the order identifier

getId() : integer

Response

integer

orderId

Getter for the order booking date

getOrderDate() : \NextEvent\PHPSDK\Model\DateTime|null

Getter for items assigned to this order

getOrderItems() : array<mixed,\NextEvent\PHPSDK\Model\OrderItem>
Throws

Response

array<mixed,\NextEvent\PHPSDK\Model\OrderItem>

Get the state of this order

getState() : string

Possible values are: payment, reservation, completed, aborted, replaced, cancelled

Response

string

Get tickets booked with this order

getTickets( $force = false) : array<mixed,\NextEvent\PHPSDK\Model\Ticket>
Throws
\NextEvent\PHPSDK\Exception\TicketNotFoundException

Arguments

$force

Response

array<mixed,\NextEvent\PHPSDK\Model\Ticket>

Getter for the total amount of this order

getTotal() : float

Response

float

Get the globally unique identifier of this item

getUuid() : string

Response

string

UUID

Check order if documents are available

hasDocuments() : boolean

This chech includes tickets

Response

boolean

Check order if tickets are available

hasTickets() : boolean

Response

boolean

Check order status to be 'completed'

isComplete() : boolean

Response

boolean

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