Class: Fog::Compute::Packet::Invitation

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

Overview

Invitation Model

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Invitation

Returns a new instance of Invitation.



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

def initialize(attributes = {})
  super
end

Instance Method Details

#acceptObject



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

def accept
  requires :id

  response = service.accept_invitation(id)
  merge_attributes(response.body)
end

#declineObject



27
28
29
30
31
32
# File 'lib/fog/compute/packet/models/invitation.rb', line 27

def decline
  requires :id

  response = service.decline_invitation(id)
  merge_attributes(response.body)
end