Class: SauceWhisk::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/sauce_whisk/accounts.rb

Direct Known Subclasses

SubAccount

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Account

Returns a new instance of Account.



57
58
59
60
61
62
63
64
65
66
# File 'lib/sauce_whisk/accounts.rb', line 57

def initialize(options)
  @access_key = options[:access_key]
  @username = options[:id]
  @minutes = options[:minutes]
  @mac_minutes = options[:mac_minutes]
  @manual_minutes = options[:manual_minutes]
  @mac_manual_minutes = options[:mac_manual_minutes]
  @total_concurrency = options[:total_concurrency]
  @mac_concurrency = options[:mac_concurrency]
end

Instance Attribute Details

#access_keyObject (readonly)

Returns the value of attribute access_key.



55
56
57
# File 'lib/sauce_whisk/accounts.rb', line 55

def access_key
  @access_key
end

#mac_concurrencyObject (readonly)

Returns the value of attribute mac_concurrency.



55
56
57
# File 'lib/sauce_whisk/accounts.rb', line 55

def mac_concurrency
  @mac_concurrency
end

#mac_manual_minutesObject (readonly)

Returns the value of attribute mac_manual_minutes.



56
57
58
# File 'lib/sauce_whisk/accounts.rb', line 56

def mac_manual_minutes
  @mac_manual_minutes
end

#mac_minutesObject (readonly)

Returns the value of attribute mac_minutes.



56
57
58
# File 'lib/sauce_whisk/accounts.rb', line 56

def mac_minutes
  @mac_minutes
end

#manual_minutesObject (readonly)

Returns the value of attribute manual_minutes.



56
57
58
# File 'lib/sauce_whisk/accounts.rb', line 56

def manual_minutes
  @manual_minutes
end

#minutesObject (readonly)

Returns the value of attribute minutes.



56
57
58
# File 'lib/sauce_whisk/accounts.rb', line 56

def minutes
  @minutes
end

#total_concurrencyObject (readonly)

Returns the value of attribute total_concurrency.



55
56
57
# File 'lib/sauce_whisk/accounts.rb', line 55

def total_concurrency
  @total_concurrency
end

#usernameObject (readonly)

Returns the value of attribute username.



55
56
57
# File 'lib/sauce_whisk/accounts.rb', line 55

def username
  @username
end

Instance Method Details

#add_subaccount(name, username, email, password) ⇒ Object



68
69
70
# File 'lib/sauce_whisk/accounts.rb', line 68

def add_subaccount(name, username, email, password)
  SauceWhisk::Accounts.create_subaccount(self, name, username, email, password)
end