Sha256: 6004dee3f420be8b40d1764d1c4eddb64d990ad2eee4b9c8e15af00c47f2b05d
Contents?: true
Size: 961 Bytes
Versions: 54
Compression:
Stored size: 961 Bytes
Contents
class Ey::Core::Client::StorageUser < Ey::Core::Model extend Ey::Core::Associations identity :id attribute :username attribute :access_id attribute :secret_key attribute :provisioned_id attribute :created_at, type: :time attribute :deleted_at, type: :time has_one :storage attr_accessor :permissions def save! requires :storage_id, :username params = { "url" => self.collection.url, "storage" => self.storage_id, "storage_user" => { "username" => self.username, "permissions" => self.permissions }, } if new_record? self.connection.requests.new(self.connection.create_storage_user(params).body["request"]) else raise NotImplementedError end end def destroy! requires :identity params = { "id" => self.identity, } connection.requests.new(connection.destroy_storage_user(params).body["request"]) end end
Version data entries
54 entries across 54 versions & 3 rubygems