lib/kentaa/api/resources/user.rb in kentaa-api-0.2.1 vs lib/kentaa/api/resources/user.rb in kentaa-api-0.3.0
- old
+ new
@@ -3,13 +3,11 @@
require 'time'
module Kentaa
module Api
module Resources
- class User < Base
- include Kentaa::Api::Resources::Resource
-
+ class User < Resource
def object_key
"User_#{id}"
end
def site_id
@@ -87,10 +85,16 @@
def locale
data[:locale]
end
def consent
- @consent ||= Kentaa::Api::Resources::Consent.new(config, data[:consent]) if data[:consent]
+ @consent ||= Kentaa::Api::Resources::Consent.new(config, data: data[:consent]) if data[:consent]
+ end
+
+ protected
+
+ def load_resource(options)
+ request.get("/users/#{id}", options)
end
end
end
end
end