Skip to content

Commit

Permalink
Reformat docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-novotny committed Jan 2, 2019
1 parent 2763453 commit 296814c
Show file tree
Hide file tree
Showing 5 changed files with 244 additions and 244 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ $packages = new PackageCollection(Shipper::CP);
// create new package
$package = new Package();
$package->setServiceType(ServiceType::CP_NP);
$package->setRecName("Josef Novák");
$package->setRecZip("11000");
$package->setRecName('Josef Novák');
$package->setRecZip('11000');
$package->setRecCountry(Country::CZECH_REPUBLIC);
$package->setRecPhone("776555888");
$package->setRecPhone('776555888');
$package->setCodPrice(1399.00);
$package->setCodCurrency(Currency::CZK);

Expand All @@ -49,35 +49,35 @@ $packages->add($package);
$orderedPackages = $balikobot->addPackages($packages);

// save package IDs
$data["packages"] = $orderedPackages->getPackageIds();
$data['packages'] = $orderedPackages->getPackageIds();

// save track URL for each package
foreach($orderedPackages as $orderedPackage) {
$data["trackUrl"][] = $orderedPackage->getTrackUrl();
$data['trackUrl'][] = $orderedPackage->getTrackUrl();
}

// order shipment for packages
$orderedShipment = $balikobot->orderShipment($orderedPackages);

// save order ID and labels URL
$data["orderId"] = $orderedShipment->getOrderId();
$data["labelsUrl"] = $orderedShipment->getLabelsUrl();
$data["handoverUrl"] = $orderedShipment->getHandoverUrl();
$data['orderId'] = $orderedShipment->getOrderId();
$data['labelsUrl'] = $orderedShipment->getLabelsUrl();
$data['handoverUrl'] = $orderedShipment->getHandoverUrl();

