Search in sources :

Example 86 with POST

use of javax.ws.rs.POST in project killbill by killbill.

the class SubscriptionResource method createEntitlementsWithAddOns.

@TimedResource
@POST
@Path("/createEntitlementsWithAddOns")
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
@ApiOperation(value = "Create multiple entitlements with addOn products")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid entitlements supplied") })
public Response createEntitlementsWithAddOns(final List<BulkBaseSubscriptionAndAddOnsJson> entitlementsWithAddOns, @QueryParam(QUERY_REQUESTED_DT) final String requestedDate, /* This is deprecated, only used for backward compatibility */
@QueryParam(QUERY_ENTITLEMENT_REQUESTED_DT) final String entitlementDate, @QueryParam(QUERY_BILLING_REQUESTED_DT) final String billingDate, @QueryParam(QUERY_MIGRATED) @DefaultValue("false") final Boolean isMigrated, @QueryParam(QUERY_CALL_COMPLETION) @DefaultValue("false") final Boolean callCompletion, @QueryParam(QUERY_CALL_TIMEOUT) @DefaultValue("3") final long timeoutSec, @QueryParam(QUERY_PLUGIN_PROPERTY) final List<String> pluginPropertiesString, @HeaderParam(HDR_CREATED_BY) final String createdBy, @HeaderParam(HDR_REASON) final String reason, @HeaderParam(HDR_COMMENT) final String comment, @javax.ws.rs.core.Context final HttpServletRequest request, @javax.ws.rs.core.Context final UriInfo uriInfo) throws EntitlementApiException, AccountApiException, SubscriptionApiException {
    Preconditions.checkArgument(Iterables.size(entitlementsWithAddOns) > 0, "Subscription bulk list mustn't be null or empty.");
    logDeprecationParameterWarningIfNeeded(QUERY_REQUESTED_DT, QUERY_ENTITLEMENT_REQUESTED_DT, QUERY_BILLING_REQUESTED_DT);
    final Iterable<PluginProperty> pluginProperties = extractPluginProperties(pluginPropertiesString);
    final CallContext callContext = context.createContext(createdBy, reason, comment, request);
    final Account account = accountUserApi.getAccountById(UUID.fromString(entitlementsWithAddOns.get(0).getBaseEntitlementAndAddOns().get(0).getAccountId()), callContext);
    final List<BaseEntitlementWithAddOnsSpecifier> baseEntitlementWithAddOnsSpecifierList = new ArrayList<BaseEntitlementWithAddOnsSpecifier>();
    for (BulkBaseSubscriptionAndAddOnsJson bulkBaseEntitlementWithAddOns : entitlementsWithAddOns) {
        final Iterable<SubscriptionJson> baseEntitlements = Iterables.filter(bulkBaseEntitlementWithAddOns.getBaseEntitlementAndAddOns(), new Predicate<SubscriptionJson>() {

            @Override
            public boolean apply(final SubscriptionJson subscription) {
                return ProductCategory.BASE.toString().equalsIgnoreCase(subscription.getProductCategory());
            }
        });
        Preconditions.checkArgument(Iterables.size(baseEntitlements) > 0, "SubscriptionJson Base Entitlement needs to be provided");
        verifyNumberOfElements(Iterables.size(baseEntitlements), 1, "Only one BASE product is allowed per bundle.");
        final Iterable<SubscriptionJson> entitlementsWithBundleSpecified = Iterables.filter(bulkBaseEntitlementWithAddOns.getBaseEntitlementAndAddOns(), new Predicate<SubscriptionJson>() {

            @Override
            public boolean apply(final SubscriptionJson subscription) {
                return subscription.getBundleId() != null;
            }
        });
        Preconditions.checkArgument(Iterables.size(entitlementsWithBundleSpecified) == 0, "BundleId must not be specified when creating new bulks");
        SubscriptionJson baseEntitlement = baseEntitlements.iterator().next();
        final int addOnSubscriptionsSize = Iterables.size(Iterables.filter(bulkBaseEntitlementWithAddOns.getBaseEntitlementAndAddOns(), new Predicate<SubscriptionJson>() {

            @Override
            public boolean apply(final SubscriptionJson subscription) {
                return ProductCategory.ADD_ON.toString().equals(subscription.getProductCategory());
            }
        }));
        verifyNumberOfElements(addOnSubscriptionsSize, bulkBaseEntitlementWithAddOns.getBaseEntitlementAndAddOns().size() - 1, "It should be " + (bulkBaseEntitlementWithAddOns.getBaseEntitlementAndAddOns().size() - 1) + " ADD_ON products.");
        final List<EntitlementSpecifier> entitlementSpecifierList = buildEntitlementSpecifierList(bulkBaseEntitlementWithAddOns.getBaseEntitlementAndAddOns(), account.getCurrency());
        // create the baseEntitlementSpecifierWithAddOns
        final LocalDate resolvedEntitlementDate = requestedDate != null ? toLocalDate(requestedDate) : toLocalDate(entitlementDate);
        final LocalDate resolvedBillingDate = requestedDate != null ? toLocalDate(requestedDate) : toLocalDate(billingDate);
        BaseEntitlementWithAddOnsSpecifier baseEntitlementSpecifierWithAddOns = buildBaseEntitlementWithAddOnsSpecifier(entitlementSpecifierList, resolvedEntitlementDate, resolvedBillingDate, null, baseEntitlement, isMigrated);
        baseEntitlementWithAddOnsSpecifierList.add(baseEntitlementSpecifierWithAddOns);
    }
    final EntitlementCallCompletionCallback<List<Entitlement>> callback = new EntitlementCallCompletionCallback<List<Entitlement>>() {

        @Override
        public List<Entitlement> doOperation(final CallContext ctx) throws InterruptedException, TimeoutException, EntitlementApiException, SubscriptionApiException, AccountApiException {
            return entitlementApi.createBaseEntitlementsWithAddOns(account.getId(), baseEntitlementWithAddOnsSpecifierList, pluginProperties, callContext);
        }

        @Override
        public boolean isImmOperation() {
            return true;
        }

        @Override
        public Response doResponseOk(final List<Entitlement> entitlements) {
            return uriBuilder.buildResponse(uriInfo, AccountResource.class, "getAccountBundles", entitlements.get(0).getAccountId(), buildQueryParams(buildBundleIdList(entitlements)), request);
        }
    };
    final EntitlementCallCompletion<List<Entitlement>> callCompletionCreation = new EntitlementCallCompletion<List<Entitlement>>();
    return callCompletionCreation.withSynchronization(callback, timeoutSec, callCompletion, callContext);
}
Also used : Account(org.killbill.billing.account.api.Account) SubscriptionJson(org.killbill.billing.jaxrs.json.SubscriptionJson) ArrayList(java.util.ArrayList) BulkBaseSubscriptionAndAddOnsJson(org.killbill.billing.jaxrs.json.BulkBaseSubscriptionAndAddOnsJson) CallContext(org.killbill.billing.util.callcontext.CallContext) LocalDate(org.joda.time.LocalDate) Predicate(com.google.common.base.Predicate) EntitlementSpecifier(org.killbill.billing.entitlement.api.EntitlementSpecifier) PluginProperty(org.killbill.billing.payment.api.PluginProperty) BaseEntitlementWithAddOnsSpecifier(org.killbill.billing.entitlement.api.BaseEntitlementWithAddOnsSpecifier) List(java.util.List) ArrayList(java.util.ArrayList) Entitlement(org.killbill.billing.entitlement.api.Entitlement) PlanPhasePriceOverride(org.killbill.billing.catalog.api.PlanPhasePriceOverride) Path(javax.ws.rs.Path) TimedResource(org.killbill.commons.metrics.TimedResource) POST(javax.ws.rs.POST) Consumes(javax.ws.rs.Consumes) Produces(javax.ws.rs.Produces) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses)

