X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Facct_xmlrpc.pm;h=4c896b4221c1acff42a3d9b94933c89d59e85a0c;hb=f5540dd87ad191257c3c1364993fc275bb68c881;hp=d746f29bcbca37ab40eb5795269ad38792af6108;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git diff --git a/FS/FS/part_export/acct_xmlrpc.pm b/FS/FS/part_export/acct_xmlrpc.pm index d746f29bc..4c896b422 100644 --- a/FS/FS/part_export/acct_xmlrpc.pm +++ b/FS/FS/part_export/acct_xmlrpc.pm @@ -5,6 +5,7 @@ use vars qw( %info ); # $DEBUG ); #use Data::Dumper; use Tie::IxHash; use Frontier::Client; #to avoid adding a dependency on RPC::XML just now +use Frontier::RPC2; #use FS::Record qw( qsearch qsearchs ); use FS::Schema qw( dbdef ); @@ -34,10 +35,11 @@ tie my %options, 'Tie::IxHash', 'svc' => 'svc_acct', 'desc' => 'Configurable provisioning of accounts via the XML-RPC protocol', 'options' => \%options, + 'no_machine' => 1, 'notes' => <<'END', Configurable, real-time export of accounts via the XML-RPC protocol.

-If using "Individual values" parameter style, specfify one parameter per line.
+If using "Individual values" parameter style, specify one parameter per line.

If using "Struct of name/value pairs" parameter style, specify one name and value on each line, separated by whitespace.
@@ -188,18 +190,18 @@ sub _export_value { if ( $fields{$value} ) { my $type = dbdef->table('svc_acct')->column($value)->type; if ( $type =~ /^(int|serial)/i ) { - return Frontier::Client->new->int( $svc_acct->$value() ); + return Frontier::RPC2::Integer->new( $svc_acct->$value() ); } elsif ( $value =~ /^last_log/ ) { - return Frontier::Client->new->date_time( $svc_acct->$value() ); #conversion? + return Frontier::RPC2::DateTime::ISO8601->new( $svc_acct->$value() ); #conversion? } else { - return Frontier::Client->new->string( $svc_acct->$value() ); + return Frontier::RPC2::String->new( $svc_acct->$value() ); } } elsif ( $value eq 'domain' ) { - return Frontier::Client->new->string( $svc_acct->domain ); + return Frontier::RPC2::String->new( $svc_acct->domain ); } elsif ( $value eq 'crypt_password' ) { - return Frontier::Client->new->string( $svc_acct->crypt_password( $self->option('crypt') ) ); + return Frontier::RPC2::String->new( $svc_acct->crypt_password( $self->option('crypt') ) ); } elsif ( $value eq 'ldap_password' ) { - return Frontier::Client->new->string( $svc_acct->ldap_password($self->option('crypt') ) ); + return Frontier::RPC2::String->new( $svc_acct->ldap_password($self->option('crypt') ) ); } elsif ( $value eq 'radius_groups' ) { my @radius_groups = $svc_acct->radius_groups; #XXX