Method | Description | Returns |
---|---|---|
getCodeUrl() | Gets code URL for the code: if not exist, creates a new model | CodeUrl |
getHateoasLinks() | Get the HATEOAS links for the record | array |
getEditUrl() | Get the url for editing the record. | string |
getDeleteUrl() | Get the url for deleting the record. | string |
getId() | int | |
getCode() | string | |
getMaxUses() | Gets maximum usage of the code: there is no limit when not set, but when it is 0, the code can't be used | int |
getCreated() | Date the record was created. | DateTime |
getModified() | Last modification date for the record. | DateTime |
getDiscount() | Discount | |
isNewRecord() | Check if the record is a new record | bool |
isHierarchicalModel() | Check whether a model is a hierarchical model, i.e. can have children | bool |
isVersionedModel() | Check whether a model is versioned | bool |
Discounts\Models\Backend\Code
Code