承接 curenect/bestell-api-adapter 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

curenect/bestell-api-adapter

Composer 安装命令:

composer require curenect/bestell-api-adapter

包简介

PHP Adapter für die curenect Bestell-API. Ermöglicht autorisierten Partnern die flexible Erstellung von TI-Bestellungen mit vollständiger Unterstützung für Einzel- und Multi-Standort-Szenarien.

README 文档

README

Pipeline Status PHP Version Docker License: MIT

📋 Über diesen Adapter

Flexible Bestell-API für curenect Partner mit vollständiger Docker-Integration.

Diese API ermöglicht autorisierten Partnern die flexible Erstellung von TI-Bestellungen mit vollständiger Unterstützung für Einzel- und Multi-Standort-Szenarien.

🐳 Vollständig containerisiert - Identische Entwicklungs- und CI-Umgebung für alle.

🚀 Quick Start

Voraussetzungen

🐳 Setup mit Docker (Empfohlen)

# Repository clonen
git clone https://gitlab.com/sl.is/adapter/php/bestell-api-adapter.git
cd bestell-api-adapter

# Entwicklungsumgebung starten
make setup

# Oder manuell:
docker-compose --profile dev up -d
docker-compose run --rm php composer install

⚡ Entwicklung

# Tests ausführen
make test

# Code-Qualität prüfen
make quality

# Integration Tests
make integration

# Alle verfügbaren Commands anzeigen
make help

🔧 Lokale Entwicklung ohne Docker

Nur falls Docker nicht verfügbar ist:

# PHP 8.2+ und Composer erforderlich
composer install
composer test
composer quality

📋 Bestellprozess

  1. Katalogdaten abrufen: Verfügbare Berufsgruppen, Primärsysteme und Produkte
  2. Bestellung konfigurieren: Pro Standort individuell konfigurieren
  3. Bestellung erstellen: Alle Standorte in einem API-Call übermitteln
  4. Status verfolgen: Bestellstatus und Fortschritt abfragen

🏢 Standort-Flexibilität

Einzelstandort

  • Ein Standort pro Bestellung
  • Vereinfachte Struktur
  • Kein Hauptstandort-Flag erforderlich

Multi-Standort

  • Mehrere Standorte pro Bestellung
  • Genau ein Hauptstandort erforderlich
  • Individuelle Konfiguration pro Standort möglich:
    • Verschiedene Bestelltypen
    • Verschiedene Berufsgruppen
    • Verschiedene Primärsysteme
    • Individuelle Produktauswahl

📋 Bestelltypen pro Standort

  • Erstausstattung: Neue TI-Infrastruktur
  • Wechsler: Migration von bestehenden Systemen
  • Bestellung: Standard-Nachbestellungen

Jeder Standort kann einen anderen Bestelltyp haben!

📊 Rate Limiting

Die API verwendet Rate Limiting zum Schutz vor Missbrauch:

  • Katalog-Endpunkte: 100 Anfragen pro Minute
  • Bestellungs-Endpunkte: 60 Anfragen pro Minute
  • Status-Endpunkte: 200 Anfragen pro Minute

Bei Überschreitung erhalten Sie HTTP 429 mit Retry-After Header.

🔒 Idempotenz

POST-Requests unterstützen Idempotenz über den X-Idempotency-Key Header:

  • Verhindert Doppelbestellungen bei Retry-Versuchen
  • Gültigkeitsdauer: 24 Stunden
  • Empfohlenes Format: partner-order-{datum}-{eindeutige-id}

🛠 Entwicklung

Docker-Umgebung

Die Entwicklungsumgebung läuft vollständig in Docker-Containern und stellt eine identische Umgebung zu CI/CD bereit.

Container-Services

# Entwicklungsumgebung starten
docker-compose --profile dev up -d

# Integration Tests Services
docker-compose --profile integration up -d

# Alle Services (dev + integration)
docker-compose --profile all up -d

Verfügbare Services

ServicePortBeschreibung
php-Haupt-PHP-Container mit allen Tools
redis6379Cache für Tests
api-mock4010Prism API Mock Server
oauth-mock4011OAuth2 Mock Server
error-simulator4012HTTP Error Simulator

Make Commands

Das Makefile bietet einheitliche Commands für alle Entwicklungsaufgaben:

# Setup & Cleanup
make setup          # Projekt einrichten
make clean          # Aufräumen
make build          # Docker Image bauen

# Testing
make test           # Unit Tests
make test-all       # Alle Test-Suites
make integration    # Integration Tests
make test-coverage  # Tests mit Coverage

# Code Quality
make quality        # Alle Quality Checks
make lint           # PHP Syntax Check
make phpstan        # Static Analysis
make cs-fix         # Code Style Fix
make rector         # Code Modernization

