Net-Simplify
view release on metacpan or search on metacpan
lib/Net/Simplify/InvoiceItem.pm view on Meta::CPAN
package Net::Simplify::InvoiceItem;
=head1 NAME
Net::Simplify::InvoiceItem - A Simplify Commerce InvoiceItem object
=head1 SYNOPSIS
use Net::Simplify;
$Net::Simplify::public_key = 'YOUR PUBLIC KEY';
$Net::Simplify::private_key = 'YOUR PRIVATE KEY';
# Create a new InvoiceItem.
my $invoice_item = Net::Simplify::InvoiceItem->create{ {...});
# Retrieve a InvoiceItem given its ID.
my $invoice_item = Net::Simplify::InvoiceItem->find('a7e41');
# Update existing InvoiceItem.
my $invoice_item = Net::Simplify::InvoiceItem->find('a7e41');
$invoice_item->{PROPERTY} = "NEW VALUE";
$invoice_item->update();
# Delete
my $invoice_item = Net::Simplify::InvoiceItem->find('a7e41');
$invoice_item->delete();
=head1 DESCRIPTION
=head2 METHODS
=head3 create(%params, $auth)
Creates a C<Net::Simplify::InvoiceItem> object. The parameters are:
=over 4
=item C<%params>
Hash map containing initial values for the object. Valid keys are:
=over 4
=item amount
Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00 (B<required>)
=item description
Individual items of an invoice [max length: 1024]
=item invoice
The ID of the invoice this item belongs to.
=item product
Product ID this item relates to.
=item quantity
Quantity of the item. This total amount of the invoice item is the amount * quantity. [min value: 1, max value: 999999, default: 1]
=item reference
User defined reference field. [max length: 255]
=item tax
The tax ID of the tax charge in the invoice item.
=back
=item C<$auth>
Authentication object for accessing the API. If no value is passed the global keys
C<$Net::Simplify::public_key> and C<$Net::Simplify::private_key> are used.
=back
=head3 delete()
Deletes the C<Net::Simplify::InvoiceItem> object. Authentication is done using the same credentials used when the AccessToken was created.
=head3 find($id, $auth)
Retrieve a C<Net::Simplify::InvoiceItem> object from the API. Parameters are:
=over 4
=item C<$id>
Identifier of the object to retrieve.
=item C<$auth>
Authentication object for accessing the API. If no value is passed the global keys
C<$Net::Simplify::public_key> and C<$Net::Simplify::private_key> are used.
=back
=head3 update()
Update C<Net::Simplify::InvoiceItem> object.
The properties that can be updated are:
=over 4
=item C<amount>
Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00 [min value: 1]
=item C<description>
Individual items of an invoice
=item C<quantity>
Quantity of the item. This total amount of the invoice item is the amount * quantity. [min value: 1, max value: 999999]
=item C<reference>
User defined reference field.
=item C<tax>
The tax ID of the tax charge in the invoice item.
Authentication is done using the same credentials used when the AccessToken was created.
=back
=head1 SEE ALSO
L<Net::Simplify>,
L<Net::Simplify::Domain>,
L<Net::Simplify::DomainList>,
L<Net::Simplify::Authentication>,
L<Net::Simplify::ApiException>,
L<http://www.simplify.com>
=head1 VERSION
1.6.0
=head1 LICENSE
Copyright (c) 2013 - 2022 MasterCard International Incorporated
All rights reserved.
( run in 2.155 seconds using v1.01-cache-2.11-cpan-cdf2f3d4e48 )