Class: Infobeep::BaseClient
- Inherits:
-
Object
- Object
- Infobeep::BaseClient
- Defined in:
- lib/infobeep/client.rb
Direct Known Subclasses
Constant Summary collapse
- API_BASE_URL =
'https://api.infobip.com/'
Instance Method Summary collapse
- #authentication_headers ⇒ Object
- #client_headers ⇒ Object
-
#initialize(username, password) ⇒ BaseClient
constructor
A new instance of BaseClient.
Constructor Details
#initialize(username, password) ⇒ BaseClient
Returns a new instance of BaseClient.
10 11 12 13 |
# File 'lib/infobeep/client.rb', line 10 def initialize(username, password) @username = username @password = password end |
Instance Method Details
#authentication_headers ⇒ Object
15 16 17 18 |
# File 'lib/infobeep/client.rb', line 15 def authentication_headers auth_string = ::Base64.encode64("#{@username}:#{@password}").strip {'Authorization': "Basic #{auth_string}"} end |