File: D:/HostingSpaces/SBogers10/shop.komma.nl/resources/js/components/vue/shipments/models/Shipment.js
import Model from "../../../../global/models/Model";
import ShipmentStatus from "./ShipmentStatus";
export default class Shipment extends Model
{
/**
* @return {number}
*/
get id() {
return this._id;
}
/**
* @param {number} value
*/
set id(value) {
this._id = typeof value === 'number' ? value : Model.newId();
}
/**
* @return {string}
*/
get status() {
return this._status;
}
/**
* @param {string} value
*/
set status(value) {
if(typeof value !== 'string') {
this._status = ShipmentStatus.NEW
} else {
this._status = value
}
}
/**
* @return {string}
*/
get tracking_code() {
return this._tracking_code;
}
/**
* @param {string} value
*/
set tracking_code(value) {
if(typeof value !== 'string') {
this._tracking_code = ''
} else {
this._tracking_code = value
}
}
/**
* @return {number}
*/
get can_be_announced() {
return this._can_be_announced;
}
/**
* @param {number} value
*/
set can_be_announced(value) {
this._can_be_announced = typeof value === 'boolean' ? value : false;
}
/**
* @return {number}
*/
get is_announced() {
return this._is_announced;
}
/**
* @param {number} value
*/
set is_announced(value) {
this._is_announced = typeof value === 'boolean' ? value : false;
}
/**
* @return {object}
*/
get order() {
return this._order;
}
/**
* @param {object} value
*/
set order(value) {
if(typeof value !== 'object') {
this._order = null
} else {
this._order = value
}
}
/**
* @return {string}
*/
get comment() {
return this._comment;
}
/**
* @param {string} value
*/
set comment(value) {
if(typeof value !== 'string') {
this._comment = ''
} else {
this._comment = value
}
}
/**
* @return {string}
*/
get ssp_reference() {
return this._ssp_reference;
}
/**
* @param {string} value
*/
set ssp_reference(value) {
if(typeof value !== 'string') {
this._ssp_reference = ''
} else {
this._ssp_reference = value
}
}
/**
* @return {string}
*/
get tracking_url() {
return this._tracking_url;
}
/**
* @param {string} value
*/
set tracking_url(value) {
if(typeof value !== 'string') {
this._tracking_url = ''
} else {
this._tracking_url = value
}
}
/**
* @return {string}
*/
get carrier_name() {
return this._carrier_name;
}
/**
* @param {string} value
*/
set carrier_name(value) {
if(typeof value !== 'string') {
this._carrier_name = ''
} else {
this._carrier_name = value
}
}
}