NAME

Business::Monzo::Resource

DESCRIPTION

This is a base class for Monzo resource classes, it implements common behaviour. You shouldn't use this class directly, but extend it instead.

ATTRIBUTES

The Resource class has the following attributes (with their type).

client (Business::Monzo::Client) - REQUIRED
url (Str)
url_no_id (Str)

METHODS

to_hash

Returns a hash representation of the object.

my %data = $transaction->to_hash;

as_json

Returns a json string representation of the object.

my $json = $transaction->as_json;

get

Returns a new instance of the object populated with the attributes having called the API

my $populated_object = $object->get;

This is for when you have instantiated an object with the id, so calling the API will retrieve the full details for the entity.

AUTHOR

Lee Johnson - leejo@cpan.org

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