lib/gateway.rb in twilio_contactable-0.8.1 vs lib/gateway.rb in twilio_contactable-0.8.2
- old
+ new
@@ -83,10 +83,14 @@
'SMS/Messages'
when :voice
'Calls'
end
- post service, data
+ response = post service, data
+
+ Net::HTTPCreated == response.code_type ?
+ TwilioContactable::Gateway::Success :
+ TwilioContactable::Gateway::Error
end
def post(service, data = {})
url = "/#{API_VERSION}/Accounts/#{TwilioContactable.configuration.client_id}/#{service}"
account.request url,