lib/smsified/reporting.rb in smsified-0.1.6 vs lib/smsified/reporting.rb in smsified-0.1.7
- old
+ new
@@ -42,31 +42,31 @@
raise ArgumentError, 'an options Hash is required' if !options.instance_of?(Hash)
raise ArgumentError, ':sender_address is required' if options[:sender_address].nil? && @sender_address.nil?
options[:sender_address] = options[:sender_address] || @sender_address
- Response.new self.class.get("/smsmessaging/outbound/#{options[:sender_address]}/requests/#{options[:request_id]}/deliveryInfos", :basic_auth => @auth)
+ Response.new self.class.get("/smsmessaging/outbound/#{options[:sender_address]}/requests/#{options[:request_id]}/deliveryInfos", :basic_auth => @auth, :headers => SMSIFIED_HTTP_HEADERS)
end
##
# Retrieve a single SMS
#
# @param [required, String] message_id of the message to retrieve
# @return [Object] A Response Object with http and data instance methods
# @example
# reporting.retrieve_sms '74ae6147f915eabf87b35b9ea30c5916'
def retrieve_sms(message_id)
- Response.new self.class.get("/messages/#{message_id}", :basic_auth => @auth)
+ Response.new self.class.get("/messages/#{message_id}", :basic_auth => @auth, :headers => SMSIFIED_HTTP_HEADERS)
end
##
# Retrieve multiple SMS messages based on a query string
#
# @param [required, String] query_string to search SMS messages for
# @return [Object] A Response Object with http and data instance methods
# @example
- # reporting.search_sms 'startDate=2011-02-14&endDate=2011-02-15'
+ # reporting.search_sms 'start=2011-02-14&end=2011-02-15'
def search_sms(query_string)
- Response.new self.class.get("/messages?#{query_string}", :basic_auth => @auth)
+ Response.new self.class.get("/messages?#{query_string}", :basic_auth => @auth, :headers => SMSIFIED_HTTP_HEADERS)
end
end
end
\ No newline at end of file