Source of file ArticleDeliveryParameter.php
Size: 3,552 Bytes - Last Modified: 2015-05-14T23:22:17+02:00
/www-data/git/ricardo/src/Diglin/Ricardo/Managers/Sell/Parameter/ArticleDeliveryParameter.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 | <?php /** * Diglin GmbH - Switzerland * * This file is part of a Diglin GmbH module. * * This Diglin GmbH module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * This script is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * @author Sylvain Rayé <support at diglin.com> * @category Diglin * @package Diglin_Ricardo * @copyright Copyright (c) 2011-2015 Diglin (http://www.diglin.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) */ namespace Diglin\Ricardo\Managers\Sell\Parameter; use Diglin\Ricardo\Managers\ParameterAbstract; /** * Class ArticleDeliveryParameter * @package Diglin\Ricardo\Managers\Sell\Parameter */ class ArticleDeliveryParameter extends ParameterAbstract { /** * @var float */ protected $_deliveryCost; // required /** * @var int */ protected $_deliveryId; // required /** * @var int */ protected $_deliveryPackageSizeId; // optional /** * @var boolean */ protected $_isCumulativeShipping; // required /** * @var boolean */ protected $_isDeliveryFree; // required protected $_requiredProperties = array( 'deliveryCost', 'deliveryId', 'isCumulativeShipping', 'isDeliveryFree', ); protected $_optionalProperties = array( 'deliveryPackageSizeId', ); /** * @param int $deliveryPackageSizeId * @return $this */ public function setDeliveryPackageSizeId($deliveryPackageSizeId) { $this->_deliveryPackageSizeId = (int) $deliveryPackageSizeId; return $this; } /** * @return int */ public function getDeliveryPackageSizeId() { return (int) $this->_deliveryPackageSizeId; } /** * @param boolean $isCumulativeShipping * @return $this */ public function setIsCumulativeShipping($isCumulativeShipping) { $this->_isCumulativeShipping = (bool) $isCumulativeShipping; return $this; } /** * @return boolean */ public function getIsCumulativeShipping() { return (bool) $this->_isCumulativeShipping; } /** * @param float $deliveryCost * @return $this */ public function setDeliveryCost($deliveryCost) { $this->_deliveryCost = (float) $deliveryCost; return $this; } /** * @return float */ public function getDeliveryCost() { return floatval($this->_deliveryCost); } /** * @param int $deliveryId * @return $this */ public function setDeliveryId($deliveryId) { $this->_deliveryId = (int) $deliveryId; return $this; } /** * @return int */ public function getDeliveryId() { return (int) $this->_deliveryId; } /** * @param boolean $isDeliveryFree * @return $this */ public function setIsDeliveryFree($isDeliveryFree = false) { $this->_isDeliveryFree = (bool) $isDeliveryFree; return $this; } /** * @return boolean */ public function getIsDeliveryFree() { return (bool) $this->_isDeliveryFree; } } |