Net::FreshBooks::API::Recurring - FreshBooks Recurring Items


    use Net::FreshBooks::API;
    use Net::FreshBooks::API::InvoiceLine;
    use DateTime;
    # You will not access this module directly, but rather fetch an object via
    # its parent class, Net::FreshBooks::API
    # auth_token and account_name come from FreshBooks
    my $fb = Net::FreshBooks::API->new(
        {   auth_token   => $auth_token,
            account_name => $account_name,

    # create a new client
    my $client = $fb->client->create(
        {   first_name   => 'Larry',
            last_name    => 'Wall',
            organization => 'Perl HQ',
            email        => '',
    # create a recurring item
    use Net::FreshBooks::API;
    my $line = Net::FreshBooks::API::InvoiceLine->new({
        name         => "Widget",
        description  => "Net::FreshBooks::API Widget",
        unit_cost    => '1.99',
        quantity     => 1,
        tax1_name    => "GST",
        tax1_percent => 5,
    # use the client object from the previous example

    my $recurring_item = $fb->recurring->create({
        client_id   => $client->client_id,
        date        => DateTime->now->add( days => 2 )->ymd, # YYYY-MM-DD
        frequency   => 'monthly',
        lines       => [ $line ],
        notes       => 'Created by Net::FreshBooks::API',
    $recurring_item->po_number( 999 );
    See also L<Net::FreshBooks::API::Base> for other available methods, such
    as create, update, get, list and delete.


    Olaf Alders


Thanks to Edmund von der Burg for doing all of the hard work to get this module going and for allowing me to act as a co-maintainer.

Thanks to Raybec Communications for funding my work on this module and for releasing it to the world.


This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.