@POST @Consumes(APPLICATION_JSON) @Produces(APPLICATION_JSON) public Response createAccount(final AccountJson json, @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 { final AccountData data = json.toAccountData(); final Account account = accountUserApi.createAccount(data, context.createContext(createdBy, reason, comment, request)); return uriBuilder.buildResponse(uriInfo, AccountResource.class, "getAccount", account.getId()); }
public Account createAccount(final CallContext callContext) throws AccountApiException { final AccountData accountData = new MockAccountBuilder().name(UUID.randomUUID().toString().substring(1, 8)) .firstNameLength(6) .email(UUID.randomUUID().toString().substring(1, 8)) .phone(UUID.randomUUID().toString().substring(1, 8)) .migrated(false) .isNotifiedForInvoices(true) .externalKey(UUID.randomUUID().toString().substring(1, 8)) .billingCycleDayLocal(31) .currency(accountCurrency) .paymentMethodId(UUID.randomUUID()) .timeZone(DateTimeZone.UTC) .build(); return accountUserApi.createAccount(accountData, callContext); }
clock.setDay(initialDate); final Account account = accountApi.createAccount(getAccountData(7), callContext); final InternalCallContext internalCallContext = internalCallContextFactory.createInternalCallContext(account.getId(), callContext);
clock.setDay(initialDate); final Account account = accountApi.createAccount(getAccountData(7), callContext); final InternalCallContext internalCallContext = internalCallContextFactory.createInternalCallContext(account.getId(), callContext);