@@ -8,7 +8,7 @@ class WebshopappApiClient
8
8
/**
9
9
* The Api Client version (do not change!)
10
10
*/
11
- const CLIENT_VERSION = '1.6 .0 ' ;
11
+ const CLIENT_VERSION = '1.7 .0 ' ;
12
12
/**
13
13
* The Api Hosts (do not change!)
14
14
*/
@@ -173,6 +173,10 @@ class WebshopappApiClient
173
173
* @var WebshopappApiResourceEvents
174
174
*/
175
175
public $ events ;
176
+ /**
177
+ * @var WebshopappApiResourceExternal_services
178
+ */
179
+ public $ external_services ;
176
180
/**
177
181
* @var WebshopappApiResourceFiles
178
182
*/
@@ -381,6 +385,14 @@ class WebshopappApiClient
381
385
* @var WebshopappApiResourceTextpages
382
386
*/
383
387
public $ textpages ;
388
+ /**
389
+ * @var WebshopappApiResourceThemeCategories
390
+ */
391
+ public $ themeCategories ;
392
+ /**
393
+ * @var WebshopappApiResourceThemeProducts
394
+ */
395
+ public $ themeProducts ;
384
396
/**
385
397
* @var WebshopappApiResourceTickets
386
398
*/
@@ -572,6 +584,7 @@ private function registerResources()
572
584
$ this ->deliverydates = new WebshopappApiResourceDeliverydates ($ this );
573
585
$ this ->discounts = new WebshopappApiResourceDiscounts ($ this );
574
586
$ this ->events = new WebshopappApiResourceEvents ($ this );
587
+ $ this ->external_services = new WebshopappApiResourceExternal_services ($ this );
575
588
$ this ->files = new WebshopappApiResourceFiles ($ this );
576
589
$ this ->filters = new WebshopappApiResourceFilters ($ this );
577
590
$ this ->filtersValues = new WebshopappApiResourceFiltersValues ($ this );
@@ -624,6 +637,8 @@ private function registerResources()
624
637
$ this ->tagsProducts = new WebshopappApiResourceTagsProducts ($ this );
625
638
$ this ->taxes = new WebshopappApiResourceTaxes ($ this );
626
639
$ this ->textpages = new WebshopappApiResourceTextpages ($ this );
640
+ $ this ->themeCategories = new WebshopappApiResourceThemeCategories ($ this );
641
+ $ this ->themeProducts = new WebshopappApiResourceThemeProducts ($ this );
627
642
$ this ->tickets = new WebshopappApiResourceTickets ($ this );
628
643
$ this ->ticketsMessages = new WebshopappApiResourceTicketsMessages ($ this );
629
644
$ this ->time = new WebshopappApiResourceTime ($ this );
@@ -766,7 +781,7 @@ private function sendRequest($url, $method, $payload = null)
766
781
$ this ->handleResponseError ($ responseCode , $ responseBody );
767
782
}
768
783
769
- if ($ responseBody && in_array ( $ url , array ( ' checkouts ' )) === false )
784
+ if ($ responseBody && preg_match ( ' /^checkout/i ' , $ url ) !== 1 )
770
785
{
771
786
$ responseBody = array_shift ($ responseBody );
772
787
}
@@ -2743,6 +2758,73 @@ public function delete($eventId)
2743
2758
}
2744
2759
}
2745
2760
2761
+ class WebshopappApiResourceExternal_services
2762
+ {
2763
+ /**
2764
+ * @var WebshopappApiClient
2765
+ */
2766
+ private $ client ;
2767
+
2768
+ public function __construct (WebshopappApiClient $ client )
2769
+ {
2770
+ $ this ->client = $ client ;
2771
+ }
2772
+
2773
+ /**
2774
+ * @param array $fields
2775
+ *
2776
+ * @return array
2777
+ * @throws WebshopappApiException
2778
+ */
2779
+ public function create ($ fields )
2780
+ {
2781
+ $ fields = array ('externalService ' => $ fields );
2782
+
2783
+ return $ this ->client ->create ('external_services ' , $ fields );
2784
+ }
2785
+
2786
+ /**
2787
+ * @param int $externalserviceId
2788
+ * @param array $params
2789
+ *
2790
+ * @return array
2791
+ * @throws WebshopappApiException
2792
+ */
2793
+ public function get ($ externalserviceId = null , $ params = array ())
2794
+ {
2795
+ if (!$ externalserviceId )
2796
+ {
2797
+ return $ this ->client ->read ('external_services ' , $ params );
2798
+ }
2799
+ else
2800
+ {
2801
+ return $ this ->client ->read ('external_services/ ' . $ externalserviceId , $ params );
2802
+ }
2803
+ }
2804
+
2805
+ /**
2806
+ * @param array $params
2807
+ *
2808
+ * @return int
2809
+ * @throws WebshopappApiException
2810
+ */
2811
+ public function count ($ params = array ())
2812
+ {
2813
+ return $ this ->client ->read ('external_services/count ' , $ params );
2814
+ }
2815
+
2816
+ /**
2817
+ * @param int $externalserviceId
2818
+ *
2819
+ * @return array
2820
+ * @throws WebshopappApiException
2821
+ */
2822
+ public function delete ($ externalserviceId )
2823
+ {
2824
+ return $ this ->client ->delete ('external_services/ ' . $ externalserviceId );
2825
+ }
2826
+ }
2827
+
2746
2828
class WebshopappApiResourceFiles
2747
2829
{
2748
2830
/**
@@ -4434,6 +4516,17 @@ public function get($quoteId)
4434
4516
{
4435
4517
return $ this ->client ->read ('quotes/ ' . $ quoteId . '/paymentmethods ' );
4436
4518
}
4519
+
4520
+ /**
4521
+ * @param array $params
4522
+ *
4523
+ * @return int
4524
+ * @throws WebshopappApiException
4525
+ */
4526
+ public function count ($ params = array ())
4527
+ {
4528
+ return $ this ->client ->read ('quotes/ ' . $ quoteId . '/paymentmethods/count ' , $ params );
4529
+ }
4437
4530
}
4438
4531
4439
4532
class WebshopappApiResourceQuotesProducts
@@ -5990,6 +6083,168 @@ public function delete($textpageId)
5990
6083
}
5991
6084
}
5992
6085
6086
+ class WebshopappApiResourceThemeCategories
6087
+ {
6088
+ /**
6089
+ * @var WebshopappApiClient
6090
+ */
6091
+ private $ client ;
6092
+
6093
+ public function __construct (WebshopappApiClient $ client )
6094
+ {
6095
+ $ this ->client = $ client ;
6096
+ }
6097
+
6098
+ /**
6099
+ * @param array $fields
6100
+ *
6101
+ * @return array
6102
+ * @throws WebshopappApiException
6103
+ */
6104
+ public function create ($ fields )
6105
+ {
6106
+ $ fields = array ('themeCategory ' => $ fields );
6107
+
6108
+ return $ this ->client ->create ('theme/categories ' , $ fields );
6109
+ }
6110
+
6111
+ /**
6112
+ * @param int $categoryId
6113
+ * @param array $params
6114
+ *
6115
+ * @return array
6116
+ * @throws WebshopappApiException
6117
+ */
6118
+ public function get ($ categoryId = null , $ params = array ())
6119
+ {
6120
+ if (!$ categoryId )
6121
+ {
6122
+ return $ this ->client ->read ('theme/categories ' , $ params );
6123
+ }
6124
+ else
6125
+ {
6126
+ return $ this ->client ->read ('theme/categories/ ' . $ categoryId , $ params );
6127
+ }
6128
+ }
6129
+
6130
+ /**
6131
+ * @param array $params
6132
+ *
6133
+ * @return int
6134
+ * @throws WebshopappApiException
6135
+ */
6136
+ public function count ($ params = array ())
6137
+ {
6138
+ return $ this ->client ->read ('theme/categories/count ' , $ params );
6139
+ }
6140
+
6141
+ /**
6142
+ * @param int $categoryId
6143
+ * @param array $fields
6144
+ *
6145
+ * @return array
6146
+ * @throws WebshopappApiException
6147
+ */
6148
+ public function update ($ categoryId , $ fields )
6149
+ {
6150
+ $ fields = array ('themeCategory ' => $ fields );
6151
+
6152
+ return $ this ->client ->update ('theme/categories/ ' . $ categoryId , $ fields );
6153
+ }
6154
+
6155
+ /**
6156
+ * @param int $categoryId
6157
+ *
6158
+ * @return array
6159
+ * @throws WebshopappApiException
6160
+ */
6161
+ public function delete ($ categoryId )
6162
+ {
6163
+ return $ this ->client ->delete ('theme/categories/ ' . $ categoryId );
6164
+ }
6165
+ }
6166
+
6167
+ class WebshopappApiResourceThemeProducts
6168
+ {
6169
+ /**
6170
+ * @var WebshopappApiClient
6171
+ */
6172
+ private $ client ;
6173
+
6174
+ public function __construct (WebshopappApiClient $ client )
6175
+ {
6176
+ $ this ->client = $ client ;
6177
+ }
6178
+
6179
+ /**
6180
+ * @param array $fields
6181
+ *
6182
+ * @return array
6183
+ * @throws WebshopappApiException
6184
+ */
6185
+ public function create ($ fields )
6186
+ {
6187
+ $ fields = array ('themeProducts ' => $ fields );
6188
+
6189
+ return $ this ->client ->create ('theme/products ' , $ fields );
6190
+ }
6191
+
6192
+ /**
6193
+ * @param int $productId
6194
+ * @param array $params
6195
+ *
6196
+ * @return array
6197
+ * @throws WebshopappApiException
6198
+ */
6199
+ public function get ($ productId = null , $ params = array ())
6200
+ {
6201
+ if (!$ productId )
6202
+ {
6203
+ return $ this ->client ->read ('theme/products ' , $ params );
6204
+ }
6205
+ else
6206
+ {
6207
+ return $ this ->client ->read ('theme/products/ ' . $ productId , $ params );
6208
+ }
6209
+ }
6210
+
6211
+ /**
6212
+ * @param array $params
6213
+ *
6214
+ * @return int
6215
+ * @throws WebshopappApiException
6216
+ */
6217
+ public function count ($ params = array ())
6218
+ {
6219
+ return $ this ->client ->read ('theme/products/count ' , $ params );
6220
+ }
6221
+
6222
+ /**
6223
+ * @param int $productId
6224
+ * @param array $fields
6225
+ *
6226
+ * @return array
6227
+ * @throws WebshopappApiException
6228
+ */
6229
+ public function update ($ productId , $ fields )
6230
+ {
6231
+ $ fields = array ('themeProduct ' => $ fields );
6232
+
6233
+ return $ this ->client ->update ('theme/products/ ' . $ productId , $ fields );
6234
+ }
6235
+
6236
+ /**
6237
+ * @param int $productId
6238
+ *
6239
+ * @return array
6240
+ * @throws WebshopappApiException
6241
+ */
6242
+ public function delete ($ productId )
6243
+ {
6244
+ return $ this ->client ->delete ('theme/products/ ' . $ productId );
6245
+ }
6246
+ }
6247
+
5993
6248
class WebshopappApiResourceTickets
5994
6249
{
5995
6250
/**
0 commit comments