fix TeleAPI import (what kind of crack was Christopher smoking that he couldn't fix...
[freeside.git] / FS / FS / cgp_rule_condition.pm
index f91b3e6..772e189 100644 (file)
@@ -36,7 +36,7 @@ currently supported:
 
 primary key
 
-=item condition
+=item conditionname
 
 condition
 
@@ -52,7 +52,6 @@ params
 
 rulenum
 
-
 =back
 
 =head1 METHODS
@@ -114,9 +113,9 @@ sub check {
 
   my $error = 
     $self->ut_numbern('ruleconditionnum')
-    || $self->ut_text('condition')
-    || $self->ut_text('op')
-    || $self->ut_text('params')
+    || $self->ut_text('conditionname')
+    || $self->ut_textn('op')
+    || $self->ut_textn('params')
     || $self->ut_foreign_key('rulenum', 'cgp_rule', 'rulenum')
   ;
   return $error if $error;
@@ -124,6 +123,17 @@ sub check {
   $self->SUPER::check;
 }
 
+=item arrayref
+
+Returns an array reference of the conditionname, op and params fields.
+
+=cut
+
+sub arrayref {
+  my $self = shift;
+  [ map $self->$_, qw( conditionname op params ) ];
+}
+
 =back
 
 =head1 BUGS