strict;
use warnings;
our $VERSION = '0.01';
use base 'SMS::Send::Driver';
use MIME::Base64;
use JSON;
use Data::Dumper;
sub new {
my ($class, %args) = @_;
die "$class needs hash_ref with _login a
t as _sender to new. Max 11 chars.
return $self;
}
sub send_sms {
my ($self, %args) = @_;
my $json_args = {
text => "$args{'text'}",
to => "sms:$args{'to'}"
e => "text",
sms_originator_text => "$self->{_sender}"
};
my $response = _post($self, to_json($json_args));
if ($response->{status} eq "200") {
return 1;
}
return 0;
}
sub _post {
my ($se