NAME
Business::Monzo::Account
DESCRIPTION
A class for a Monzo account, extends Business::Monzo::Resource
ATTRIBUTES
The Account class has the following attributes (with their type).
id (Str)
description (Str)
created (DateTime)
Note that when a Str is passed to ->created this will be coerced to a DateTime object.
Operations on an account
add_feed_item
Adds a feed item to the Account. Returns true on success, otherwise will throw an error. Note the required parameters:
$Account->add_feed_item(
account_id => $id, # defaults to $Account->id,
type => $type, # defaults to 'basic'
url => $url, # optional, the URL to open when the item is tapped
params => {
title => $title, # REQUIRED
image_url => $url, # REQUIRED
body => $body_text, # optional
background_color => $hex_value, # optional
title_color => $hex_value, # optional
body_color => $hex_value, # optional
}
);
register_webhook
Registers a webhook against the Account. Returns a Business::Monzo::Webhook object. Note the required parameters:
my $Webhook = $Account->webhooks(
callback_url => 'https://www.example.com/monzo/callback' # REQUIRED
);
webhooks
Returns a list of Business::Monzo::Webhook objects linked to the Account
my @webhooks = $Account->webhooks
transactions
Returns a list of Business::Monzo::Transaction objects for the account
my @transactions = $Account->transactions( %query_params );
balance
Returns a Business::Monzo::Balance object for the account with the attributes populated having called the Monzo API
$Balance = $Account->balance;
SEE ALSO
AUTHOR
Lee Johnson - leejo@cpan.org
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. If you would like to contribute documentation, features, bug fixes, or anything else then please raise an issue / pull request:
https://github.com/leejo/business-monzo