KlarnaHubConfiguration
in package
Class KlarnaHubConfiguration
Prepares KlarnaHub related configuration for JavaScript modules.
Tags
Table of Contents
- DEFAULT_ORDER_STATUS_SHIPPED = '3'
- $countries : Countries
- $klarnaHubFactory : KlarnaHubFactory
- $languageTextManager : LanguageTextManager
- $orderJsonSerializer : OrderJsonSerializer
- $orderReadService : OrderReadServiceInterface
- __construct() : mixed
- KlarnaHubConfiguration constructor.
- asArray() : array<string|int, mixed>
- Returns the configuration as an associative array.
Constants
DEFAULT_ORDER_STATUS_SHIPPED
public
string
DEFAULT_ORDER_STATUS_SHIPPED
= '3'
Properties
$countries
protected
Countries
$countries
$klarnaHubFactory
protected
KlarnaHubFactory
$klarnaHubFactory
$languageTextManager
protected
LanguageTextManager
$languageTextManager
$orderJsonSerializer
protected
OrderJsonSerializer
$orderJsonSerializer
$orderReadService
protected
OrderReadServiceInterface
$orderReadService
Methods
__construct()
KlarnaHubConfiguration constructor.
public
__construct(LanguageTextManager $languageTextManager, Countries $countries, OrderReadServiceInterface $orderReadService, OrderJsonSerializer $orderJsonSerializer, KlarnaHubFactory $klarnaHubFactory) : mixed
Parameters
- $languageTextManager : LanguageTextManager
-
Used for reading KlarnaHub translations.
- $countries : Countries
-
Read the available countries.
- $orderReadService : OrderReadServiceInterface
-
Reads order record.
- $orderJsonSerializer : OrderJsonSerializer
-
Serializes order record to assosiative array.
- $klarnaHubFactory : KlarnaHubFactory
-
Klarna Hub factory.
Return values
mixed —asArray()
Returns the configuration as an associative array.
public
asArray([HubClientKey|null $clientKey = null ][, NonEmptyStringType|null $moduleCode = null ][, NonEmptyStringType|null $orderNumber = null ]) : array<string|int, mixed>
Parameters
- $clientKey : HubClientKey|null = null
-
Hub client key.
- $moduleCode : NonEmptyStringType|null = null
-
Hub module code of the order.
- $orderNumber : NonEmptyStringType|null = null
-
Shop order number.
Return values
array<string|int, mixed> —Returns the configuration array.