Skip to content

Commit 603f717

Browse files
committed
Point deprecations to migration guide
1 parent 1048902 commit 603f717

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

lib/shopify_api/resources/product.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ def price_range
1717
end
1818

1919
def total_inventory=(new_value)
20-
raise(ShopifyAPI::ValidationException, 'deprecated behaviour') unless Base.api_version < ApiVersion.find_version('2019-10')
20+
raise(ShopifyAPI::ValidationException,
21+
"'total_inventory' is deprecated - see https://help.shopify.com/en/api/guides/inventory-migration-guide",
22+
) unless Base.api_version < ApiVersion.find_version('2019-10')
2123
super
2224
end
2325

lib/shopify_api/resources/variant.rb

+9-3
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@ class Variant < Base
66
conditional_prefix :product
77

88
def inventory_quantity_adjustment=(new_value)
9-
raise(ShopifyAPI::ValidationException, 'deprecated behaviour') unless Base.api_version < ApiVersion.find_version('2019-10')
9+
raise(ShopifyAPI::ValidationException,
10+
"'inventory_quantity_adjustment' is deprecated - see https://help.shopify.com/en/api/guides/inventory-migration-guide",
11+
) unless Base.api_version < ApiVersion.find_version('2019-10')
1012
super
1113
end
1214

1315
def inventory_quantity=(new_value)
14-
raise(ShopifyAPI::ValidationException, 'deprecated behaviour') unless Base.api_version < ApiVersion.find_version('2019-10')
16+
raise(ShopifyAPI::ValidationException,
17+
"'inventory_quantity' is deprecated - see https://help.shopify.com/en/api/guides/inventory-migration-guide",
18+
) unless Base.api_version < ApiVersion.find_version('2019-10')
1519
super
1620
end
1721

1822
def old_inventory_quantity=(new_value)
19-
raise(ShopifyAPI::ValidationException, 'deprecated behaviour') unless Base.api_version < ApiVersion.find_version('2019-10')
23+
raise(ShopifyAPI::ValidationException,
24+
"'old_inventory_quantity' is deprecated - see https://help.shopify.com/en/api/guides/inventory-migration-guide",
25+
) unless Base.api_version < ApiVersion.find_version('2019-10')
2026
super
2127
end
2228
end

0 commit comments

Comments
 (0)