Class: SerwerSMS::Http::HttpCredentials

Inherits:
ApiClient
  • Object
show all
Defined in:
lib/serwersms/http/http_credentials.rb

Constant Summary

Constants inherited from ApiClient

ApiClient::API_URL, ApiClient::SYSTEM

Instance Method Summary collapse

Methods inherited from ApiClient

#call

Constructor Details

#initialize(username:, password:, **opts) ⇒ HttpCredentials

Returns a new instance of HttpCredentials.

Raises:



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