vshipdk/php-sdk
最新稳定版本:2.1.1
Composer 安装命令:
composer require vshipdk/php-sdk
包简介
SDK For vShip API
README 文档
README
Introduction
This package provides basic interface to interact with the vShip API.
Documentation
Installation
To install the SDK in your project you need to require the package via composer:
composer require vshipdk/php-sdk
Basic Usage
Initialize vShip client:
$client = new \Vship\Client( apiKey: { Your API key } );
Send a request through the client:
$client->getCountries(); $client->getCarrier('car_2IGXIoELZX4Bga45tOxo52sbpJY');
Send a request with query parameters through the client:
$client->getCarriers([ 'filter[name]' => 'Carrier name', ]);
Send a request with body to create API resource through the client:
$response = $client->createOrganisation([ 'name' => 'test 5222ee5511232ff31rr33', 'vat_number' => '123423rr4 ', 'company_number' => 'bhifgrvbhief', 'vat_registered' => false, 'currency' => 'EUR', 'timezone' => 'Europe/Copenhagen', 'settings' => [], ]);
API Reference
vShip client
Carriers
$client->getCarriers(array queryParameters = []): Carrier[]
$client->getCarrier(string $carrierId): Carrier
$client->createCarrier(array $payload): Carrier
$client->updateCarrier(string $carrierId, array $payload): Carrier
$client->deleteCarrier(string $carrierId): Carrier
Carrier Accounts
$client->getCarrierAccounts(array $queryParameters = []): CarrierAccount[]
$client->getCarrierAccount(string $carrierAccountId): CarrierAccount
$client->createCarrierAccount(array $payload): CarrierAccount
$client->updateCarrierAccount(string $carrierAccountId, array $payload): CarrierAccount
$client->deleteCarrierAccount(string $carrierAccountId): CarrierAccount
$client->getCarrierAccountFields(string $carrierCode): CarrierAccountFields
Countries
$client->getCountries(): Country
Labels
$client->fetchPrintShipmentLabel(string $shipmentId, array $parameters): Label
Organisation Objects
$client->getOrganisationObjects(array $queryParameters = []): OrganisationObject[]
$client->getOrganisationObject(string $organisationObjectId): OrganisationObject
$client->createOrganisationObject(array $payload): OrganisationObject
$client->updateOrganisationObject(string $organisationObjectId, array $payload): OrganisationObject
$client->deleteOrganisationObject(string $organisationObjectId): OrganisationObject
Organisations
$client->getOrganisations(array $queryParameters = []): Organisation[]
$client->getOrganisation(string $organisationId): Organisation
$client->createOrganisation(array $payload): Organisation
$client->updateOrganisation(string $organisationId, array $payload): Organisation
$client->deleteOrganisation($organisationId): Organisation
Shipments
$client->getShipments(array $queryParameters = []): Shipment[]
$client->createShipment(array $payload): Shipment
$client->cancelShipment(string $id): void
$client->archiveShipment(string $shipmentId): Shipment
Users
$client->getUsers(array $queryParameters = []): User[]
$client->getUser(string $userId): User
Consolidate Invoices
$client->createConsolidateInvoice(array $payload): Invoice
统计信息
- 总下载量: 370
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 5
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-02