Use Shopify Price Rules Api To Create Discounts In RoR
I am developing an app for shopify app store in RoR and trying to use Shopify's new PriceRules API. But I am not able to make it work. I am using shopify-app gem and for price rules api I tries using:
but it throws following error :
uninitialized constant ShopifyAPI::PriceRule
Does anyone has any idea on how can I make it work in Ror?
Do a bundle open shopify_api and examine the resources. You probably won't find the new-ish PriceRules endpoint. So you have to make it yourself or wait if you want the official Shopify one.
If you are using RoR, then you almost certainly are using bundler. An alternative is to open the Shopify Gem shopify_api, and you'll see all the resources currently supported. If you wanted to add PriceRules endpoint, hack it into that gem.
- → Trigger a click with jQuery using link_to of rails 4
- → Adding html data attribute to simple_forms input
- → How to remove parameters from the root URL if it does I18n
- → passing parameters to rails back end from an ajax call
- → Blocking ?page= in robots.txt
- → react js and rails Updating state on a component with active record relationship
- → State not passed into prop
- → Cannot read property 'modalIsOpen' of undefined
- → Objects not valid issue
- → How to map API params to model
- → Consuming webhooks shopify-api
- → How to add ScriptTag on shopify_api gem?