Our store features a number of transactions (authorization, capture, terms ), and an order can have multiple transactions in its history. Example: card is authorized and later captured and maybe even refunded.
The below returns each transaction.kind but I only want the last transaction kind, so that I can display the correct verbiage based upon the current status of the order. I tried transaction.kind.last, but this returned the last letter of each. Not sure why this is making my head spin. Any guidance is appreciated.