File tree 3 files changed +11
-7
lines changed
3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 8
8
trait Create
9
9
{
10
10
11
- public function create (array $ data, array $ additionalData = [] )
11
+ public function create (array $ data )
12
12
{
13
13
$ data = $ this ->objectToPayload ($ data );
14
14
15
- return $ this ->client ->post (
15
+ $ response = $ this ->client ->post (
16
16
$ this ->path (),
17
17
$ data
18
18
);
19
+
20
+ return $ this ->payloadToObject ($ response );
19
21
}
20
22
21
23
}
Original file line number Diff line number Diff line change @@ -10,9 +10,11 @@ trait Delete
10
10
11
11
public function delete (int $ id )
12
12
{
13
- return $ this ->client ->delete (
13
+ $ response = $ this ->client ->delete (
14
14
$ this ->path ($ id )
15
15
);
16
+
17
+ return $ this ->payloadToObject ($ response );
16
18
}
17
19
18
20
}
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ trait Get
10
10
11
11
public function get (int $ id )
12
12
{
13
- return $ this ->payloadToObject (
14
- $ this ->client ->get (
15
- $ this ->path ($ id )
16
- )
13
+ $ response = $ this ->client ->get (
14
+ $ this ->path ($ id )
17
15
);
16
+
17
+ return $ this ->payloadToObject ($ response );
18
18
}
19
19
20
20
}
You can’t perform that action at this time.
0 commit comments