uctoplus/uctoplus-php-api

生产环境位于`https://api.moje.uctoplus.sk/production/`。沙箱环境位于`https://api.moje.uctoplus.sk/sandbox/`。与API的所有通信均采用UTF-8编码。此REST API基于Open API v3标准。如需实施帮助或访问测试环境,请联系我们的客服台。

3.2.0 2023-10-26 15:14 UTC

This package is auto-updated.

Last update: 2024-09-24 09:18:24 UTC


README

生产环境位于 https://api.moje.uctoplus.sk/production/

沙箱环境位于 https://api.moje.uctoplus.sk/sandbox/

与API的所有通信均采用UTF-8编码。此REST API基于Open API v3标准。如需实施帮助或访问测试环境,请联系我们的客服台。

安装与使用

要求

PHP 7.4及更高版本。也应与PHP 8.0兼容。

Composer

要通过Composer安装绑定,请将以下内容添加到composer.json

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/uctoplus/uctoplus-php-api.git"
    }
  ],
  "require": {
    "uctoplus/uctoplus-php-api": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含autoload.php

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

入门指南

请遵循安装程序,然后运行以下命令

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



// Configure API key authorization: api-key
$config = Uctoplus\API\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Uctoplus\API\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');


$apiInstance = new Uctoplus\API\Api\AddressListApi(
    // 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
);
$address = new \Uctoplus\API\Models\Address(); // \Uctoplus\API\Models\Address | Address
$except = array(new \Uctoplus\API\Models\\Uctoplus\API\Models\Except()); // \Uctoplus\API\Models\Except[] | Optional arguments for exclude data from response

try {
    $result = $apiInstance->addAddress($address, $except);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressListApi->addAddress: ', $e->getMessage(), PHP_EOL;
}

API端点

所有URI均相对于https://api.moje.uctoplus.sk/production

模型

授权

API定义的认证方案

api-key

  • 类型: API密钥
  • API密钥参数名称: api-key
  • 位置: HTTP头

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

helpdesk@uctoplus.sk

关于此包

此PHP包是由OpenAPI Generator项目自动生成的

  • API版本: 3.2.0
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen