Class: Brivo::Application

Inherits:
Object
  • Object
show all
Includes:
Brivo::API::Credentials, Brivo::API::Groups, Brivo::API::Users
Defined in:
lib/brivo/application.rb

Constant Summary

Constants included from Brivo::API::Credentials

Brivo::API::Credentials::FORMAT_NAME

Constants included from Brivo::API::HTTP

Brivo::API::HTTP::API_URL, Brivo::API::HTTP::DEFAULT_HTTPS_SETTINGS, Brivo::API::HTTP::MAX_RETRIES, Brivo::API::HTTP::PAGE_SIZE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Brivo::API::Credentials

#create_credential, #credential, #credentials, #delete_credential, #user_credentials

Methods included from Brivo::API::HTTP

#http_request, #set_access_token

Methods included from Brivo::API::Groups

#create_group, #delete_group, #group, #group_assign_user, #group_remove_user, #groups, #user_groups

Methods included from Brivo::API::Users

#create_user, #credential_user, #delete_user, #group_users, #user, #user_assign_credential, #user_remove_credential, #users

Constructor Details

#initialize(client_id:, secret:, api_key:, username:, password:) ⇒ Application

Returns a new instance of Application.



11
12
13
14
15
16
17
# File 'lib/brivo/application.rb', line 11

def initialize client_id:, secret:, api_key:, username:, password:
  @client_id = client_id
  @secret = secret
  @api_key = api_key
  @username = username
  @password = password
end

Instance Attribute Details

#api_keyObject (readonly)

Returns the value of attribute api_key.



9
10
11
# File 'lib/brivo/application.rb', line 9

def api_key
  @api_key
end

#client_idObject (readonly)

Returns the value of attribute client_id.



9
10
11
# File 'lib/brivo/application.rb', line 9

def client_id
  @client_id
end

#passwordObject (readonly)

Returns the value of attribute password.



9
10
11
# File 'lib/brivo/application.rb', line 9

def password
  @password
end

#secretObject (readonly)

Returns the value of attribute secret.



9
10
11
# File 'lib/brivo/application.rb', line 9

def secret
  @secret
end

#usernameObject (readonly)

Returns the value of attribute username.



9
10
11
# File 'lib/brivo/application.rb', line 9

def username
  @username
end