Sha256: e42ca81b407f132d137fbd435997ea11481f8967cb7c8186e07588aa5e058b38
Contents?: true
Size: 640 Bytes
Versions: 15
Compression:
Stored size: 640 Bytes
Contents
class Ey::Core::Client::AddonAttachment < Ey::Core::Model extend Ey::Core::Associations identity :id, type: :string attribute :key attribute :app_id attribute :environment_id attribute :suggested_name def resource_url "#{collection.url}/#{id}" end def attach!(key) self.key = key self.save! end def detach! self.key = nil self.save! end def save! # always update params = { "attachment" => { "key" => self.key, }, "url" => self.resource_url, } merge_attributes(self.connection.update_addon_attachment(params).body["addon_attachment"]) end end
Version data entries
15 entries across 15 versions & 1 rubygems