class Layer::Identity
Managing user identity is also possible:
@example
user = Layer::User.find('user_id') user.identity # Returns user identity user.identity.create({ first_name: 'Frodo', last_name: 'Baggins'}) # Creates new identity user.identity.delete # Removes identity
@see developer.layer.com/docs/platform#identity Layer
Platform API Documentation about identity @!macro platform-api
Public Class Methods
url()
click to toggle source
# File lib/layer/identity.rb, line 17 def self.url '/identity' end
Public Instance Methods
attributes=(attributes)
click to toggle source
Calls superclass method
Layer::Operations::Patch#attributes=
# File lib/layer/identity.rb, line 21 def attributes=(attributes) attributes['metadata'] ||= {} super end
metadata=(metadata)
click to toggle source
# File lib/layer/identity.rb, line 26 def metadata=(metadata) metadata.each_pair do |key, value| self.metadata[key] = value end end