Renée Bäcker > Nexmo-SMS-0.07 > Nexmo::SMS::Response::Message

Download:
Nexmo-SMS-0.07.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.02   Source  

SYNOPSIS ^

This module represents a single message in a response from Nexmo.

    use Nexmo::SMS::Response::Message;

    my $nexmo = Nexmo::SMS::Response::Message->new(
        json => '{
              "status":"4",
              "message-id":"message001",
              "client-ref":"Test001 - Reference",
              "remaining-balance":"20.0",
              "message-price":"0.05",
              "error-text":""
              }',
    );
    
    print $nexmo->message_price;

METHODS ^

new

create a new object

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

ATTRIBUTES ^

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

  $nexmo->client_ref( 'client_ref' );
  my $client_ref = $nexmo->client_ref;
syntax highlighting: