lib/imperituroard.rb in imperituroard-0.4.1 vs lib/imperituroard.rb in imperituroard-0.4.2
- old
+ new
@@ -12,10 +12,11 @@
require "imperituroard/projects/iot/add_functions"
require "imperituroard/projects/iot/internal_functions"
require 'imperituroard/projects/mhub/infobip'
require 'imperituroard/projects/mhub/sk'
require 'imperituroard/projects/mhub/subs/dabrab/dabrab_proced'
+require 'imperituroard/projects/mhub/subs/dabrab/dabrab_platform'
require 'json'
require 'ipaddr'
require 'date'
require 'net/http'
require 'uri'
@@ -873,17 +874,17 @@
if params["destinations"].length >= 1
msisdn2 = dabrab_connecter.num_formatter(params["destinations"], params["notifyUrl"].split(":")[2])
if null_statement.include?(params["viber"]) && !null_statement.include?(params["sms"])
- hub_resp = mhub_connector.sk_send_sms_list(msisdn2, params["notifyUrl"], params["sms"]["text"], "TEST")
+ hub_resp = mhub_connector.sk_send_sms_list(msisdn2, static_callback, params["sms"]["text"], "TEST")
elsif !null_statement.include?(params["viber"]) && null_statement.include?(params["sms"])
- hub_resp = mhub_connector.sk_send_viber_list(msisdn2, params["notifyUrl"], params["viber"]["text"])
+ hub_resp = mhub_connector.sk_send_viber_list(msisdn2, static_callback, params["viber"]["text"])
elsif !null_statement.include?(params["viber"]) && !null_statement.include?(params["sms"])
p "vibersms"
p msisdn2
- hub_resp = mhub_connector.sk_send_viber_sms_list(msisdn2, params["notifyUrl"], params["sms"]["text"], params["viber"]["text"], "TEST")
+ hub_resp = mhub_connector.sk_send_viber_sms_list(msisdn2, static_callback, params["sms"]["text"], params["viber"]["text"], "TEST")
else
output_params = {"code": 502, "result": "Invalid input data st2", "body": {"answer": {}, "sender": {"ip_src": ip_src, "ip_real": ip_real, "ip_vip": ip_vip}}}
end
else
output_params = {"code": 503, "result": "Invalid recipients", "body": {"answer": {}, "sender": {"ip_src": ip_src, "ip_real": ip_real, "ip_vip": ip_vip}}}
@@ -909,10 +910,9 @@
output_params = {}
hub_resp = {}
null_statement = [nil, "nil", "", "null"]
begin
-
mes_report = dabrab_connecter.delivery_report_transform(params)[:body][:report_to_recip]
result = crm_connector.crm_status_1(mes_report)
\ No newline at end of file