shufflingpixels/bokio-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

shufflingpixels/bokio-php

最新稳定版本:v0.0.1

Composer 安装命令:

composer require shufflingpixels/bokio-php

包简介

PHP Wrapper for the experimental Bokio API

README 文档

README

PHP Wrapper for the experimental Bokio API

Install

Install via composer

composer require shufflingpixels/bokio-php

Example

<?php

require_once 'vendor/autoload.php';

use Shufflingpixels\BokioApi\Api;
use Shufflingpixels\BokioApi\Auth;
use Shufflingpixels\BokioApi\Enum\CustomerType;
use Shufflingpixels\BokioApi\Enum\LanguageEnum;
use Shufflingpixels\BokioApi\Exception\ApiException;
use Shufflingpixels\BokioApi\Exception\Exception;
use Shufflingpixels\BokioApi\Objects\Customer;

$api = new Api(new Auth('<company_id>', '<token>'));

try {
    $customer = new Customer([
        'name' => "Created From Api",
        'type' => CustomerType::COMPANY,
        'vatNumber' => "SE1234567890",
        'orgNumber' => "123456-7890",
        'contactsDetails' => [
            [
                'name' => 'Person 1',
                'email' => 'test@example.com',
                'phone' => '0739281831',
                'isDefault' => true,
            ],
            [
                'name' => 'Person 2',
            ],
        ],
        "address" => [
            'line1' => 'Älvsborgsvägen 10',
            'city' => 'Göteborg',
            'postalCode' => '123 45',
            'country' => 'SE',
        ],
        'language' => LanguageEnum::SV,
    ]);

    $response = $api->customer()->create($customer);

    print_r($response);
} catch (ApiException $e) {
    print_r($e->getError());
} catch (Exception $e) {
    print_r($e);
}

Implemented

Author

Henrik Hautakoski henrik@shufflingpixels.com

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2025-03-05