public PaymentMethod find(String token) {
if(token.trim().equals("") || token == null)
throw new NotFoundException();
NodeWrapper response = http.get("/payment_methods/any/" + token);
if (response.getElementName() == "paypal-account") {
return new PayPalAccount(response);
} else if (response.getElementName() == "credit-card") {
return new CreditCard(response);
} else if (response.getElementName() == "sepa-bank-account") {
return new SEPABankAccount(response);
} else {
return new UnknownPaymentMethod(response);
}
}