export host selection per service, RT#17914
[freeside.git] / FS / FS / part_export / communigate_pro.pm
index cc96086..8b66225 100644 (file)
@@ -36,6 +36,7 @@ tie %options, 'Tie::IxHash',
   'svc'     => [qw( svc_acct svc_domain svc_forward svc_mailinglist )],
   'desc'    => 'Real-time export of accounts, domains, mail forwards and mailing lists to a CommuniGate Pro mail server',
   'options' => \%options,
+  'default_svc_class' => 'Email',
   'notes'   => <<'END'
 Real time export of accounts, domains, mail forwards and mailing lists to a
 <a href="http://www.stalker.com/CommuniGatePro/">CommuniGate Pro</a>
@@ -173,6 +174,8 @@ sub _export_insert_svc_domain {
     if $svc_domain->parent_svcnum;
   $settings{'TrailerText'} = $svc_domain->trailer
     if $svc_domain->trailer;
+  $settings{'CertificateType'} = $svc_domain->cgp_certificatetype
+    if $svc_domain->cgp_certificatetype;
 
   my @options = ( $create, $svc_domain->domain, \%settings );
 
@@ -426,6 +429,8 @@ sub _export_replace_svc_domain {
   $settings{'AdminDomainName'} =
     $new->parent_svcnum ? $new->parent_svc_x->domain : ''
       if $old->parent_svcnum != $new->parent_svcnum;
+  $settings{'CertificateType'} = $new->cgp_certificatetype
+    if $old->cgp_certificatetype ne $new->cgp_certificatetype;
 
   if ( keys %settings ) {
     my $error = $self->communigate_pro_queue( $new->svcnum,