Class: ShellSmartPayApi::MppToken
- Inherits:
-
CoreLibrary::HeaderAuth
- Object
- CoreLibrary::HeaderAuth
- ShellSmartPayApi::MppToken
- Defined in:
- lib/shell_smart_pay_api/http/auth/mpp_token.rb
Overview
Utility class for custom header authorization.
Instance Method Summary collapse
-
#error_message ⇒ Object
Display error message on occurrence of authentication failure.
-
#initialize(mpp_token_credentials) ⇒ MppToken
constructor
Initialization constructor.
Constructor Details
#initialize(mpp_token_credentials) ⇒ MppToken
Initialization constructor.
16 17 18 19 20 21 22 |
# File 'lib/shell_smart_pay_api/http/auth/mpp_token.rb', line 16 def initialize(mpp_token_credentials) auth_params = {} auth_params['Authorization'] = mpp_token_credentials. unless mpp_token_credentials.nil? || mpp_token_credentials..nil? super auth_params end |
Instance Method Details
#error_message ⇒ Object
Display error message on occurrence of authentication failure.
11 12 13 |
# File 'lib/shell_smart_pay_api/http/auth/mpp_token.rb', line 11 def 'MppToken: authorization is undefined.' end |