Codota Logo
BundleJson.<init>
Code IndexAdd Codota to your IDE (free)

How to use
com.ning.billing.jaxrs.json.BundleJson
constructor

Best Java code snippets using com.ning.billing.jaxrs.json.BundleJson.<init> (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: com.ning.billing/killbill-jaxrs

  @Override
  public BundleJson apply(final SubscriptionBundle input) {
    return new BundleJson(input, null);
  }
});
origin: com.ning.billing/killbill-jaxrs

@GET
@Path("/{bundleId:" + UUID_PATTERN + "}")
@Produces(APPLICATION_JSON)
public Response getBundle(@PathParam("bundleId") final String bundleId,
             @javax.ws.rs.core.Context final HttpServletRequest request) throws SubscriptionApiException {
  final UUID id = UUID.fromString(bundleId);
  final SubscriptionBundle bundle = subscriptionApi.getSubscriptionBundle(id, context.createContext(request));
  final BundleJson json = new BundleJson(bundle, null);
  return Response.status(Status.OK).entity(json).build();
}
origin: com.ning.billing/killbill-jaxrs

@GET
@Produces(APPLICATION_JSON)
public Response getBundleByKey(@QueryParam(QUERY_EXTERNAL_KEY) final String externalKey,
                @javax.ws.rs.core.Context final HttpServletRequest request) throws SubscriptionApiException {
  final SubscriptionBundle bundle = subscriptionApi.getActiveSubscriptionBundleForExternalKey(externalKey, context.createContext(request));
  final BundleJson json = new BundleJson(bundle, null);
  return Response.status(Status.OK).entity(json).build();
}
origin: com.ning.billing/killbill-jaxrs

  @Override
  public BundleJson apply(final SubscriptionBundle bundle) {
    // Cache audit logs per account
    if (accountsAuditLogs.get().get(bundle.getAccountId()) == null) {
      accountsAuditLogs.get().put(bundle.getAccountId(), auditUserApi.getAccountAuditLogs(bundle.getAccountId(), auditMode.getLevel(), tenantContext));
    }
    return new BundleJson(bundle, accountsAuditLogs.get().get(bundle.getAccountId()));
  }
},
origin: com.ning.billing/killbill-jaxrs

  @Override
  public BundleJson apply(final SubscriptionBundle bundle) {
    // Cache audit logs per account
    if (accountsAuditLogs.get().get(bundle.getAccountId()) == null) {
      accountsAuditLogs.get().put(bundle.getAccountId(), auditUserApi.getAccountAuditLogs(bundle.getAccountId(), auditMode.getLevel(), tenantContext));
    }
    return new BundleJson(bundle, accountsAuditLogs.get().get(bundle.getAccountId()));
  }
},
origin: com.ning.billing/killbill-jaxrs

private BundleJson createBundleWithSubscriptions() {
  final String someUUID = UUID.randomUUID().toString();
  final UUID accountId = UUID.randomUUID();
  final UUID bundleId = UUID.randomUUID();
  final UUID subscriptionId = UUID.randomUUID();
  final String externalKey = UUID.randomUUID().toString();
  final SubscriptionJson entitlementJsonWithEvents = new SubscriptionJson(accountId.toString(), bundleId.toString(), subscriptionId.toString(), externalKey,
                                                new LocalDate(), someUUID, someUUID, someUUID, someUUID,
                                                new LocalDate(), new LocalDate(), new LocalDate(), new LocalDate(),
                                                null, null, null, null);
  return new BundleJson(accountId.toString(), bundleId.toString(), externalKey, ImmutableList.<SubscriptionJson>of(entitlementJsonWithEvents), null);
}
origin: com.ning.billing/killbill-jaxrs

  @Test(groups = "fast")
  public void testJson() throws Exception {

    final String someUUID = UUID.randomUUID().toString();
    final UUID bundleId = UUID.randomUUID();
    final String externalKey = UUID.randomUUID().toString();
    final List<AuditLogJson> auditLogs = createAuditLogsJson(clock.getUTCNow());

    EventSubscriptionJson event = new EventSubscriptionJson(someUUID, BillingPeriod.NO_BILLING_PERIOD.toString(), new LocalDate(), new LocalDate(), "product", "priceList", "eventType", "phase", null);
    final SubscriptionJson subscription = new SubscriptionJson(someUUID, someUUID, someUUID, externalKey,
                                            new LocalDate(), someUUID, someUUID, someUUID, someUUID, new LocalDate(), new LocalDate(),
                                            new LocalDate(), new LocalDate(),
                                            ImmutableList.<EventSubscriptionJson>of(event), null, null, auditLogs);

    final BundleJson bundleJson = new BundleJson(someUUID, bundleId.toString(), externalKey, ImmutableList.<SubscriptionJson>of(subscription), auditLogs);
    Assert.assertEquals(bundleJson.getBundleId(), bundleId.toString());
    Assert.assertEquals(bundleJson.getExternalKey(), externalKey);
    Assert.assertEquals(bundleJson.getSubscriptions().size(), 1);
    Assert.assertEquals(bundleJson.getAuditLogs(), auditLogs);

    final String asJson = mapper.writeValueAsString(bundleJson);
    final BundleJson fromJson = mapper.readValue(asJson, BundleJson.class);
    Assert.assertEquals(fromJson, bundleJson);
  }
}
origin: com.ning.billing/killbill-jaxrs

for (final SubscriptionBundle bundle : bundles) {
  final List<AuditLog> bundleAuditLogs = accountAuditLogs.getAuditLogsForBundle(bundle.getId());
  final BundleJson jsonWithSubscriptions = new BundleJson(bundle, accountAuditLogs);
  this.bundles.add(jsonWithSubscriptions);
com.ning.billing.jaxrs.jsonBundleJson<init>

Popular methods of BundleJson

  • equals
  • getAccountId
  • getAuditLogs
  • getBundleId
  • getExternalKey
  • getSubscriptions
  • hashCode
  • toAuditLogJson

Popular in Java

  • Making http requests using okhttp
  • getContentResolver (Context)
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • String (java.lang)
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now