Class: Blackbird::Retoure::Environments::Production

Inherits:
Base
  • Object
show all
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

Methods inherited from Base

#endpoint_url, #initialize

Constructor Details

This class inherits a constructor from Blackbird::Retoure::Environments::Base

Instance Method Details

#authentication_dataObject

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_tokenObject

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