Class: Blackbird::Retoure::Environments::Production
- Defined in:
- lib/blackbird/retoure/environments/production.rb
Overview
Public: Sandbox environment specific functions
Constant Summary collapse
- ENDPOINT =
'https://cig.dhl.de/services/production/rest/returns/'.freeze
Instance Method Summary collapse
-
#authentication_data ⇒ Object
Internal: Return the authentication data needed for the HTTP Basic authentication.
-
#dpdhl_token ⇒ Object
Internal: Generate the DPDHL User Authentication Token.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Blackbird::Retoure::Environments::Base
Instance Method Details
#authentication_data ⇒ Object
Internal: Return the authentication data needed for the HTTP Basic authentication.
Returns an Array containing the username and the password to use for
the CIG HTTP Basic authentication.
15 16 17 |
# File 'lib/blackbird/retoure/environments/production.rb', line 15 def authentication_data [@app_id, @app_token] end |
#dpdhl_token ⇒ Object
Internal: Generate the DPDHL User Authentication Token
Returns a String.
22 23 24 |
# File 'lib/blackbird/retoure/environments/production.rb', line 22 def dpdhl_token Base64.strict_encode64("#{@username}:#{@password}") end |