# CI Simulation
make ci             # Komplette CI Pipeline lokal
make ci-fast-check  # Nur Fast-Check Stage
make ci-core-tests  # Nur Core-Tests Stage

# Docker
make docker-dev     # Development Container
make docker-clean   # Container aufräumen
make docker-shell   # Shell im Container

# Help
make help           # Alle verfügbaren Commands

Lokale Entwicklung

# Container-Shell öffnen
make docker-shell
# oder
docker-compose exec php bash

# Im Container arbeiten
composer install
composer test
composer phpstan
composer cs-fix

Integration Tests lokal ausführen

# Services starten
make integration-setup

# Tests ausführen
make integration

# Oder manuell
docker-compose --profile integration up -d
composer test-integration

CI/CD Pipeline lokal testen

# Komplette Pipeline simulieren
make ci

# Einzelne Stages testen
make ci-fast-check
make ci-core-tests
make ci-integration

📖 Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "require": {
    "curenect/bestell-api-adapter": "^1.0"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/bestell-api-adapter/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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



// Configure OAuth2 access token for authorization: OAuth2
$config = curenect\Adapter\BestellApi\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new curenect\Adapter\BestellApi\Api\BestellungenApi(
    // 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
);
$bestellungErstellen = {"standorte":[{"bestelltyp":"erstausstattung","berufsgruppe_id":1,"primaersystem_id":1,"firma":"Praxis Dr. Mustermann","ik_nummer":"123456789","strasse":"Musterstraße","hausnummer":"123","plz":"12345","ort":"Musterstadt","rechtsform":"einzelunternehmen","hauptkontakt":{"vorname":"Max","nachname":"Mustermann","telefon":"+49 123 456789","email":"max.mustermann@praxis.de"},"technischer_kontakt":{"vorname":"Anna","nachname":"Tech","telefon":"+49 123 456790","email":"anna.tech@praxis.de","position":"IT-Administrator","it_kenntnisse":"fortgeschritten"},"produkte":[{"produkt_id":1,"menge":1},{"produkt_id":5,"menge":2}],"sepa_daten":{"iban":"DE89370400440532013000","kontoinhaber":"Dr. Max Mustermann"}}],"empfehlungscode":"REF-2024-001"}; // \curenect\Adapter\BestellApi\Model\BestellungErstellen | Vollständige Bestelldaten mit Standort-Konfiguration
$xRequestID = 550e8400-e29b-41d4-a716-446655440000; // string | Eindeutige Request-ID für Tracing und Fehlerbehandlung
$xIdempotencyKey = partner-order-2024-01-15-12345; // string | Idempotenz-Schlüssel für sichere Wiederholungen von POST-Requests. Verhindert Doppelbestellungen bei Retry-Versuchen. Gültigkeitsdauer: 24 Stunden

try {
    $result = $apiInstance->createBestellung($bestellungErstellen, $xRequestID, $xIdempotencyKey);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BestellungenApi->createBestellung: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://odoo.curenect.io/api/partner/v2

ClassMethodHTTP requestDescription
BestellungenApicreateBestellungPOST /bestellungenNeue Bestellung erstellen
BestellungenApigetBestellungGET /bestellungen/{bestellnummer}Einzelne Bestellung abrufen
BestellungenApigetBestellungenGET /bestellungenEigene Bestellungen abrufen
KatalogApigetBerufsgruppenGET /katalog/berufsgruppenVerfügbare Berufsgruppen abrufen
KatalogApigetPrimaersystemeGET /katalog/primaersystemeVerfügbare Primärsysteme abrufen
KatalogApigetProdukteGET /katalog/produkteVerfügbare Produkte abrufen
SystemApigetAPIStatusGET /system/statusAPI-Status prüfen
WebhooksApideleteWebhookDELETE /webhooks/{webhook_id}Webhook deregistrieren
WebhooksApigetWebhooksGET /webhooksRegistrierte Webhooks abrufen
WebhooksApiregisterWebhookPOST /webhooksWebhook für Bestellungsstatusänderungen registrieren

Models

Authorization

Authentication schemes defined for the API:

OAuth2

  • Type: OAuth
  • Flow: application
  • Authorization URL: ``
  • Scopes:
    • partner:read: Lesezugriff auf Katalogdaten und eigene Bestellungen
    • partner:write: Erstellung neuer Bestellungen

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

partner-api@curenect.de

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.0
    • Generator version: 7.14.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

curenect/bestell-api-adapter 适用场景与选型建议

curenect/bestell-api-adapter 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 07 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「rest」 「api」 「sdk」 「adapter」 「healthcare」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 curenect/bestell-api-adapter 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 curenect/bestell-api-adapter 我们能提供哪些服务?
定制开发 / 二次开发

基于 curenect/bestell-api-adapter 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 22
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-07