Example 87 with POST

use of javax.ws.rs.POST in project killbill by killbill.

the class InvoiceResource method createExternalCharges.

@TimedResource
@POST
@Produces(APPLICATION_JSON)
@Consumes(APPLICATION_JSON)
@Path("/" + CHARGES + "/{accountId:" + UUID_PATTERN + "}")
@ApiOperation(value = "Create external charge(s)", response = InvoiceItemJson.class, responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid account id supplied"), @ApiResponse(code = 404, message = "Account not found") })
public Response createExternalCharges(final Iterable<InvoiceItemJson> externalChargesJson, @PathParam("accountId") final String accountId, @QueryParam(QUERY_REQUESTED_DT) final String requestedDateTimeString, @QueryParam(QUERY_PAY_INVOICE) @DefaultValue("false") final Boolean payInvoice, @QueryParam(QUERY_PLUGIN_PROPERTY) final List<String> pluginPropertiesString, @QueryParam(QUERY_AUTO_COMMIT) @DefaultValue("false") final Boolean autoCommit, @QueryParam(QUERY_PAYMENT_EXTERNAL_KEY) final String paymentExternalKey, @QueryParam(QUERY_TRANSACTION_EXTERNAL_KEY) final String transactionExternalKey, @HeaderParam(HDR_CREATED_BY) final String createdBy, @HeaderParam(HDR_REASON) final String reason, @HeaderParam(HDR_COMMENT) final String comment, @javax.ws.rs.core.Context final UriInfo uriInfo, @javax.ws.rs.core.Context final HttpServletRequest request) throws AccountApiException, InvoiceApiException, PaymentApiException {
    final Iterable<PluginProperty> pluginProperties = extractPluginProperties(pluginPropertiesString);
    final CallContext callContext = context.createContext(createdBy, reason, comment, request);
    final Account account = accountUserApi.getAccountById(UUID.fromString(accountId), callContext);
    final Iterable<InvoiceItem> sanitizedExternalChargesJson = validateSanitizeAndTranformInputItems(account.getCurrency(), externalChargesJson);
    // Get the effective date of the external charge, in the account timezone
    final LocalDate requestedDate = toLocalDateDefaultToday(account, requestedDateTimeString, callContext);
    final List<InvoiceItem> createdExternalCharges = invoiceApi.insertExternalCharges(account.getId(), requestedDate, sanitizedExternalChargesJson, autoCommit, callContext);
    // if all createdExternalCharges point to the same invoiceId, use the provided paymentExternalKey and / or transactionExternalKey
    final boolean haveSameInvoiceId = Iterables.all(createdExternalCharges, new Predicate<InvoiceItem>() {

        @Override
        public boolean apply(final InvoiceItem input) {
            return input.getInvoiceId().equals(createdExternalCharges.get(0).getInvoiceId());
        }
    });
    if (payInvoice) {
        final Collection<UUID> paidInvoices = new HashSet<UUID>();
        for (final InvoiceItem externalCharge : createdExternalCharges) {
            if (!paidInvoices.contains(externalCharge.getInvoiceId())) {
                paidInvoices.add(externalCharge.getInvoiceId());
                final Invoice invoice = invoiceApi.getInvoice(externalCharge.getInvoiceId(), callContext);
                createPurchaseForInvoice(account, invoice.getId(), invoice.getBalance(), account.getPaymentMethodId(), false, (haveSameInvoiceId && paymentExternalKey != null) ? paymentExternalKey : null, (haveSameInvoiceId && transactionExternalKey != null) ? transactionExternalKey : null, pluginProperties, callContext);
            }
        }
    }
    final List<InvoiceItemJson> createdExternalChargesJson = Lists.<InvoiceItem, InvoiceItemJson>transform(createdExternalCharges, new Function<InvoiceItem, InvoiceItemJson>() {

        @Override
        public InvoiceItemJson apply(final InvoiceItem input) {
            return new InvoiceItemJson(input);
        }
    });
    return Response.status(Status.OK).entity(createdExternalChargesJson).build();
}
Also used : Account(org.killbill.billing.account.api.Account) InvoiceItem(org.killbill.billing.invoice.api.InvoiceItem) Invoice(org.killbill.billing.invoice.api.Invoice) InvoiceItemJson(org.killbill.billing.jaxrs.json.InvoiceItemJson) CallContext(org.killbill.billing.util.callcontext.CallContext) LocalDate(org.joda.time.LocalDate) PluginProperty(org.killbill.billing.payment.api.PluginProperty) UUID(java.util.UUID) PlanPhasePriceOverride(org.killbill.billing.catalog.api.PlanPhasePriceOverride) DefaultPlanPhasePriceOverride(org.killbill.billing.catalog.DefaultPlanPhasePriceOverride) HashSet(java.util.HashSet) Path(javax.ws.rs.Path) TimedResource(org.killbill.commons.metrics.TimedResource) POST(javax.ws.rs.POST) Produces(javax.ws.rs.Produces) Consumes(javax.ws.rs.Consumes) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses)

