Class: DNSimple::User

Inherits:
Base
  • Object
show all
Defined in:
lib/dnsimple/user.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from DNSimple::Base

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



10
11
12
# File 'lib/dnsimple/user.rb', line 10

def created_at
  @created_at
end

#domain_countObject

Returns the value of attribute domain_count.



6
7
8
# File 'lib/dnsimple/user.rb', line 6

def domain_count
  @domain_count
end

#domain_limitObject

Returns the value of attribute domain_limit.



7
8
9
# File 'lib/dnsimple/user.rb', line 7

def domain_limit
  @domain_limit
end

#emailObject

Returns the value of attribute email.



5
6
7
# File 'lib/dnsimple/user.rb', line 5

def email
  @email
end

#failed_login_countObject

Returns the value of attribute failed_login_count.



9
10
11
# File 'lib/dnsimple/user.rb', line 9

def 
  @failed_login_count
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/dnsimple/user.rb', line 4

def id
  @id
end

#login_countObject

Returns the value of attribute login_count.



8
9
10
# File 'lib/dnsimple/user.rb', line 8

def 
  @login_count
end

#updated_atObject

Returns the value of attribute updated_at.



11
12
13
# File 'lib/dnsimple/user.rb', line 11

def updated_at
  @updated_at
end

Class Method Details

.meObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/dnsimple/user.rb', line 14

def self.me
  response = DNSimple::Client.get("/v1/user")

  case response.code
  when 200
    new(response["user"])
  else
    raise RequestError.new("Error finding account", response)
  end
end