Class: Fog::Compute::Packet::Licenses

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/compute/packet/models/licenses.rb

Overview

Licenses Collection

Instance Method Summary collapse

Instance Method Details

#all(project_id, params = {}) ⇒ Object



10
11
12
13
# File 'lib/fog/compute/packet/models/licenses.rb', line 10

def all(project_id, params = {})
  response = service.list_licenses(project_id, params)
  load(response.body["licenses"])
end

#get(id) ⇒ Object



15
16
17
18
# File 'lib/fog/compute/packet/models/licenses.rb', line 15

def get(id)
  response = service.get_license(id)
  new(response.body)
end