Business-Shipping

 view release on metacpan or  search on metacpan

t/210-USPS_Online-basic.t  view on Meta::CPAN

use warnings;
use Test::More;
use Carp;
use Business::Shipping;
use Data::Dumper;
use Scalar::Util qw(blessed);

plan skip_all => 'Required modules not installed'
    unless Business::Shipping::Config::calc_req_mod('USPS_Online');

plan skip_all => 'No credentials'
    unless $ENV{USPS_USER_ID} and $ENV{USPS_PASSWORD};

plan skip_all => 'Slow tests. Set TEST_SLOW to run.'
    unless $ENV{TEST_SLOW};

plan 'no_plan';

#goto letter_is_cheaper;

{

t/220-USPS_Online_Tracking.t  view on Meta::CPAN


use strict;
use warnings;
use Test::More;
use Carp;
use Scalar::Util qw(blessed);
use Business::Shipping;

plan skip_all => ''
    unless Business::Shipping::Config::calc_req_mod('USPS_Online');
plan skip_all => 'No credentials'
    unless $ENV{USPS_USER_ID} and $ENV{USPS_PASSWORD};
plan 'no_plan';

use_ok('Business::Shipping::USPS_Online::Tracking');

my $tracker = Business::Shipping::USPS_Online::Tracking->new();
is( blessed($tracker),
    'Business::Shipping::USPS_Online::Tracking',
    'Get new Tracking object'
);

t/310-UPS_Online-basic.t  view on Meta::CPAN


use strict;
use warnings;
use Test::More;
use Carp;
use Data::Dumper;
use Business::Shipping;

plan skip_all => 'Required modules not installed'
    unless Business::Shipping::Config::calc_req_mod('UPS_Online');
plan skip_all => 'No credentials'
    unless $ENV{UPS_USER_ID}
        and $ENV{UPS_PASSWORD}
        and $ENV{UPS_ACCESS_KEY};

plan skip_all => 'Slow tests. Set TEST_SLOW to run.'
    unless $ENV{TEST_SLOW};

plan 'no_plan';

$::debug = 0;

t/311-UPS_Online-shop.t  view on Meta::CPAN

# UPS_Online RateRequest - some basic "shop" tests.

use strict;
use warnings;
use Test::More;
use Carp;
use Business::Shipping;

plan skip_all => ''
    unless Business::Shipping::Config::calc_req_mod('USPS_Online');
plan skip_all => 'No credentials'
    unless $ENV{UPS_USER_ID}
        and $ENV{UPS_PASSWORD}
        and $ENV{UPS_ACCESS_KEY};
plan 'no_plan';

{
    my $rr_shop = Business::Shipping->rate_request(
        service    => 'shop',
        shipper    => 'UPS_Online',
        from_zip   => '98682',

t/312-UPS-Online-COD.t  view on Meta::CPAN

# UPS_Online RateRequest A few Cash On Delivery tests.

use strict;
use warnings;
use Test::More;
use Carp;
use Business::Shipping;

plan skip_all => ''
    unless Business::Shipping::Config::calc_req_mod('USPS_Online');
plan skip_all => 'No credentials'
    unless $ENV{UPS_USER_ID}
        and $ENV{UPS_PASSWORD}
        and $ENV{UPS_ACCESS_KEY};
plan 'no_plan';

my $rr_shop = Business::Shipping->rate_request(
    service        => 'shop',
    shipper        => 'UPS_Online',
    from_zip       => '98682',
    to_zip         => '98270',

t/320-UPS_Online-Tracking.t  view on Meta::CPAN

# UPS_Online Tracking - some basic tests.

use strict;
use warnings;
use Test::More;
use Carp;
use Business::Shipping;

plan skip_all => 'Required modules not installed'
    unless Business::Shipping::Config::calc_req_mod('UPS_Online');
plan skip_all => 'No credentials'
    unless $ENV{UPS_USER_ID}
        and $ENV{UPS_PASSWORD}
        and $ENV{UPS_ACCESS_KEY};

#plan skip_all => 'SLOW_TESTS is not set, skipping.' unless $ENV{SLOW_TESTS};
plan 'no_plan';

#Business::Shipping->log_level('DEBUG');

use_ok('Business::Shipping::UPS_Online::Tracking');

t/410-UPS_Offline-Rate.t  view on Meta::CPAN


plan skip_all => 'DataFiles version 1.02+ is required.'
    unless $Business::Shipping::DataFiles::VERSION >= 1.02;

plan 'no_plan';

$::UPS_Online = 1 if Business::Shipping::Config::calc_req_mod('UPS_Online');

unless ($ENV{UPS_USER_ID} and $ENV{UPS_PASSWORD} and $ENV{UPS_ACCESS_KEY}) {
    $::UPS_Online     = 0;
    $::UPS_Online_msg = 'No credentials. Set three UPS_* variables to run.';
}

if ($ENV{DISABLE_UPS_ONLINE}) {
    $::UPS_Online     = 0;
    $::UPS_Online_msg = 'Comparison to UPS_Online is disabled. '
        . 'Unset DISABLE_UPS_ONLINE to run.';
}

if (not $ENV{TEST_SLOW}) {
    $::UPS_Online = 0;

t/910-Interchange-sim.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;

plan skip_all => 'missing required modules'
    unless Business::Shipping::Config::calc_req_mod('UPS_Online');
plan skip_all => ''
    unless Business::Shipping::Config::calc_req_mod('USPS_Online');
plan skip_all => ''
    unless Business::Shipping::Config::calc_req_mod('UPS_Offline');
plan skip_all => 'No credentials'
    unless $ENV{UPS_USER_ID}
        and $ENV{UPS_PASSWORD}
        and $ENV{UPS_ACCESS_KEY};
plan 'no_plan';

# Setup Interchange Environment Simulation
use Data::Dumper;
our $Values   = {};
our $Variable = {};
our $Session  = {};



( run in 0.282 second using v1.01-cache-2.11-cpan-4d50c553e7e )