NAME

Business::Fixflo::Resource

DESCRIPTION

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

ATTRIBUTES

client
url
url_no_id

METHODS

to_hash

Returns a hash representation of the object.

my %data = $Issue->to_hash;

to_json

Returns a json string representation of the object.

my $json = $Issue->to_json;

get

Populates the object with its attributes (calls the API)

$Issue->get

As the data returned in the call to list objects does not contain the full data of the objects (it only contains lightweight information, such as the URLs of the objects you are interested in) you need to call the ->get method to populate the attributes on an object. Really the Paginator just contains a list of URLs and an easy way to navigate through them.

Note that Fixflo have a habit of updating their API to add new attributes to the entities - these would normally cause the parsing of the envelope data to throw an exception, but a check is in place to defend against this. If you want to see warnings about those then set warn_unknown_attributes on this Resource object (a boolean, which defaults to false).

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-fixflo