Class: NgrokAPI::Models::ApplicationUser
- Inherits:
-
Object
- Object
- NgrokAPI::Models::ApplicationUser
- Defined in:
- lib/ngrokapi/models/application_user.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#identity_provider ⇒ Object
readonly
Returns the value of attribute identity_provider.
-
#last_active ⇒ Object
readonly
Returns the value of attribute last_active.
-
#last_login ⇒ Object
readonly
Returns the value of attribute last_login.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#provider_user_id ⇒ Object
readonly
Returns the value of attribute provider_user_id.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#delete ⇒ Object
Delete an application user by ID.
-
#initialize(client: nil, attrs: {}) ⇒ ApplicationUser
constructor
A new instance of ApplicationUser.
- #to_h ⇒ Object
- #to_s ⇒ Object
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
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
10 11 12 |
# File 'lib/ngrokapi/models/application_user.rb', line 10 def attrs @attrs end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
10 11 12 |
# File 'lib/ngrokapi/models/application_user.rb', line 10 def client @client end |
#created_at ⇒ Object (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 |
#email ⇒ Object (readonly)
Returns the value of attribute email.
10 11 12 |
# File 'lib/ngrokapi/models/application_user.rb', line 10 def email @email end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/ngrokapi/models/application_user.rb', line 10 def id @id end |
#identity_provider ⇒ Object (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_active ⇒ Object (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_login ⇒ Object (readonly)
Returns the value of attribute last_login.
10 11 12 |
# File 'lib/ngrokapi/models/application_user.rb', line 10 def last_login @last_login end |
#name ⇒ Object (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_id ⇒ Object (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 |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
10 11 12 |
# File 'lib/ngrokapi/models/application_user.rb', line 10 def uri @uri end |
#username ⇒ Object (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 |
#delete ⇒ Object
Delete an application user by ID.
56 57 58 59 60 |
# File 'lib/ngrokapi/models/application_user.rb', line 56 def delete @client.delete( id: @id ) end |
#to_h ⇒ Object
48 49 50 |
# File 'lib/ngrokapi/models/application_user.rb', line 48 def to_h @attrs.to_h end |
#to_s ⇒ Object
44 45 46 |
# File 'lib/ngrokapi/models/application_user.rb', line 44 def to_s @attrs.to_s end |