temporarily disabling torrus source build
[freeside.git] / FS / FS / part_export / acct_http.pm
1 package FS::part_export::acct_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 %options, 'Tie::IxHash',
10   'method' => { label   =>'Method',
11                 type    =>'select',
12                 #options =>[qw(POST GET)],
13                 options =>[qw(POST)],
14                 default =>'POST' },
15   'url'    => { label   => 'URL', default => 'http://', },
16   'ssl_no_verify' => { label => 'Skip SSL certificate validation',
17                        type  => 'checkbox',
18                      },
19   'insert_data' => {
20     label   => 'Insert data',
21     type    => 'textarea',
22     default => join("\n",
23       "action 'add'",
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",
28     ),
29   },
30   'delete_data' => {
31     label   => 'Delete data',
32     type    => 'textarea',
33     default => join("\n",
34       "action  'remove'",
35       "username \$svc_x->username",
36     ),
37   },
38   'replace_data' => {
39     label   => 'Replace data',
40     type    => 'textarea',
41     default => join("\n",
42       "action  'update'",
43       "username \$old->username",
44       "password \$new->_password",
45     ),
46   },
47   'suspend_data' => {
48     label   => 'Suspend data',
49     type    => 'textarea',
50     default => join("\n",
51     ),
52   },
53   'unsuspend_data' => {
54     label   => 'Unsuspend data',
55     type    => 'textarea',
56     default => join("\n",
57     ),
58   },
59   'success_regexp' => {
60     label  => 'Success Regexp',
61     default => '',
62   },
63 ;
64
65 %info = (
66   'svc'     => 'svc_acct',
67   'desc'    => 'Send an HTTP or HTTPS GET or POST request, for accounts.',
68   'options' => \%options,
69   'no_machine' => 1,
70   'notes'   => <<'END'
71 Send an HTTP or HTTPS GET or POST to the specified URL on account addition,
72 modification and deletion.  For HTTPS support,
73 <a href="http://search.cpan.org/dist/Crypt-SSLeay">Crypt::SSLeay</a>
74 or <a href="http://search.cpan.org/dist/IO-Socket-SSL">IO::Socket::SSL</a>
75 is required.
76 END
77 );
78
79 1;