Currently, line item data (LIN segments, and the ones related to them, like QTY and PRI) is being stored together with normal data in gruopedSegments
.
However, the line items data does not follow the structure of normal grouped segments:
// normal segments:
[
...
'RFF' => [
'ADE' => RFFReference(...),
'PD' => RFFReference(...),
],
...
]
// line item data
[
...
'LIN' => [
'1' => [
'LIN' => [ '1' => LINLineItem(...)],
'QTY' => ['21' => QTYQuantity(...), ... ],
...
],
],
...
]
What we could do instead is have all the line item data under a separate field in TransactionMessage
, let's say lineItems
. And the structure might look like this:
TransactionMessage(
groupedSegments => [...],
lineItems => [
'1' => [
'LIN' => [ '1' => LINLineItem(...)],
'QTY' => ['21' => QTYQuantity(...), ... ],
...
],
]
)