twilio / twilio-java

A Java library for communicating with the Twilio REST API and generating TwiML.
MIT License
492 stars 429 forks source link

Twilio phoneNumber prcing api throw an exception #638

Closed ronak-gurjar closed 3 years ago

ronak-gurjar commented 3 years ago

Issue Summary

I am using Twilio 7.1.0 version, I am not able to fetch country information it will throw an exception in my code. I had change the version to Twilio 8.14.0, but I still get an exception

Code Snippet

Country country= Country.fetcher("US").fetch();

Exception/Log

Unrecognized field "number_type" (class com.twilio.type.PhoneNumberPrice), not marked as ignorable (5 known properties: "basePrice", "type", "base_price", "currentPrice", "current_price"])
 at [Source: (org.apache.http.conn.EofSensorInputStream); line: 1, column: 212] (through reference chain: com.twilio.rest.pricing.v1.phonenumber.Country["phone_number_prices"]-
>java.util.ArrayList[0]->com.twilio.type.PhoneNumberPrice["number_type"])

Technical details: