Overview

Namespaces

  • Apptus
    • ESales
      • Connector
        • Report
        • Time
    • Util
      • Cache
  • PHP
  • Overview
  • Namespace
  • Class
  • Tree
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 
<?php
namespace Apptus\ESales\Connector\Report;

/**
 * Sub class for {@see ProductSalesByAttributeReport}.
 * Contains sales data for a group of products with a common facet value.
 */
class ProductSalesByAttributeReportSection {
    private $name;
    private $discount; // Calculated as List price - Net selling price
    private $purchasedUnits; //The number of purchased units.
    private $abandonedUnits; //The number of abandoned units
    private $revenue; //Aggregated net selling price
    private $margin; //(Gross Profit) Margin - Calculated as Net selling price - Cost as per http://en.wikipedia.org/wiki/Gross_profit_margin

    public function __construct($name, $discount, $purchasedUnits, $abandonedUnits, $revenue, $margin) {
        $this->name = $name;
        $this->discount = $discount;
        $this->purchasedUnits = $purchasedUnits;
        $this->abandonedUnits = $abandonedUnits;
        $this->revenue = $revenue;
        $this->margin = $margin;
    }

    /**
     * @return string Name of the facet value for this group of products.
     */
    public function name() {
        return $this->name;
    }

    /**
     * @return float The total discount for this group of products.
     */
    public function discount() {
        return $this->discount;
    }

    /**
     * @return int The total number of purchased units for this group of products.
     */
    public function purchasedUnits() {
        return $this->purchasedUnits;
    }

    /**
     * @return int The total number of abandoned units for this group of products.
     */
    public function abandonedUnits() {
        return $this->abandonedUnits;
    }

    /**
     * @return float The total revenue for this group of products.
     */
    public function revenue() {
        return $this->revenue;
    }

    /**
     * @return float The total margin for this group of products.
     */
    public function margin() {
        return $this->margin;
    }
}
Apptus ESales Connector PHP API documentation generated by ApiGen