Skip to content

Commit

Permalink
Add prerequisite_quantity_range to price rule (nsweeting#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmccall10 authored and Ninigi committed Apr 25, 2019
1 parent e8905fa commit 082fb6f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/shopify/resources/price_rule.ex
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ defmodule Shopify.PriceRule do
:updated_at,
:prerequisite_subtotal_range,
:prerequisite_shipping_price_range,
:prerequisite_quantity_range,
:title,
:entitled_product_ids,
:entitled_variant_ids,
Expand Down
9 changes: 6 additions & 3 deletions test/fixtures/price_rules.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"price_rules": [
{
"price_rules": [{
"id": 1,
"value_type": "fixed_amount",
"value": "-500.0",
Expand All @@ -25,6 +24,9 @@
],
"prerequisite_subtotal_range": null,
"prerequisite_shipping_price_range": null,
"prerequisite_quantity_range": {
"greater_than_or_equal_to": 2
},
"title": "74NSJ3SK08M0"
},
{
Expand All @@ -49,8 +51,9 @@
"prerequisite_subtotal_range": {
"greater_than_or_equal_to": "5000.0"
},
"prerequisite_quantity_range": null,
"prerequisite_shipping_price_range": null,
"title": "2M42ZNSW82TA"
}
]
}
}
5 changes: 4 additions & 1 deletion test/fixtures/price_rules/1.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
],
"prerequisite_subtotal_range": null,
"prerequisite_shipping_price_range": null,
"prerequisite_quantity_range": {
"greater_than_or_equal_to": 2
},
"title": "74NSJ3SK08M0"
}
}
}

0 comments on commit 082fb6f

Please sign in to comment.