from infobip.clients import send_multiple_textual_sms_advanced from infobip.api.model.sms.mt.send.textual.SMSAdvancedTextualRequest import SMSAdvancedTextualRequest from infobip.api.model.sms.mt.send.SMSData import SMSData from infobip.api.model.sms.Destination import Destination from .__init__ import configuration send_sms_client = send_multiple_textual_sms_advanced(configuration) dest = Destination() dest.message_id = "message_111" dest.to = "number1aaa" message = SMSData() message.from_ = "sender1" message.text = "This is an example message." message.notify_url = "https://test.com/url_for_delivery_reports" message.destinations = [dest] dest2 = Destination() dest2.message_id = "message_222" dest2.to = "number2bbb" message2 = SMSData() message2.from_ = "123412341234" message2.text = "This is an example message #2." message2.notify_url = "https://test.com/url_for_delivery_reports_2" message2.destinations = [dest2] request = SMSAdvancedTextualRequest() request.messages = [message, message2]
# -*- coding: utf-8 -*- from infobip.api.model.sms.mt.send.Tracking import Tracking from infobip.clients import send_multiple_textual_sms_advanced from infobip.api.model.sms.mt.send.textual.SMSAdvancedTextualRequest import SMSAdvancedTextualRequest from infobip.api.model.sms.mt.send.SMSData import SMSData from infobip.api.model.sms.Destination import Destination from __init__ import configuration send_sms_client = send_multiple_textual_sms_advanced(configuration) dest = Destination() dest.message_id = "message_111" dest.to = "number1aaa" message = SMSData() message.from_ = "sender1" message.text = "This is an example message. More information you can find on: http://dev.infobip.com/docs/fully-featured-textual-message" message.destinations = [dest] request = SMSAdvancedTextualRequest() request.messages = [message] tracking = Tracking() tracking.set_track("URL") request.set_tracking(tracking) response = send_sms_client.execute(request) print(response)
from infobip.clients import send_multiple_textual_sms_advanced from infobip.api.model.sms.mt.send.textual.SMSAdvancedTextualRequest import SMSAdvancedTextualRequest from infobip.api.model.sms.mt.send.SMSData import SMSData from infobip.api.model.sms.mt.send.IsFlash import IsFlash from infobip.api.model.sms.Destination import Destination from __init__ import configuration send_sms_client = send_multiple_textual_sms_advanced(configuration) dest = Destination() dest.message_id = "message_123" dest.to = "number1aaa" message = SMSData() message.flash = IsFlash(true) message.text = "This is an example message." message.destinations = [dest] request = SMSAdvancedTextualRequest() request.messages = [message] response = send_sms_client.execute(request) print(response)
from infobip.api.model.sms.mt.send.Language import Language from infobip.clients import send_multiple_textual_sms_advanced from infobip.api.model.sms.mt.send.textual.SMSAdvancedTextualRequest import SMSAdvancedTextualRequest from infobip.api.model.sms.mt.send.SMSData import SMSData from infobip.api.model.sms.Destination import Destination from .__init__ import configuration send_sms_client = send_multiple_textual_sms_advanced(configuration) dest = Destination() dest.message_id = "message_111" dest.to = "number1aaa" language = Language() language.language_code = "TR" language.single_shift = True language.locking_shift = False message = SMSData() message.from_ = "sender1" message.text = "Artık Ulusal Dil Tanımlayıcısı ile Türkçe karakterli smslerinizi rahatlıkla iletebilirsiniz." message.destinations = [dest] message.language = language request = SMSAdvancedTextualRequest() request.messages = [message] response = send_sms_client.execute(request) print(response)
from infobip.api.model.sms.mt.send.Language import Language from infobip.clients import send_multiple_textual_sms_advanced from infobip.api.model.sms.mt.send.textual.SMSAdvancedTextualRequest import SMSAdvancedTextualRequest from infobip.api.model.sms.mt.send.SMSData import SMSData from infobip.api.model.sms.Destination import Destination from __init__ import configuration send_sms_client = send_multiple_textual_sms_advanced(configuration) dest = Destination() dest.message_id = "message_111" dest.to = "number1aaa" language = Language() language.language_code = "TR" language.single_shift = True language.locking_shift = False message = SMSData() message.from_ = "sender1" message.text = "Artık Ulusal Dil Tanımlayıcısı ile Türkçe karakterli smslerinizi rahatlıkla iletebilirsiniz." message.destinations = [dest] message.language = language request = SMSAdvancedTextualRequest() request.messages = [message] response = send_sms_client.execute(request) print(response)
from infobip.clients import send_multiple_textual_sms_advanced from infobip.api.model.sms.mt.send.textual.SMSAdvancedTextualRequest import SMSAdvancedTextualRequest from infobip.api.model.sms.mt.send.SMSData import SMSData from infobip.api.model.sms.Destination import Destination from __init__ import configuration send_sms_client = send_multiple_textual_sms_advanced(configuration) dest = Destination() dest.message_id = "message_111" dest.to = "number1aaa" message = SMSData() message.from_ = "sender1" message.text = "This is an example message." message.notify_url = "https://test.com/url_for_delivery_reports" message.destinations = [dest] dest2 = Destination() dest2.message_id = "message_222" dest2.to = "number2bbb" message2 = SMSData() message2.from_ = "123412341234" message2.text = "This is an example message #2." message2.notify_url = "https://test.com/url_for_delivery_reports_2" message2.destinations = [dest2] request = SMSAdvancedTextualRequest() request.messages = [message, message2]