@Override public ExternalAccount update(Map<String, Object> params, RequestOptions options) throws StripeException { return request(RequestMethod.POST, this.getInstanceUrl(), params, ExternalAccount.class, options); } // </editor-fold>
public ExternalAccount delete(RequestOptions options) throws StripeException { return request(RequestMethod.DELETE, this.getInstanceUrl(), null, ExternalAccount.class, options); } // </editor-fold>
@Override protected String getInstanceUrl() { String result = super.getInstanceUrl(); if (result == null) { return String.format("%s/%s/%s", Stripe.getApiBase(), "v1/bitcoin/receivers", this.getId()); } else { return result; } } }
/** * Verifies a bank account. * * @param params request parameters * @param options request options * @return the verified bank account */ public ExternalAccount verify(Map<String, Object> params, RequestOptions options) throws StripeException { if (this.getCustomer() != null) { return request(RequestMethod.POST, String.format("%s/verify", this.getInstanceUrl()), params, ExternalAccount.class, options); } else { throw new InvalidRequestException( "Only customer bank accounts can be verified in this manner.", null, null, null, 0, null); } } // </editor-fold>
@Override protected String getInstanceUrl() { String result = super.getInstanceUrl(); if (result != null) { return result; } else if (this.getRecipient() != null) { return String.format("%s/%s/cards/%s", classUrl(Recipient.class), this.getRecipient(), this.getId()); } else { return null; } } }