Class: Fog::Compute::Packet::TransferRequests

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

Overview

TransferRequests Collection

Instance Method Summary collapse

Instance Method Details

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



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

def all(organization_id, params = {})
  response = service.list_transfer_requests(organization_id, params)
  load(response.body["transfers"])
end

#get(id) ⇒ Object



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

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

#transfer(project_id, organization_id) ⇒ Object



20
21
22
23
# File 'lib/fog/compute/packet/models/transfer_requests.rb', line 20

def transfer(project_id, organization_id)
  response = service.transfer_project(project_id, organization_id)
  new(response.body)
end