lib/restful_model.rb in inbox-0.18.2 vs lib/restful_model.rb in inbox-1.0.0

- old
+ new

@@ -5,21 +5,21 @@ class RestfulModel extend Inbox::TimeAttrAccessor include Inbox::Parameters parameter :id - parameter :namespace_id + parameter :account_id parameter :cursor # Only used by the delta sync API time_attr_accessor :created_at def self.collection_name "#{self.to_s.downcase}s".split('::').last end - def initialize(api, namespace_id = nil) + def initialize(api, account_id = nil) raise StandardError.new unless api.class <= Inbox::API - @namespace_id = namespace_id + @account_id = account_id @_api = api end def ==(comparison_object) comparison_object.equal?(self) || (comparison_object.instance_of?(self.class) && comparison_object.id == id) @@ -39,10 +39,10 @@ end end def url(action = "") action = "/#{action}" unless action.empty? - @_api.url_for_path("/n/#{@namespace_id}/#{self.class.collection_name}/#{id}#{action}") + @_api.url_for_path("/#{self.class.collection_name}/#{id}#{action}") end def as_json(options = {}) hash = {} parameters.each do |getter|