lib/smshelper/api/smstrade.rb in smshelper-0.3.1 vs lib/smshelper/api/smstrade.rb in smshelper-0.4.0

- old
+ new

@@ -34,9 +34,18 @@ def get_status(message_id) raise NotImplementedError, "Sms status checks unsupported by #{self.class.name}" end + def get_callback_response(args = {}) + DeliveryReport.new( + :message_id => args['message_id'], + :timestamp => Time.now, + :delivered => ((args['status'] == 'DELIVERED') ? true : false), + :original_params => args + ) + end + private def process_response_code(code) (code == '100') ? true : false end end