[freeside-commits] branch master updated. 7dd7870cac67454c84c1dc3b3003a64a61b3451f

Ivan ivan at 420.am
Mon May 22 18:22:30 PDT 2017


The branch, master has been updated
       via  7dd7870cac67454c84c1dc3b3003a64a61b3451f (commit)
      from  b47863eafb08949924bf24eb77c90f0366770389 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7dd7870cac67454c84c1dc3b3003a64a61b3451f
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon May 22 18:22:29 2017 -0700

    better vitelity error messages, just depend on Net::Vitelity, RT#75901

diff --git a/FS/FS/part_export/vitelity.pm b/FS/FS/part_export/vitelity.pm
index cef9ae8..8d802b1 100644
--- a/FS/FS/part_export/vitelity.pm
+++ b/FS/FS/part_export/vitelity.pm
@@ -4,6 +4,7 @@ use base qw( FS::part_export );
 use vars qw( %info );
 use Tie::IxHash;
 use Geo::StreetAddress::US;
+use Net::Vitelity;
 use FS::Record qw( qsearch dbh );
 use FS::phone_avail;
 use FS::svc_phone;
@@ -32,10 +33,6 @@ tie my %options, 'Tie::IxHash',
   'options'    => \%options,
   'no_machine' => 1,
   'notes'      => <<'END'
-Requires installation of
-<a href="http://search.cpan.org/dist/Net-Vitelity">Net::Vitelity</a>
-from CPAN.
-<br><br>
 routesip - optional Vitelity sub-account to which newly ordered DIDs will be routed
 <br>type - optional DID type (perminute, unlimited, or your-pri)
 END
@@ -60,7 +57,7 @@ sub get_dids {
     return [] if ( $tollfree[0] eq 'noneavailable' || $tollfree[0] eq 'none');
 
     foreach my $did ( @tollfree ) {
-        $did =~ /^(\d{3})(\d{3})(\d{4})/ or die "unparsable did $did\n";
+        $did =~ /^(\d{3})(\d{3})(\d{4})/ or die "unparsable toll-free did $did\n";
         push @ret, $did;
     }
 
@@ -100,7 +97,7 @@ sub get_dids {
     die "missingdata error running Vitelity API" if $dids[0] eq 'missingdata';
 
     foreach my $did ( @dids ) {
-      $did =~ /^(\d{3})(\d{3})(\d{4})/ or die "unparsable did $did\n";
+      $did =~ /^(\d{3})(\d{3})(\d{4})/ or die "unparsable (state and ratecenter) did $did\n";
       my($npa, $nxx, $station) = ($1, $2, $3);
 
       my $phone_avail = new FS::phone_avail {
@@ -210,7 +207,7 @@ sub get_dids {
       }
 
       foreach my $did ( @dids ) {
-        $did =~ /^(\d{3})(\d{3})(\d{4})/ or die "unparsable did $did\n";
+        $did =~ /^(\d{3})(\d{3})(\d{4})/ or die "unparsable (state) did $did\n";
         my($npa, $nxx, $station) = ($1, $2, $3);
         $npa{$npa}++;
 
@@ -248,9 +245,6 @@ sub get_dids {
 sub vitelity_command {
   my( $self, $command, @args ) = @_;
 
-  eval "use Net::Vitelity;";
-  die $@ if $@;
-
   my $vitelity = Net::Vitelity->new(
     'login' => $self->option('login'),
     'pass'  => $self->option('pass'),
@@ -264,9 +258,6 @@ sub vitelity_command {
 sub vitelity_lnp_command {
   my( $self, $command, @args ) = @_;
 
-  eval "use Net::Vitelity 0.04;";
-  die $@ if $@;
-
   my $vitelity = Net::Vitelity->new(
     'login'   => $self->option('login'),
     'pass'    => $self->option('pass'),
diff --git a/debian/control b/debian/control
index 503e14d..e52dd87 100644
--- a/debian/control
+++ b/debian/control
@@ -98,7 +98,8 @@ Depends: aspell-en,gnupg,ghostscript,gsfonts,gzip,latex-xcolor,
  libtry-tiny-perl, libnumber-phone-perl, libxml-libxml-simple-perl,
  libxml-writer-perl, libio-socket-ssl-perl,
  libmap-splat-perl, libdatetime-format-ical-perl, librest-client-perl,
- libgeo-streetaddress-us-perl, libbusiness-onlinepayment-perl
+ libgeo-streetaddress-us-perl, libbusiness-onlinepayment-perl,
+ libnet-vitelity-perl
 Conflicts: libparams-classify-perl (>= 0.013-6)
 Replaces: freeside (<<4)
 Breaks: freeside (<<4)

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/part_export/vitelity.pm |   17 ++++-------------
 debian/control                |    3 ++-
 2 files changed, 6 insertions(+), 14 deletions(-)




More information about the freeside-commits mailing list