Skip to content

Commit

Permalink
Merge pull request #10 from devi4nt/feature/account-type
Browse files Browse the repository at this point in the history
added account_type param for accounts request
  • Loading branch information
Lee J committed Feb 28, 2018
2 parents a99bb8b + 6c70fe3 commit 529ec24
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/Business/Monzo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -270,16 +270,18 @@ sub transaction {

=head2 accounts
$monzo->accounts;
$monzo->accounts; # all accounts
$monzo->accounts( account_type => "uk_prepaid" ); # prepaid accounts
$monzo->accounts( account_type => "uk_retail" ); # current accounts
Get a list of accounts. Will return a list of L<Business::Monzo::Account>
objects
=cut

sub accounts {
my ( $self ) = @_;
return $self->client->_get_accounts;
my ( $self,%params ) = @_;
return $self->client->_get_accounts( \%params );
}

=head2 pots
Expand Down

0 comments on commit 529ec24

Please sign in to comment.