NAME
SMS::MessageBird::API::HLR - Sub-module for the SMS::MessageBird distribution.
SYNOPSIS
This is a sub-module which is part of the SMS::MessageBird distribution.
While this module can be used directly, it's designed to be used via SMS::MessageBird
DESCRIPTION
This module provides the interface to the HLR related methods of the MessageBird JSON API.
The methods implmented acceept the paramteres as named in the MessageBird API documentation which can be found at the MessageBird Developer Documentation. If you're using this distribution you should be familiar with the API documentation.
Response Data
Every method returns a standardised hashref containin the following keys:
- ok
-
Value of 0 or 1. Indicates if the request was completed successfully or not. This value is based on LWP::UserAgent's is_success() method.
- code
-
This is the HTTP code returned by the API. In the event of ok => 0 - it's possible that the request was a 401 etc. So this is provided for sanity checking.
- content
-
This is a Perl hashref data structure decoded from the API's response JSON as-is.
Please see the MessageBird Developer Documentation for more information on the expected structure.
METHODS
request
In: %params - Hash of params accepted by the MessageBird API.
Out: $response - Hashref of response data. See "Response Data" above.
This method implements the POST /hlr route of the API.
Requests an HLR lookup for a given MSISDN.
Accepted parameters are listed in the MessageBird API documentation.
Require parameters are as follows:
- msisdn
-
The MSISDN formatted telephone number to do the network query on.
- reference
-
A client reference string for human reference.
get
In: $hlr_id - The HLR ID returned by the request call.
Out: $response - Hashref of response data. See "Response Data" above.
This method implements the GET /hlr/{hlr_id} route of the API.
Attempts to retrieve the result of a previously requested HLR.
Please see the MessageBird API Documentation for more information.
remove
In: $hlr_id - The HLR ID returned by the request call.
Out: $response - Hashref of response data. See "Response Data" above.
This method implements the DELETE /hlr/{hlr_id} route of the API.
Deletes the result of a previously requested HLR.
Please see the MessageBird API Documentation for more information.
del
Synonym for the remove() method.
AUTHOR
James Ronan, <james at ronanweb.co.uk>
BUGS
Please report any bugs or feature requests to bug-sms-messagebird at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SMS-MessageBird. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
Alternatively you can raise an issue on the source code which is available on GitHub.
LICENSE AND COPYRIGHT
Copyright 2016 James Ronan.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.