diff options
author | ivan <ivan> | 2002-04-05 16:37:42 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-04-05 16:37:42 +0000 |
commit | 20d1b5c39c3674f3fdf5c0f784697a4442658648 (patch) | |
tree | c5f8db9f674560fbf70bd48c386b4f333e116f8d /eg | |
parent | 92badebcb286260d7861bd09a2450eea18c4259e (diff) |
oops forgot these from working on the road
Diffstat (limited to 'eg')
-rw-r--r-- | eg/export_template.pm | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/eg/export_template.pm b/eg/export_template.pm new file mode 100644 index 000000000..11e1c3b14 --- /dev/null +++ b/eg/export_template.pm @@ -0,0 +1,47 @@ +package FS::part_export::myexport; + +use vars qw(@ISA); +use FS::part_export; + +@ISA = qw(FS::part_export); + +sub rebless { shift; } + +sub _export_insert { + my($self, $svc_something) = (shift, shift); + $self->myexport_queue( $svc_acct->svcnum, 'insert', + $svc_something->username, $svc_something->password ); +} + +sub _export_replace { + my( $self, $new, $old ) = (shift, shift, shift); + #return "can't change username with myexport" + # if $old->username ne $new->username; + #return '' unless $old->_password ne $new->_password; + $self->myexport_queue( $new->svcnum, + 'replace', $new->username, $new->password ); +} + +sub _export_delete { + my( $self, $svc_something ) = (shift, shift); + $self->myexport_queue( $svc_acct->svcnum, + 'delete', $svc_something->username ); +} + +#a good idea to queue anything that could fail or take any time +sub myexport_queue { + my( $self, $svcnum, $method ) = (shift, shift, shift); + my $queue = new FS::queue { + 'svcnum' => $svcnum, + 'job' => "FS::part_export::myexport::myexport_$method", + }; + $queue->insert( @_ ); +} + +sub myexport_insert { #subroutine, not method +} +sub myexport_replace { #subroutine, not method +} +sub myexport_delete { #subroutine, not method +} + |