Class: Blackbird::Retoure::Environments::Sandbox

Inherits:
Base
  • Object
show all
Defined in:
lib/blackbird/retoure/environments/sandbox.rb

Overview

Public: Sandbox environment specific functions

Constant Summary collapse

ENDPOINT =
'https://cig.dhl.de/services/sandbox/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.


13
14
15
# File 'lib/blackbird/retoure/environments/sandbox.rb', line 13

def authentication_data
  [@username, @password]
end

#dpdhl_tokenObject

Internal: Generate the DPDHL User Authentication Token.

Returns a String.



20
21
22
# File 'lib/blackbird/retoure/environments/sandbox.rb', line 20

def dpdhl_token
  'MjIyMjIyMjIyMl9jdXN0b21lcjp1QlFiWjYyIVppQmlWVmJoYw=='
end