lib/rumour-ruby/client.rb in rumour-ruby-0.0.5 vs lib/rumour-ruby/client.rb in rumour-ruby-0.0.6

- old
+ new

@@ -14,13 +14,15 @@ @access_token = access_token || Rumour.configuration.access_token raise Rumour::Errors::AuthenticationError.new('Missing access token') if @access_token.nil? end def send_text_message(sender, recipient, body) + recipient = Rumour.configuration.intercept_text_message_recipient || recipient post('/text_messages', text_message: { from: sender, recipient: recipient, body: body }) end def send_push_notification(platform, recipient, options= {}) + recipient = Rumour.configuration.intercept_push_notification_recipient || recipient post('/push_notifications', push_notification: { platform: platform, recipient: recipient }.merge(options)) end private