$contact_info{'email'} = $emails[0] if @emails;
#this one is kinda noment-specific
- $contact_info{'title'} = $cust_main->agent->agent;
+ $contact_info{'organization'} = $cust_main->agent->agent;
$err_or_queue = $self->infostreet_queueContact( $svc_acct->svcnum,
$svc_acct->username, %contact_info );
my($url, $is_username, $is_password, $groupID, $username, %contact_info) = @_;
my $accountID = infostreet_command($url, $is_username, $is_password, $groupID,
'getAccountID', $username);
- foreach my $field ( %contact_info ) {
+ foreach my $field ( keys %contact_info ) {
infostreet_command($url, $is_username, $is_password, $groupID,
- 'setContactField', $field, $contact_info{$field} );
+ 'setContactField', [ 'int'=>$accountID ], $field, $contact_info{$field} );
}
}
}
eval "use Frontier::Client;";
+ die $@ if $@;
+
+ eval 'sub Frontier::RPC2::String::repr {
+ my $self = shift;
+ my $value = $$self;
+ $value =~ s/([&<>\"])/$Frontier::RPC2::char_entities{$1}/ge;
+ $value;
+ }';
+ die $@ if $@;
my $conn = Frontier::Client->new( url => $url );
my $key_result = $conn->call( 'authenticate', $username, $password, $groupID);
my $key = $key_result{data};
#my $result = $conn->call($method, $key, @args);
- my $result = $conn->call($method, $key, map { $conn->string($_) } @args);
+ my $result = $conn->call( $method, $key,
+ map {
+ if ( ref($_) ) {
+ my( $type, $value) = @{$_};
+ $conn->$type($value);
+ } else {
+ $conn->string($_);
+ }
+ } @args );
my %result = _infostreet_parse($result);
die $result{error} unless $result{success};