Skip to content

Conversation

@andrewheald
Copy link

Hi Murray. Thanks for the gem. I've raised this tiny PR to add the ability to get all of the merchant details for all of the transactions in one go, like this:
Monzo::Transaction.all('acc_xxxxxxxxxxxxx', {'expand[]': 'merchant'})
Thanks,
Andrew.

@murraysum
Copy link
Owner

Hey @andrewheald

Thanks for pointing out this missing functionality. I think I would agree that adding a second argument as a hash is the best way to support retrieving the merchant details for a transaction. However, I am unsure whether "expand[]" is the best key name due to the square brackets. I think it exposes implementation details to the caller who doesn't really care about them.

I think a better approach for callers would be:

Monzo::Transaction.all('acc_xxxxxxxxxxxxx', {expand: 'merchant'})

Then the square brackets can be added in the implementation. What do you think? 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants