Business-Tax-Avalara
view release on metacpan or search on metacpan
lib/Business/Tax/Avalara.pm view on Meta::CPAN
package Business::Tax::Avalara;
use 5.010;
use strict;
use warnings;
use Try::Tiny;
use Carp;
use LWP;
use HTTP::Request::Common;
use Encode qw();
use Data::Dump;
use JSON::PP;
=head1 NAME
Business::Tax::Avalara - An interface to Avalara's REST webservice
=head1 SYNOPSYS
use Business::Tax::Avalara;
my $avalara_gateway = Business::Tax::Avalara->new(
customer_code => $customer_code,
company_code => $company_code,
user_name => $user_name,
password => $password,
origin_address =>
{
line_1 => '1313 Mockingbird Lane',
postal_code => '98765',
},
);
my $tax_results = $avalara_gateway->get_tax(
destination_address =>
{
line_1 => '42 Evergreen Terrace',
city => 'Springfield',
postal_code => '12345',
},
cart_lines =>
[
{
sku => '42ACE',
quantity => 1,
amount => '8.99',
},
{
sku => '9FCE2',
quantity => 2,
amount => '38.98',
}
],
);
=head1 DESCRIPTION
Business::Tax::Avalara is a simple interface to Avalara's REST-based sales tax webservice.
It takes in a perl hash of data to send to Avalara, generates the JSON, fetches a response,
and converts that back into a perl hash structure.
This module only supports the 'get_tax' method at the moment.
=head1 VERSION
( run in 1.239 second using v1.01-cache-2.11-cpan-800906f7e73 )