Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit fcb172e

Browse files
authored
Merge pull request #5 from picqer/v2
v2 to master
2 parents 053f116 + e68b9df commit fcb172e

33 files changed

+1044
-206
lines changed

.travis.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
language: php
2+
php:
3+
- '5.5'
4+
- '5.6'
5+
- '7.0'
6+
- hhvm
7+
- nightly
8+
install: composer install --dev
9+
env:
10+
global:
11+
- secure: FVLSHe0WnE9VYVIl7KEpzxQ8zMh6iB9RPtDykDi+KuzdhSyJJ0L105uG/3RddtAB9punXafWFmfCMan8BxikkDdMtl6mCJXjeQA+kCsK2B9lhdf+h+NW4RsE4SsI3NWR/f4H4stdDJ/gUy/GcC1QXF8msGrIqna8qrhS5ys1+nQPza7qy5IJn9BQP9ORMnvAUje7bgWuPox9lCDbbjs6yzgNhF9GwHMSXBfG7g0mAPEMLbDaw/ZqyzSs/gV609kIKqwVR/rHGSAnKQVuNojuPhf6H5Cdg2SbxkZ5NfBUyJRsTEGmyRauZRtQjLKSDG9MyR7hdzCpXabyIvVz6azH+tdTLUMJdoMXh6mhOygENHMlIihRlwt2SFQT+f4kFh8hPb2wZGlgwX7yDmd4GMfK3yHxCQc5YGZCYlzUPhhCL/B4gGt2gxxOs3as7TLuCB0Frf/77kyCqNVl9LAJ+HvrH/+HnKPjY7C0cOST/rgWJ/ftI1gH9rZ/q433tvN/cEB89dfzFCH/rtFaZoiW7GbIr7xakTq54ncbEpLt7KTJqPBAu/55Hq15z5Q53KOj0q9mF/nyxsUzHVdnnPIEL219mzdbfOkomGcUtlJDYJHYZOVSxZA5NzEF+vzazAJkOFOuieWxOfJ1bLEWi5CeyoKL+jbM8bTnsRWLOUsGKd84L8I=
12+
- secure: nahNQUhB+/06NCpTc9lb9USxM+cYXPPhZb7BoPtmn9YfAgSSj23hXy5K79MtdT6cVShCQe4DdmCmfPfIBm9LS3YTaj7DJ8RLQJ3zVgZbB23OywT1JdQbi5f2AQlhNZ6tFzF/5pkaMqsc+50gRIN90GVLQTvDWGqUAZuuHk1GV0jhV+tT1/mzh6i0yJ4fyg5wLAu5Fqqy70wff1g9QY4URpghurHPC3/l5VHoGa4OjYZyjjKwYJ7sUEu9cxQwdWQGiK0Y4UGfav8Ju2nGZAc4DjoVH1d3tkHLcaNQQMDUTCZD3w0ltAaEWtdB1lMeO0Bgn+4Y+ksVTtGjrIHPkvhtWQDk7B5EGq0lHBH8rHuQXhuciDs7ArAK7VBemiqdZEFqAYwjsUtWutzLonpX4/imVN5MECCiTJlZTxx7XYmpxixUo7Kep+zj9HLm25W7vxhcQyfxp1aAdg/iUO5DLWBuSA72huG/CU1qW/ikC6sHS8QLkfAw5NxjsnWYSfkYjfinRtB/X2MEC8+bcR5JueD0eBtf0VWr7JDJjGFWGxR7OCZFylNq67Oxw/+sQHJokfwJUY/DSIknXK/BjaxSrL3miwBRwfjfcPYXfxSQS26aDOryovZiNbQVVTA5SP7FMTLo1oLgEseftP6XlzSDtb6ZCkN0qEe8mWGt9C8hm2lMFX8=

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 Picqer
3+
Copyright (c) 2016 Picqer
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
[![Build Status](https://travis-ci.org/picqer/bol-plaza-php-client.svg?branch=v2)](https://travis-ci.org/picqer/bol-plaza-php-client)
2+
3+
14
# Bol.com Plaza API client for PHP
2-
Work in progress, but this an open source PHP client for the [Bol.com Plaza API](https://developers.bol.com/documentatie/plaza-api/).
5+
This is an open source PHP client for the [Bol.com Plaza API](https://developers.bol.com/documentatie/plaza-api/).
36

47
## Installation
58
Get it with [composer](https://getcomposer.org)
@@ -9,7 +12,7 @@ Run the command:
912
composer require picqer/bol-plaza-php-client
1013
```
1114

12-
## Example: get open orders
15+
## Example: get orders
1316
```php
1417
<?php
1518

@@ -20,32 +23,11 @@ $privatekey = '--YOUR PRIVATE KEY--';
2023

2124
$client = new Picqer\BolPlazaClient\BolPlazaClient($publickey, $privatekey);
2225

23-
$orders = $client->getOpenOrders();
26+
$orders = $client->getOrders();
2427

2528
var_dump($orders);
2629
```
2730

28-
## Example: Update shipment
29-
```php
30-
<?php
31-
32-
require __DIR__ . '/vendor/autoload.php';
33-
34-
$publickey = '--YOUR PUBLIC KEY--';
35-
$privatekey = '--YOUR PRIVATE KEY--';
36-
37-
$client = new Picqer\BolPlazaClient\BolPlazaClient($publickey, $privatekey);
31+
See the [tests file](tests/BolPlazaClientTest.php) for more information.
3832

39-
$shipment = new Picqer\BolPlazaClient\Entities\BolPlazaShipment();
40-
$shipment->OrderId = 1234;
41-
$shipment->DateTime = "2011-01-01T12:00:00";
42-
$transporter = new Picqer\BolPlazaClient\Entities\BolPlazaTransporter();
43-
$transporter->Code = 'TNT';
44-
$transporter->TrackAndTraceCode = '3SLGCT01238190283';
45-
$shipment->Transporter = $transporter;
46-
$shipment->OrderItems = ['1231'];
47-
48-
$shipments = [$shipment];
49-
50-
$client->processShipments($shipments);
51-
```
33+
Thanks to [@mwienk](https://github.com/mwienk) for migrating this package for the Bol Plaza API V2.

composer.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,21 @@
1515
{
1616
"name": "Casper Bakker",
1717
"email": "[email protected]"
18+
},
19+
{
20+
"name": "Mark Wienk",
21+
"email": "[email protected]"
1822
}
1923
],
2024
"require": {
2125
"php": ">=5.5.9"
2226
},
27+
"require-dev": {
28+
"phpunit/phpunit": "*"
29+
},
2330
"autoload": {
2431
"psr-4": {
2532
"Picqer\\BolPlazaClient\\": "src/"
2633
}
2734
}
28-
}
35+
}

phpunit.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<phpunit colors="true" strict="true" bootstrap="tests/autoload.php">
2+
<php>
3+
<env name="PHP_PUBKEY" value="--INSERT KEY HERE--"/>
4+
<env name="PHP_PRIVKEY" value="--INSERT KEY HERE--"/>
5+
</php>
6+
<testsuites>
7+
<testsuite name="The project's test suite">
8+
<directory>./tests</directory>
9+
</testsuite>
10+
</testsuites>
11+
</phpunit>

0 commit comments

Comments
 (0)