1 | <?php |
||
14 | class ProductUsage |
||
15 | { |
||
16 | /** |
||
17 | * The current allocation term length in months. |
||
18 | * @var integer |
||
19 | */ |
||
20 | private $allocationTermInMonths; |
||
21 | |||
22 | /** |
||
23 | * The end date of the current allocation term period. |
||
24 | * @var string |
||
25 | */ |
||
26 | private $endTime; |
||
27 | |||
28 | /** |
||
29 | * The last time that the unit_of_measurement count was updated |
||
30 | * @var string |
||
31 | */ |
||
32 | private $lastUpdateTime; |
||
33 | |||
34 | /** |
||
35 | * (optional) The cost in cents for every visitor when the number of |
||
36 | * unit_of_measurement has exceeded the usage_allowance. This value is |
||
37 | * only set for accounts with a limited usage_allowance |
||
38 | * @var number |
||
39 | */ |
||
40 | private $overageCentsPerVisitor; |
||
41 | |||
42 | /** |
||
43 | * The product name |
||
44 | * @var string |
||
45 | */ |
||
46 | private $productName; |
||
47 | |||
48 | /** |
||
49 | * Key-value map of usage per project under this account and this product. |
||
50 | * Keys are project IDs, values are usage numbers. Only available for the |
||
51 | * Impressions metrics, otherwise omitted. |
||
52 | * @var array |
||
53 | */ |
||
54 | private $projects; |
||
55 | |||
56 | /** |
||
57 | * The start date of the current allocation term period. For monthly paying |
||
58 | * accounts, the current allocation term period means the current billing month |
||
59 | * @var string |
||
60 | */ |
||
61 | private $startTime; |
||
62 | |||
63 | /** |
||
64 | * The total usage in the unit_of_measurement within the current allocation term |
||
65 | * @var integer |
||
66 | */ |
||
67 | private $usage; |
||
68 | |||
69 | /** |
||
70 | * (optional) The total usage allowed in the unit_of_measurement for the |
||
71 | * current allocation term. This value is only set for accounts with a |
||
72 | * limited usage_allowance |
||
73 | * |
||
74 | * @var integer |
||
75 | */ |
||
76 | private $usageAllowance; |
||
77 | |||
78 | /** |
||
79 | * Constructor. |
||
80 | */ |
||
81 | 4 | public function __construct($options = array()) |
|
99 | |||
100 | /** |
||
101 | * Returns this object as array. |
||
102 | */ |
||
103 | 1 | public function toArray() |
|
126 | |||
127 | 1 | public function getAllocationTermInMonths() |
|
131 | |||
132 | 4 | public function setAllocationTermInMonths($allocationTermInMonths) |
|
136 | |||
137 | 1 | public function getEndTime() |
|
141 | |||
142 | 4 | public function setEndTime($endTime) |
|
146 | |||
147 | 1 | public function getLastUpdateTime() |
|
151 | |||
152 | 4 | public function setLastUpdateTime($lastUpdateTime) |
|
156 | |||
157 | 1 | public function getOverageCentsPerVisitor() |
|
161 | |||
162 | 4 | public function setOverageCentsPerVisitor($overageCentsPerVisitor) |
|
166 | |||
167 | 3 | public function getProductName() |
|
171 | |||
172 | 4 | public function setProductName($productName) |
|
176 | |||
177 | 3 | public function getProjects() |
|
181 | |||
182 | 4 | public function setProjects($projects) |
|
186 | |||
187 | 1 | public function getStartTime() |
|
191 | |||
192 | 4 | public function setStartTime($startTime) |
|
196 | |||
197 | 1 | public function getUsage() |
|
201 | |||
202 | 4 | public function setUsage($usage) |
|
206 | |||
207 | 1 | public function getUsageAllowance() |
|
211 | |||
212 | 4 | public function setUsageAllowance($usageAllowance) |
|
216 | } |
||
217 | |||
226 |