/*
var_dump($data);
[
"packages" => [
'packages' => [
0 => 42719
1 => 42720
]
"trackUrl" => [
0 => "https://www.postaonline.cz/trackandtrace/-/zasilka/cislo?parcelNumbers=DR00112233M"
1 => "https://www.postaonline.cz/trackandtrace/-/zasilka/cislo?parcelNumbers=DR00112234M"
'trackUrl' => [
0 => 'https://www.postaonline.cz/trackandtrace/-/zasilka/cislo?parcelNumbers=DR00112233M'
1 => 'https://www.postaonline.cz/trackandtrace/-/zasilka/cislo?parcelNumbers=DR00112234M'
]
"orderId" => 2757
"labelsUrl" => "https://pdf.balikobot.cz/cp/eNorMTIwt9A1NbYwM76cMBAXAn4."
"handoverUrl" => "https://pdf.balikobot.cz/cp/eNorMTIwt9A1NbawtARcMBAhAoU."
'orderId' => 2757
'labelsUrl' => 'https://pdf.balikobot.cz/cp/eNorMTIwt9A1NbYwM76cMBAXAn4.'
'handoverUrl' => 'https://pdf.balikobot.cz/cp/eNorMTIwt9A1NbawtARcMBAhAoU.'
]
*/
```
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Contributions are **welcome** and will be fully **credited**.

## Pull Requests

- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - Check the code style with ``$ composer check-style`` and fix it with ``$ composer fix-style``.
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - Check the code style with `$ composer check-style` and fix it with `$ composer fix-style`.

- **Add tests!** - Your patch won't be accepted if it doesn't have tests.

Expand Down
56 changes: 28 additions & 28 deletions docs/balikobot.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ $packages = new PackageCollection(Shipper::CP);

$package = new Package();
$package->setServiceType(ServiceType::CP_NP);
$package->setRecName("Josef Novák");
$package->setRecName('Josef Novák');
$package->setPrice(1500);
$package->setRecStreet("Ulice 123");
$package->setRecCity("Praha");
$package->setRecZip("11000");
$package->setRecStreet('Ulice 123');
$package->setRecCity('Praha');
$package->setRecZip('11000');
$package->setRecCountry(Country::CZECH_REPUBLIC);
$package->setReturnFullErrors();

Expand All @@ -56,14 +56,14 @@ $orderedPackages = $balikobot->addPackages($packages);
/*
var_dump($orderedPackages);
Inspirum\Balikobot\Model\Aggregates\OrderedPackageCollection {
private $shipper => "cp"
private $shipper => 'cp'
private $packages => [
0 => Inspirum\Balikobot\Model\Values\OrderedPackage {
private $shipper => "cp"
private $packageId => "42718"
private $carrierId => "NP1504102232M"
private $shipper => 'cp'
private $packageId => '42718'
private $carrierId => 'NP1504102232M'
private $trackUrl => NULL
private $labelUrl => "https://pdf.balikobot.cz/cp/eNorMTIwt9A1NbYwMwVcMBAXAn4."
private $labelUrl => 'https://pdf.balikobot.cz/cp/eNorMTIwt9A1NbYwMwVcMBAXAn4.'
...
}
]
Expand Down Expand Up @@ -103,14 +103,14 @@ $orderedShipment = $balikobot->orderShipment($orderedPackages);
/*
var_dump($orderedPackages);
Inspirum\Balikobot\Model\Values\OrderedShipment {
private $orderId => "42718"
private $handoverUrl => "https://pdf.balikobot.cz/cp/eNorMTIwt9A1NTW1MAVcMBAaAn4."
private $labelsUrl => "https://pdf.balikobot.cz/cp/eNorMTIwt9A1NbYwMwVcMBAXAn4."
private $fileUrl => "https://csv.balikobot.cz/cp/eNorMTIwt9A1sjAyB1wwDZECRr.."
private $orderId => '42718'
private $handoverUrl => 'https://pdf.balikobot.cz/cp/eNorMTIwt9A1NTW1MAVcMBAaAn4.'
private $labelsUrl => 'https://pdf.balikobot.cz/cp/eNorMTIwt9A1NbYwMwVcMBAXAn4.'
private $fileUrl => 'https://csv.balikobot.cz/cp/eNorMTIwt9A1sjAyB1wwDZECRr..'
private $date => NULL
private $shipper => "cp"
private $shipper => 'cp'
private $packageIds => [
"43619"
'43619'
]
}
*/
Expand All @@ -131,17 +131,17 @@ var_dump($statuses);
[
0 => Inspirum\Balikobot\Model\Values\PackageStatus {
private $date => DateTime {
public $date => "2018-07-02 00:00:00.000000"
public $date => '2018-07-02 00:00:00.000000'
}
private $id => 2
private $name => "Dodání zásilky. 10003 Depo Praha 701"
private $name => 'Dodání zásilky. 10003 Depo Praha 701'
}
1 => Inspirum\Balikobot\Model\Values\PackageStatus {
private $date => DateTime {
public $date => "2018-07-02 00:00:00.000000"
public $date => '2018-07-02 00:00:00.000000'
}
private $id => 1
private $name => "Doručování zásilky. 10003 Depo Praha 701"
private $name => 'Doručování zásilky. 10003 Depo Praha 701'
}
...
]
Expand Down Expand Up @@ -181,19 +181,19 @@ foreach($shippers as $shipper) {
/*
var_dump($shipper);
Inspirum\Balikobot\Model\Values\Branch {
private $shipper => "cp"
private $service => "NB"
private $branchId => "10003"
private $shipper => 'cp'
private $service => 'NB'
private $branchId => '10003'
private $id => NULL
private $type => "branch"
private $name => "Depo Praha 701"
private $city => ""
private $street => "Sazečská 598/7, Malešice, 10003, Praha"
private $zip => "10003"
private $type => 'branch'
private $name => 'Depo Praha 701'
private $city => ''
private $street => 'Sazečská 598/7, Malešice, 10003, Praha'
private $zip => '10003'
private $cityPart => NULL
private $district => NULL
private $region => NULL
private $country => "CZ"
private $country => 'CZ'
...
}
*/
Expand Down
Loading

0 comments on commit 296814c

Please sign in to comment.