This commit was manufactured by cvs2svn to create tag 'freeside_2_1_1'.
[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 tie my %options, 'Tie::IxHash', %FS::part_export::http::options;
10
11 $options{'insert_data'}->{'default'} = join("\n",
12   "action  'insert'",
13   "custnum \$cust_main->custnum",
14   "first   \$cust_main->first",
15   "last    \$cust_main->get('last')",
16   ( map "$_ \$cust_main->$_", qw( company address1 address2 city county state zip country daytime night fax  last ) ),
17   "email   \$cust_main->invoicing_list_emailonly_scalar",
18 );
19 $options{'delete_data'}->{'default'} = join("\n",
20   "action  'delete'",
21   "custnum \$cust_main->custnum",
22 );
23 $options{'replace_data'}->{'default'} = join("\n",
24   "action  'replace'",
25   "custnum \$new_cust_main->custnum",
26   "first   \$new_cust_main->first",
27   "last    \$new_cust_main->get('last')",
28   ( map "$_ \$cust_main->$_", qw( company address1 address2 city county state zip country daytime night fax  last ) ),
29   "email   \$new_cust_main->invoicing_list_emailonly_scalar",
30 );
31
32 %info = (
33   'svc'     => 'cust_main',
34   'desc'    => 'Send an HTTP or HTTPS GET or POST request, for customers.',
35   'options' => \%options,
36   'notes'   => <<'END'
37 Send an HTTP or HTTPS GET or POST to the specified URL on customer addition,
38 modification and deletion.  For HTTPS support,
39 <a href="http://search.cpan.org/dist/Crypt-SSLeay">Crypt::SSLeay</a>
40 or <a href="http://search.cpan.org/dist/IO-Socket-SSL">IO::Socket::SSL</a>
41 is required.
42 END
43 );
44
45 1;