承接 impact-factoring/management-client 相关项目开发

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

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

impact-factoring/management-client

最新稳定版本:2.0.3

Composer 安装命令:

composer require impact-factoring/management-client

包简介

A Laravel client for consuming Impact Factoring Management API

README 文档

README

Overview

The ImpactFactoringManagementClient is a PHP client designed to interact with the Impact Factoring Management API. It simplifies managing resources like operating companies, funders, funder compartments, and bank accounts. The client offers methods to fetch and manipulate these resources and ensures seamless API communication with predefined request and response handling.

Contribution

Please keep this README up to date.

Installation

Use Composer to install the package:

composer require impact-factoring/management-client

Configuration

The client autoconfigures based on environment variables:

  • APP_ENV: Determines if the client runs in production mode. Client will receive dummy data if APP_ENV is other than "production"
  • IMPACT_FACTORING_MANAGEMENT_API_TOKEN: Authentication token for API requests.
  • IMPACT_FACTORING_MANAGEMENT_API_BASE_URL: Base URL for the API.

Set these variables in your environment to streamline usage.

Features

  • Fetch details of Operating Companies, Funders, Funder Compartments, and Bank Accounts.
  • Reserve and release bank account reservations.
  • Centralized configuration for API communication, including authentication and environment-specific settings.

Method Summary

MethodDescription
getOperatingCompanies(): ?OperatingCompanyResource[]Fetch all operating companies.
getOperatingCompanyById(int $operatingCompanyId): ?OperatingCompanyResourceFetch a single operating company.
getFunders(int $operatingCompanyId): ?FunderResource[]Fetch funders associated with an operating company.
getFunderById(int $funderId): ?FunderResourceFetch a single funder
getFunderCompartments(int $funderId): ?FunderCompartmentResource[]Fetch compartments for a specific funder
getFunderCompartmentById(int $funderCompartmentId): ?FunderCompartmentResourceFetch a single funder compartment
getAvailableBankAccounts(int $compartmentId): ?BankAccountResource[]Fetch available bank accounts for a funder compartment.
getBankAccountById(int $bankAccountId): ?BankAccountResourceFetch a single bank account
reserveBankAccount(int $accountId): boolReserve a bank account
releaseBankAccountReservation(int $accountId): boolRelease a bank account reservation.
getCustomerNumberById(int $customerNumberId): ?CustomerNumberResourceFetch a single customer number by ID.
getAvailableCustomerNumbers(): ?CustomerNumberResource[]Fetch all available customer numbers
reserveCustomerNumbers(int $amount): CustomerNumberResource[]Reserve a given amount of customer numbers
releaseCustomerNumberReservation(int $customerNumberId): boolRelease a reservation of a customer number.

Usage

Initializing the Client

Create a new instance of ImpactFactoringManagementClient:

use ImpactFactoring\Management\Client\ImpactFactoringManagementClient;

$client = new ImpactFactoringManagementClient();

Fetching Resources

Operating Companies:

Fetch all active operating companies

$operatingCompanies = $client->getOperatingCompanies();

Fetch a single operating company by ID

$operatingCompanie = $client->getOperatingCompanyById($operatingCompanyId);

Funders:

Fetch active funders assigned to a specific operating company.

$funders = $client->getFunders($operatingCompanyId);

Fetch a single funder by ID.

$funder = $client->getFunderById($funderId);

Funder Compartments:

Fetch active funder compartment assigned to a specific funder

$compartments = $client->getFunderCompartments($funderId);

Fetch a single funder compartment by ID

$compartment = $client->getFunderCompartmentById($funderCompartmentId);

Bank Accounts:

Fetch available bank accounts assigned to a specified funder compartment

$bankAccounts = $client->getAvailableBankAccounts($funderCompartmentId);

Fetch a single bank account by ID

$bankAccount = $client->getBankAccountById($bankAccountId);

Customer Numbers:

Fetch a single customer number by ID

$customerNumber = $client->getCustomerNumberById($customerNumberId);

Fetch all available customer numbers

$customerNumbers = $client->getAvailableCustomerNumbers();

Resources

OperatingCompanyResource

MethodDescription
getId(): intRetrieve the ID of the operating company.
getCompanyName(): ?stringRetrieve the name of the operating company.
getAddress(): ?stringRetrieve the address where the operating company is based
getZipCode(): ?stringRetrieve the zipcode where the operating company is based
getCity(): ?stringRetrieve the city where the operating company is based
getCountry(): ?stringRetrieve the country where the operating company is based
getCompanyRegistrationNumber(): ?stringRetrieve the company's business registration number (KvK).
getCompanyVatNumber(): ?stringRetrieve the company's VAT number.
getPhone(): ?stringRetrieve the company's general contact phone number.
getEmail(): ?stringRetrieve the company's general contact email-address.
getBankAccountNumber(): ?stringRetrieve the company's general IBAN account number.
getBic(): ?stringRetrieve BIC associated with the general IBAN account number.
getActive(): ?stringRetrieve the company's current state.

FunderResource

MethodDescription
getId(): intRetrieve the ID of the funder.
getName(): ?stringRetrieve the name of the funder.
getActive(): ?stringRetrieve the current state of the funder.

FunderCompartmentResource

MethodDescription
getId(): intRetrieve the ID of the funder compartment.
getName(): ?stringRetrieve the name of the funder compartment.
getActive(): ?stringRetrieve the current state of the funder compartment.

BankAccountResource

MethodDescription
getId(): intRetrieve the ID of the bank account.
getIban(): ?stringRetrieve the IBAN of the bank account.

CustomerNumberResource

MethodDescription
getId(): intRetrieve the ID of the customer number.
getCustomerNumber(): ?stringRetrieve the generated customer number.

Reserve and release bank accounts

It's mandatory to reserve a bank account after the bank account is picked. The bank account should be released if there is no use for it anymore.

Reserve:

$isReserved = $client->reserveBankAccount($bankAccountId);

Release:

$isReleased = $client->releaseBankAccountReservation($bankAccountId);

Reserve and release customer numbers

Once the request to reserve customer numbers has been completed, the given customer numbers are already reserved. If, for any reason, the customer number isn't used anymore, you can release the reservation of that customer number.

Reserve:

$customerNumbers = $client->reserveCustomerNumbers($amount);

Release:

$isReleased = $client->releaseCustomerNumberReservation($customerNumberId);

Development

This package contains a Docker Compose file. Use the following Composer scripts to run and debug in an isolated environment

Usage

Initial composer install

composer docker-install

To test the package (powered by: Orchestra Testbench)

composer test

Run a debug container

composer debug

impact-factoring/management-client 适用场景与选型建议

impact-factoring/management-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 317 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 11 月 20 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 impact-factoring/management-client 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-20