class RestUser

Attributes

consumed_gears[RW]
login[RW]
max_gears[RW]
plan_id[RW]
usage_account_id[RW]

Public Class Methods

new(cloud_user, url) click to toggle source
# File lib/stickshift-controller/app/models/rest_user.rb, line 4
def initialize(cloud_user, url)
  self.login = cloud_user.login
  self.consumed_gears = cloud_user.consumed_gears
  self.max_gears = cloud_user.max_gears
  self.plan_id = cloud_user.plan_id
  self.usage_account_id = cloud_user.usage_account_id
  @links = {
    "LIST_KEYS" => Link.new("Get SSH keys", "GET", URI::join(url, "user/keys")),
    "ADD_KEY" => Link.new("Add new SSH key", "POST", URI::join(url, "user/keys"), [
      Param.new("name", "string", "Name of the key"),
      Param.new("type", "string", "Type of Key", ["ssh-rsa", "ssh-dss"]),
      Param.new("content", "string", "The key portion of an rsa key (excluding ssh-rsa and comment)"),
    ])
  }
end

Public Instance Methods

to_xml(options={}) click to toggle source
# File lib/stickshift-controller/app/models/rest_user.rb, line 20
def to_xml(options={})
  options[:tag_name] = "user"
  super(options)
end