Example 88 with POST

use of javax.ws.rs.POST in project killbill by killbill.

the class SubscriptionResource method createEntitlementWithAddOns.

@TimedResource
@POST
@Path("/createEntitlementWithAddOns")
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
@ApiOperation(value = "Create an entitlement with addOn products")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid entitlement supplied") })
public Response createEntitlementWithAddOns(final List<SubscriptionJson> entitlements, @QueryParam(QUERY_REQUESTED_DT) final String requestedDate, /* This is deprecated, only used for backward compatibility */
@QueryParam(QUERY_ENTITLEMENT_REQUESTED_DT) final String entitlementDate, @QueryParam(QUERY_BILLING_REQUESTED_DT) final String billingDate, @QueryParam(QUERY_MIGRATED) @DefaultValue("false") final Boolean isMigrated, @QueryParam(QUERY_CALL_COMPLETION) @DefaultValue("false") final Boolean callCompletion, @QueryParam(QUERY_CALL_TIMEOUT) @DefaultValue("3") final long timeoutSec, @QueryParam(QUERY_PLUGIN_PROPERTY) final List<String> pluginPropertiesString, @HeaderParam(HDR_CREATED_BY) final String createdBy, @HeaderParam(HDR_REASON) final String reason, @HeaderParam(HDR_COMMENT) final String comment, @javax.ws.rs.core.Context final HttpServletRequest request, @javax.ws.rs.core.Context final UriInfo uriInfo) throws EntitlementApiException, AccountApiException, SubscriptionApiException {
    Preconditions.checkArgument(Iterables.size(entitlements) > 0, "Subscription list mustn't be null or empty.");
    logDeprecationParameterWarningIfNeeded(QUERY_REQUESTED_DT, QUERY_ENTITLEMENT_REQUESTED_DT, QUERY_BILLING_REQUESTED_DT);
    final int baseSubscriptionsSize = Iterables.size(Iterables.filter(entitlements, new Predicate<SubscriptionJson>() {

        @Override
        public boolean apply(final SubscriptionJson subscription) {
            return ProductCategory.BASE.toString().equals(subscription.getProductCategory());
        }
    }));
    verifyNumberOfElements(baseSubscriptionsSize, 1, "Only one BASE product is allowed.");
    final int addOnSubscriptionsSize = Iterables.size(Iterables.filter(entitlements, new Predicate<SubscriptionJson>() {

        @Override
        public boolean apply(final SubscriptionJson subscription) {
            return ProductCategory.ADD_ON.toString().equals(subscription.getProductCategory());
        }
    }));
    verifyNumberOfElements(addOnSubscriptionsSize, entitlements.size() - 1, "It should be " + (entitlements.size() - 1) + " ADD_ON products.");
    final Iterable<PluginProperty> pluginProperties = extractPluginProperties(pluginPropertiesString);
    final CallContext callContext = context.createContext(createdBy, reason, comment, request);
    final SubscriptionJson baseEntitlement = Iterables.tryFind(entitlements, new Predicate<SubscriptionJson>() {

        @Override
        public boolean apply(final SubscriptionJson subscription) {
            return ProductCategory.BASE.toString().equalsIgnoreCase(subscription.getProductCategory());
        }
    }).orNull();
    verifyNonNull(baseEntitlement.getAccountId(), "SubscriptionJson accountId needs to be set for BASE product.");
    final EntitlementCallCompletionCallback<List<Entitlement>> callback = new EntitlementCallCompletionCallback<List<Entitlement>>() {

        @Override
        public List<Entitlement> doOperation(final CallContext ctx) throws InterruptedException, TimeoutException, EntitlementApiException, SubscriptionApiException, AccountApiException {
            final Account account = getAccountFromSubscriptionJson(baseEntitlement, callContext);
            final List<EntitlementSpecifier> entitlementSpecifierList = buildEntitlementSpecifierList(entitlements, account.getCurrency());
            final LocalDate resolvedEntitlementDate = requestedDate != null ? toLocalDate(requestedDate) : toLocalDate(entitlementDate);
            final LocalDate resolvedBillingDate = requestedDate != null ? toLocalDate(requestedDate) : toLocalDate(billingDate);
            final UUID bundleId = baseEntitlement.getBundleId() != null ? UUID.fromString(baseEntitlement.getBundleId()) : null;
            BaseEntitlementWithAddOnsSpecifier baseEntitlementSpecifierWithAddOns = buildBaseEntitlementWithAddOnsSpecifier(entitlementSpecifierList, resolvedEntitlementDate, resolvedBillingDate, bundleId, baseEntitlement, isMigrated);
            final List<BaseEntitlementWithAddOnsSpecifier> baseEntitlementWithAddOnsSpecifierList = new ArrayList<BaseEntitlementWithAddOnsSpecifier>();
            baseEntitlementWithAddOnsSpecifierList.add(baseEntitlementSpecifierWithAddOns);
            return entitlementApi.createBaseEntitlementsWithAddOns(account.getId(), baseEntitlementWithAddOnsSpecifierList, pluginProperties, callContext);
        }

        @Override
        public boolean isImmOperation() {
            return true;
        }

        @Override
        public Response doResponseOk(final List<Entitlement> entitlements) {
            return uriBuilder.buildResponse(uriInfo, BundleResource.class, "getBundle", entitlements.get(0).getBundleId(), request);
        }
    };
    final EntitlementCallCompletion<List<Entitlement>> callCompletionCreation = new EntitlementCallCompletion<List<Entitlement>>();
    return callCompletionCreation.withSynchronization(callback, timeoutSec, callCompletion, callContext);
}
Also used : Account(org.killbill.billing.account.api.Account) SubscriptionJson(org.killbill.billing.jaxrs.json.SubscriptionJson) ArrayList(java.util.ArrayList) CallContext(org.killbill.billing.util.callcontext.CallContext) LocalDate(org.joda.time.LocalDate) Predicate(com.google.common.base.Predicate) EntitlementSpecifier(org.killbill.billing.entitlement.api.EntitlementSpecifier) PluginProperty(org.killbill.billing.payment.api.PluginProperty) BaseEntitlementWithAddOnsSpecifier(org.killbill.billing.entitlement.api.BaseEntitlementWithAddOnsSpecifier) List(java.util.List) ArrayList(java.util.ArrayList) Entitlement(org.killbill.billing.entitlement.api.Entitlement) UUID(java.util.UUID) Path(javax.ws.rs.Path) TimedResource(org.killbill.commons.metrics.TimedResource) POST(javax.ws.rs.POST) Consumes(javax.ws.rs.Consumes) Produces(javax.ws.rs.Produces) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses)

