1 package FS::part_export::broadband_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 "address \$svc_x->ip_addr",
25 "name \$cust_main->first.' '.\$cust_main->last",
29 label => 'Delete data',
33 "address \$svc_x->ip_addr",
37 label => 'Replace data',
42 label => 'Suspend data',
48 label => 'Unsuspend data',
54 label => 'Success Regexp',
60 'svc' => 'svc_broadband',
61 'desc' => 'Send an HTTP or HTTPS GET or POST request, for accounts.',
62 'options' => \%options,
65 <p>Send an HTTP or HTTPS GET or POST to the specified URL on account addition,
66 modification and deletion. For HTTPS support,
67 <a href="http://search.cpan.org/dist/Crypt-SSLeay">Crypt::SSLeay</a>
68 or <a href="http://search.cpan.org/dist/IO-Socket-SSL">IO::Socket::SSL</a>
70 <p>Each "Data" option takes a list of <i>name value</i> pairs on successive
72 <ul><li><i>name</i> is an unquoted, literal string without whitespace.</li>
73 <li><i>value</i> is a Perl expression that will be evaluated. If it's a
74 literal string, it must be quoted. This expression has access to the
75 svc_broadband object as '$svc_x' (or '$new' and '$old' in "Replace Data")
76 and the customer record as '$cust_main'.</li></ul>
77 If "Success Regexp" is specified, the response from the server will be
78 tested against it to determine if the export succeeded.</p>