File tree Expand file tree Collapse file tree 2 files changed +37
-2
lines changed Expand file tree Collapse file tree 2 files changed +37
-2
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * @see https://help.shopify.com/api/reference/discounts/discountcode Shopify API Reference for PriceRule
4
+ */
5
+
6
+ namespace PHPShopify ;
7
+
8
+
9
+ /**
10
+ * --------------------------------------------------------------------------
11
+ * DiscountCode -> Batch action
12
+ * --------------------------------------------------------------------------
13
+ *
14
+ */
15
+
16
+ class Batch extends ShopifyResource
17
+ {
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ protected $ resourceKey = 'batch ' ;
22
+
23
+ protected function getResourcePath ()
24
+ {
25
+ return $ this ->resourceKey ;
26
+ }
27
+
28
+ protected function wrapData ($ dataArray , $ dataKey = null )
29
+ {
30
+ return ['discount_codes ' => $ dataArray ];
31
+ }
32
+
33
+ }
Original file line number Diff line number Diff line change 17
17
* @property-read ShopifyResource $DiscountCode
18
18
*
19
19
* @method ShopifyResource DiscountCode(integer $id = null)
20
+ * @method ShopifyResource Batch()
20
21
*
21
22
*/
22
23
class PriceRule extends ShopifyResource
@@ -30,6 +31,7 @@ class PriceRule extends ShopifyResource
30
31
* @inheritDoc
31
32
*/
32
33
protected $ childResource = array (
33
- 'DiscountCode '
34
+ 'DiscountCode ' ,
35
+ 'Batch ' ,
34
36
);
35
- }
37
+ }
You can’t perform that action at this time.
0 commit comments