expertorder / push-api
由OpenAPI生成的ExpertOrder PHP Push-API
dev-main
2023-11-26 11:42 UTC
Requires
- php: ^7.2.5 || ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.8
- guzzlehttp/psr7: ^2.6
This package is auto-updated.
Last update: 2024-09-26 13:35:31 UTC
README
向ExpertOrder收银软件发送订单的API。
<p style="font-size:1.5rem;">
以下数据供测试使用
PUT: https://osp.expertorder.de/testPush
API_KEY: 9615d48a-cc88-4c3e-8e43-102047366a71
更多信息,请访问https://expertorder.de/support/。
安装与使用
要求
PHP 7.4及以后版本。也应适用于PHP 8.0。
Composer
要使用Composer安装绑定,请将以下内容添加到composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" } ], "require": { "GIT_USER_ID/GIT_REPO_ID": "*@dev" } }
然后运行composer install
手动安装
下载文件并包含autoload.php
<?php require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
入门指南
请遵循安装流程,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new OpenAPI\Client\Api\BestellungBermittlungApi( // 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() ); $api_key = 'api_key_example'; // string | Diese Api-Key identifiziert an welche ExpertOrder die Bestellung weiter geleitet werden soll. $order = {"version":1,"broker":"TestShop.de","fromMobile":false,"clientIp":"192.168.1.2","id":"20221121114617984","oldid":"20221121114617988","ordertime":"2022-11-21T11:46:17.988Z","deliverytime":"2022-11-21T11:46:17.988Z","customerinfo":"Quittung nicht vergessen","orderprice":20.5,"orderdiscount":0.0,"bonuscard":"","notification":false,"deliverycost":0.0,"tip":0.0,"customer":{"phone":"01700000001","email":"test@test.de","companyname":"RevoutIT","departmentname":"ExpertOrder","name":"Revout","street":"Ing.-Honnef-Str. 13","zip":"21509","location":"Glinde","addressinfo":"1.OG"},"payment":{"type":1,"provider":"","transactionid":"","prepaid":0.0},"items":[{"count":1,"name":"Menü 1","price":17.0,"items":[{"count":1,"name":"Sommer-Salat standard","price":0.0,"items":[{"count":1,"name":"French Dressing","price":0.0,"items":[]},{"count":1,"name":"Brötchen zum Salat standard","price":0.0,"items":[]}]},{"count":1,"name":"Pizza Vegetaria small","price":0.0,"items":[]},{"count":1,"name":"Warme Pfannkuchen","price":0.0,"items":[{"count":1,"name":"mit heißen Kirschen und Vanille-Sauce","price":0.0,"items":[]}]}]},{"count":1,"name":"Coca Cola 1l","price":3.5,"items":[]}]}; // \OpenAPI\Client\Model\Order try { $apiInstance->pushPut($api_key, $order); } catch (Exception $e) { echo 'Exception when calling BestellungBermittlungApi->pushPut: ', $e->getMessage(), PHP_EOL; }
API端点
所有URI均相对于https://osp.expertorder.de
模型
授权
端点不需要授权。
测试
要运行测试,请使用
composer install vendor/bin/phpunit
作者
关于此包
此PHP包由OpenAPI Generator项目自动生成
- API版本:
1.0.2
- 构建包:
org.openapitools.codegen.languages.PhpClientCodegen