Example 89 with POST

use of javax.ws.rs.POST in project killbill by killbill.

the class CreditResource method createCredit.

@POST
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
@ApiOperation(value = "Create a credit")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid account id supplied"), @ApiResponse(code = 404, message = "Account not found") })
public Response createCredit(final CreditJson json, @QueryParam(QUERY_AUTO_COMMIT) @DefaultValue("false") final Boolean autoCommit, @HeaderParam(HDR_CREATED_BY) final String createdBy, @HeaderParam(HDR_REASON) final String reason, @HeaderParam(HDR_COMMENT) final String comment, @javax.ws.rs.core.Context final HttpServletRequest request, @javax.ws.rs.core.Context final UriInfo uriInfo) throws AccountApiException, InvoiceApiException {
    verifyNonNullOrEmpty(json, "CreditJson body should be specified");
    verifyNonNullOrEmpty(json.getAccountId(), "CreditJson accountId needs to be set", json.getCreditAmount(), "CreditJson creditAmount needs to be set");
    final CallContext callContext = context.createContext(createdBy, reason, comment, request);
    final Account account = accountUserApi.getAccountById(UUID.fromString(json.getAccountId()), callContext);
    final LocalDate effectiveDate = new LocalDate(clock.getUTCNow(), account.getTimeZone());
    final InvoiceItem credit;
    if (json.getInvoiceId() != null) {
        // Apply an invoice level credit
        credit = invoiceUserApi.insertCreditForInvoice(account.getId(), UUID.fromString(json.getInvoiceId()), json.getCreditAmount(), effectiveDate, account.getCurrency(), json.getDescription(), callContext);
    } else {
        // Apply a account level credit
        credit = invoiceUserApi.insertCredit(account.getId(), json.getCreditAmount(), effectiveDate, account.getCurrency(), autoCommit, json.getDescription(), callContext);
    }
    return uriBuilder.buildResponse(uriInfo, CreditResource.class, "getCredit", credit.getId(), request);
}
Also used : Account(org.killbill.billing.account.api.Account) InvoiceItem(org.killbill.billing.invoice.api.InvoiceItem) CallContext(org.killbill.billing.util.callcontext.CallContext) LocalDate(org.joda.time.LocalDate) POST(javax.ws.rs.POST) Consumes(javax.ws.rs.Consumes) Produces(javax.ws.rs.Produces) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses)

