ventureleap / leap-one-order-sdk
dev-master
2021-07-27 15:19 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-07 13:16:31 UTC
README
未提供描述(由Swagger Codegen生成 https://github.com/swagger-api/swagger-codegen)
此PHP包由Swagger Codegen项目自动生成
- API版本:1.0.0
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen
需求
PHP 5.5及以后版本
安装与使用
Composer
要通过Composer安装绑定,请在composer.json中添加以下内容
{
"repositories": [
{
"type": "git",
"url": "https://github.com/ventureleap/leap-one-order-sdk.git"
}
],
"require": {
"ventureleap/leap-one-order-sdk": "*@dev"
}
}
然后运行composer install
手动安装
下载文件并包含autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门
请按照安装过程进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: apiKey $config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new VentureLeap\OrderService\Api\BillingAddressApi( // 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 ); $page = 1; // int | The collection page number try { $result = $apiInstance->getBillingAddressCollection($page); print_r($result); } catch (Exception $e) { echo 'Exception when calling BillingAddressApi->getBillingAddressCollection: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new VentureLeap\OrderService\Api\BillingAddressApi( // 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 ); $id = "id_example"; // string | try { $result = $apiInstance->getBillingAddressItem($id); print_r($result); } catch (Exception $e) { echo 'Exception when calling BillingAddressApi->getBillingAddressItem: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new VentureLeap\OrderService\Api\BillingAddressApi( // 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 ); $body = new \VentureLeap\OrderService\Model\BillingAddressJsonldBillingAddressWrite(); // \VentureLeap\OrderService\Model\BillingAddressJsonldBillingAddressWrite | The new BillingAddress resource try { $result = $apiInstance->postBillingAddressCollection($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling BillingAddressApi->postBillingAddressCollection: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new VentureLeap\OrderService\Api\BillingAddressApi( // 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 ); $id = "id_example"; // string | $body = new \VentureLeap\OrderService\Model\BillingAddressJsonldBillingAddressWrite(); // \VentureLeap\OrderService\Model\BillingAddressJsonldBillingAddressWrite | The updated BillingAddress resource try { $result = $apiInstance->putBillingAddressItem($id, $body); print_r($result); } catch (Exception $e) { echo 'Exception when calling BillingAddressApi->putBillingAddressItem: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI均相对于/
模型文档
- BillingAddressJsonldBillingAddressRead
- BillingAddressJsonldBillingAddressWrite
- BillingAddressJsonldOrderRead
- BillingAddressJsonldOrderWrite
- ConfigurationEntryJsonldConfigurationRead
- ConfigurationEntryJsonldConfigurationWrite
- InlineResponse200
- InlineResponse2001
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2005
- InlineResponse200Hydrasearch
- InlineResponse200HydrasearchHydramapping
- InlineResponse200Hydraview
- OrderJsonldOrderRead
- OrderJsonldOrderWrite
- OrderLogJsonldOrderRead
- OrderProductJsonldOrderProductRead
- OrderProductJsonldOrderProductWrite
- OrderProductJsonldOrderRead
- OrderProductJsonldOrderWrite
- OrderVoucherJsonldOrderRead
- OrderVoucherJsonldOrderVoucherRead
- OrderVoucherJsonldOrderVoucherWrite
- OrderVoucherJsonldVoucherRead
- VoucherJsonldVoucherRead
- VoucherJsonldVoucherWrite
授权文档
0
- 类型:API密钥
- API密钥参数名:Authorization
- 位置:HTTP头
apiKey
- 类型:API密钥
- API密钥参数名:Authorization
- 位置:HTTP头