X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fhttp.pm;h=0be2a0f36c39d34cd69d242219370d1c2da9c4aa;hp=0e02f0f8e42b9d0dd404b63ca75992fda9c0b727;hb=dabdf357484badff95afcae50b08ec1c3bb58343;hpb=7de51deb0e3e3fe1b0a9e06be6498256d5511bd0 diff --git a/FS/FS/part_export/http.pm b/FS/FS/part_export/http.pm index 0e02f0f8e..0be2a0f36 100644 --- a/FS/FS/part_export/http.pm +++ b/FS/FS/part_export/http.pm @@ -1,10 +1,54 @@ package FS::part_export::http; -use vars qw(@ISA); +use vars qw(@ISA %info); +use Tie::IxHash; use FS::part_export; @ISA = qw(FS::part_export); +tie my %options, 'Tie::IxHash', + 'method' => { label =>'Method', + type =>'select', + #options =>[qw(POST GET)], + options =>[qw(POST)], + default =>'POST' }, + 'url' => { label => 'URL', default => 'http://', }, + 'insert_data' => { + label => 'Insert data', + type => 'textarea', + default => join("\n", + 'DomainName $svc_x->domain', + 'Email ( grep { $_ ne "POST" } $svc_x->cust_svc->cust_pkg->cust_main->invoicing_list)[0]', + 'test 1', + 'reseller $svc_x->cust_svc->cust_pkg->part_pkg->pkg =~ /reseller/i', + ), + }, + 'delete_data' => { + label => 'Delete data', + type => 'textarea', + default => join("\n", + ), + }, + 'replace_data' => { + label => 'Replace data', + type => 'textarea', + default => join("\n", + ), + }, +; + +%info = ( + 'svc' => 'svc_domain', + 'desc' => 'Send an HTTP or HTTPS GET or POST request', + 'options' => \%options, + 'notes' => <<'END' +Send an HTTP or HTTPS GET or POST to the specified URL. For HTTPS support, +Crypt::SSLeay +or IO::Socket::SSL +is required. +END +); + sub rebless { shift; } sub _export_insert { @@ -86,3 +130,5 @@ sub http { } +1; +