Price

Extends \NextEvent\PHPSDK\Model\Model

Price model

Model class exposing price properties like title, price, currency

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

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 changed date of this price

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

Get the creation data of this price

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

Get the currency of this price

getCurrency() : string

Returns an alphanumeric currency code according to ISO 4217.

Response

string

Get the unique identifier of this price record

getId() : integer

Response

integer

Get the net price without additions and taxes

getNetPrice() : float

Response

float

Get the gross price after calculated additions

getPrice() : float

Response

float

Get the title for this price

getTitle() : string

Response

string

Getter for the deleted flag

isDeleted() : boolean

Denotes that the price has been deleted and is no longer available for booking.

Response

boolean

True if this price has been deleted

Check if this price represents a discount price

isDiscountPrice() : boolean

Discount prices cannot be selected directly but are automatically chosen if a matching discount code was entered.

Response

boolean

Check if this price is a hidden item

isHidden() : boolean

Hidden prices are not directly selectable for customers but represent the price that is charged when a ticket is added indirectly via sideevent selection or when booked as a package.

Response

boolean

Check if this price represents a package price

isPackagePrice() : boolean

Response

boolean

Check if this price represents a sideevent price

isSideeventPrice() : 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