@@ -27,8 +27,8 @@ class Item implements XmlSerializable
27
27
/** @var string|null Sellers item identification. */
28
28
private ?string $ sellersItemIdentification = null ;
29
29
30
- /** @var ClassifiedTaxCategory |null Classified tax category. */
31
- private ?ClassifiedTaxCategory $ classifiedTaxCategory = null ;
30
+ /** @var array |null Classified tax category. */
31
+ private ?array $ classifiedTaxCategory = [] ;
32
32
33
33
/**
34
34
* Set the item description.
@@ -159,10 +159,10 @@ public function getSellersItemIdentification(): ?string
159
159
/**
160
160
* Set the classified tax category.
161
161
*
162
- * @param ClassifiedTaxCategory |null $classifiedTaxCategory
162
+ * @param array |null $classifiedTaxCategory
163
163
* @return self
164
164
*/
165
- public function setClassifiedTaxCategory (?ClassifiedTaxCategory $ classifiedTaxCategory ): self
165
+ public function setClassifiedTaxCategory (?array $ classifiedTaxCategory ): self
166
166
{
167
167
$ this ->classifiedTaxCategory = $ classifiedTaxCategory ;
168
168
return $ this ;
@@ -171,9 +171,9 @@ public function setClassifiedTaxCategory(?ClassifiedTaxCategory $classifiedTaxCa
171
171
/**
172
172
* Get the classified tax category.
173
173
*
174
- * @return ClassifiedTaxCategory |null
174
+ * @return array |null
175
175
*/
176
- public function getClassifiedTaxCategory (): ?ClassifiedTaxCategory
176
+ public function getClassifiedTaxCategory (): ?array
177
177
{
178
178
return $ this ->classifiedTaxCategory ;
179
179
}
@@ -227,9 +227,11 @@ public function xmlSerialize(Writer $writer): void
227
227
228
228
// Write ClassifiedTaxCategory element if provided.
229
229
if (!empty ($ this ->classifiedTaxCategory )) {
230
- $ writer ->write ([
231
- Schema::CAC . 'ClassifiedTaxCategory ' => $ this ->classifiedTaxCategory ,
232
- ]);
230
+ foreach ($ this ->classifiedTaxCategory as $ classifiedTaxCategory ){
231
+ $ writer ->write ([
232
+ Schema::CAC . 'ClassifiedTaxCategory ' => $ classifiedTaxCategory
233
+ ]);
234
+ }
233
235
}
234
236
}
235
237
}
0 commit comments