diff options
Diffstat (limited to 'lib/WebService/TFL/Bus/Response')
-rw-r--r-- | lib/WebService/TFL/Bus/Response/BaseVersion.pm | 15 | ||||
-rw-r--r-- | lib/WebService/TFL/Bus/Response/FlexibleMessage.pm | 5 | ||||
-rw-r--r-- | lib/WebService/TFL/Bus/Response/Prediction.pm | 5 | ||||
-rw-r--r-- | lib/WebService/TFL/Bus/Response/Stop.pm | 5 | ||||
-rw-r--r-- | lib/WebService/TFL/Bus/Response/URAVersion.pm | 17 |
5 files changed, 47 insertions, 0 deletions
diff --git a/lib/WebService/TFL/Bus/Response/BaseVersion.pm b/lib/WebService/TFL/Bus/Response/BaseVersion.pm new file mode 100644 index 0000000..37b2ddb --- /dev/null +++ b/lib/WebService/TFL/Bus/Response/BaseVersion.pm @@ -0,0 +1,15 @@ +package WebService::TFL::Bus::Response::BaseVersion; +use Moose; +use namespace::autoclean; + +has Version => ( + is => 'ro', +); + +sub new_from_array { + my ($class,$return_set,$array) = @_; + + return $class->new({Version => $array->[1]}); +} + +1; diff --git a/lib/WebService/TFL/Bus/Response/FlexibleMessage.pm b/lib/WebService/TFL/Bus/Response/FlexibleMessage.pm new file mode 100644 index 0000000..11b7b1a --- /dev/null +++ b/lib/WebService/TFL/Bus/Response/FlexibleMessage.pm @@ -0,0 +1,5 @@ +package WebService::TFL::Bus::Response::FlexibleMessage; +use Moose; +with 'WebService::TFL::Bus::ResponseTypeRole' => { type => 'flexible' }; + +1; diff --git a/lib/WebService/TFL/Bus/Response/Prediction.pm b/lib/WebService/TFL/Bus/Response/Prediction.pm new file mode 100644 index 0000000..d3ea931 --- /dev/null +++ b/lib/WebService/TFL/Bus/Response/Prediction.pm @@ -0,0 +1,5 @@ +package WebService::TFL::Bus::Response::Prediction; +use Moose; +with 'WebService::TFL::Bus::ResponseTypeRole' => { type => 'prediction' }; + +1; diff --git a/lib/WebService/TFL/Bus/Response/Stop.pm b/lib/WebService/TFL/Bus/Response/Stop.pm new file mode 100644 index 0000000..3c98ca5 --- /dev/null +++ b/lib/WebService/TFL/Bus/Response/Stop.pm @@ -0,0 +1,5 @@ +package WebService::TFL::Bus::Response::Stop; +use Moose; +with 'WebService::TFL::Bus::ResponseTypeRole' => { type => 'stop' }; + +1; diff --git a/lib/WebService/TFL/Bus/Response/URAVersion.pm b/lib/WebService/TFL/Bus/Response/URAVersion.pm new file mode 100644 index 0000000..38c8a62 --- /dev/null +++ b/lib/WebService/TFL/Bus/Response/URAVersion.pm @@ -0,0 +1,17 @@ +package WebService::TFL::Bus::Response::URAVersion; +use Moose; +use namespace::autoclean; + +for my $field (qw(Version TimeStamp)) { + has $field => ( + is => 'ro', + ); +} + +sub new_from_array { + my ($class,$return_set,$array) = @_; + + return $class->new({Version => $array->[1],TimeStamp => $array->[2]}); +} + +1; |