use of org.killbill.billing.jaxrs.json.AdminPaymentJson in project killbill by killbill.
the class TestAdmin method fixPaymentState.
private void fixPaymentState(final Payment payment, final String lastSuccessPaymentState, final String currentPaymentStateName, final TransactionStatus transactionStatus) throws KillBillClientException {
//
// We do not expose the endpoint in the client API on purpose since this should only be accessed using special permission ADMIN_CAN_FIX_DATA
// for when there is a need to fix payment state.
//
final String uri = "/1.0/kb/admin/payments/" + payment.getPaymentId().toString() + "/transactions/" + payment.getTransactions().get(0).getTransactionId().toString();
final AdminPaymentJson body = new AdminPaymentJson(lastSuccessPaymentState, currentPaymentStateName, transactionStatus.toString());
final Multimap result = HashMultimap.create();
result.put(KillBillHttpClient.AUDIT_OPTION_CREATED_BY, createdBy);
result.put(KillBillHttpClient.AUDIT_OPTION_REASON, reason);
result.put(KillBillHttpClient.AUDIT_OPTION_COMMENT, comment);
killBillHttpClient.doPut(uri, body, result);
}
Aggregations