cust_main exports! cust_main-exports config option and part_export/cust_http.pm...
[freeside.git] / FS / FS / part_export / cust_http.pm
1 package FS::part_export::cust_http;
2
3 use vars qw( @ISA %info );
4 use FS::part_export::http;
5 use Tie::IxHash;
6
7 @ISA = qw( FS::part_export::http );
8
9 $options{'insert_data'}->{'default'} = join("\n",
10   "action  'insert'",
11   "custnum \$cust_main->custnum",
12   "first   \$cust_main->first",
13   "last    \$cust_main->get('last')",
14   ( map "$_ \$cust_main->$_", qw( company address1 address2 city county state zip country daytime night fax  last ) ),
15   "email   \$cust_main->invoicing_list_emailonly_scalar",
16 );
17 $options{'delete_data'}->{'default'} = join("\n",
18   "action  'delete'",
19   "custnum \$cust_main->custnum",
20 );
21 $options{'replace_data'}->{'default'} = join("\n",
22   "action  'replace'",
23   "custnum \$new_cust_main->custnum",
24   "first   \$new_cust_main->first",
25   "last    \$new_cust_main->get('last')",
26   ( map "$_ \$cust_main->$_", qw( company address1 address2 city county state zip country daytime night fax  last ) ),
27   "email   \$new_cust_main->invoicing_list_emailonly_scalar",
28 );
29
30 %info = (
31   'svc'     => 'cust_main',
32   'desc'    => 'Send an HTTP or HTTPS GET or POST request, for customers.',
33   'options' => \%options,
34   'notes'   => <<'END'
35 Send an HTTP or HTTPS GET or POST to the specified URL on customer addition,
36 modification and deletion.  For HTTPS support,
37 <a href="http://search.cpan.org/dist/Crypt-SSLeay">Crypt::SSLeay</a>
38 or <a href="http://search.cpan.org/dist/IO-Socket-SSL">IO::Socket::SSL</a>
39 is required.
40 END
41 );
42
43 1;