friends-of-ce / channel-api-client-php
ChannelEngine API 适用于商家
2.13.0
2023-06-01 18:14 UTC
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
README
ChannelEngine API 适用于商家
安装与使用
需求
PHP 7.4 及更高版本。也应适用于 PHP 8.0。
Composer
要通过 Composer 安装绑定,请将以下内容添加到 composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/friends-of-ce/channel-api-client-php.git" } ], "require": { "friends-of-ce/channel-api-client-php": "*@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: apiKey $config = FriendsOfCE\Channel\ApiClient\Configuration::getDefaultConfiguration()->setApiKey('apikey', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = FriendsOfCE\Channel\ApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apikey', 'Bearer'); $apiInstance = new FriendsOfCE\Channel\ApiClient\Api\CancellationApi( // 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 ); $merchantCancellationRequest = new \FriendsOfCE\Channel\ApiClient\Model\MerchantCancellationRequest(); // \FriendsOfCE\Channel\ApiClient\Model\MerchantCancellationRequest try { $result = $apiInstance->cancellationCreate($merchantCancellationRequest); print_r($result); } catch (Exception $e) { echo 'Exception when calling CancellationApi->cancellationCreate: ', $e->getMessage(), PHP_EOL; }
API 端点
所有 URI 都是相对于 https://demo.channelengine.net/api
模型
- AddProductExtraDataRequests
- AdvanceSettingsResponse
- ApiResponse
- ChannelCarrierCollectionMethodApi
- ChannelCarrierRecommendationApi
- ChannelChannelResponse
- ChannelGlobalChannelResponse
- ChannelListedProductResponse
- CollectionOfChannelGlobalChannelResponse
- CollectionOfChannelListedProductResponse
- CollectionOfMerchantCancellationResponse
- CollectionOfMerchantNotificationResponse
- CollectionOfMerchantOfferGetStockResponse
- CollectionOfMerchantOrderResponse
- CollectionOfMerchantProductAttributeGroupWithLinkedChannelsResponse
- CollectionOfMerchantProductAttributeGroupWithProductExtraDataResponse
- CollectionOfMerchantProductBundleResponse
- CollectionOfMerchantProductResponse
- CollectionOfMerchantProductWithBuyBoxPrice
- CollectionOfMerchantReportsResponse
- CollectionOfMerchantReturnResponse
- CollectionOfMerchantShipmentLabelCarrierResponse
- CollectionOfMerchantShipmentResponse
- CollectionOfMerchantSingleOrderReturnResponse
- CollectionOfMerchantStockLocationWithCountryIsoResponse
- CollectionOfMerchantWebhookResponse
- Condition
- CreatorFilter
- ExtraDataType
- FulfillmentType
- Gender
- ListedProductChannelStatus
- ListedProductExportStatus
- MancoReason
- MerchantAddressResponse
- MerchantCancellationLineRequest
- MerchantCancellationLineResponse
- MerchantCancellationRequest
- MerchantCancellationResponse
- MerchantChannelLabelShipmentRequest
- MerchantCreateReportResponse
- MerchantCreateSettlementsReportRequest
- MerchantGetReportStatusResponse
- MerchantNotificationResponse
- MerchantOfferGetStockResponse
- MerchantOfferStockUpdateRequest
- MerchantOrderAcknowledgementRequest
- MerchantOrderCommentUpdateRequest
- MerchantOrderLineExtraDataResponse
- MerchantOrderLineResponse
- MerchantOrderResponse
- MerchantProductAttributeGroupChannelInfoResponse
- MerchantProductAttributeGroupWithLinkedChannelsResponse
- MerchantProductAttributeGroupWithProductExtraDataResponse
- MerchantProductBundlePartResponse
- MerchantProductBundleResponse
- MerchantProductExtraDataItemRequest
- MerchantProductExtraDataItemResponse
- MerchantProductExtraDataRequest
- MerchantProductExtraDataResponse
- MerchantProductRequest
- MerchantProductResponse
- MerchantProductWithBuyBoxPrice
- MerchantReportsResponse
- MerchantReturnAcknowledgeRequest
- MerchantReturnLineRequest
- MerchantReturnLineResponse
- MerchantReturnLineUpdateRequest
- MerchantReturnRequest
- MerchantReturnResponse
- MerchantReturnUpdateRequest
- MerchantSettingsResponse
- MerchantShipmentLabelCarrierRequest
- MerchantShipmentLabelCarrierResponse
- MerchantShipmentLineRequest
- MerchantShipmentLineResponse
- MerchantShipmentPackageDimensionsRequest
- MerchantShipmentPackageWeightRequest
- MerchantShipmentRequest
- MerchantShipmentResponse
- MerchantShipmentTrackingRequest
- MerchantSingleOrderReturnLineResponse
- MerchantSingleOrderReturnResponse
- MerchantStockLocationAddressRequest
- MerchantStockLocationCreateRequest
- MerchantStockLocationResponse
- MerchantStockLocationUpdateRequest
- MerchantStockLocationWithCountryIsoResponse
- MerchantStockPriceUpdateRequest
- MerchantWebhookRequest
- MerchantWebhookResponse
- NotificationType
- Operation
- OrderStatusView
- OrderSupport
- PackageDimensionsUnit
- PackageWeightUnit
- PatchMerchantProductDto
- ProductAttributeGroupRequest
- 产品创建结果
- 产品额外数据请求
- 产品消息
- 删除产品额外数据请求
- 重命名产品属性组请求
- 报告状态
- 报告类型
- 退货原因
- 退货状态
- 设置响应
- 货运履行类型
- 货运行状态
- 货运设置响应
- 字典中包含字符串和字符串列表的单个
- 单个商家产品响应
- 单个商家设置响应
- 单个产品创建结果
- 增值税率类型
- 增值税设置响应
- Webhook事件类型
授权
为API定义的认证方案
apiKey
- 类型:API密钥
- API密钥参数名:apikey
- 位置:URL查询字符串
测试
要运行测试,请使用
composer install vendor/bin/phpunit
作者
关于此包
此PHP包是由OpenAPI Generator项目自动生成的
- API版本:
2.13.0
- 包版本:
2.13.0
- 包版本:
- 构建包:
org.openapitools.codegen.languages.PhpClientCodegen