Class: ProntoForms::User

Inherits:
Resource show all
Defined in:
lib/prontoforms/user.rb

Overview

A ProntoForms user account.

Instance Attribute Summary

Attributes inherited from Resource

#client, #data, #parent

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

#initialize, property, #resource_name

Constructor Details

This class inherits a constructor from ProntoForms::Resource

Class Method Details

.resource_nameObject



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

def self.resource_name
  'users'
end

Instance Method Details

#display_nameString

Get a display name consisting of the first name followed by last name e.g. “John Doe”

Returns:

  • (String)

    The display name for the user



30
31
32
# File 'lib/prontoforms/user.rb', line 30

def display_name
  "#{first_name} #{last_name}"
end

#emailString

Returns The user’s email address.

Returns:

  • (String)

    The user’s email address



19
# File 'lib/prontoforms/user.rb', line 19

property :email, key: 'email'

#first_nameString

Returns The user’s first name.

Returns:

  • (String)

    The user’s first name



21
# File 'lib/prontoforms/user.rb', line 21

property :first_name, key: 'firstName'

#idString

Returns The User identifier.

Returns:

  • (String)

    The User identifier



13
# File 'lib/prontoforms/user.rb', line 13

property :id, key: 'identifier'

#last_nameString

Returns The user’s last name.

Returns:

  • (String)

    The user’s last name



23
# File 'lib/prontoforms/user.rb', line 23

property :last_name, key: 'lastName'

#localeString

Returns The user’s preferred locale.

Returns:

  • (String)

    The user’s preferred locale



25
# File 'lib/prontoforms/user.rb', line 25

property :locale, key: 'locale'

#roleString

Returns The user’s role.

Returns:

  • (String)

    The user’s role



17
# File 'lib/prontoforms/user.rb', line 17

property :role, key: 'role'

#usernameString

Returns The user’s username.

Returns:

  • (String)

    The user’s username



15
# File 'lib/prontoforms/user.rb', line 15

property :username, key: 'username'