Class: Mhub_2

Inherits:
Object
  • Object
show all
Defined in:
lib/imperituroard.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sk_url_simple, sk_login, sk_password, telegram_api_url, telegram_chat_id, sk_url_broadcast, static_callback, crm_callback_url, crm_login, crm_password, sms_alphaname, log_level = "error") ⇒ Mhub_2

Returns a new instance of Mhub_2.



321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'lib/imperituroard.rb', line 321

def initialize(sk_url_simple, , sk_password, telegram_api_url, telegram_chat_id, sk_url_broadcast, static_callback, crm_callback_url, , crm_password, sms_alphaname, log_level="error")
  @sk_url = sk_url_simple
  @sk_login = 
  @sk_password = sk_password
  @log_level = log_level
  @internal_func = InternalFunc.new
  @mhub_connector = Sksk_2.new(sk_url_simple, , sk_password, sk_url_broadcast, telegram_api_url, telegram_chat_id, log_level)
  @internal_func = InternalFunc.new
  @dabrab_connecter = Dabrab.new(log_level)
  @static_callback = static_callback
  @crm_connector = Crm_2.new(crm_callback_url, , crm_password, telegram_api_url, telegram_chat_id, log_level)
  @mhub_connector = MhubFunctions_2.new(sk_url_simple, , sk_password, telegram_api_url, telegram_chat_id, sk_url_broadcast, static_callback, crm_callback_url, , crm_password, sms_alphaname, log_level)
end

Instance Attribute Details

#crm_connectorObject

Returns the value of attribute crm_connector.



311
312
313
# File 'lib/imperituroard.rb', line 311

def crm_connector
  @crm_connector
end

#dabrab_connecterObject

Returns the value of attribute dabrab_connecter.



311
312
313
# File 'lib/imperituroard.rb', line 311

def dabrab_connecter
  @dabrab_connecter
end

#internal_funcObject

Returns the value of attribute internal_func.



311
312
313
# File 'lib/imperituroard.rb', line 311

def internal_func
  @internal_func
end

#log_levelObject

Returns the value of attribute log_level.



311
312
313
# File 'lib/imperituroard.rb', line 311

def log_level
  @log_level
end

#mhub_connectorObject

Returns the value of attribute mhub_connector.



311
312
313
# File 'lib/imperituroard.rb', line 311

def mhub_connector
  @mhub_connector
end

#sk_loginObject

Returns the value of attribute sk_login.



311
312
313
# File 'lib/imperituroard.rb', line 311

def 
  @sk_login
end

#sk_passwordObject

Returns the value of attribute sk_password.



311
312
313
# File 'lib/imperituroard.rb', line 311

def sk_password
  @sk_password
end

#sk_urlObject

Returns the value of attribute sk_url.



311
312
313
# File 'lib/imperituroard.rb', line 311

def sk_url
  @sk_url
end

#static_callbackObject

Returns the value of attribute static_callback.



311
312
313
# File 'lib/imperituroard.rb', line 311

def static_callback
  @static_callback
end

Instance Method Details

#get_send_message(params, ip_src, ip_real, ip_vip) ⇒ Object

“emailAddress”=>nil}], “scenarioKey”=>“1”, “viber”=>nil, “sms”=>готова”, “sendAt”=>“2019-08-15T08:40:00.000”, “notifyUrl”=>“bpmonline.bankdabrabyt.by:444/0/ServiceModel/ScGetReports.svc/GetReports”, “notifyContentType”=>“application/json”, “controller”=>“bank”, “action”=>“api”, “bank”=>“emailAddress”=>nil}], “scenarioKey”=>“1”, “viber”=>nil, “sms”=>готова”, “sendAt”=>“2019-08-15T08:40:00.000”, “notifyUrl”=>“bpmonline.bankdabrabyt.by:444/0/ServiceModel/ScGetReports.svc/GetReports”, “notifyContentType”=>“application/json”}}



344
345
346
# File 'lib/imperituroard.rb', line 344

def get_send_message(params, ip_src, ip_real, ip_vip)
  mhub_connector.get_send_message_2(params, ip_src, ip_real, ip_vip)
end

#get_send_message_mass(params, ip_src, ip_real, ip_vip, slice_number = 100, time_pause_minutes = 5, viberttl = 60, params_manual_set = 0, smsttl = 60) ⇒ Object



348
349
350
# File 'lib/imperituroard.rb', line 348

def get_send_message_mass(params, ip_src, ip_real, ip_vip, slice_number=100, time_pause_minutes=5, viberttl=60, params_manual_set=0, smsttl=60)
  mhub_connector.get_send_message_mass_2(params, ip_src, ip_real, ip_vip, slice_number, time_pause_minutes, viberttl, params_manual_set, smsttl)
end

#recieve_delivery_report(params, ip_src, ip_real, ip_vip, crm_slice_num) ⇒ Object



352
353
354
# File 'lib/imperituroard.rb', line 352

def recieve_delivery_report(params, ip_src, ip_real, ip_vip, crm_slice_num)
  mhub_connector.rec_deliv_report_2(params, ip_src, ip_real, ip_vip, crm_slice_num)
end