class Fog::Compute::Packet::Organization

Organization Model

Public Class Methods

new(attributes = {}) click to toggle source
Calls superclass method
# File lib/fog/compute/packet/models/organization.rb, line 24
def initialize(attributes = {})
  super
end

Public Instance Methods

destroy() click to toggle source
# File lib/fog/compute/packet/models/organization.rb, line 63
def destroy
  requires :id
  response = service.delete_organization(id)
  true if response.status == 204
end
save() click to toggle source
# File lib/fog/compute/packet/models/organization.rb, line 28
def save
  requires :name

  options = {}
  options[:name] = name

  options[:description] = description if description
  options[:website] = website if website
  options[:twitter] = twitter if twitter
  options[:logo] = website if logo
  options[:address] = address if address
  options[:customdata] = customdata if customdata

  response = service.create_organization(options)

  merge_attributes(response.body)
  true
end
update() click to toggle source
# File lib/fog/compute/packet/models/organization.rb, line 47
def update
  requires :id
  options = {}

  options[:name] = name if name
  options[:description] = description if description
  options[:website] = website if website
  options[:twitter] = twitter if twitter
  options[:logo] = website if logo
  options[:address] = address if address
  options[:customdata] = customdata if customdata

  response = service.update_organization(id, options)
  merge_attributes(response.body)
end