Kernel::System::CloudService::Client::SMS

NAME

Kernel::System::CloudService::Client::SMS – SMS cloud service client

DESCRIPTION

Cloud service client handles communication with operation on cloud server.

PUBLIC INTERFACE

new()

Creates an object. Do not use it directly, instead use:

    my $CloudServiceClientObject = $Kernel::OM->Get('Kernel::System::CloudService::Client::SMS');

SendSMS()

Perform an SMS sending attempt.

    my $Result = $SMSObject->SendSMS(
        To => '+49172123456789',                # (required) Scalar
                                                # or
        To => [                                 # (required) Array reference
            '+49172123456789',
            '+49172987654321',
        ],
        Text           => 'Some Message',
        IsFlashMessage => 1,                 # (optional) 0 or 1
    );

    $Result = {
        Success       => 1,                             # 0 or 1
        ErrorMessage  => 'An explanation about error.', # in case of error
        Data          => {
            Text              => 'Some Message',
            TransactionNumber => '4fb339ac3a1587803ae982613dde5b62',
        },
    };

HealthCheck()

Check if it is possible to use this cloud service and retrieve the number of SMS units available.

    my $Result = $SMSObject->HealthCheck();

    Returns hash reference:

    $Result = {
        Success       => 1,                             # 0 or 1
        ErrorMessage  => 'An explanation about error.', # in case of error
        Data          => {
            Success      => 1,                # 1 or 0, possible values
            AvailableSMS => 10,
            SystemID     => '1234567890',
            CustomerID   => 'TestCustomerID',
        },
    };

IsActive()

Check if this cloud service is active and ready to use it.

    my $Result = $SMSObject->IsActive();

Returns '1' if cloud service is active, otherwise '0':

    $Result = 1;
Scroll to Top