Skip to content

Commit

Permalink
Fixed incorrectly generated namespace in documentation files
Browse files Browse the repository at this point in the history
  • Loading branch information
Caffe1neAdd1ct committed Oct 20, 2021
1 parent 2ae523c commit a05b7c5
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/Api/LabelsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
6 changes: 3 additions & 3 deletions docs/Api/OrdersApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion docs/Api/VersionApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Get API version details.
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new RoyalMail\ClickAndDrop\Rest\Api\Api\VersionApi(
$apiInstance = new RoyalMail\ClickAndDrop\Rest\Api\VersionApi(
// 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()
Expand Down
26 changes: 26 additions & 0 deletions test/Integration/Label.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

require_once(__DIR__ . '/../../vendor/autoload.php');

// Configure API key authorization: Bearer
$config = RoyalMail\ClickAndDrop\Rest\Api\Configuration::getDefaultConfiguration()->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;
}

0 comments on commit a05b7c5

Please sign in to comment.