Example 90 with POST

use of javax.ws.rs.POST in project killbill by killbill.

the class OverdueResource method uploadOverdueConfigXml.

@TimedResource
@POST
@Consumes(APPLICATION_XML)
@ApiOperation(value = "Upload the full overdue config as XML")
@ApiResponses(value = {})
public Response uploadOverdueConfigXml(final String overdueXML, @HeaderParam(HDR_CREATED_BY) final String createdBy, @HeaderParam(HDR_REASON) final String reason, @HeaderParam(HDR_COMMENT) final String comment, @javax.ws.rs.core.Context final HttpServletRequest request, @javax.ws.rs.core.Context final UriInfo uriInfo) throws Exception {
    // Validation purpose:  Will throw if bad XML or catalog validation fails
    final InputStream stream = new ByteArrayInputStream(overdueXML.getBytes());
    XMLLoader.getObjectFromStream(new URI(JaxrsResource.OVERDUE_PATH), stream, DefaultOverdueConfig.class);
    final CallContext callContext = context.createContext(createdBy, reason, comment, request);
    overdueApi.uploadOverdueConfig(overdueXML, callContext);
    return uriBuilder.buildResponse(uriInfo, OverdueResource.class, null, null, request);
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) URI(java.net.URI) CallContext(org.killbill.billing.util.callcontext.CallContext) TimedResource(org.killbill.commons.metrics.TimedResource) POST(javax.ws.rs.POST) Consumes(javax.ws.rs.Consumes) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses)

Aggregations

POST (javax.ws.rs.POST)513 Path (javax.ws.rs.Path)360 Consumes (javax.ws.rs.Consumes)242 Produces (javax.ws.rs.Produces)222 ApiOperation (io.swagger.annotations.ApiOperation)133 ApiResponses (io.swagger.annotations.ApiResponses)107 IOException (java.io.IOException)74 URI (java.net.URI)63 WebApplicationException (javax.ws.rs.WebApplicationException)62 Timed (com.codahale.metrics.annotation.Timed)55 Response (javax.ws.rs.core.Response)50 TimedResource (org.killbill.commons.metrics.TimedResource)36 CallContext (org.killbill.billing.util.callcontext.CallContext)35 AuditEvent (org.graylog2.audit.jersey.AuditEvent)33 HashMap (java.util.HashMap)32 BadRequestException (co.cask.cdap.common.BadRequestException)24 AuditPolicy (co.cask.cdap.common.security.AuditPolicy)24 ResponseBuilder (javax.ws.rs.core.Response.ResponseBuilder)23 Account (org.killbill.billing.account.api.Account)22 ExceptionMetered (com.codahale.metrics.annotation.ExceptionMetered)20