add debug flag, RT#73618
authorIvan Kohler <ivan@freeside.biz>
Tue, 23 May 2017 18:47:03 +0000 (11:47 -0700)
committerIvan Kohler <ivan@freeside.biz>
Tue, 23 May 2017 18:47:03 +0000 (11:47 -0700)
FS/FS/part_export/vitelity.pm
debian/control

index 8d802b1..089e109 100644 (file)
@@ -4,7 +4,7 @@ use base qw( FS::part_export );
 use vars qw( %info );
 use Tie::IxHash;
 use Geo::StreetAddress::US;
 use vars qw( %info );
 use Tie::IxHash;
 use Geo::StreetAddress::US;
-use Net::Vitelity;
+use Net::Vitelity 0.05;
 use FS::Record qw( qsearch dbh );
 use FS::phone_avail;
 use FS::svc_phone;
 use FS::Record qw( qsearch dbh );
 use FS::phone_avail;
 use FS::svc_phone;
@@ -25,6 +25,10 @@ tie my %options, 'Tie::IxHash',
   'disable_e911'       => { label => "Disable E911 provisioning",
                             type  => 'checkbox',
                           },
   'disable_e911'       => { label => "Disable E911 provisioning",
                             type  => 'checkbox',
                           },
+  'debug'              => { label  => 'Enable debugging',
+                             type  => 'checkbox',
+                             value => 1,
+                          },
 ;
 
 %info = (
 ;
 
 %info = (
@@ -246,10 +250,10 @@ sub vitelity_command {
   my( $self, $command, @args ) = @_;
 
   my $vitelity = Net::Vitelity->new(
   my( $self, $command, @args ) = @_;
 
   my $vitelity = Net::Vitelity->new(
-    'login' => $self->option('login'),
-    'pass'  => $self->option('pass'),
-    'apitype' => $self->option('fax') ? 'fax' : 'api',
-    #'debug'    => $debug,
+    'login'    => $self->option('login'),
+    'pass'     => $self->option('pass'),
+    'apitype'  => $self->option('fax') ? 'fax' : 'api',
+    'debug'    => $self->option('debug'),
   );
 
   $vitelity->$command(@args);
   );
 
   $vitelity->$command(@args);
@@ -259,10 +263,10 @@ sub vitelity_lnp_command {
   my( $self, $command, @args ) = @_;
 
   my $vitelity = Net::Vitelity->new(
   my( $self, $command, @args ) = @_;
 
   my $vitelity = Net::Vitelity->new(
-    'login'   => $self->option('login'),
-    'pass'    => $self->option('pass'),
-    'apitype' => 'lnp',
-    #'debug'   => $debug,
+    'login'    => $self->option('login'),
+    'pass'     => $self->option('pass'),
+    'apitype'  => 'lnp',
+    'debug'    => $self->option('debug'),
   );
 
   $vitelity->$command(@args);
   );
 
   $vitelity->$command(@args);
index e52dd87..a268ffd 100644 (file)
@@ -99,7 +99,7 @@ Depends: aspell-en,gnupg,ghostscript,gsfonts,gzip,latex-xcolor,
  libxml-writer-perl, libio-socket-ssl-perl,
  libmap-splat-perl, libdatetime-format-ical-perl, librest-client-perl,
  libgeo-streetaddress-us-perl, libbusiness-onlinepayment-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,
- libnet-vitelity-perl
+ libnet-vitelity-perl (>= 0.05)
 Conflicts: libparams-classify-perl (>= 0.013-6)
 Replaces: freeside (<<4)
 Breaks: freeside (<<4)
 Conflicts: libparams-classify-perl (>= 0.013-6)
 Replaces: freeside (<<4)
 Breaks: freeside (<<4)