Class: QuickbooksWebConnector::User

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(username, password, company_file_path, owner_id = nil, file_id = nil) ⇒ User

Returns a new instance of User.



6
7
8
9
10
11
12
13
# File 'lib/quickbooks_web_connector/user.rb', line 6

def initialize(username, password, company_file_path, owner_id = nil, file_id = nil)
  @username = username
  @password = password
  @company_file_path = company_file_path

  @owner_id = owner_id || 'd69682e6-4436-44bc-bd19-d6bfbd11778d'
  @file_id = file_id || '916222f3-c574-4c70-8c9d-e3cec2634e49'
end

Instance Attribute Details

#company_file_pathObject (readonly)

Returns the value of attribute company_file_path.



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

def company_file_path
  @company_file_path
end

#file_idObject (readonly)

Returns the value of attribute file_id.



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

def file_id
  @file_id
end

#owner_idObject (readonly)

Returns the value of attribute owner_id.



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

def owner_id
  @owner_id
end

#usernameObject (readonly)

Returns the value of attribute username.



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

def username
  @username
end

Instance Method Details

#valid_password?(provided_password) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/quickbooks_web_connector/user.rb', line 15

def valid_password?(provided_password)
  provided_password == password
end