HermesHSIService
in package
implements
LoggerAwareInterface
Interfaces, Classes and Traits
- LoggerAwareInterface
Table of Contents
- LABELSTORAGE = DIR_FS_CATALOG . '/export/hermeshsi'
- $configuration : HermesHSIConfigurationStorage
- $lastRequest : string
- $logger : LoggerInterface
- __construct() : mixed
- authenticateUser() : HermesHSIAccessToken
- createShipmentOrder() : HermesHSIRestResponse
- getAccessToken() : HermesHSIAccessToken
- getLabel() : HermesHSILabel
- getLastRequest() : string
- markAccessTokenCachesAsDirty() : void
- Marks the contents of the AccessToken cache as dirty. Required when dis-/enabling testMode.
- refreshToken() : HermesHSIAccessToken
- retrieveLabel() : HermesHSILabel
- retrieveShipmentOrder() : array<string|int, mixed>
- retrieveShipmentOrders() : array<string|int, mixed>
- setLogger() : null
- Sets a logger instance on the object
- getClientId() : string
- getClientSecret() : string
- retrieveAccessTokenFromCache() : HermesHSIAccessToken
- storeAccessTokenInCache() : void
Constants
LABELSTORAGE
protected
mixed
LABELSTORAGE
= DIR_FS_CATALOG . '/export/hermeshsi'
Properties
$configuration
protected
HermesHSIConfigurationStorage
$configuration
$lastRequest
protected
string
$lastRequest
$logger
protected
LoggerInterface
$logger
Methods
__construct()
public
__construct(HermesHSIConfigurationStorage $configuration) : mixed
Parameters
- $configuration : HermesHSIConfigurationStorage
Return values
mixed —authenticateUser()
public
authenticateUser(string $username, string $password) : HermesHSIAccessToken
Parameters
- $username : string
- $password : string
Tags
Return values
HermesHSIAccessToken —createShipmentOrder()
public
createShipmentOrder(HermesHSIShipmentOrder $shipmentOrder) : HermesHSIRestResponse
Parameters
- $shipmentOrder : HermesHSIShipmentOrder
Tags
Return values
HermesHSIRestResponse —getAccessToken()
public
getAccessToken() : HermesHSIAccessToken
Tags
Return values
HermesHSIAccessToken —getLabel()
public
getLabel(string $shipmentOrderId) : HermesHSILabel
Parameters
- $shipmentOrderId : string
Tags
Return values
HermesHSILabel —getLastRequest()
public
getLastRequest() : string
Return values
string —markAccessTokenCachesAsDirty()
Marks the contents of the AccessToken cache as dirty. Required when dis-/enabling testMode.
public
markAccessTokenCachesAsDirty() : void
Return values
void —refreshToken()
public
refreshToken(string $refreshToken) : HermesHSIAccessToken
Parameters
- $refreshToken : string
Tags
Return values
HermesHSIAccessToken —retrieveLabel()
public
retrieveLabel(string $shipmentOrderId) : HermesHSILabel
Parameters
- $shipmentOrderId : string
Tags
Return values
HermesHSILabel —retrieveShipmentOrder()
public
retrieveShipmentOrder([string|null $shipmentOrderId = null ]) : array<string|int, mixed>
Parameters
- $shipmentOrderId : string|null = null
Tags
Return values
array<string|int, mixed> —retrieveShipmentOrders()
public
retrieveShipmentOrders(array<string|int, mixed> $shipmentOrderIds) : array<string|int, mixed>
Parameters
- $shipmentOrderIds : array<string|int, mixed>
Return values
array<string|int, mixed> —setLogger()
Sets a logger instance on the object
public
setLogger(LoggerInterface $logger) : null
Parameters
- $logger : LoggerInterface
Return values
null —getClientId()
protected
getClientId() : string
Return values
string —getClientSecret()
protected
getClientSecret() : string
Return values
string —retrieveAccessTokenFromCache()
protected
retrieveAccessTokenFromCache() : HermesHSIAccessToken
Tags
Return values
HermesHSIAccessToken —storeAccessTokenInCache()
protected
storeAccessTokenInCache(HermesHSIAccessToken $accessToken) : void
Parameters
- $accessToken : HermesHSIAccessToken