Issues (121)

src/Service/PackageService.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Inspirum\Balikobot\Service;
6
7
use DateTimeInterface;
8
use Inspirum\Balikobot\Model\OrderedShipment\OrderedShipment;
9
use Inspirum\Balikobot\Model\Package\Package;
10
use Inspirum\Balikobot\Model\Package\PackageCollection;
11
use Inspirum\Balikobot\Model\PackageData\PackageData;
12
use Inspirum\Balikobot\Model\PackageData\PackageDataCollection;
13
use Inspirum\Balikobot\Model\TransportCost\TransportCostCollection;
14
15
interface PackageService
16
{
17
    /**
18
     * Check if packages data are valid
19
     *
20
     * @throws \Inspirum\Balikobot\Exception\Exception
21
     */
22
    public function checkPackages(PackageDataCollection $packages): void;
23
24
    /**
25
     * Add packages
26
     *
27
     * @throws \Inspirum\Balikobot\Exception\Exception
28
     */
29
    public function addPackages(PackageDataCollection $packages): PackageCollection;
30
31
    /**
32
     * Drops packages
33
     *
34
     * @throws \Inspirum\Balikobot\Exception\Exception
35
     */
36
    public function dropPackages(PackageCollection $packages): void;
37
38
    /**
39
     * Drops package
40
     *
41
     * @throws \Inspirum\Balikobot\Exception\Exception
42
     */
43
    public function dropPackage(Package $package): void;
44
45
    /**
46
     * Drops package by its package ID
47
     *
48
     * @throws \Inspirum\Balikobot\Exception\Exception
49
     */
50
    public function dropPackageByPackageId(string $carrier, string $packageId): void;
51
52
    /**
53
     * Drops packages by theirs package IDs
54
     *
55
     * @param list<string> $packageIds
0 ignored issues
show
The type Inspirum\Balikobot\Service\list was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
56
     *
57
     * @throws \Inspirum\Balikobot\Exception\Exception
58
     */
59
    public function dropPackagesByPackageIds(string $carrier, array $packageIds): void;
60
61
    /**
62
     * Order shipment for packages
63
     *
64
     * @throws \Inspirum\Balikobot\Exception\Exception
65
     */
66
    public function orderShipment(PackageCollection $packages): OrderedShipment;
67
68
    /**
69
     * Order shipment for packages by theirs IDs
70
     *
71
     * @param list<string> $packageIds
72
     *
73
     * @throws \Inspirum\Balikobot\Exception\Exception
74
     */
75
    public function orderShipmentByPackageIds(string $carrier, array $packageIds): OrderedShipment;
76
77
    /**
78
     * Get packages which was not yet sent
79
     *
80
     * @throws \Inspirum\Balikobot\Exception\Exception
81
     */
82
    public function getOverview(string $carrier): PackageCollection;
83
84
    /**
85
     * Get labels PDF link for packages
86
     *
87
     * @throws \Inspirum\Balikobot\Exception\Exception
88
     */
89
    public function getLabels(PackageCollection $packages): string;
90
91
    /**
92
     * Get labels PDF link for packages by theirs IDs
93
     *
94
     * @param list<string> $packageIds
95
     *
96
     * @throws \Inspirum\Balikobot\Exception\Exception
97
     */
98
    public function getLabelsByPackageIds(string $carrier, array $packageIds): string;
99
100
    /**
101
     * Get complete information about a package
102
     *
103
     * @throws \Inspirum\Balikobot\Exception\Exception
104
     */
105
    public function getPackageInfo(Package $package): PackageData;
106
107
    /**
108
     * Get complete information about a package by its package ID
109
     *
110
     * @throws \Inspirum\Balikobot\Exception\Exception
111
     */
112
    public function getPackageInfoByPackageId(string $carrier, string $packageId): PackageData;
113
114
    /**
115
     * Get complete information about a package by its carrier ID
116
     *
117
     * @throws \Inspirum\Balikobot\Exception\Exception
118
     */
119
    public function getPackageInfoByCarrierId(string $carrier, string $carrierId): PackageData;
120
121
    /**
122
     * Gets complete information about an ordered package
123
     *
124
     * @throws \Inspirum\Balikobot\Exception\Exception
125
     */
126
    public function getOrder(string $carrier, string $orderId): OrderedShipment;
127
128
    /**
129
     * Get PDF link with signed consignment delivery document by the recipient
130
     *
131
     * @throws \Inspirum\Balikobot\Exception\Exception
132
     */
133
    public function getProofOfDelivery(Package $package): string;
134
135
    /**
136
     * Get PDF links with signed consignment delivery document by the recipient
137
     *
138
     * @return list<string>
139
     *
140
     * @throws \Inspirum\Balikobot\Exception\Exception
141
     */
142
    public function getProofOfDeliveries(PackageCollection $packages): array;
143
144
    /**
145
     * Get PDF link with signed consignment delivery document by the recipient by carrier IDs
146
     *
147
     * @throws \Inspirum\Balikobot\Exception\Exception
148
     */
149
    public function getProofOfDeliveryByCarrierId(string $carrier, string $carrierId): string;
150
151
    /**
152
     * Get PDF links with signed consignment delivery document by the recipient by carrier ID
153
     *
154
     * @param list<string> $carrierIds
155
     *
156
     * @return list<string>
157
     *
158
     * @throws \Inspirum\Balikobot\Exception\Exception
159
     */
160
    public function getProofOfDeliveriesByCarrierIds(string $carrier, array $carrierIds): array;
161
162
    /**
163
     * Get the price of carriage at consignment level
164
     *
165
     * @throws \Inspirum\Balikobot\Exception\Exception
166
     */
167
    public function getTransportCosts(PackageDataCollection $packages): TransportCostCollection;
168
169
    /**
170
     * Order a pickup for packages
171
     *
172
     * @throws \Inspirum\Balikobot\Exception\Exception
173
     */
174
    public function orderPickup(
175
        string $carrier,
176
        DateTimeInterface $dateFrom,
177
        DateTimeInterface $dateTo,
178
        float $weight,
179
        int $packageCount,
180
        ?string $message = null,
181
    ): void;
182
183
    /**
184
     * Order shipments from place B (typically supplier / previous consignee) to place A (shipping point)
185
     *
186
     * @throws \Inspirum\Balikobot\Exception\Exception
187
     */
188
    public function orderB2AShipment(PackageDataCollection $packages): PackageCollection;
189
190
    /**
191
     * Order shipments from place B (typically supplier / previous consignee) to place C (address other than shipping point)
192
     *
193
     * @throws \Inspirum\Balikobot\Exception\Exception
194
     */
195
    public function orderB2CShipment(PackageDataCollection $packages): PackageCollection;
196
197
    /**
198
     * Check if packages data are valid for B2A
199
     *
200
     * @throws \Inspirum\Balikobot\Exception\Exception
201
     */
202
    public function checkB2APackages(PackageDataCollection $packages): void;
203
204
    /**
205
     * Check if packages data are valid for B2C
206
     *
207
     * @throws \Inspirum\Balikobot\Exception\Exception
208
     */
209
    public function checkB2CPackages(PackageDataCollection $packages): void;
210
}
211