1 package FS::part_export::acct_http;
3 use vars qw( @ISA %info );
4 use FS::part_export::http;
7 @ISA = qw( FS::part_export::http );
9 tie %options, 'Tie::IxHash',
10 'method' => { label =>'Method',
12 #options =>[qw(POST GET)],
15 'url' => { label => 'URL', default => 'http://', },
16 'ssl_no_verify' => { label => 'Skip SSL certificate validation',
20 label => 'Insert data',
24 "username \$svc_x->username",
25 "password \$svc_x->_password",
26 "prismid \$cust_main->agent_custid ? \$cust_main->agent_custid : \$cust_main->custnum ",
27 "name \$cust_main->first.' '.\$cust_main->last",
31 label => 'Delete data',
35 "username \$svc_x->username",
39 label => 'Replace data',
43 "username \$old->username",
44 "password \$new->_password",
48 label => 'Suspend data',
54 label => 'Unsuspend data',
60 label => 'Success Regexp',
67 'desc' => 'Send an HTTP or HTTPS GET or POST request, for accounts.',
68 'options' => \%options,
71 Send an HTTP or HTTPS GET or POST to the specified URL on account addition,
72 modification and deletion.
73 <p>Each "Data" option takes a list of <i>name value</i> pairs on successive
75 <ul><li><i>name</i> is an unquoted, literal string without whitespace.</li>
76 <li><i>value</i> is a Perl expression that will be evaluated. If it's a
77 literal string, it must be quoted. This expression has access to the
78 svc_acct object as '$svc_x' (or '$new' and '$old' in "Replace Data")
79 and the customer record as '$cust_main'.</li></ul>
80 If "Success Regexp" is specified, the response from the server will be
81 tested against it to determine if the export succeeded.</p>