From a05b7c56fdb6d84b37a1d5225653ddfe9219dbce Mon Sep 17 00:00:00 2001 From: Kevin Andrews Date: Wed, 20 Oct 2021 22:18:59 +0100 Subject: [PATCH] Fixed incorrectly generated namespace in documentation files --- docs/Api/LabelsApi.md | 2 +- docs/Api/OrdersApi.md | 6 +++--- docs/Api/VersionApi.md | 2 +- test/Integration/Label.php | 26 ++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 test/Integration/Label.php diff --git a/docs/Api/LabelsApi.md b/docs/Api/LabelsApi.md index bcec011..1d6391f 100644 --- a/docs/Api/LabelsApi.md +++ b/docs/Api/LabelsApi.md @@ -24,7 +24,7 @@ $config = RoyalMail\ClickAndDrop\Rest\Api\Configuration::getDefaultConfiguration // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = RoyalMail\ClickAndDrop\Rest\Api\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); -$apiInstance = new RoyalMail\ClickAndDrop\Rest\Api\Api\LabelsApi( +$apiInstance = new RoyalMail\ClickAndDrop\Rest\Api\LabelsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), diff --git a/docs/Api/OrdersApi.md b/docs/Api/OrdersApi.md index ac73ab5..aed4754 100644 --- a/docs/Api/OrdersApi.md +++ b/docs/Api/OrdersApi.md @@ -24,7 +24,7 @@ $config = RoyalMail\ClickAndDrop\Rest\Api\Configuration::getDefaultConfiguration // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = RoyalMail\ClickAndDrop\Rest\Api\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); -$apiInstance = new RoyalMail\ClickAndDrop\Rest\Api\Api\OrdersApi( +$apiInstance = new RoyalMail\ClickAndDrop\Rest\Api\OrdersApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -77,7 +77,7 @@ $config = RoyalMail\ClickAndDrop\Rest\Api\Configuration::getDefaultConfiguration // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = RoyalMail\ClickAndDrop\Rest\Api\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); -$apiInstance = new RoyalMail\ClickAndDrop\Rest\Api\Api\OrdersApi( +$apiInstance = new RoyalMail\ClickAndDrop\Rest\Api\OrdersApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -132,7 +132,7 @@ $config = RoyalMail\ClickAndDrop\Rest\Api\Configuration::getDefaultConfiguration // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = RoyalMail\ClickAndDrop\Rest\Api\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); -$apiInstance = new RoyalMail\ClickAndDrop\Rest\Api\Api\OrdersApi( +$apiInstance = new RoyalMail\ClickAndDrop\Rest\Api\OrdersApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), diff --git a/docs/Api/VersionApi.md b/docs/Api/VersionApi.md index 22e269e..6b394d2 100644 --- a/docs/Api/VersionApi.md +++ b/docs/Api/VersionApi.md @@ -17,7 +17,7 @@ Get API version details. setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = RoyalMail\ClickAndDrop\Rest\Api\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +$apiInstance = new RoyalMail\ClickAndDrop\Rest\Api\LabelsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$orderIdentifiers = "orderIdentifiers_example"; // string | Order Identifier or several Order Identifiers separated by semicolon +$documentType = "documentType_example"; // string | Document generation mode. When documentType is set to \"postageLabel\" the additional parameters below must be used. These additional parameters will be ignored when documentType is not set to \"postageLabel\" +$includeReturnsLabel = true; // bool | Include returns label. Required when documentType is set to 'postageLabel' +$includeCN = true; // bool | Include CN22/CN23 with label. Optional parameter. If this parameter is used the setting will override the default account behaviour specified in the \"Label format\" setting \"Generate customs declarations with orders\" + +try { + $result = $apiInstance->getOrdersLabelAsync($orderIdentifiers, $documentType, $includeReturnsLabel, $includeCN); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling LabelsApi->getOrdersLabelAsync: ', $e->getMessage(), PHP_EOL; +} \ No newline at end of file