Details
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/AccountResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/AccountResource.java
index 23aa22f..3f9b7b6 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/AccountResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/AccountResource.java
@@ -353,7 +353,7 @@ public class AccountResource extends JaxRsResourceBase {
@POST
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Create account")
+ @ApiOperation(value = "Create account", response = AccountJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid account data supplied")})
public Response createAccount(final AccountJson json,
@HeaderParam(HDR_CREATED_BY) final String createdBy,
@@ -803,7 +803,7 @@ public class AccountResource extends JaxRsResourceBase {
@Path("/{accountId:" + UUID_PATTERN + "}/" + PAYMENT_METHODS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add a payment method")
+ @ApiOperation(value = "Add a payment method", response = PaymentMethodJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid account id supplied"),
@ApiResponse(code = 404, message = "Account not found")})
public Response createPaymentMethod(final PaymentMethodJson json,
@@ -959,12 +959,14 @@ public class AccountResource extends JaxRsResourceBase {
return Response.status(Response.Status.OK).entity(result).build();
}
+
+
@TimedResource(name = "processPayment")
@POST
@Path("/" + PAYMENTS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Trigger a payment using the account external key (authorization, purchase or credit)")
+ @ApiOperation(value = "Trigger a payment using the account external key (authorization, purchase or credit)", response = PaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 201, message = "Payment transaction created successfully"),
@ApiResponse(code = 400, message = "Invalid account external key supplied"),
@ApiResponse(code = 404, message = "Account not found"),
@@ -994,7 +996,7 @@ public class AccountResource extends JaxRsResourceBase {
@Path("/{accountId:" + UUID_PATTERN + "}/" + PAYMENTS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Trigger a payment (authorization, purchase or credit)")
+ @ApiOperation(value = "Trigger a payment (authorization, purchase or credit)", response = PaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 201, message = "Payment transaction created successfully"),
@ApiResponse(code = 400, message = "Invalid account id supplied"),
@ApiResponse(code = 404, message = "Account not found"),
@@ -1193,7 +1195,7 @@ public class AccountResource extends JaxRsResourceBase {
@Path("/{accountId:" + UUID_PATTERN + "}/" + CUSTOM_FIELDS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add custom fields to account")
+ @ApiOperation(value = "Add custom fields to account", response = CustomField.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid account id supplied")})
public Response createCustomFields(@PathParam(ID_PARAM_NAME) final UUID accountId,
final List<CustomFieldJson> customFields,
@@ -1282,7 +1284,7 @@ public class AccountResource extends JaxRsResourceBase {
@POST
@Path("/{accountId:" + UUID_PATTERN + "}/" + TAGS)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add tags to account")
+ @ApiOperation(value = "Add tags to account", response = TagJson.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid account id supplied")})
public Response createTags(@PathParam(ID_PARAM_NAME) final UUID accountId,
@QueryParam(QUERY_TAGS) final String tagList,
@@ -1356,7 +1358,7 @@ public class AccountResource extends JaxRsResourceBase {
@Path("/{accountId:" + UUID_PATTERN + "}/" + EMAILS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add account email")
+ @ApiOperation(value = "Add account email", response = AccountEmailJson.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid account id supplied"),
@ApiResponse(code = 404, message = "Account not found")})
public Response addEmail(final AccountEmailJson json,
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/BundleResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/BundleResource.java
index 476d72a..b749afc 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/BundleResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/BundleResource.java
@@ -70,6 +70,7 @@ import org.killbill.billing.util.api.TagUserApi;
import org.killbill.billing.util.audit.AccountAuditLogs;
import org.killbill.billing.util.callcontext.CallContext;
import org.killbill.billing.util.callcontext.TenantContext;
+import org.killbill.billing.util.customfield.CustomField;
import org.killbill.billing.util.entity.Pagination;
import org.killbill.clock.Clock;
import org.killbill.commons.metrics.TimedResource;
@@ -308,7 +309,7 @@ public class BundleResource extends JaxRsResourceBase {
@Path("/{bundleId:" + UUID_PATTERN + "}/" + CUSTOM_FIELDS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add custom fields to bundle")
+ @ApiOperation(value = "Add custom fields to bundle", response = CustomField.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid bundle id supplied")})
public Response createCustomFields(@PathParam(ID_PARAM_NAME) final UUID bundleId,
final List<CustomFieldJson> customFields,
@@ -438,7 +439,7 @@ public class BundleResource extends JaxRsResourceBase {
@Path("/{bundleId:" + UUID_PATTERN + "}/" + TAGS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add tags to bundle")
+ @ApiOperation(value = "Add tags to bundle", response = TagJson.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid bundle id supplied")})
public Response createTags(@PathParam(ID_PARAM_NAME) final UUID bundleId,
@QueryParam(QUERY_TAGS) final String tagList,
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/CatalogResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/CatalogResource.java
index 70752e0..b6c36ab 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/CatalogResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/CatalogResource.java
@@ -116,7 +116,7 @@ public class CatalogResource extends JaxRsResourceBase {
@TimedResource
@GET
@Produces(APPLICATION_XML)
- @ApiOperation(value = "Retrieve the full catalog as XML", response = String.class, hidden = true)
+ @ApiOperation(value = "Retrieve the full catalog as XML", response = String.class)
@ApiResponses(value = {})
public Response getCatalogXml(@javax.ws.rs.core.Context final HttpServletRequest request) throws Exception {
final TenantContext tenantContext = context.createTenantContextNoAccountId(request);
@@ -352,7 +352,7 @@ public class CatalogResource extends JaxRsResourceBase {
@Path("/simplePlan")
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Upload the full catalog as XML")
+ @ApiOperation(value = "Add a simple plan entry in the current version of the catalog")
@ApiResponses(value = {})
public Response addSimplePlan(final SimplePlanJson simplePlan,
@HeaderParam(HDR_CREATED_BY) final String createdBy,
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/CreditResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/CreditResource.java
index d560165..01e4776 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/CreditResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/CreditResource.java
@@ -101,7 +101,7 @@ public class CreditResource extends JaxRsResourceBase {
@POST
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Create a credit")
+ @ApiOperation(value = "Create a credit", response = CreditJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid account id supplied"),
@ApiResponse(code = 404, message = "Account not found")})
public Response createCredit(final CreditJson json,
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/InvoiceItemResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/InvoiceItemResource.java
index 3b94ad5..197383d 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/InvoiceItemResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/InvoiceItemResource.java
@@ -53,6 +53,7 @@ import org.killbill.billing.util.api.TagApiException;
import org.killbill.billing.util.api.TagDefinitionApiException;
import org.killbill.billing.util.api.TagUserApi;
import org.killbill.billing.util.callcontext.TenantContext;
+import org.killbill.billing.util.customfield.CustomField;
import org.killbill.clock.Clock;
import org.killbill.commons.metrics.TimedResource;
@@ -93,7 +94,7 @@ public class InvoiceItemResource extends JaxRsResourceBase {
@Path("/{invoiceItemId:" + UUID_PATTERN + "}/" + CUSTOM_FIELDS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add custom fields to invoice item")
+ @ApiOperation(value = "Add custom fields to invoice item", response = CustomField.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid invoice item id supplied")})
public Response createCustomFields(@PathParam(ID_PARAM_NAME) final UUID id,
final List<CustomFieldJson> customFields,
@@ -165,7 +166,7 @@ public class InvoiceItemResource extends JaxRsResourceBase {
@Path("/{invoiceItemId:" + UUID_PATTERN + "}/" + TAGS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add tags to invoice item")
+ @ApiOperation(value = "Add tags to invoice item", response = TagJson.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid invoice item id supplied")})
public Response createTags(@PathParam(ID_PARAM_NAME) final UUID id,
@QueryParam(QUERY_TAGS) final String tagList,
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/InvoicePaymentResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/InvoicePaymentResource.java
index d01e40f..41bd280 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/InvoicePaymentResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/InvoicePaymentResource.java
@@ -72,6 +72,7 @@ import org.killbill.billing.util.api.TagUserApi;
import org.killbill.billing.util.audit.AccountAuditLogs;
import org.killbill.billing.util.callcontext.CallContext;
import org.killbill.billing.util.callcontext.TenantContext;
+import org.killbill.billing.util.customfield.CustomField;
import org.killbill.clock.Clock;
import org.killbill.commons.metrics.TimedResource;
@@ -146,7 +147,7 @@ public class InvoicePaymentResource extends JaxRsResourceBase {
@Path("/{paymentId:" + UUID_PATTERN + "}/" + REFUNDS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Refund a payment, and adjust the invoice if needed")
+ @ApiOperation(value = "Refund a payment, and adjust the invoice if needed", response = InvoicePaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid payment id supplied"),
@ApiResponse(code = 404, message = "Account or payment not found")})
public Response createRefundWithAdjustments(final InvoicePaymentTransactionJson json,
@@ -209,7 +210,7 @@ public class InvoicePaymentResource extends JaxRsResourceBase {
@Path("/{paymentId:" + UUID_PATTERN + "}/" + CHARGEBACKS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Record a chargeback")
+ @ApiOperation(value = "Record a chargeback", response = InvoicePaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid payment id supplied"),
@ApiResponse(code = 404, message = "Account or payment not found")})
public Response createChargeback(final InvoicePaymentTransactionJson json,
@@ -237,7 +238,7 @@ public class InvoicePaymentResource extends JaxRsResourceBase {
@Path("/{paymentId:" + UUID_PATTERN + "}/" + CHARGEBACK_REVERSALS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Record a chargebackReversal")
+ @ApiOperation(value = "Record a chargebackReversal", response = InvoicePaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid payment id supplied"),
@ApiResponse(code = 404, message = "Account or payment not found")})
public Response createChargebackReversal(final InvoicePaymentTransactionJson json,
@@ -328,7 +329,7 @@ public class InvoicePaymentResource extends JaxRsResourceBase {
@Path("/{paymentId:" + UUID_PATTERN + "}/" + CUSTOM_FIELDS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add custom fields to payment")
+ @ApiOperation(value = "Add custom fields to payment", response = CustomField.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid payment id supplied")})
public Response createCustomFields(@PathParam(ID_PARAM_NAME) final UUID id,
final List<CustomFieldJson> customFields,
@@ -400,7 +401,7 @@ public class InvoicePaymentResource extends JaxRsResourceBase {
@Path("/{paymentId:" + UUID_PATTERN + "}/" + TAGS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add tags to payment")
+ @ApiOperation(value = "Add tags to payment", response = TagJson.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid payment id supplied")})
public Response createTags(@PathParam(ID_PARAM_NAME) final UUID id,
@QueryParam(QUERY_TAGS) final String tagList,
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/InvoiceResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/InvoiceResource.java
index 8855d34..6a69479 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/InvoiceResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/InvoiceResource.java
@@ -101,6 +101,7 @@ import org.killbill.billing.util.api.TagUserApi;
import org.killbill.billing.util.audit.AccountAuditLogs;
import org.killbill.billing.util.callcontext.CallContext;
import org.killbill.billing.util.callcontext.TenantContext;
+import org.killbill.billing.util.customfield.CustomField;
import org.killbill.billing.util.entity.Pagination;
import org.killbill.clock.Clock;
import org.killbill.commons.metrics.TimedResource;
@@ -433,7 +434,7 @@ public class InvoiceResource extends JaxRsResourceBase {
@Path("/{invoiceId:" + UUID_PATTERN + "}")
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Adjust an invoice item")
+ @ApiOperation(value = "Adjust an invoice item", response = InvoiceJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid account id, invoice id or invoice item id supplied"),
@ApiResponse(code = 404, message = "Invoice not found")})
public Response adjustInvoiceItem(final InvoiceItemJson json,
@@ -640,7 +641,7 @@ public class InvoiceResource extends JaxRsResourceBase {
@Produces(APPLICATION_JSON)
@Consumes(APPLICATION_JSON)
@Path("/{invoiceId:" + UUID_PATTERN + "}/" + PAYMENTS)
- @ApiOperation(value = "Trigger a payment for invoice")
+ @ApiOperation(value = "Trigger a payment for invoice", response = InvoicePaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid account id or invoice id supplied"),
@ApiResponse(code = 404, message = "Account not found")})
public Response createInstantPayment(final InvoicePaymentJson payment,
@@ -676,7 +677,7 @@ public class InvoiceResource extends JaxRsResourceBase {
@GET
@Path("/" + INVOICE_TRANSLATION + "/{locale:" + ANYTHING_PATTERN + "}/")
@Produces(TEXT_PLAIN)
- @ApiOperation(value = "Retrieves the invoice translation for the tenant", response = String.class, hidden = true)
+ @ApiOperation(value = "Retrieves the invoice translation for the tenant", response = String.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid locale supplied"),
@ApiResponse(code = 404, message = "Translation not found")})
public Response getInvoiceTranslation(@PathParam("locale") final String localeStr,
@@ -755,7 +756,7 @@ public class InvoiceResource extends JaxRsResourceBase {
@GET
@Path("/" + INVOICE_TEMPLATE)
@Produces(TEXT_HTML)
- @ApiOperation(value = "Retrieves the invoice template for the tenant", response = String.class, hidden = true)
+ @ApiOperation(value = "Retrieves the invoice template for the tenant", response = String.class)
@ApiResponses(value = {@ApiResponse(code = 404, message = "Template not found")})
public Response getInvoiceTemplate(@javax.ws.rs.core.Context final HttpServletRequest request) throws InvoiceApiException, TenantApiException {
return getTemplateResource(null, TenantKey.INVOICE_TEMPLATE, request);
@@ -791,7 +792,7 @@ public class InvoiceResource extends JaxRsResourceBase {
@GET
@Path("/" + INVOICE_MP_TEMPLATE)
@Produces(TEXT_HTML)
- @ApiOperation(value = "Retrieves the manualPay invoice template for the tenant", response = String.class, hidden = true)
+ @ApiOperation(value = "Retrieves the manualPay invoice template for the tenant", response = String.class)
@ApiResponses(value = {@ApiResponse(code = 404, message = "Template not found")})
public Response getInvoiceMPTemplate(@PathParam("locale") final String localeStr,
@javax.ws.rs.core.Context final HttpServletRequest request) throws InvoiceApiException, TenantApiException {
@@ -886,7 +887,7 @@ public class InvoiceResource extends JaxRsResourceBase {
@Path("/{invoiceId:" + UUID_PATTERN + "}/" + CUSTOM_FIELDS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add custom fields to invoice")
+ @ApiOperation(value = "Add custom fields to invoice", response = CustomField.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid invoice id supplied")})
public Response createCustomFields(@PathParam(ID_PARAM_NAME) final UUID id,
final List<CustomFieldJson> customFields,
@@ -955,7 +956,7 @@ public class InvoiceResource extends JaxRsResourceBase {
@Path("/{invoiceId:" + UUID_PATTERN + "}/" + TAGS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add tags to invoice")
+ @ApiOperation(value = "Add tags to invoice", response = TagJson.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid invoice id supplied")})
public Response createTags(@PathParam(ID_PARAM_NAME) final UUID id,
@QueryParam(QUERY_TAGS) final String tagList,
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/OverdueResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/OverdueResource.java
index 6281a83..4c77326 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/OverdueResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/OverdueResource.java
@@ -83,7 +83,7 @@ public class OverdueResource extends JaxRsResourceBase {
@TimedResource
@GET
@Produces(APPLICATION_XML)
- @ApiOperation(value = "Retrieve the overdue config as XML", response = String.class, hidden = true)
+ @ApiOperation(value = "Retrieve the overdue config as XML", response = String.class)
@ApiResponses(value = {})
public Response getOverdueConfigXml(@javax.ws.rs.core.Context final HttpServletRequest request) throws Exception {
final TenantContext tenantContext = context.createTenantContextNoAccountId(request);
@@ -128,7 +128,7 @@ public class OverdueResource extends JaxRsResourceBase {
@POST
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Upload the full overdue config as JSON")
+ @ApiOperation(value = "Upload the full overdue config as JSON", response = OverdueJson.class)
@ApiResponses(value = {})
public Response uploadOverdueConfigJson(final OverdueJson overdueJson,
@HeaderParam(HDR_CREATED_BY) final String createdBy,
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/PaymentGatewayResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/PaymentGatewayResource.java
index 818b4ff..68c6ddd 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/PaymentGatewayResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/PaymentGatewayResource.java
@@ -160,7 +160,7 @@ public class PaymentGatewayResource extends ComboPaymentResource {
@Path("/" + NOTIFICATION + "/{" + QUERY_PAYMENT_PLUGIN_NAME + ":" + ANYTHING_PATTERN + "}")
@Consumes(WILDCARD)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Process a gateway notification", notes = "The response is built by the appropriate plugin")
+ @ApiOperation(value = "Process a gateway notification", notes = "The response is built by the appropriate plugin", response = GatewayNotificationJson.class)
@ApiResponses(value = {})
public Response processNotification(final String body,
@PathParam(QUERY_PAYMENT_PLUGIN_NAME) final String pluginName,
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/PaymentMethodResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/PaymentMethodResource.java
index 89e3ac5..78384af 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/PaymentMethodResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/PaymentMethodResource.java
@@ -60,6 +60,7 @@ import org.killbill.billing.util.api.TagUserApi;
import org.killbill.billing.util.audit.AccountAuditLogs;
import org.killbill.billing.util.callcontext.CallContext;
import org.killbill.billing.util.callcontext.TenantContext;
+import org.killbill.billing.util.customfield.CustomField;
import org.killbill.billing.util.entity.Pagination;
import org.killbill.clock.Clock;
import org.killbill.commons.metrics.TimedResource;
@@ -297,7 +298,7 @@ public class PaymentMethodResource extends JaxRsResourceBase {
@Path("/{paymentMethodId:" + UUID_PATTERN + "}/" + CUSTOM_FIELDS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add custom fields to payment method")
+ @ApiOperation(value = "Add custom fields to payment method", response = CustomField.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid payment method id supplied")})
public Response createCustomFields(@PathParam("paymentMethodId") final UUID paymentMethodId,
final List<CustomFieldJson> customFields,
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/PaymentResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/PaymentResource.java
index 6c7d14c..6cad170 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/PaymentResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/PaymentResource.java
@@ -69,6 +69,7 @@ import org.killbill.billing.util.api.TagUserApi;
import org.killbill.billing.util.audit.AccountAuditLogs;
import org.killbill.billing.util.callcontext.CallContext;
import org.killbill.billing.util.callcontext.TenantContext;
+import org.killbill.billing.util.customfield.CustomField;
import org.killbill.billing.util.entity.Pagination;
import org.killbill.clock.Clock;
import org.killbill.commons.metrics.MetricTag;
@@ -299,7 +300,7 @@ public class PaymentResource extends ComboPaymentResource {
@Path("/{paymentId:" + UUID_PATTERN + "}/")
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Capture an existing authorization")
+ @ApiOperation(value = "Capture an existing authorization", response = PaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 201, message = "Payment transaction created successfully"),
@ApiResponse(code = 400, message = "Invalid paymentId supplied"),
@ApiResponse(code = 404, message = "Account or payment not found"),
@@ -324,7 +325,7 @@ public class PaymentResource extends ComboPaymentResource {
@POST
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Capture an existing authorization")
+ @ApiOperation(value = "Capture an existing authorization", response = PaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 201, message = "Payment transaction created successfully"),
@ApiResponse(code = 404, message = "Account or payment not found"),
@ApiResponse(code = 402, message = "Transaction declined by gateway"),
@@ -377,7 +378,7 @@ public class PaymentResource extends ComboPaymentResource {
@Path("/{paymentId:" + UUID_PATTERN + "}/" + REFUNDS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Refund an existing payment")
+ @ApiOperation(value = "Refund an existing payment", response = PaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 201, message = "Payment transaction created successfully"),
@ApiResponse(code = 400, message = "Invalid paymentId supplied"),
@ApiResponse(code = 404, message = "Account or payment not found"),
@@ -403,7 +404,7 @@ public class PaymentResource extends ComboPaymentResource {
@Path("/" + REFUNDS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Refund an existing payment")
+ @ApiOperation(value = "Refund an existing payment", response = PaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 201, message = "Payment transaction created successfully"),
@ApiResponse(code = 404, message = "Account or payment not found"),
@ApiResponse(code = 402, message = "Transaction declined by gateway"),
@@ -534,7 +535,7 @@ public class PaymentResource extends ComboPaymentResource {
@Path("/{paymentId:" + UUID_PATTERN + "}/" + CHARGEBACKS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Record a chargeback")
+ @ApiOperation(value = "Record a chargeback", response = PaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 201, message = "Payment transaction created successfully"),
@ApiResponse(code = 400, message = "Invalid paymentId supplied"),
@ApiResponse(code = 404, message = "Account or payment not found"),
@@ -560,7 +561,7 @@ public class PaymentResource extends ComboPaymentResource {
@Path("/" + CHARGEBACKS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Record a chargeback")
+ @ApiOperation(value = "Record a chargeback", response = PaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 201, message = "Payment transaction created successfully"),
@ApiResponse(code = 404, message = "Account or payment not found"),
@ApiResponse(code = 402, message = "Transaction declined by gateway"),
@@ -613,7 +614,7 @@ public class PaymentResource extends ComboPaymentResource {
@Path("/{paymentId:" + UUID_PATTERN + "}/" + CHARGEBACK_REVERSALS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Record a chargeback reversal")
+ @ApiOperation(value = "Record a chargeback reversal", response = PaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 201, message = "Payment transaction created successfully"),
@ApiResponse(code = 400, message = "Invalid paymentId supplied"),
@ApiResponse(code = 404, message = "Account or payment not found"),
@@ -639,7 +640,7 @@ public class PaymentResource extends ComboPaymentResource {
@Path("/" + CHARGEBACK_REVERSALS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Record a chargeback reversal")
+ @ApiOperation(value = "Record a chargeback reversal", response = PaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 201, message = "Payment transaction created successfully"),
@ApiResponse(code = 404, message = "Account or payment not found"),
@ApiResponse(code = 402, message = "Transaction declined by gateway"),
@@ -687,7 +688,7 @@ public class PaymentResource extends ComboPaymentResource {
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
@Path("/" + COMBO)
- @ApiOperation(value = "Combo api to create a new payment transaction on a existing (or not) account ")
+ @ApiOperation(value = "Combo api to create a new payment transaction on a existing (or not) account ", response = PaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 201, message = "Payment transaction created successfully"),
@ApiResponse(code = 400, message = "Invalid data for Account or PaymentMethod"),
@ApiResponse(code = 402, message = "Transaction declined by gateway"),
@@ -798,7 +799,7 @@ public class PaymentResource extends ComboPaymentResource {
@Path("/{paymentId:" + UUID_PATTERN + "}/" + CUSTOM_FIELDS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add custom fields to payment")
+ @ApiOperation(value = "Add custom fields to payment", response = CustomField.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid payment id supplied")})
public Response createCustomFields(@PathParam(ID_PARAM_NAME) final UUID id,
final List<CustomFieldJson> customFields,
@@ -866,7 +867,7 @@ public class PaymentResource extends ComboPaymentResource {
@Path("/{paymentId:" + UUID_PATTERN + "}/" + TAGS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add tags to payment payment")
+ @ApiOperation(value = "Add tags to payment payment", response = TagJson.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid payment id supplied")})
public Response createTags(@PathParam(ID_PARAM_NAME) final UUID paymentId,
@QueryParam(QUERY_TAGS) final String tagList,
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/SubscriptionResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/SubscriptionResource.java
index 5f8cf95..a6b1b0d 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/SubscriptionResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/SubscriptionResource.java
@@ -166,7 +166,7 @@ public class SubscriptionResource extends JaxRsResourceBase {
@POST
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Create an entitlement")
+ @ApiOperation(value = "Create an entitlement", response = SubscriptionJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid entitlement supplied")})
public Response createEntitlement(final SubscriptionJson entitlement,
@QueryParam(QUERY_REQUESTED_DT) final String requestedDate, /* This is deprecated, only used for backward compatibility */
@@ -935,7 +935,7 @@ public class SubscriptionResource extends JaxRsResourceBase {
@Path("/{subscriptionId:" + UUID_PATTERN + "}/" + TAGS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add tags to subscription")
+ @ApiOperation(value = "Add tags to subscription", response = TagJson.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid subscription id supplied")})
public Response createTags(@PathParam(ID_PARAM_NAME) final UUID id,
@QueryParam(QUERY_TAGS) final String tagList,
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TagDefinitionResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TagDefinitionResource.java
index 7f5d997..f0887e5 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TagDefinitionResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TagDefinitionResource.java
@@ -118,7 +118,7 @@ public class TagDefinitionResource extends JaxRsResourceBase {
@POST
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Create a tag definition")
+ @ApiOperation(value = "Create a tag definition", response = TagDefinitionJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid name or description supplied")})
public Response createTagDefinition(final TagDefinitionJson json,
@HeaderParam(HDR_CREATED_BY) final String createdBy,
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TenantResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TenantResource.java
index 33fa7d7..8f1145d 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TenantResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TenantResource.java
@@ -123,7 +123,7 @@ public class TenantResource extends JaxRsResourceBase {
@POST
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Create a tenant")
+ @ApiOperation(value = "Create a tenant", response = TenantJson.class)
@ApiResponses(value = {@ApiResponse(code = 500, message = "Tenant already exists")})
public Response createTenant(final TenantJson json,
@QueryParam(QUERY_TENANT_USE_GLOBAL_DEFAULT) @DefaultValue("false") final Boolean useGlobalDefault,
@@ -153,7 +153,7 @@ public class TenantResource extends JaxRsResourceBase {
@Path("/" + REGISTER_NOTIFICATION_CALLBACK)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Create a push notification")
+ @ApiOperation(value = "Create a push notification", response = TenantKeyJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid tenantId supplied")})
public Response registerPushNotificationCallback(@QueryParam(QUERY_NOTIFICATION_CALLBACK) final String notificationCallback,
@HeaderParam(HDR_CREATED_BY) final String createdBy,
@@ -191,7 +191,7 @@ public class TenantResource extends JaxRsResourceBase {
@Path("/" + UPLOAD_PLUGIN_CONFIG + "/{pluginName:" + ANYTHING_PATTERN + "}")
@Consumes(TEXT_PLAIN)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add a per tenant configuration for a plugin")
+ @ApiOperation(value = "Add a per tenant configuration for a plugin", response = TenantKeyJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid tenantId supplied")})
public Response uploadPluginConfiguration(final String pluginConfig,
@PathParam("pluginName") final String pluginName,
@@ -254,7 +254,7 @@ public class TenantResource extends JaxRsResourceBase {
@Path("/" + UPLOAD_PER_TENANT_CONFIG)
@Consumes(TEXT_PLAIN)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add a per tenant configuration (system properties)")
+ @ApiOperation(value = "Add a per tenant configuration (system properties)", response = TenantKeyJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid tenantId supplied")})
public Response uploadPerTenantConfiguration(final String perTenantConfig,
@HeaderParam(HDR_CREATED_BY) final String createdBy,
@@ -292,7 +292,7 @@ public class TenantResource extends JaxRsResourceBase {
@Path("/" + UPLOAD_PLUGIN_PAYMENT_STATE_MACHINE_CONFIG + "/{pluginName:" + ANYTHING_PATTERN + "}")
@Consumes(TEXT_PLAIN)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add a per tenant payment state machine for a plugin")
+ @ApiOperation(value = "Add a per tenant payment state machine for a plugin", response = TenantKeyJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid tenantId supplied")})
public Response uploadPluginPaymentStateMachineConfig(final String paymentStateMachineConfig,
@PathParam("pluginName") final String pluginName,
@@ -333,7 +333,7 @@ public class TenantResource extends JaxRsResourceBase {
@Path("/" + USER_KEY_VALUE + "/{keyName:" + ANYTHING_PATTERN + "}")
@Consumes(TEXT_PLAIN)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add a per tenant user key/value")
+ @ApiOperation(value = "Add a per tenant user key/value", response = TenantKeyJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid tenantId supplied")})
public Response insertUserKeyValue(@PathParam("keyName") final String key,
final String value,
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TransactionResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TransactionResource.java
index 31f6522..32e1bbd 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TransactionResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TransactionResource.java
@@ -61,6 +61,7 @@ import org.killbill.billing.util.api.TagUserApi;
import org.killbill.billing.util.audit.AccountAuditLogs;
import org.killbill.billing.util.callcontext.CallContext;
import org.killbill.billing.util.callcontext.TenantContext;
+import org.killbill.billing.util.customfield.CustomField;
import org.killbill.clock.Clock;
import org.killbill.commons.metrics.TimedResource;
@@ -115,7 +116,7 @@ public class TransactionResource extends JaxRsResourceBase {
@Path("/{transactionId:" + UUID_PATTERN + "}/")
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Mark a pending payment transaction as succeeded or failed")
+ @ApiOperation(value = "Mark a pending payment transaction as succeeded or failed", response = PaymentJson.class)
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid paymentId supplied"),
@ApiResponse(code = 404, message = "Account or Payment not found")})
public Response notifyStateChanged(final PaymentTransactionJson json,
@@ -161,7 +162,7 @@ public class TransactionResource extends JaxRsResourceBase {
@Path("/{transactionId:" + UUID_PATTERN + "}/" + CUSTOM_FIELDS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add custom fields to payment transaction")
+ @ApiOperation(value = "Add custom fields to payment transaction", response = CustomField.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid transaction id supplied")})
public Response createCustomFields(@PathParam(ID_PARAM_NAME) final UUID id,
final List<CustomFieldJson> customFields,
@@ -231,7 +232,7 @@ public class TransactionResource extends JaxRsResourceBase {
@Path("/{transactionId:" + UUID_PATTERN + "}/" + TAGS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
- @ApiOperation(value = "Add tags to payment transaction")
+ @ApiOperation(value = "Add tags to payment transaction", response = TagJson.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid transaction id supplied")})
public Response createTags(@PathParam(ID_PARAM_NAME) final UUID id,
@QueryParam(QUERY_TAGS) final String tagList,