X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Facct_xmlrpc.pm;h=a493f52062b711fabc25818b4a28a42b760e8c62;hp=96ad1fa670a5aa5137032f7da13e7ff7b7ab0f93;hb=a72a10f754f7465121d6137bb3dcee0a21ea6443;hpb=caaa554c0f4550b23b97b2de76aee2bdd12252ba
diff --git a/FS/FS/part_export/acct_xmlrpc.pm b/FS/FS/part_export/acct_xmlrpc.pm
index 96ad1fa67..a493f5206 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,6 +35,7 @@ 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.
@@ -46,6 +48,8 @@ The following variables are available for interpolation (prefixed with new_ or
old_ for replace operations):
$username
+ $domain
+ $email
- username@domain
$_password
$crypt_password
- encrypted password
$ldap_password
- Password in LDAP/RFC2307 format (for example, "{PLAIN}himom", "{CRYPT}94pAVyK/4oIBk" or "{MD5}5426824942db4253f87a1009fd5d2d4")
@@ -188,23 +192,24 @@ 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 );
+ } elsif ( $value =~ /^(domain|email)$/ ) {
+ return Frontier::RPC2::String->new( $svc_acct->$value() );
} 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
}
+#this is the "cust_main" email, not svc_acct->email
# my $cust_pkg = $svc_acct->cust_svc->cust_pkg;
# if ( $cust_pkg ) {
# no strict 'vars';