NAME

Business::GoCardless::Resource

DESCRIPTION

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

ATTRIBUTES

endpoint

The gocardless API endpoint that corresponds to the resource, for example a Business::GoCardless::Bill object will have an endpoint of "bills". This is handled automatically, you do not need to pass this unless the name of the resource differs significantly from the endpoint.

client

The client object, defaults to Business::GoCardless::Client.

METHODS

find_with_client

Calls the gocardless API and populates the resource object with the data.

my $Bill = Business::GoCardless::Bill->new( client => $self->client );
$Bill->find_with_client;

to_hash

Returns a hash representation of the object.

my %data = $Bill->to_hash;

to_json

Returns a json string representation of the object.

my $json = $Bill->to_json;

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/Humanstate/business-gocardless