Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-novotny committed Jul 6, 2020
1 parent 40d08ae commit 6720610
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/balikobot.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ getB2AServices(string $shipper): array
getProofOfDelivery(OrderedPackage $package): string
getProofOfDeliveries(OrderedPackageCollection $packages): array
getTransportCosts(PackageCollection $packages): PackageTransportCostCollection
```


Expand Down
52 changes: 50 additions & 2 deletions docs/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -860,13 +860,59 @@ $fileUrls = $client->getProofOfDeliveries(Shipper::TNT, ['GE502878792CZ', 'GE502
/*
var_dump($fileUrls);
[
'0' => 'https://pod.balikobot.cz/tnt/eNorMTY11DUEXDAFrwFs',
'1' => 'https://pod.balikobot.cz/tnt/eNorMTY11DUEXDAFrwRE',
0 => 'https://pod.balikobot.cz/tnt/eNorMTY11DUEXDAFrwFs'
1 => 'https://pod.balikobot.cz/tnt/eNorMTY11DUEXDAFrwRE'
]
*/
```


### **TRANSPORTCOSTS**

Method **TRANSPORTCOSTS** obtain the price of carriage at consignment level.

The client normalizes the response by returning only transport cost data (drop **status** attribute).


```php
use Inspirum\Balikobot\Definitions\Option;
use Inspirum\Balikobot\Definitions\ServiceType;
use Inspirum\Balikobot\Definitions\Shipper;

$transportCosts = $client->getTransportCosts(Shipper::TOPTRANS, [
[
Option::SERVICE_TYPE => ServiceType::TOP_TRANS_STANDARD,
Option::EID => '12345678',
Option::REAL_ORDER_ID => '180001',
Option::ORDER_NUMBER => 1,
Option::REC_NAME => 'Josef Novák',
Option::MU_TYPE => 'KUS',
Option::WEIGHT => 20.1,
// ...
],
// ...
]);

/*
var_dump($transportCosts);
[
0 => [
'eid' => '12345678'
'costs_total' => 336.0
'currency' => 'CZK'
'costs_breakdown' => [
0 => [
'name' => 'Base price'
'cost' => 336.0
]
]
'status' => '200'
]
],
*/
```


## All available methods

```
Expand Down Expand Up @@ -925,6 +971,8 @@ getB2AServices(string $shipper): array
getProofOfDelivery(string $shipper, string $carrierId): string
getProofOfDeliveries(string $shipper, array $carrierIds): array
getTransportCosts(string $shipper, array $packages): array
```


Expand Down

0 comments on commit 6720610

Please sign in to comment.