99public final class Phone extends AbstractModel {
1010 private final String country ;
1111 private final Boolean isVoip ;
12+ private final Boolean matchesPostal ;
1213 private final String networkOperator ;
1314 private final String numberType ;
1415
1516 /**
1617 * @param country The ISO 3166-2 country code for the phone number.
1718 * @param isVoip Whether the number is VoIP.
19+ * @param matchesPostal Whether the phone number matches the postal code.
1820 * @param networkOperator The network operator associated with the phone number.
1921 * @param numberType The type of the phone number.
2022 */
2123 public Phone (
2224 @ JsonProperty ("country" ) String country ,
2325 @ JsonProperty ("is_voip" ) Boolean isVoip ,
26+ @ JsonProperty ("matches_postal" ) Boolean matchesPostal ,
2427 @ JsonProperty ("network_operator" ) String networkOperator ,
2528 @ JsonProperty ("number_type" ) String numberType
2629 ) {
2730 this .country = country ;
2831 this .isVoip = isVoip ;
32+ this .matchesPostal = matchesPostal ;
2933 this .networkOperator = networkOperator ;
3034 this .numberType = numberType ;
3135 }
3236
37+ /**
38+ * @param country The ISO 3166-2 country code for the phone number.
39+ * @param isVoip Whether the number is VoIP.
40+ * @param networkOperator The network operator associated with the phone number.
41+ * @param numberType The type of the phone number.
42+ *
43+ * @deprecated use other constructor instead.
44+ */
45+ @ Deprecated
46+ public Phone (
47+ String country ,
48+ Boolean isVoip ,
49+ String networkOperator ,
50+ String numberType
51+ ) {
52+ this (country , isVoip , null , networkOperator , numberType );
53+ }
54+
3355 /**
3456 * Constructor for {@code Phone}.
3557 */
@@ -56,6 +78,17 @@ public Boolean isVoip() {
5678 return isVoip ;
5779 }
5880
81+ /**
82+ * @return This is {@code true} if the phone number's prefix is commonly associated with the
83+ * postal code. It is {@code false} if the prefix is not associated with the postal code.
84+ * It is non-{@code null} only when the phone number is in the US, the number prefix is
85+ * in our database, and the postal code and country are provided in the request.
86+ */
87+ @ JsonProperty ("matches_postal" )
88+ public Boolean matchesPostal () {
89+ return matchesPostal ;
90+ }
91+
5992 /**
6093 * @return The name of the original network operator associated with the phone number. This
6194 * field does not reflect phone numbers that have been ported from the original operator to
0 commit comments