1 | <?php |
||
11 | class SubscriptionService extends AbstractService |
||
12 | { |
||
13 | /** |
||
14 | * Get the subscriptions. |
||
15 | * |
||
16 | * @param integer $customerId The customer ID. |
||
17 | * @param string $externalCustomerId The external customer ID. |
||
18 | * @param string $subscriptionExternalId The external subscription ID. |
||
19 | * @param integer $subscriptionId The subscription ID. |
||
20 | * @return Get\ApiResponse |
||
21 | */ |
||
22 | 6 | public function getSubscriptions( |
|
39 | 6 | ||
40 | 6 | /** |
|
41 | 6 | * Create a subscription. |
|
42 | 3 | * |
|
43 | 3 | * @param Create\RequestData $requestData The request data. |
|
44 | 3 | * @return Create\ApiResponse |
|
45 | */ |
||
46 | 6 | public function createSubscription(Create\RequestData $requestData) |
|
52 | |||
53 | /** |
||
54 | * Update a subscription. |
||
55 | * |
||
56 | * @param integer $subscriptionId The subscription ID. |
||
57 | 3 | * @param \DateTime $nextEvent The next event date and time. |
|
58 | * @param string $subscriptionExternalId The external subscription ID. |
||
59 | 3 | * @param string $status The subscription status. |
|
60 | * @param array $xAttributes The subscription x attributes. |
||
61 | 3 | * @param Feature[] $features The features. |
|
62 | * @return Update\ApiResponse |
||
63 | */ |
||
64 | public function updateSubscription( |
||
86 | 3 | ||
87 | 3 | /** |
|
88 | 3 | * Change article of a subscription. |
|
89 | 3 | * |
|
90 | 3 | * @param ChangeArticle\RequestData $requestData The request data. |
|
91 | * @return ChangeArticle\ApiResponse |
||
92 | 3 | */ |
|
93 | public function changeSubscriptionArticle(ChangeArticle\RequestData $requestData) |
||
99 | |||
100 | /** |
||
101 | * Set the addon for a subscription. |
||
102 | * |
||
103 | 3 | * @param SetAddon\RequestData $requestData The request data. |
|
104 | * @return SetAddon\ApiResponse |
||
105 | 3 | */ |
|
106 | public function setSubscriptionAddon(SetAddon\RequestData $requestData) |
||
112 | |||
113 | /** |
||
114 | * Set the usage data of a subscription. |
||
115 | * |
||
116 | 3 | * @param SetUsageData\RequestData $requestData The request data. |
|
117 | * @return SetUsageData\ApiResponse |
||
118 | 3 | */ |
|
119 | public function setSubscriptionUsageData(SetUsageData\RequestData $requestData) |
||
125 | |||
126 | /** |
||
127 | * Get the usage data of a subscription. |
||
128 | * |
||
129 | 3 | * @param integer $subscriptionId The subscription ID. |
|
130 | * @param \DateTime $subscriptionStart The subscription start. |
||
131 | 3 | * @param \DateTime $subscriptionEnd The subscription end. |
|
132 | * @return GetUsageData\ApiResponse |
||
133 | 3 | */ |
|
134 | public function getSubscriptionUsageData( |
||
150 | |||
151 | 3 | /** |
|
152 | 3 | * Get the usage data of a subscription. |
|
153 | 3 | * |
|
154 | * @param string $usageDataId The usage data ID. |
||
155 | 3 | * @return DeleteUsageData\ApiResponse |
|
156 | */ |
||
157 | 3 | public function deleteSubscriptionUsageData($usageDataId) |
|
164 | |||
165 | /** |
||
166 | 3 | * Get the upcoming amount. |
|
167 | * |
||
168 | 3 | * @param GetUpcomingAmount\RequestData $requestData The request data filter. |
|
169 | 3 | * @return GetUpcomingAmount\ApiResponse |
|
170 | */ |
||
171 | 3 | public function getUpcomingAmount(GetUpcomingAmount\RequestData $requestData = null) |
|
181 | |||
182 | 3 | /** |
|
183 | * Postpone a subscription shipping. |
||
184 | * |
||
185 | * @param integer $subscriptionId |
||
186 | 3 | * @param integer $month The month to postpone. |
|
187 | * @return Postpone\ApiResponse |
||
188 | 3 | */ |
|
189 | public function postponeSubscription($subscriptionId, $month) |
||
196 | |||
197 | /** |
||
198 | 3 | * Renew a subscription. |
|
199 | * |
||
200 | 3 | * @param integer $subscriptionId The subscription ID to renew. |
|
201 | 3 | * @return Renew\ApiResponse |
|
202 | */ |
||
203 | 3 | public function renewSubscription($subscriptionId) |
|
210 | |||
211 | /** |
||
212 | 3 | * Create a secure link for a subscription. |
|
213 | * |
||
214 | 3 | * @param integer $subscriptionId The subscription ID for which to create the secure link. |
|
215 | 3 | * @return CreateSecureLink\ApiResponse |
|
216 | */ |
||
217 | 3 | public function createSecureLink($subscriptionId) |
|
224 | |||
225 | /** |
||
226 | 3 | * Cancel a subscription. |
|
227 | * |
||
228 | 3 | * @param integer $subscriptionId The subscription ID. |
|
229 | 3 | * @param \DateTime $cancellationDate The cancellation date and time. |
|
230 | * @param string $cancellationNote The cancellation note. |
||
231 | 3 | * @return Cancel\ApiResponse |
|
232 | */ |
||
233 | public function cancelSubscription($subscriptionId, \DateTime $cancellationDate = null, $cancellationNote = null) |
||
243 | |||
244 | 3 | /** |
|
245 | 3 | * Reactivate a subscription. |
|
246 | 3 | * |
|
247 | * @param integer $subscriptionId The subscription ID to reactivate. |
||
248 | 3 | * @return Reactivate\ApiResponse |
|
249 | */ |
||
250 | 3 | public function reactivateSubscription($subscriptionId) |
|
257 | } |
||
258 |
It seems like you allow that null is being passed for a parameter, however the function which is called does not seem to accept null.
We recommend to add an additional type check (or disallow null for the parameter):