class Fog::Compute::Packet::License
License
Model
Public Class Methods
new(attributes = {})
click to toggle source
Calls superclass method
# File lib/fog/compute/packet/models/license.rb, line 17 def initialize(attributes = {}) super end
Public Instance Methods
destroy()
click to toggle source
# File lib/fog/compute/packet/models/license.rb, line 46 def destroy requires :id response = service.delete_license(id) true if response.status == 204 end
save()
click to toggle source
# File lib/fog/compute/packet/models/license.rb, line 21 def save requires :project_id, :description, :size options = { :description => description, :size => size } options[:license_product_id] = license_product_id if license_product_id response = service.create_license(project_id, options) merge_attributes(response.body) if response.status == 201 end
update()
click to toggle source
# File lib/fog/compute/packet/models/license.rb, line 35 def update requires :id options = { :description => description, :size => size } response = service.update_license(id, options) merge_attributes(response.body) if response.status == 200 end