|
| 1 | +# Messente\Api\PricingApi |
| 2 | + |
| 3 | +All URIs are relative to https://api.messente.com/v1, except if the operation defines another base path. |
| 4 | + |
| 5 | +| Method | HTTP request | Description | |
| 6 | +| ------------- | ------------- | ------------- | |
| 7 | +| [**getPricelist()**](PricingApi.md#getPricelist) | **GET** /pricelist | Get pricelist for account | |
| 8 | +| [**getPrices()**](PricingApi.md#getPrices) | **GET** /prices | Get pricing for a specific country | |
| 9 | + |
| 10 | + |
| 11 | +## `getPricelist()` |
| 12 | + |
| 13 | +```php |
| 14 | +getPricelist($username, $password): string |
| 15 | +``` |
| 16 | +### URI(s): |
| 17 | +- https://api2.messente.com Override base path for account balance API |
| 18 | +Get pricelist for account |
| 19 | + |
| 20 | +### Example |
| 21 | + |
| 22 | +```php |
| 23 | +<?php |
| 24 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 25 | + |
| 26 | + |
| 27 | +// Configure API key authorization: apiPassword |
| 28 | +$config = Messente\Api\Configuration::getDefaultConfiguration()->setApiKey('password', 'YOUR_API_KEY'); |
| 29 | +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 30 | +// $config = Messente\Api\Configuration::getDefaultConfiguration()->setApiKeyPrefix('password', 'Bearer'); |
| 31 | + |
| 32 | +// Configure API key authorization: apiUsername |
| 33 | +$config = Messente\Api\Configuration::getDefaultConfiguration()->setApiKey('username', 'YOUR_API_KEY'); |
| 34 | +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 35 | +// $config = Messente\Api\Configuration::getDefaultConfiguration()->setApiKeyPrefix('username', 'Bearer'); |
| 36 | + |
| 37 | + |
| 38 | +$apiInstance = new Messente\Api\Api\PricingApi( |
| 39 | + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. |
| 40 | + // This is optional, `GuzzleHttp\Client` will be used as default. |
| 41 | + new GuzzleHttp\Client(), |
| 42 | + $config |
| 43 | +); |
| 44 | +$username = 'username_example'; // string | The API username |
| 45 | +$password = 'password_example'; // string | The API password |
| 46 | + |
| 47 | +$hostIndex = 0; |
| 48 | +$variables = [ |
| 49 | +]; |
| 50 | + |
| 51 | +try { |
| 52 | + $result = $apiInstance->getPricelist($username, $password, $hostIndex, $variables); |
| 53 | + print_r($result); |
| 54 | +} catch (Exception $e) { |
| 55 | + echo 'Exception when calling PricingApi->getPricelist: ', $e->getMessage(), PHP_EOL; |
| 56 | +} |
| 57 | +``` |
| 58 | + |
| 59 | +### Parameters |
| 60 | + |
| 61 | +| Name | Type | Description | Notes | |
| 62 | +| ------------- | ------------- | ------------- | ------------- | |
| 63 | +| **username** | **string**| The API username | | |
| 64 | +| **password** | **string**| The API password | | |
| 65 | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | |
| 66 | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | |
| 67 | + |
| 68 | +### Return type |
| 69 | + |
| 70 | +**string** |
| 71 | + |
| 72 | +### Authorization |
| 73 | + |
| 74 | +[apiPassword](../../README.md#apiPassword), [apiUsername](../../README.md#apiUsername) |
| 75 | + |
| 76 | +### HTTP request headers |
| 77 | + |
| 78 | +- **Content-Type**: Not defined |
| 79 | +- **Accept**: `text/plain` |
| 80 | + |
| 81 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 82 | +[[Back to Model list]](../../README.md#models) |
| 83 | +[[Back to README]](../../README.md) |
| 84 | + |
| 85 | +## `getPrices()` |
| 86 | + |
| 87 | +```php |
| 88 | +getPrices($username, $password, $country, $format): \Messente\Api\Model\Price |
| 89 | +``` |
| 90 | +### URI(s): |
| 91 | +- https://api2.messente.com Override base path for account balance API |
| 92 | +Get pricing for a specific country |
| 93 | + |
| 94 | +### Example |
| 95 | + |
| 96 | +```php |
| 97 | +<?php |
| 98 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 99 | + |
| 100 | + |
| 101 | +// Configure API key authorization: apiPassword |
| 102 | +$config = Messente\Api\Configuration::getDefaultConfiguration()->setApiKey('password', 'YOUR_API_KEY'); |
| 103 | +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 104 | +// $config = Messente\Api\Configuration::getDefaultConfiguration()->setApiKeyPrefix('password', 'Bearer'); |
| 105 | + |
| 106 | +// Configure API key authorization: apiUsername |
| 107 | +$config = Messente\Api\Configuration::getDefaultConfiguration()->setApiKey('username', 'YOUR_API_KEY'); |
| 108 | +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 109 | +// $config = Messente\Api\Configuration::getDefaultConfiguration()->setApiKeyPrefix('username', 'Bearer'); |
| 110 | + |
| 111 | + |
| 112 | +$apiInstance = new Messente\Api\Api\PricingApi( |
| 113 | + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. |
| 114 | + // This is optional, `GuzzleHttp\Client` will be used as default. |
| 115 | + new GuzzleHttp\Client(), |
| 116 | + $config |
| 117 | +); |
| 118 | +$username = 'username_example'; // string | The API username |
| 119 | +$password = 'password_example'; // string | The API password |
| 120 | +$country = 'country_example'; // string | The country code, for which to get the prices |
| 121 | +$format = 'format_example'; // string | The format of the response. Can be either 'json' or 'xml'. If not specified, defaults to 'json'. |
| 122 | + |
| 123 | +$hostIndex = 0; |
| 124 | +$variables = [ |
| 125 | +]; |
| 126 | + |
| 127 | +try { |
| 128 | + $result = $apiInstance->getPrices($username, $password, $country, $format, $hostIndex, $variables); |
| 129 | + print_r($result); |
| 130 | +} catch (Exception $e) { |
| 131 | + echo 'Exception when calling PricingApi->getPrices: ', $e->getMessage(), PHP_EOL; |
| 132 | +} |
| 133 | +``` |
| 134 | + |
| 135 | +### Parameters |
| 136 | + |
| 137 | +| Name | Type | Description | Notes | |
| 138 | +| ------------- | ------------- | ------------- | ------------- | |
| 139 | +| **username** | **string**| The API username | | |
| 140 | +| **password** | **string**| The API password | | |
| 141 | +| **country** | **string**| The country code, for which to get the prices | | |
| 142 | +| **format** | **string**| The format of the response. Can be either 'json' or 'xml'. If not specified, defaults to 'json'. | [optional] | |
| 143 | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | |
| 144 | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | |
| 145 | + |
| 146 | +### Return type |
| 147 | + |
| 148 | +[**\Messente\Api\Model\Price**](../Model/Price.md) |
| 149 | + |
| 150 | +### Authorization |
| 151 | + |
| 152 | +[apiPassword](../../README.md#apiPassword), [apiUsername](../../README.md#apiUsername) |
| 153 | + |
| 154 | +### HTTP request headers |
| 155 | + |
| 156 | +- **Content-Type**: Not defined |
| 157 | +- **Accept**: `application/json`, `application/xml`, `text/plain; charset=utf-8` |
| 158 | + |
| 159 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 160 | +[[Back to Model list]](../../README.md#models) |
| 161 | +[[Back to README]](../../README.md) |
0 commit comments