diff --git a/src/AmazonPHP/SellingPartner/Api/FbaInboundApi/FulfillmentInboundSDK.php b/src/AmazonPHP/SellingPartner/Api/FbaInboundApi/FulfillmentInboundSDK.php index c7a35be57..fd6e4468f 100644 --- a/src/AmazonPHP/SellingPartner/Api/FbaInboundApi/FulfillmentInboundSDK.php +++ b/src/AmazonPHP/SellingPartner/Api/FbaInboundApi/FulfillmentInboundSDK.php @@ -10,6 +10,7 @@ use Plenty\AmazonPHP\SellingPartner\HttpFactory; use Plenty\AmazonPHP\SellingPartner\HttpSignatureHeaders; use Plenty\AmazonPHP\SellingPartner\ObjectSerializer; +use Plenty\Log\Traits\Loggable; use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestInterface; @@ -21,6 +22,8 @@ */ final class FulfillmentInboundSDK { + use Loggable; + public const API_NAME = 'FulfillmentInbound'; public const OPERATION_CONFIRMPREORDER = 'confirmPreorder'; @@ -570,9 +573,7 @@ public function createInboundShipment(AccessToken $accessToken, string $region, $sanitizedRequest = $sanitizedRequest->withoutHeader($sensitiveHeader); } - $this->logger->log( - $this->configuration->logLevel('FulfillmentInbound', 'createInboundShipment'), - 'Amazon Selling Partner API pre request', + $this->getLogger('CreateInboundShipmentRequest')->report('module_amazon::log/fbaInbound/debug.requestPayload', [ 'api' => 'FulfillmentInbound', 'operation' => 'createInboundShipment', @@ -595,9 +596,7 @@ public function createInboundShipment(AccessToken $accessToken, string $region, $sanitizedResponse = $sanitizedResponse->withoutHeader($sensitiveHeader); } - $this->logger->log( - $this->configuration->logLevel('FulfillmentInbound', 'createInboundShipment'), - 'Amazon Selling Partner API post request', + $this->getLogger('CreateInboundShipmentRequest')->report('module_amazon::log/fbaInbound/debug.requestPayload', [ 'api' => 'FulfillmentInbound', 'operation' => 'createInboundShipment', @@ -787,9 +786,7 @@ public function createInboundShipmentPlan(AccessToken $accessToken, string $regi $sanitizedRequest = $sanitizedRequest->withoutHeader($sensitiveHeader); } - $this->logger->log( - $this->configuration->logLevel('FulfillmentInbound', 'createInboundShipmentPlan'), - 'Amazon Selling Partner API pre request', + $this->getLogger('CreateInboundShipmentPlanRequest')->report('module_amazon::log/fbaInbound/debug.requestPayload', [ 'api' => 'FulfillmentInbound', 'operation' => 'createInboundShipmentPlan', @@ -812,9 +809,7 @@ public function createInboundShipmentPlan(AccessToken $accessToken, string $regi $sanitizedResponse = $sanitizedResponse->withoutHeader($sensitiveHeader); } - $this->logger->log( - $this->configuration->logLevel('FulfillmentInbound', 'createInboundShipmentPlan'), - 'Amazon Selling Partner API post request', + $this->getLogger('CreateInboundShipmentPlanResponse')->report('module_amazon::log/fbaInbound/debug.requestPayload', [ 'api' => 'FulfillmentInbound', 'operation' => 'createInboundShipmentPlan', @@ -3298,9 +3293,7 @@ public function putTransportDetails(AccessToken $accessToken, string $region, st $sanitizedRequest = $sanitizedRequest->withoutHeader($sensitiveHeader); } - $this->logger->log( - $this->configuration->logLevel('FulfillmentInbound', 'putTransportDetails'), - 'Amazon Selling Partner API pre request', + $this->getLogger('PutTransportDetailsRequest')->report('module_amazon::log/fbaInbound/debug.requestPayload', [ 'api' => 'FulfillmentInbound', 'operation' => 'putTransportDetails', @@ -3323,9 +3316,7 @@ public function putTransportDetails(AccessToken $accessToken, string $region, st $sanitizedResponse = $sanitizedResponse->withoutHeader($sensitiveHeader); } - $this->logger->log( - $this->configuration->logLevel('FulfillmentInbound', 'putTransportDetails'), - 'Amazon Selling Partner API post request', + $this->getLogger('PutTransportDetailsResponse')->report('module_amazon::log/fbaInbound/debug.requestPayload', [ 'api' => 'FulfillmentInbound', 'operation' => 'putTransportDetails',