Overview

Namespaces

  • Datadepo
    • Api
      • DataStores
      • Structures
      • Synchronizers

Classes

  • Datadepo\Api\ApiWrapper
  • Datadepo\Api\Collector
  • Datadepo\Api\DataDepoResponse
  • Datadepo\Api\DataDepoSync
  • Datadepo\Api\DataStores\PdoDataStore
  • Datadepo\Api\IniConfiguration
  • Datadepo\Api\RunningFiles
  • Datadepo\Api\Structures\AbstractStructure
  • Datadepo\Api\Structures\BusinessLine
  • Datadepo\Api\Structures\BusinessSupplierLine
  • Datadepo\Api\Structures\CategoryLine
  • Datadepo\Api\Structures\DataLine
  • Datadepo\Api\Structures\ImageLine
  • Datadepo\Api\Structures\ParameterLine
  • Datadepo\Api\Structures\PriceLine
  • Datadepo\Api\Structures\RelatedLine
  • Datadepo\Api\Structures\StoreLine
  • Datadepo\Api\Structures\SupplierBankAccountLine
  • Datadepo\Api\Structures\SupplierLine
  • Datadepo\Api\Structures\SupplierPersonLine
  • Datadepo\Api\Structures\VariantLine
  • Datadepo\Api\Synchronizers\AbstractSynchronizer
  • Datadepo\Api\Synchronizers\BusinessSynchronizer
  • Datadepo\Api\Synchronizers\CategorySynchronizer
  • Datadepo\Api\Synchronizers\DataSynchronizer
  • Datadepo\Api\Synchronizers\SuppliersSynchronizer

Interfaces

  • Datadepo\Api\DataStores\IDataStore

Exceptions

  • Datadepo\Api\ApiException
  • Datadepo\Api\ConfigurationException
  • Datadepo\Api\DataDepoRunningException
  • Datadepo\Api\DataDepoSuspendedException
  • Overview
  • Namespace
  • Class
  1: <?php
  2: namespace Datadepo\Api\Structures;
  3: 
  4: /**
  5:  * @property-read string $currency
  6:  * @property-read double $tax
  7:  * @property-read double $rabat
  8:  * @property-read double $margin
  9:  * @property-read double $priceRetail
 10:  * @property-read double $price
 11:  * @property-read double $pricePhe
 12:  * @property-read double $priceMin
 13:  * @property-read double $priceSale
 14:  * @property-read double $priceSaleFinal
 15:  */
 16: class PriceLine extends AbstractStructure
 17: {
 18:   
 19:   /** @var string */
 20:   protected $currency;
 21:   
 22:   /**
 23:    * @param array $data
 24:    * @param string $currency
 25:    */
 26:   public function __construct($data, $currency)
 27:   {
 28:     $this->data = $data;
 29:     $this->currency = $currency;
 30:   }
 31:   
 32:   /**
 33:    * @return string
 34:    */
 35:   public function getJson()
 36:   {
 37:     return json_encode($this->data);
 38:   }
 39:   
 40:   /**
 41:    * @return string
 42:    */
 43:   public function getPrimary()
 44:   {
 45:     return $this->getCurrency();
 46:   }
 47:   
 48:   /**
 49:    * @return string
 50:    */
 51:   public function getCurrency()
 52:   {
 53:     return $this->currency;
 54:   }
 55:   
 56:   /**
 57:    * @return double
 58:    */
 59:   public function getTax()
 60:   {
 61:     return $this->data->tax;
 62:   }
 63:   
 64:   /**
 65:    * @return double
 66:    */
 67:   public function getRabat()
 68:   {
 69:     return $this->data->rabat;
 70:   }
 71:   
 72:   /**
 73:    * @return double
 74:    */
 75:   public function getMargin()
 76:   {
 77:     return $this->data->margin;
 78:   }
 79:   
 80:   /**
 81:    * Recommended MOC
 82:    * @return double
 83:    */
 84:   public function getPriceRetail()
 85:   {
 86:     return $this->data->priceRetail;
 87:   }
 88:   
 89:   /**
 90:    * Order price
 91:    * @return double
 92:    */
 93:   public function getPrice()
 94:   {
 95:     return $this->data->price;
 96:   }
 97:   
 98:   /**
 99:    * Additional dues (is not included in sale price)
100:    * @return double
101:    */
102:   public function getPricePhe()
103:   {
104:     return $this->data->pricePhe;
105:   }
106:   
107:   /**
108:    * Minimal sale price
109:    * @return double
110:    */
111:   public function getPriceMin()
112:   {
113:     return $this->data->priceMin;
114:   }
115:   
116:   /**
117:    * Sale price without dues and price add
118:    * @return double
119:    */
120:   public function getPriceSale()
121:   {
122:     return $this->data->priceSale;
123:   }
124:   
125:   /**
126:    * Sale price (include dues and price add)
127:    * @return double
128:    */
129:   public function getPriceSaleFinal()
130:   {
131:     return $this->getPriceSale() + $this->getPricePhe();
132:   }
133:   
134: }
API documentation generated by ApiGen