Add transaction timestamp to Subscription output #370
- I assumed that there is always an existing transaction (or unconfirmed transaction) (transactionId = subscriptionId).
- I implemented the additional tx information only for the mentioned endpoint
getSubscription. - I introduced a new AccountDto class which is delivered in the JSON data as a possible future improvement of the data format and code.
- That means ALL subscription JSON objects deliver now a
senderAccountobject and arecipientAccountobject. - This data is now redundant to be backward compatible but you could think about that to go for a new API version in the future.
- I wrote a test to ensure that the JSON data is correctly created (and still backward compatible).
- I added Lombok to the maven pom to reduce boilerplate code. That means when integrating my changes you and other devs need to install the Lombok plugin into your IDE.
- You should then have a look at my code, maybe there are some things to use for future developments (e.g. using a data transfer object class).
example data (old):
{"id":"9223372036854775807","sender":"123456789","senderRS":"BURST-RMAP-225P-CQQP-22222", "recipient":"23456789","recipientRS":"BURST-DV2P-222Q-DTX3-22222", "amountNQT":"321","frequency":4,"timeNext":5} example data (new):
{"id":"9223372036854775807","sender":"123456789","senderRS":"BURST-RMAP-225P-CQQP-22222","senderAccount":{"id":"123456789","idRS":"BURST-RMAP-225P-CQQP-22222"},"recipient":"23456789","recipientRS":"BURST-DV2P-222Q-DTX3-22222","recipientAccount":{"id":"23456789","idRS":"BURST-DV2P-222Q-DTX3-22222"},"amountNQT":"321","frequency":4,"timeNext":5,"timestamp":1623878907,"blockTimestamp":1623878900}
@jjos2372 is this something relevant?! PR is stale already... maybe we can close it
@ohager do we still need this change or will we cover that in a different way - now we have the Openaapi ?
added to 3.5.2 beta2
Stale.... and very old! I think we updated that differenlty already after so long time. @jjos2372 Closing?! I recommend.
We should be better on reviews by other contributors.
Close due to stale. Hurts me a bit to see a PR pending for so much time, and finally not accepting a community members contribution... but bigger changes are coming in. We might review the idea of adding more info to subscriptions.