1 | <?php |
||
13 | class ArticleService extends AbstractService |
||
14 | { |
||
15 | /** |
||
16 | * Get the articles. |
||
17 | * |
||
18 | * @param string $articleNumber Article number to filter on. |
||
19 | * @return Get\ApiResponse |
||
20 | 3 | */ |
|
21 | public function getArticles($articleNumber = null) |
||
30 | |||
31 | /** |
||
32 | * Get one article by article number. |
||
33 | * |
||
34 | * @param string $articleNumber Article number of the article to get. |
||
35 | * @return Article|null |
||
36 | 12 | */ |
|
37 | public function getArticle($articleNumber) |
||
51 | 9 | ||
52 | /** |
||
53 | 9 | * Get the article checkout URL. |
|
54 | 3 | * |
|
55 | * @param Article $article The article. |
||
56 | * @param Customer|null $customer The customer. |
||
57 | 6 | * @return string |
|
58 | */ |
||
59 | public function getArticleCheckoutURL(Article $article, Customer $customer = null) |
||
67 | 9 | ||
68 | /** |
||
69 | 9 | * Get the checkout URL for an article. |
|
70 | 9 | * |
|
71 | 3 | * @param string $articleNumber Article number of the article to get the checkout URL. |
|
72 | * @param Customer $customer The customer for which the checkout URL should be created. |
||
73 | * @return string |
||
74 | 6 | */ |
|
75 | public function getArticleNumberCheckoutURL($articleNumber, Customer $customer = null) |
||
84 | |||
85 | /** |
||
86 | * Get the checkout URL for an article. |
||
87 | * |
||
88 | * @deprecated Use getArticleNumberCheckoutURL |
||
89 | * |
||
90 | * @param string $articleNumber Article number of the article to get the checkout URL. |
||
91 | * @param Customer $customer The customer for which the checkout URL should be created. |
||
92 | * @return string |
||
93 | */ |
||
94 | public function getCheckoutURL($articleNumber, Customer $customer = null) |
||
98 | 6 | ||
99 | /** |
||
100 | 6 | * Get the checkout URL of an article for a customer. |
|
101 | 6 | * |
|
102 | 6 | * @param string $customerId The customer ID. |
|
103 | 6 | * @param string $articleNumber The article number. |
|
104 | * @return string |
||
105 | 6 | */ |
|
106 | protected function generateCheckoutURLForCustomer($customerId, $articleNumber) |
||
115 | |||
116 | /** |
||
117 | * Get the checkout URL to change a product for a subscription. |
||
118 | * |
||
119 | * @param Subscription $subscription The subscription. |
||
120 | * @param Article $article The new article. |
||
121 | * @return string |
||
122 | */ |
||
123 | public function getSubscriptionProductChangeURL(Subscription $subscription, Article $article) |
||
127 | |||
128 | /** |
||
129 | * Get the checkout URL to change a product for a subscription. |
||
130 | * |
||
131 | * @param string $subscriptionId The subscription ID. |
||
132 | * @param string $articleNumber The new article number. |
||
133 | * @return string |
||
134 | */ |
||
135 | protected function generateSubscriptionProductChangeURL($subscriptionId, $articleNumber) |
||
144 | } |
||
145 |