shopify - Unable to update ShopifyAPI::Collect object using Ruby script -
i working on shopify app in want run script in ruby. want update 'position' , 'sort_value' of collect object per link https://docs.shopify.com/api/collect. everytime try got activeresource error.
here 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 code given below, works fine in irb
product = shopifyapi::product.find(179761209) product.handle = "burton-snowboard" product.save i got error:
activeresource::resourcenotfound: failed. response code = 404. response message = not found
can send http put request on collect object update position? in advance..
it appears not providing id call.
product = shopifyapi::collect.find(:id)
what supposed return?
i think have 404 returned indication not asking valid id. second call works fine id.
Comments
Post a Comment