ruby-on-rails – rails twilio api发布号码

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – rails twilio api发布号码前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我使用twilio gem而且我不知道如何发布电话号码.
我试试: @H_403_3@@client.account.incoming_phone_numbers.delete(:phone_number => phone_number)

但铁路说:

@H_403_3@undefined method `delete' for #<Twilio::REST::IncomingPhoneNumbers:0x7f35c99e93e0>

如何纠正发行号码?

解决方法

我找到了解决方案 @H_403_3@@client.account.incoming_phone_numbers.list({:phone_number => phone_number}).each do |n| num = @client.account.incoming_phone_numbers.get(n.sid) num.delete end
原文链接:https://www.f2er.com/ruby/268793.html

猜你在找的Ruby相关文章