Closed dturanski closed 3 years ago
I figured it out so closing. It would help to include this in the generation docs. Thanks, this library is very useful.
I figured it out so closing. It would help to include this in the generation docs. Thanks, this library is very useful.
Maybe post how you did it here and/or create a PR to address the gap?
Glad you got it figured out. I suppose the documentation is a bit subpar in this respect... I was trying to explain it over here in this section:
Contained aggregates that are allowed to appear more than once are instead defined with a validator of type ListAggregate, and accessed via the Python list API. Unique children are defined in the usual manner, and accessed as instance attributes.
So the lists are constructed accordingly.... list contents are passed as args
, and the other children are passed as kwargs
, something like:
stmttrn1 = STMTTRN(...)
stmttrn2 = STMTTRN(...)
dtend = datetime.now()
dtstart = dtend - timedelta(days=30)
banktranlist = BANKTRANLIST(stmttrn1, stmttrn2, dtstart=dtstart, dtend=dtend)
It all seems obvious to me, naturally, since I wrote it.... Suggestions for improvement or clarification are of course welcome.
In my case, I append the STMTTRN
s to a transaction-list
, the list must be prefixed with *
to unpack it before calling BANKTRANLIST
.
bank_tran_list = BANKTRANLIST(*statement_transactions, dtstart=statement_start_date, dtend=statement_end_date)
I see
banktranlist
is a kwarg forSTMTRS
. How do you create a sub-element like below?