diff options
author | Struan Donald <struan@exo.org.uk> | 2012-03-19 15:28:10 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-03-19 15:28:10 +0000 |
commit | b0caccf00ebbef40fbaf4a57c537c31f8393aa4f (patch) | |
tree | 5b934a1df458eed99115a393d10e9b0b074022c9 /perllib/Open311.pm | |
parent | 257d609b986b5f70282c68b75858cc5f2323a400 (diff) |
initial get serivce request updates method and tests
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r-- | perllib/Open311.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm index e26e3e4c6..0773edc19 100644 --- a/perllib/Open311.pm +++ b/perllib/Open311.pm @@ -13,7 +13,7 @@ has endpoint => ( is => 'ro', isa => 'Str' ); has test_mode => ( is => 'ro', isa => 'Bool' ); has test_uri_used => ( is => 'rw', 'isa' => 'Str' ); has test_get_returns => ( is => 'rw' ); -has endpoints => ( is => 'rw', default => sub { { services => 'services.xml', requests => 'requests.xml' } } ); +has endpoints => ( is => 'rw', default => sub { { services => 'services.xml', requests => 'requests.xml', service_request_updates => 'update.xml' } } ); has debug => ( is => 'ro', isa => 'Bool', default => 0 ); has debug_details => ( is => 'rw', 'isa' => 'Str', default => '' ); @@ -129,6 +129,15 @@ sub get_service_request_id_from_token { } } +sub get_service_request_updates { + my $self = shift; + + my $params = {}; + + my $xml = $self->_get( $self->endpoints->{service_request_updates}, $params || undef ); + return $self->_get_xml_object( $xml ); +} + sub _get { my $self = shift; my $path = shift; |