lordvol/despatchbaypro_api
Composer 安装命令:
composer require lordvol/despatchbaypro_api
包简介
Unnoficial dev branch of the DBPApiClient
README 文档
README
Despatch Bay Pro API Client
Provided as is.
Usage
$apiUser = 'your_api_user_string_here'; $apiKey = 'your_api_key_here'; $dbpApiClient = new \DespatchBayProApi\DespatchBayProApiClient($apiUser,$apiKey); // AddressingService $dbpApiClient->addressingService->getDomesticAddressKeysByPostcode('S118RR'); $dbpApiClient->addressingService->getDomesticAddressByLookup('S118RR', 13); $dbpApiClient->addressingService->getDomesticAddressByKey($key); // ShippingService $dbpApiClient->shippingService->getDomesticServicesByPostcode('S118RR'); $dbpApiClient->shippingService->getDomesticServices() $dbpApiClient->shippingService->getShipment($shipmentID) $domesticShipmentDetailsArray = [ 'ServiceID' => $serviceID, 'OrderReference' => $orderReference, 'Contents' => $contents, 'ParcelQuantity' => count($parcels), 'CompanyName' => $companyName, 'ReceiptName' => $receiptName, 'Street' => $street, 'Locality' => $locality, 'Town' => $town, 'County' => $county, 'Postcode' => $postcode, 'RecipientEmail' => $receipientEmail, 'EmailNotification' => (boolval($emailNotification))?1:0, 'DashboardNotification' => (boolval($dashboardNotification))?1:0 ]; $dbpApiClient->shippingService->addDomesticShipment($domesticShipmentDetailsArray); // TrackingService $dbpApiClient->trackingService->getTracking($trackingNumber); // LabelsService $labelSizes = $dbpApiClient->labelsService->getAvailableLabelSizes(); $dbpApiClient->labelsService->setLabelFormat(0); // Warning: this function charges your account! $dbpApiClient->labelsService->getLabels($shipmentID);
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2015-07-03