Sha256: 564610b35334db4a656c691d2f0741d1e1a75ed998bdd29cf3d64e11e1a7a77f
Contents?: true
Size: 698 Bytes
Versions: 20
Compression:
Stored size: 698 Bytes
Contents
class Ey::Core::Client::User < Ey::Core::Model extend Ey::Core::Associations identity :id attribute :token, aliases: ["api_token"] attribute :name attribute :email attribute :staff attribute :deleted_at has_many :accounts has_many :environments has_many :keypairs has_many :tokens attr_accessor :password def self.api_name "User" end def save! requires :name, :email params = { "name" => self.name, "email" => self.email, "password" => self.password, } merge_attributes(self.connection.create_user("user" => params).body["user"]) end def destroy! self.connection.destroy_user("id" => self.id) && true end end
Version data entries
20 entries across 20 versions & 2 rubygems