Class: PlentyClient::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/plenty_client/config.rb

Defined Under Namespace

Classes: NoCredentials, NoToken

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.access_tokenObject

Returns the value of attribute access_token.



7
8
9
# File 'lib/plenty_client/config.rb', line 7

def access_token
  @access_token
end

.api_passwordObject

Returns the value of attribute api_password.



7
8
9
# File 'lib/plenty_client/config.rb', line 7

def api_password
  @api_password
end

.api_userObject

Returns the value of attribute api_user.



7
8
9
# File 'lib/plenty_client/config.rb', line 7

def api_user
  @api_user
end

.logObject

Returns the value of attribute log.



7
8
9
# File 'lib/plenty_client/config.rb', line 7

def log
  @log
end

.refresh_tokenObject

Returns the value of attribute refresh_token.



7
8
9
# File 'lib/plenty_client/config.rb', line 7

def refresh_token
  @refresh_token
end

.site_urlObject

Returns the value of attribute site_url.



7
8
9
# File 'lib/plenty_client/config.rb', line 7

def site_url
  @site_url
end

Class Method Details

.validateObject

Raises:



9
10
11
12
# File 'lib/plenty_client/config.rb', line 9

def validate
  raise NoCredentials if site_url.nil? || api_user.nil? || api_password.nil?
  raise NoToken if access_token.nil? || refresh_token.nil?
end