Class: Fog::Compute::Packet::TransferRequest

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/compute/packet/models/transfer_request.rb

Overview

TransferRequest Model

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ TransferRequest

Returns a new instance of TransferRequest.



14
15
16
# File 'lib/fog/compute/packet/models/transfer_request.rb', line 14

def initialize(attributes = {})
  super
end

Instance Method Details

#acceptObject



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

def accept
  requires :id

  response = service.accept_transfer_request(id)
  true if response.status == 204
end

#declineObject



25
26
27
28
29
30
# File 'lib/fog/compute/packet/models/transfer_request.rb', line 25

def decline
  requires :id

  response = service.decline_transfer_request(id)
  true if response.status == 204
end