承接 speedfin/speedfin-wrapper 相关项目开发

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

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

speedfin/speedfin-wrapper

最新稳定版本:1.0.2

Composer 安装命令:

composer require speedfin/speedfin-wrapper

包简介

Speedfin 2.0 API wrapper for Finance Admin (clients, documents, etc.)

README 文档

README

A lightweight wrapper layer to communicate with Speedfin 2.0 API from external applications (e.g., Finance Admin).

Modules

  • ClientService (CRUD dla klientów: getAll, getById, create, update, delete)

Instalacja

composer install

Konfiguracja i użycie (przykład w Finance Admin)

  1. Zainstaluj paczkę lub dołącz repozytorium jako path repository (jeśli monorepo).
  2. Skonfiguruj serwis w Symfony:
# services.yaml (fragment)
services:
    SpeedfinWrapper\Client\SpeedfinApiClient:
        arguments:
            $baseUrl: '%env(SPEEDFIN_API_URL)%'
            $timeout: 30

    SpeedfinWrapper\Service\ClientService:
        arguments:
            $client: '@SpeedfinWrapper\\Client\\SpeedfinApiClient'
  1. Użycie w kodzie:
use SpeedfinWrapper\Service\ClientService;
use SpeedfinWrapper\Dto\Client\ClientDto;

$clientService = $container->get(ClientService::class);

// Pobranie listy
$clients = $clientService->getAll();

// Pobranie po ID
$client = $clientService->getById(123);

// Utworzenie klienta
$new = new ClientDto(name: 'Jan', surname: 'Kowalski', email: 'jan@example.com');
$created = $clientService->create($new);

// Aktualizacja klienta
$created->comment = 'Ważny klient';
$updated = $clientService->save($created);

// Usunięcie
$clientService->delete($updated->id);

Uwagi

  • Endpointy oparte na Api Platform (prefiks /api).
  • PATCH używa application/merge-patch+json.
  • Autoryzacja Bearer przez przekazanie tokena po logowaniu.

Ustawienie tokena po logowaniu

Przekaż token uzyskany przy logowaniu bezpośrednio do klienta:

use SpeedfinWrapper\Client\SpeedfinApiClient;

$apiClient = $container->get(SpeedfinApiClient::class);
$apiClient->setToken($tokenUzyskanyPrzyLogowaniu);

// Od tego momentu wszystkie wywołania będą używać ustawionego tokena

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2025-10-17