class ComteleSdk::ReplyService
Public Class Methods
new(api_key)
click to toggle source
# File lib/comtele_sdk.rb, line 128 def initialize(api_key) @api_key = api_key @base_address = 'https://sms.comtele.com.br/api/v2' @headers = { 'Accept': 'application/json', 'Content-type': 'application/json', 'auth-key': @api_key } end
Public Instance Methods
get_report(start_date, end_date, sender = '')
click to toggle source
# File lib/comtele_sdk.rb, line 138 def get_report(start_date, end_date, sender = '') url = @base_address + '/replyreporting?startDate=' + start_date + '&endDate=' + end_date + '&sender=' + sender response = RestClient.get(url, @headers) return JSON.parse(response) end