File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ class Tracking extends Auth
10
10
{
11
11
private TrackingQuery $ query ;
12
12
private ?string $ trackingNumber ;
13
+ private object $ apiResponse ;
13
14
14
15
public function __construct ()
15
16
{
@@ -51,7 +52,7 @@ public function fetch(string $client_id, string $client_secret): array
51
52
]);
52
53
$ httpClient ->setUrl ($ this ->_getAPIBaseURL () . "/api/track/v1/details/ " . $ this ->trackingNumber . $ queryParams );
53
54
$ httpClient ->setMethod ("GET " );
54
- $ res = $ httpClient ->fetch ();
55
+ $ this -> apiResponse = $ res = $ httpClient ->fetch ();
55
56
56
57
if (!isset ($ res ->trackResponse )) {
57
58
if (isset ($ res ->response )) {
@@ -82,4 +83,9 @@ public function setMode(string $mode): self
82
83
parent ::setMode ($ mode );
83
84
return $ this ;
84
85
}
86
+
87
+ public function getResponse (): string
88
+ {
89
+ return json_encode ($ this ->apiResponse );
90
+ }
85
91
}
You can’t perform that action at this time.
0 commit comments