@@ -12,26 +12,43 @@ public final class CreditCard extends AbstractModel {
1212 private final String country ;
1313 private final Boolean isIssuedInBillingAddressCountry ;
1414 private final Boolean isPrepaid ;
15+ private final Boolean isVirtual ;
1516 private final String type ;
1617
18+ // This method is for backwards compatibility. We should remove it when we
19+ // do a major release.
20+ public CreditCard (
21+ String brand ,
22+ String country ,
23+ Boolean isIssuedInBillingAddressCountry ,
24+ Boolean isPrepaid ,
25+ Issuer issuer ,
26+ String type
27+ ) {
28+ this (brand , country , isIssuedInBillingAddressCountry , isPrepaid , false ,
29+ issuer , type );
30+ }
31+
1732 public CreditCard (
1833 @ JsonProperty ("brand" ) String brand ,
1934 @ JsonProperty ("country" ) String country ,
2035 @ JsonProperty ("is_issued_in_billing_address_country" ) Boolean isIssuedInBillingAddressCountry ,
2136 @ JsonProperty ("is_prepaid" ) Boolean isPrepaid ,
37+ @ JsonProperty ("is_virtual" ) Boolean isVirtual ,
2238 @ JsonProperty ("issuer" ) Issuer issuer ,
2339 @ JsonProperty ("type" ) String type
2440 ) {
2541 this .brand = brand ;
2642 this .country = country ;
2743 this .isIssuedInBillingAddressCountry = isIssuedInBillingAddressCountry ;
2844 this .isPrepaid = isPrepaid ;
45+ this .isVirtual = isVirtual ;
2946 this .issuer = issuer == null ? new Issuer () : issuer ;
3047 this .type = type ;
3148 }
3249
3350 public CreditCard () {
34- this (null , null , null , null , null , null );
51+ this (null , null , null , null , null , null , null );
3552 }
3653
3754 /**
@@ -49,7 +66,7 @@ public String getBrand() {
4966 }
5067
5168 /**
52- * @return The two letter <a href="http ://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">
69+ * @return The two letter <a href="https ://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">
5370 * ISO 3166-1 alpha-2</a> country code associated with the location
5471 * of the majority of customers using this credit card as determined
5572 * by their billing address. In cases where the location of customers
@@ -80,6 +97,15 @@ public Boolean isPrepaid() {
8097 return isPrepaid ;
8198 }
8299
100+ /**
101+ * @return True if the card is a virtual card. False if not virtual. If the
102+ * IIN was not provided or is unknown, null will be returned.
103+ */
104+ @ JsonProperty ("is_virtual" )
105+ public Boolean isVirtual () {
106+ return isVirtual ;
107+ }
108+
83109 /**
84110 * @return The credit card type.
85111 */
0 commit comments