@Nullable public static BankAccount fromJson(@Nullable JSONObject jsonObject) { if (jsonObject == null) { return null; } return new BankAccount( StripeJsonUtils.optString(jsonObject, FIELD_ACCOUNT_HOLDER_NAME), asBankAccountType( StripeJsonUtils.optString(jsonObject, FIELD_ACCOUNT_HOLDER_TYPE)), StripeJsonUtils.optString(jsonObject, FIELD_BANK_NAME), StripeJsonUtils.optCountryCode(jsonObject, FIELD_COUNTRY), StripeJsonUtils.optCurrency(jsonObject, FIELD_CURRENCY), StripeJsonUtils.optString(jsonObject, FIELD_FINGERPRINT), StripeJsonUtils.optString(jsonObject, FIELD_LAST4), StripeJsonUtils.optString(jsonObject, FIELD_ROUTING_NUMBER)); } }