func (client *SmsClient) CreateMultipleSms(request MultipleSmsRequest) MultipleSmsData {
var sms MultipleSmsData
request.Destination = “phones”
_DoJsonCreateRequest(client.BaseClient, sms_create_method, request, &sms)
return sms
}
bsg.createSMS(
{
destination: “phone”,
originator:”alpha name”,
body:”message text”,
msisdn:”85226010227″,
reference:”ext_id_16″,
validity:”1″,
tariff:”0″
}
).then(
SMS => console.log( “SMS created:”, SMS ),
error => console.log( “SMS creation failed:”, error )
def message_create(params={})
MESSAGE.new(request(:post, “sms/create/”, params.merge({})))
end
class SMSMessage(dict):
def __init__(self, body: str = ”, originator: str = ‘BSG RESTAPI’, **kwargs):
kwargs.update({‘body’: body, ‘originator’: originator})
super().__init__(**kwargs)
MultipleSmsRequest multipleSmsRequest = new MultipleSmsRequest(); multipleSmsRequest.setBody(“Some text”); multipleSmsRequest.setOriginator(“me”); multipleSmsRequest.setTariff(null); multipleSmsRequest.setValidity(1); List<Phone> phones = new ArrayList(); phones.add(new Phone(“85226010227”, UUID.randomUUID().toString().substring(0, 13))); phones.add(new Phone(“79991234568”, UUID.randomUUID().toString().substring(0, 13))); multipleSmsRequest.setPhones(phones); MultipleSmsData data = smsClient.createSms(multipleSmsRequest);
$smsclient->$answer = $this->smsClient->sendSmsMulti([
[‘msisdn’ => 85226010227, ‘body’ =>’test’, ‘reference’ => ‘successSendM’ . (string)time()],
[‘msisdn’ => 85226010227, ‘body’ =>’tes2′, ‘reference’ => ‘successSendM1’ . (string)time()],
])