Net::FreshBooks::API::Role::LineItem - Line Item roles


Net-FreshBooks-API documentation Contained in the Net-FreshBooks-API distribution.

Index


Code Index:

NAME

Top

Net::FreshBooks::API::Role::LineItem - Line Item roles

VERSION

Top

version 0.21

SYNOPSIS

Top

Provides line item functionality to Invoices and Estimates. See those modules for specific examples of how to use this method.

add_line( $args)

AUTHORS

Top

COPYRIGHT AND LICENSE

Top


Net-FreshBooks-API documentation Contained in the Net-FreshBooks-API distribution.

use strict;
use warnings;

package Net::FreshBooks::API::Role::LineItem;
BEGIN {
  $Net::FreshBooks::API::Role::LineItem::VERSION = '0.21';
}

use Moose::Role;
use Net::FreshBooks::API::InvoiceLine;
use Data::Dump qw( dump );

sub add_line {
    my $self      = shift;
    my $line_args = shift;

    push @{ $self->{lines} ||= [] },
        Net::FreshBooks::API::InvoiceLine->new($line_args);

    return 1;
}

1;

# ABSTRACT: Line Item roles


__END__