File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Expand file tree Collapse file tree 3 files changed +46
-0
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 7171 * @property-read Blog $Blog
7272 * @property-read CarrierService $CarrierService
7373 * @property-read Collect $Collect
74+ * @property-read Collection $Collection
7475 * @property-read Comment $Comment
7576 * @property-read Country $Country
7677 * @property-read Currency $Currency
110111 * @method Blog Blog(integer $id = null)
111112 * @method CarrierService CarrierService(integer $id = null)
112113 * @method Collect Collect(integer $id = null)
114+ * @method Collection Collection(integer $id = null)
113115 * @method Comment Comment(integer $id = null)
114116 * @method Country Country(integer $id = null)
115117 * @method Currency Currency(integer $id = null)
@@ -158,6 +160,7 @@ class ShopifySDK
158160 'Blog ' ,
159161 'CarrierService ' ,
160162 'Collect ' ,
163+ 'Collection ' ,
161164 'Comment ' ,
162165 'Country ' ,
163166 '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+ }
You can’t perform that action at this time.
0 commit comments