| 1 | <?php |
||
| 9 | class Package implements PackageInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Package's origin. |
||
| 13 | * |
||
| 14 | * @var \Jne\Contracts\Foundation\LocationInterface |
||
| 15 | */ |
||
| 16 | protected $origin; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Package's destination. |
||
| 20 | * |
||
| 21 | * @var \Jne\Contracts\Foundation\LocationInterface |
||
| 22 | */ |
||
| 23 | protected $destination; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Package's weight. |
||
| 27 | * |
||
| 28 | * @var \Jne\Contracts\Foundation\WeightInterface |
||
| 29 | */ |
||
| 30 | protected $weight; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Create a new instance of Package. |
||
| 34 | * |
||
| 35 | * @param \Jne\Contracts\Foundation\LocationInterface $origin |
||
| 36 | * @param \Jne\Contracts\Foundation\LocationInterface $destination |
||
| 37 | * @param \Jne\Contracts\Foundation\WeightInterface $weight |
||
| 38 | */ |
||
| 39 | 4 | public function __construct(LocationInterface $origin, LocationInterface $destination, WeightInterface $weight) |
|
| 45 | |||
| 46 | /** |
||
| 47 | * Get package's origin. |
||
| 48 | * |
||
| 49 | * @return \Jne\Contracts\Foundation\LocationInterface |
||
| 50 | */ |
||
| 51 | 2 | public function origin() |
|
| 55 | |||
| 56 | /** |
||
| 57 | * Get package's destination. |
||
| 58 | * |
||
| 59 | * @return \Jne\Contracts\Foundation\LocationInterface |
||
| 60 | */ |
||
| 61 | 2 | public function destination() |
|
| 65 | |||
| 66 | /** |
||
| 67 | * Get package's weight. |
||
| 68 | * |
||
| 69 | * @return \Jne\Contracts\Foundation\WeightInterface |
||
| 70 | */ |
||
| 71 | 2 | public function weight() |
|
| 75 | } |
||
| 76 |