We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3905493 commit 93bdb67Copy full SHA for 93bdb67
src/Data/Data.php
@@ -51,6 +51,10 @@ private function transform($item)
51
return $item->toArray();
52
}
53
54
+ if (is_array($item)) {
55
+ return array_map([$this, 'transform'], $item);
56
+ }
57
+
58
return $item;
59
60
src/Data/ParcelItemData.php
@@ -0,0 +1,23 @@
1
+<?php
2
3
+namespace Soved\Laravel\Sendcloud\Data;
4
5
+class ParcelItemData extends Data
6
+{
7
+ public string $description;
8
+ public int $quantity;
9
+ public string $weight;
10
+ public float $value;
11
+ public string $hs_code;
12
+ public string $origin_country;
13
+ public string $sku;
14
+ public string $product_id;
15
+ public string $properties;
16
17
+ public array $required = [
18
+ 'description',
19
+ 'quantity',
20
+ 'weight',
21
+ 'value',
22
+ ];
23
+}
0 commit comments