Class: NgrokAPI::Models::ApplicationUser

Inherits:
Object
  • Object
show all
Defined in:
lib/ngrokapi/models/application_user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client: nil, attrs: {}) ⇒ ApplicationUser

Returns a new instance of ApplicationUser.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/ngrokapi/models/application_user.rb', line 23

def initialize(client: nil, attrs: {})
  @client = client
  @attrs = attrs
  @id = @attrs['id']
  unless @attrs['uri'].nil?
    @uri = URI(@attrs['uri'])
  end
  @identity_provider = @attrs['identity_provider']
  @provider_user_id = @attrs['provider_user_id']
  @username = @attrs['username']
  @email = @attrs['email']
  @name = @attrs['name']
  @created_at = @attrs['created_at']
  @last_active = @attrs['last_active']
  @last_login = @attrs['last_login']
end

Instance Attribute Details

#attrsObject (readonly)

Returns the value of attribute attrs.



10
11
12
# File 'lib/ngrokapi/models/application_user.rb', line 10

def attrs
  @attrs
end

#clientObject (readonly)

Returns the value of attribute client.



10
11
12
# File 'lib/ngrokapi/models/application_user.rb', line 10

def client
  @client
end

#created_atObject (readonly)

Returns the value of attribute created_at.



10
11
12
# File 'lib/ngrokapi/models/application_user.rb', line 10

def created_at
  @created_at
end

#emailObject (readonly)

Returns the value of attribute email.



10
11
12
# File 'lib/ngrokapi/models/application_user.rb', line 10

def email
  @email
end

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/ngrokapi/models/application_user.rb', line 10

def id
  @id
end

#identity_providerObject (readonly)

Returns the value of attribute identity_provider.



10
11
12
# File 'lib/ngrokapi/models/application_user.rb', line 10

def identity_provider
  @identity_provider
end

#last_activeObject (readonly)

Returns the value of attribute last_active.



10
11
12
# File 'lib/ngrokapi/models/application_user.rb', line 10

def last_active
  @last_active
end

#last_loginObject (readonly)

Returns the value of attribute last_login.



10
11
12
# File 'lib/ngrokapi/models/application_user.rb', line 10

def 
  @last_login
end

#nameObject (readonly)

Returns the value of attribute name.



10
11
12
# File 'lib/ngrokapi/models/application_user.rb', line 10

def name
  @name
end

#provider_user_idObject (readonly)

Returns the value of attribute provider_user_id.



10
11
12
# File 'lib/ngrokapi/models/application_user.rb', line 10

def provider_user_id
  @provider_user_id
end

#uriObject (readonly)

Returns the value of attribute uri.



10
11
12
# File 'lib/ngrokapi/models/application_user.rb', line 10

def uri
  @uri
end

#usernameObject (readonly)

Returns the value of attribute username.



10
11
12
# File 'lib/ngrokapi/models/application_user.rb', line 10

def username
  @username
end

Instance Method Details

#==(other) ⇒ Object



40
41
42
# File 'lib/ngrokapi/models/application_user.rb', line 40

def ==(other)
  @attrs == other.attrs
end

#deleteObject



56
57
58
59
60
# File 'lib/ngrokapi/models/application_user.rb', line 56

def delete
  @client.delete(
    id: @id
  )
end

#to_hObject



48
49
50
# File 'lib/ngrokapi/models/application_user.rb', line 48

def to_h
  @attrs.to_h
end

#to_sObject



44
45
46
# File 'lib/ngrokapi/models/application_user.rb', line 44

def to_s
  @attrs.to_s
end