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 |
|
|---|
arrayThe 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
integerbasketId
getReplacedOrderId() : integer
integerThe ID of the order to be replaced by this basket
getUuid() : string
stringUUID
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.
booleanTrue 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.
booleanTrue 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