Simplify Api#create_transaction_for
by improving the transaction ID generator
#168
Labels
enhancement
New feature or request
In our extensions's
Api#create_transaction_for(order)
method, we noticed that we need to callOrderTransaction.latest_for(order)&.transaction_id
in order to check if we already have a transaction reported.We think that we can optimize our
TransactionIdGenerator.next_transaction_id
method to just always call `OrderTransaction.latest_for(order)&.transaction_id so that our API wrapper doesn't need to know about it.Before:
After:
The text was updated successfully, but these errors were encountered: