X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Finfostreet.pm;h=51f57605a8c8a0264e022f907c9851aa6f587b03;hb=ffa18709ee8a4d05e18d2d406cf73afe79e52524;hp=caca7c5e13fbc32ca2e3e42c22c0a113f300d817;hpb=eb9668a6f3181ee02cb335272c5ee4616e61fd09;p=freeside.git diff --git a/FS/FS/part_export/infostreet.pm b/FS/FS/part_export/infostreet.pm index caca7c5e1..51f57605a 100644 --- a/FS/FS/part_export/infostreet.pm +++ b/FS/FS/part_export/infostreet.pm @@ -1,11 +1,33 @@ package FS::part_export::infostreet; -use vars qw(@ISA %infostreet2cust_main $DEBUG); +use vars qw(@ISA %info %infostreet2cust_main $DEBUG); +use Tie::IxHash; use FS::UID qw(dbh); use FS::part_export; @ISA = qw(FS::part_export); +tie my %options, 'Tie::IxHash', + 'url' => { label=>'XML-RPC Access URL', }, + 'login' => { label=>'InfoStreet login', }, + 'password' => { label=>'InfoStreet password', }, + 'groupID' => { label=>'InfoStreet groupID', }, +; + +%info = ( + 'svc' => 'svc_acct', + 'desc' => 'Real-time export to InfoStreet streetSmartAPI', + 'options' => \%options, + 'nodomain' => 'Y', + 'no_machine' => 1, + 'notes' => <<'END' +Real-time export to +InfoStreet streetSmartAPI. +Requires installation of +Frontier::Client from CPAN. +END +); + $DEBUG = 0; %infostreet2cust_main = ( @@ -46,7 +68,7 @@ sub _export_insert { $_ => $cust_main->getfield( $infostreet2cust_main{$_} ); } keys %infostreet2cust_main ); - my @emails = grep { $_ ne 'POST' } $cust_main->invoicing_list; + my @emails = grep { $_ !~ /^(POST|FAX)$/ } $cust_main->invoicing_list; $contact_info{'email'} = $emails[0] if @emails; #this one is kinda noment-specific @@ -252,4 +274,5 @@ sub _infostreet_parse { #subroutine, not method } keys %$arg; } +1;