@@ -33,8 +33,8 @@ class AllowanceCharge implements XmlSerializable
33
33
/** @var TaxTotal|null Tax total information. */
34
34
private ?TaxTotal $ taxTotal = null ;
35
35
36
- /** @var TaxCategory |null Tax category information . */
37
- private ?TaxCategory $ taxCategory = null ;
36
+ /** @var array |null List of tax categories . */
37
+ private ?array $ taxCategory = null ;
38
38
39
39
/**
40
40
* Get the charge indicator.
@@ -191,7 +191,7 @@ public function setAmount(?float $amount): self
191
191
/**
192
192
* Get the tax category.
193
193
*
194
- * @return TaxCategory |null
194
+ * @return array |null
195
195
*/
196
196
public function getTaxCategory (): ?TaxCategory
197
197
{
@@ -204,7 +204,7 @@ public function getTaxCategory(): ?TaxCategory
204
204
* @param TaxCategory|null $taxCategory
205
205
* @return self
206
206
*/
207
- public function setTaxCategory (?TaxCategory $ taxCategory ): self
207
+ public function setTaxCategory (?array $ taxCategory ): self
208
208
{
209
209
$ this ->taxCategory = $ taxCategory ;
210
210
return $ this ;
@@ -276,9 +276,11 @@ public function xmlSerialize(Writer $writer): void
276
276
}
277
277
278
278
if ($ this ->taxCategory !== null ) {
279
- $ writer ->write ([
280
- Schema::CAC . 'TaxCategory ' => $ this ->taxCategory ,
281
- ]);
279
+ foreach ($ this ->taxCategory as $ taxCategory ){
280
+ $ writer ->write ([
281
+ Schema::CAC . 'TaxCategory ' => $ taxCategory
282
+ ]);
283
+ }
282
284
}
283
285
284
286
if ($ this ->taxTotal !== null ) {
@@ -299,4 +301,4 @@ public function xmlSerialize(Writer $writer): void
299
301
]);
300
302
}
301
303
}
302
- }
304
+ }
0 commit comments