projects
/
Net-Ikano.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dc09944
)
Move valid order types and status into Ikano.pm
author
levinse
<levinse>
Mon, 29 Nov 2010 17:59:53 +0000
(17:59 +0000)
committer
levinse
<levinse>
Mon, 29 Nov 2010 17:59:53 +0000
(17:59 +0000)
lib/Net/Ikano.pm
patch
|
blob
|
history
diff --git
a/lib/Net/Ikano.pm
b/lib/Net/Ikano.pm
index
8b8ec76
..
ab62bf4
100644
(file)
--- 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 $API_VERSION = "1.0";
+our @orderType = qw( NEW CANCEL CHANGE );
+
+our @orderStatus = qw( NEW PENDING CANCELLED COMPLETED ERROR );
+
our $AUTOLOAD;
=head1 SYNOPSIS
our $AUTOLOAD;
=head1 SYNOPSIS
@@
-143,12
+147,10
@@
sub new {
sub req_ORDER {
my ($self, $args) = (shift, shift);
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}
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 );
# XXX: rewrite this uglyness?
my @ignoreFields = qw( orderType ProductCustomId );