Basket model
Represents a basket model retrieved from the API
package |
NextEvent\PHPSDK\Model |
---|
__call(string $name, array $args) : mixed
If the source of your model contains, e.g. a property named 'my_property',
you can call getMyProperty()
to retrieve it's value.
string
array
mixed
__construct(array $source)
Parse source data.
Throws |
|
---|
array
The source data as received from the API
get(string $var) : mixed
Should be used, if you expect the model to have custom properties which are not known/covered by the known getters
string
mixed
getBasketItems() : array<mixed,\NextEvent\PHPSDK\Model\BasketItem>
getCancellationTotal() : float
This represents the total amount paid for the previous order this basket is supposed to replace.
float
getExpires() : \NextEvent\PHPSDK\Model\DateTime|null
Can be null if the basket has no specific expiration date
\NextEvent\PHPSDK\Model\DateTime|null
getId() : integer
integer
basketId
getReplacedOrderId() : integer
integer
The ID of the order to be replaced by this basket
getUuid() : string
string
UUID
getWidgetParameter() : string|null
string|null
groupItems(array $items) : array
array
array
hasBasketItems() : boolean
Use this method to check whether the basket is empty or not.
boolean
True if basket contains at least one item
isRebookOrder() : boolean
Rebooking baskets will replace the linked order once completed. Use Basket::getReplacedOrderId() to get the ID of the previous order this basket will replace.
boolean
True if this is a rebooking basket, false otherwise
isValid() : boolean
boolean
serialize() : string
Implements Serializable interface
string
toArray() : array
array
toLogContext() : array
Implements the LogContextInterface interface
array
toString() : string
string
unserialize( $serialized)
Implements Serializable interface