Skip to content

Commit f8432cb

Browse files
authored
Merge pull request #18 from lorro/master
Added SenderAddress API endpoint
2 parents 384d140 + d473983 commit f8432cb

File tree

3 files changed

+60
-3
lines changed

3 files changed

+60
-3
lines changed

src/Picqer/Carriers/SendCloud/Parcel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ class Parcel extends Model
6767

6868
protected $shipperShippingMethodIds = [
6969
'BPost' => [54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 82, 83, 95, 96],
70-
'DHL' => [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 38, 40, 53, 81],
70+
'DHL' => [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 38, 40, 53, 81, 117],
7171
'DHL Germany' => [89, 90, 91, 92, 93, 94],
72-
'DPD' => [41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87],
72+
'DPD' => [41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 109],
7373
'Fadello' => [88],
74-
'PostNL' => [1, 2, 3, 4, 5, 6, 7, 29, 30, 31, 32, 33, 34, 35, 36, 37, 39, 84],
74+
'PostNL' => [1, 2, 3, 4, 5, 6, 7, 29, 30, 31, 32, 33, 34, 35, 36, 37, 39, 84, 318, 319, 320, 321, 322, 323, 324, 325, 326],
7575
];
7676

7777
public function getTrackingUrl()

src/Picqer/Carriers/SendCloud/SendCloud.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,14 @@ public function users()
6767
return new User($this->connection);
6868
}
6969

70+
/**
71+
* SenderAddress Resource
72+
*
73+
* @return SenderAddress
74+
*/
75+
public function sender_addresses()
76+
{
77+
return new SenderAddress($this->connection);
78+
}
79+
7080
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
namespace Picqer\Carriers\SendCloud;
3+
4+
/**
5+
* Class SenderAddress
6+
*
7+
* @property integer id
8+
* @property string company_name
9+
* @property string contact_name
10+
* @property string email
11+
* @property string telephone
12+
* @property string street
13+
* @property string house_number
14+
* @property string postal_box
15+
* @property string postal_code
16+
* @property string city
17+
* @property string country
18+
*
19+
* @package Picqer\Carriers\SendCloud
20+
*/
21+
class SenderAddress extends Model
22+
{
23+
24+
use Query\Findable;
25+
26+
protected $fillable = [
27+
'id',
28+
'company_name',
29+
'contact_name',
30+
'email',
31+
'telephone',
32+
'street',
33+
'house_number',
34+
'postal_box',
35+
'postal_code',
36+
'city',
37+
'country'
38+
];
39+
40+
protected $url = 'user/addresses/sender';
41+
42+
protected $namespaces = [
43+
'singular' => 'sender_address',
44+
'plural' => 'sender_addresses'
45+
];
46+
47+
}

0 commit comments

Comments
 (0)