GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NEXMO::SMS::RESPONSE (3)

.ds Aq ’

NAME

Nexmo::SMS::Response - Module that represents a response from Nexmo SMS API!

CONTENTS

VERSION

version 0.06

SYNOPSIS

This module represents a response from Nexmo.



    use Nexmo::SMS::Response;

    my $nexmo = Nexmo::SMS::Response->new(
        json => {
            "message-count":"1",
            "messages":[
              {
              "status":"4",
              "message-id":"message001",
              "client-ref":"Test001 - Reference",
              "remaining-balance":"20.0",
              "message-price":"0.05",
              "error-text":""
              }
            ]
        },
    );
   
    for my $message ( $response ) {
        print $message->status;
    }



VERSION

Version 0.01

METHODS

    new

create a new object



    my $foo = Nexmo::SMS::Response->new(
        json => {
            "message-count":"1",
            "messages":[
              {
              "status":"4",
              "message-id":"message001",
              "client-ref":"Test001 - Reference",
              "remaining-balance":"20.0",
              "message-price":"0.05",
              "error-text":""
              }
            ]
        },
    );



    messages

returns the list of messages included in the response. Each element is an object of Nexmo::SMS::Response::Message.



    my @messages = $response->messages;



    errstr

return the last error as string.



    print $response->errstr;



    is_success

returns 1 if all messages have a status = 0, undef otherwise.

    is_error

Returns 1 if an error occured, 0 otherwise...

ATTRIBUTES

These attributes are available for Nexmo::SMS::TextMessage objects:



  $nexmo->status( status );
  my $status = $nexmo->status;



o json
o message_count
o status

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2011 Renee Baecker.

This program is released under the following license: artistic_2

AUTHOR

Renee Baecker <module@renee-baecker.de>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2011 by Renee Baecker.

This is free software, licensed under:



  The Artistic License 2.0 (GPL Compatible)



Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NEXMO::SMS::RESPONSE (3) 2011-12-26

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.