BasePrice model
Provides the structure for a base price record.
A base price is a price which applies it's data to actual price records. A base price is never linked to a category record. It rather links to a BaseCategory. Just like a base category, a base price is never linked to an order item.
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
getBaseCategory() : \NextEvent\PHPSDK\Model\BaseCategory|null
getBaseCategoryId() : integer
integer
getChangedDate() : \NextEvent\PHPSDK\Model\DateTime|null
getCreatedDate() : \NextEvent\PHPSDK\Model\DateTime|null
getCurrency() : string
string
Alphanumeric currency code according to ISO 4217.
getId() : integer
integer
getPrice() : float
float
getTitle() : string
string
isNew() : boolean
inheritdoc | |
---|---|
boolean
isValid() : boolean
boolean
serialize() : string
Implements Serializable interface
string
setBaseCategory(\NextEvent\PHPSDK\Model\BaseCategory $baseCategory) : void
The base_category_id and the event_id will be applied to the data of this base price if it is a new one.
Throws |
|
---|
\NextEvent\PHPSDK\Model\BaseCategory
setCurrency(string $currency) : \NextEvent\PHPSDK\Model\BasePrice
setPrice(float $price) : \NextEvent\PHPSDK\Model\BasePrice
setSource(array $source) : \NextEvent\PHPSDK\Model\MutableModel
access |
private |
---|
array
The source data as received from the API.
\NextEvent\PHPSDK\Model\MutableModel
setTitle(string $title) : \NextEvent\PHPSDK\Model\BasePrice
spawn(array $data, \NextEvent\PHPSDK\Model\BaseCategory $baseCategory) : \NextEvent\PHPSDK\Model\BasePrice
The resulting instance will be marked as a new base price which has not been persisted via API.
Use this method if you want to create a new base price and persist it via the client.
array
\NextEvent\PHPSDK\Model\BasePrice
toArray() : array
array
toLogContext() : array
Implements the LogContextInterface interface
array
toString() : string
string
unserialize( $serialized)
Implements Serializable interface