I am working on a shopify app in which I want to run a script which is in Ruby. I want to update the 'position' and 'sort_value' of Collect object as per this link https://docs.shopify.com/api/collect. Everytime I try to do so I got an ActiveResource Error.
Here is my code in irb:
require 'shopify'
require 'active_resource'
shop_url = "https://#{API_KEY}:{PASSWORD}@SHOP_NAME.myshopify.com/admin"
ShopifyAPI::Base.site = shop_url
product = ShopifyAPI::Collect.find(:id)
product.position = 4
product.save
I have tried the code given below, which works fine in irb
product = ShopifyAPI::Product.find(179761209)
product.handle = "burton-snowboard"
product.save
I got this error:
ActiveResource::ResourceNotFound: Failed. Response code = 404. Response message = Not Found
Can we send http PUT request on Collect object to update position? Thanks in Advance..