base.rb 476 B

12345678910111213141516
  1. require 'shopify_api/version'
  2. module ShopifyAPI
  3. class Base < ActiveResource::Base
  4. extend Countable
  5. self.include_root_in_json = false
  6. self.headers['User-Agent'] = ["ShopifyAPI/#{ShopifyAPI::VERSION}",
  7. "ActiveResource/#{ActiveResource::VERSION::STRING}",
  8. "Ruby/#{RUBY_VERSION}"].join(' ')
  9. private
  10. def only_id
  11. encode(:only => :id, :include => [], :methods => [])
  12. end
  13. end
  14. end