Read from the package's own PHP files at the commit ea60ef0faabe: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.
ApiclassBlue Dart's APIs (apigateway.bluedart.com): a JWT from the Token API with the client id and secret, then the Transit (serviceability and transit time), Waybill (shipments and labels), Tracking and Cancel APIs.
4 methods · 5 properties · 2 constants
BluedartGatewayFactoryclassoptions: client_id: '%env(BLUEDART_CLIENT_ID)%' # the API gateway app (bluedart.com/developer) client_secret: '%env(BLUEDART_CLIENT_SECRET)%' login_id: '%env(BLUEDART_LOGIN)%' # the ShipDart profile: login id, licence_key: '%env(BLUEDART_LICENCE)%' # licence key and customer_code: '%env(BLUEDART_CUSTOMER)%' # customer code origin_area: BOM # the account's area code sandbox: true rates: [...] # prices from configuration: the Transit API quotes none
12 options
CancelActionclassThe Waybill API's CancelWaybill.
3 methods
RatingActionclassThe Transit API's GetDomesticTransitTimeForPinCodeandProduct: whether the lane is served and in how many days, for each product (A Domestic Priority, E Dart Apex, D Dart Surfaceline). Blue Dart quotes no price: the amount is the shipment's "prices" option per product (minor units), and a product without a price is not rated (nor asked about).
3 methods
ShippingActionclassThe Waybill API's GenerateWayBill: the AWB number and its label (PDF). Service: the product code (A Domestic Priority by default, E, D).
3 methods
TrackingActionclassThe Tracking API: the waybill's scans, oldest first.
3 methods
Omnibus\Bluedart
Api class
final class Api Api.php:15
Blue Dart's APIs (apigateway.bluedart.com): a JWT from the Token API with the client id and secret, then the Transit (serviceability and transit time), Waybill (shipments and labels), Tracking and Cancel APIs.
const LIVE = 'https://apigateway.bluedart.com'const TEST = 'https://apigateway-sandbox.bluedart.com'public readonly string $loginIdpublic readonly string $licenceKeypublic readonly string $customerCodepublic readonly ?string $originAreapublic readonly bool $sandbox
Api::__construct()
public function __construct(readonly HttpClientInterface $http, readonly string $clientId, readonly string $clientSecret, public readonly string $loginId, public readonly string $licenceKey, public readonly string $customerCode, public readonly ?string $originArea = null, public readonly bool $sandbox = false, readonly int $timeout = 20)Api::base()
public function base(): stringApi::profile()
public function profile(): arrayApi::call()
public function call(string $method, string $path, ?array $body = null, array $query = []): arrayBluedartGatewayFactory class
final class BluedartGatewayFactory extends GatewayFactory BluedartGatewayFactory.php:26
options: client_id: '%env(BLUEDART_CLIENT_ID)%' # the API gateway app (bluedart.com/developer) client_secret: '%env(BLUEDART_CLIENT_SECRET)%' login_id: '%env(BLUEDART_LOGIN)%' # the ShipDart profile: login id, licence_key: '%env(BLUEDART_LICENCE)%' # licence key and customer_code: '%env(BLUEDART_CUSTOMER)%' # customer code origin_area: BOM # the account's area code sandbox: true rates: [...] # prices from configuration: the Transit API quotes none
No pickup points: Blue Dart delivers to the door. Unverified until an account's keys are at hand.
Options
| Option | Default | |
|---|---|---|
origin_area | null | |
sandbox | false | |
omnibus.api | function (Config $c) {
$http = $this->http ?? HttpClient::create();
return new Api($http, (string) $c['client_id'], (string) $c['client_secret'], (st… | |
omnibus.action.rating | static fn(Config $c) => $c->get('rates') ? null : new RatingAction() | |
omnibus.action.shipping | new ShippingAction() | |
omnibus.action.tracking | new TrackingAction() | |
omnibus.action.cancel | new CancelAction() | |
client_id | required | |
client_secret | required | |
login_id | required | |
licence_key | required | |
customer_code | required |
Omnibus\Bluedart\Action
CancelAction class
final class CancelAction implements ActionInterface, ApiAwareInterface CancelAction.php:13
The Waybill API's CancelWaybill.
CancelAction::__construct()
public function __construct()CancelAction::supports()
public function supports(Request $request): boolCancelAction::execute()
public function execute(Request $request): voidRatingAction class
final class RatingAction implements ActionInterface, ApiAwareInterface RatingAction.php:20
The Transit API's GetDomesticTransitTimeForPinCodeandProduct: whether the lane is served and in how many days, for each product (A Domestic Priority, E Dart Apex, D Dart Surfaceline). Blue Dart quotes no price: the amount is the shipment's "prices" option per product (minor units), and a product without a price is not rated (nor asked about).
RatingAction::__construct()
public function __construct()RatingAction::supports()
public function supports(Request $request): boolRatingAction::execute()
public function execute(Request $request): voidShippingAction class
final class ShippingAction implements ActionInterface, ApiAwareInterface ShippingAction.php:16
The Waybill API's GenerateWayBill: the AWB number and its label (PDF). Service: the product code (A Domestic Priority by default, E, D).
ShippingAction::__construct()
public function __construct()ShippingAction::supports()
public function supports(Request $request): boolShippingAction::execute()
public function execute(Request $request): voidTrackingAction class
final class TrackingAction implements ActionInterface, ApiAwareInterface TrackingAction.php:16
The Tracking API: the waybill's scans, oldest first.
TrackingAction::__construct()
public function __construct()TrackingAction::supports()
public function supports(Request $request): boolTrackingAction::execute()
public function execute(Request $request): void