File tree 4 files changed +54
-2
lines changed
4 files changed +54
-2
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace PHPShopify ;
4
+
5
+ /**
6
+ * --------------------------------------------------------------------------
7
+ * Collection -> Child Resources
8
+ * --------------------------------------------------------------------------
9
+ *
10
+ * @property-read Product $Product
11
+ *
12
+ * @method Product Product(integer $id = null)
13
+ *
14
+ * @see https://shopify.dev/docs/admin-api/rest/reference/products/collection
15
+ *
16
+ */
17
+ class Collection extends ShopifyResource
18
+ {
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ public $ readOnly = false ;
23
+
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ protected $ resourceKey = 'collection ' ;
28
+
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ protected $ childResource = array (
33
+ 'Product ' ,
34
+ );
35
+ }
Original file line number Diff line number Diff line change @@ -599,8 +599,6 @@ public function getUrlParams($url) {
599
599
600
600
public function getNextPageParams (){
601
601
$ nextPageParams = [];
602
- $ nextPageLink =
603
-
604
602
parse_str ($ this ->getUrlParams ($ this ->getNextLink ()), $ nextPageParams );
605
603
return $ nextPageParams ;
606
604
}
Original file line number Diff line number Diff line change 71
71
* @property-read Blog $Blog
72
72
* @property-read CarrierService $CarrierService
73
73
* @property-read Collect $Collect
74
+ * @property-read Collection $Collection
74
75
* @property-read Comment $Comment
75
76
* @property-read Country $Country
76
77
* @property-read Currency $Currency
110
111
* @method Blog Blog(integer $id = null)
111
112
* @method CarrierService CarrierService(integer $id = null)
112
113
* @method Collect Collect(integer $id = null)
114
+ * @method Collection Collection(integer $id = null)
113
115
* @method Comment Comment(integer $id = null)
114
116
* @method Country Country(integer $id = null)
115
117
* @method Currency Currency(integer $id = null)
@@ -158,6 +160,7 @@ class ShopifySDK
158
160
'Blog ' ,
159
161
'CarrierService ' ,
160
162
'Collect ' ,
163
+ 'Collection ' ,
161
164
'Comment ' ,
162
165
'Country ' ,
163
166
'Currency ' ,
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace PHPShopify ;
4
+
5
+ class CollectionTest extends TestSimpleResource
6
+ {
7
+ /**
8
+ * Test get resource
9
+ *
10
+ * Post and list not available for Collection resource so testGet not possible
11
+ */
12
+ public function testGet ()
13
+ {
14
+
15
+ }
16
+ }
You can’t perform that action at this time.
0 commit comments