Class: SerwerSMS::Http::HttpCredentials
- Defined in:
- lib/serwersms/http/http_credentials.rb
Constant Summary
Constants inherited from ApiClient
ApiClient::API_URL, ApiClient::SYSTEM
Instance Method Summary collapse
-
#initialize(username:, password:, **opts) ⇒ HttpCredentials
constructor
A new instance of HttpCredentials.
Methods inherited from ApiClient
Constructor Details
#initialize(username:, password:, **opts) ⇒ HttpCredentials
Returns a new instance of HttpCredentials.
4 5 6 7 8 9 10 11 12 |
# File 'lib/serwersms/http/http_credentials.rb', line 4 def initialize(username:, password:, **opts) raise SerwerSMS::Error, 'Username is empty' if username.to_s.strip.empty? raise SerwerSMS::Error, 'Password is empty' if password.to_s.strip.empty? super(**opts) @username = username @password = password end |