TrustpilotApi
in package
Table of Contents
Properties
- $apiKey : mixed
- $apiSecretKey : string
- $password : mixed
- $username : mixed
- $businessUnitIds : array<string|int, mixed>
- $locales : array<string|int, mixed>
- $logService : LogService
Methods
- __construct() : mixed
- sendTrustpilotInvitation() : bool
- Send Trustpilot invitation
- generateApiPayloadBody() : array<string|int, mixed>
- getAccessToken() : string|bool
- Retrieves the access token for Trustpilot API authentication
Properties
$apiKey
protected
mixed
$apiKey
$apiSecretKey
protected
string
$apiSecretKey
$password
protected
mixed
$password
$username
protected
mixed
$username
$businessUnitIds
private
array<string|int, mixed>
$businessUnitIds
$locales
private
array<string|int, mixed>
$locales
$logService
private
LogService
$logService
Methods
__construct()
public
__construct(ContainerInterface $container, LogService $logService) : mixed
Parameters
- $container : ContainerInterface
- $logService : LogService
sendTrustpilotInvitation()
Send Trustpilot invitation
public
sendTrustpilotInvitation(SaleProduct $saleProduct) : bool
Parameters
- $saleProduct : SaleProduct
Return values
boolgenerateApiPayloadBody()
private
generateApiPayloadBody(Sale $sale, int $storeId, SaleProduct $saleProduct, Product $product) : array<string|int, mixed>
Parameters
- $sale : Sale
- $storeId : int
- $saleProduct : SaleProduct
- $product : Product
Return values
array<string|int, mixed>getAccessToken()
Retrieves the access token for Trustpilot API authentication
private
getAccessToken() : string|bool
Return values
string|bool —The access token or false if authentication fails