diff options
-rw-r--r-- | lib/Net/Ikano.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Net/Ikano.pm b/lib/Net/Ikano.pm index 8b8ec76..ab62bf4 100644 --- a/lib/Net/Ikano.pm +++ b/lib/Net/Ikano.pm @@ -24,6 +24,10 @@ our $SCHEMA_ROOT = 'https://orders.value.net/osiriswebservice/schema/v1'; our $API_VERSION = "1.0"; +our @orderType = qw( NEW CANCEL CHANGE ); + +our @orderStatus = qw( NEW PENDING CANCELLED COMPLETED ERROR ); + our $AUTOLOAD; =head1 SYNOPSIS @@ -143,12 +147,10 @@ sub new { sub req_ORDER { my ($self, $args) = (shift, shift); - my @validOrderTypes = qw( NEW CHANGE CANCEL ); - return "invalid order data" unless defined $args->{orderType} && defined $args->{ProductCustomId} && defined $args->{DSLPhoneNumber}; return "invalid order type ".$args->{orderType} - unless grep($_ eq $args->{orderType}, @validOrderTypes); + unless grep($_ eq $args->{orderType}, @orderType); # XXX: rewrite this uglyness? my @ignoreFields = qw( orderType ProductCustomId ); |