@Override public RefundJson apply(Refund input) { // TODO Return adjusted items and audits return new RefundJson(input, null, null); } }));
@Override public BundleJson apply(final SubscriptionBundle input) { return new BundleJson(input, null); } });
@Override public PaymentMethodJson apply(final PaymentMethod input) { return PaymentMethodJson.toPaymentMethodJson(account, input, accountAuditLogs); } }));
@Override public String toString() { return "EventSubscriptionJson [eventId=" + eventId + ", effectiveDate=" + effectiveDate + ", getBillingPeriod()=" + getBillingPeriod() + ", getRequestedDate()=" + getRequestedDate() + ", getProduct()=" + getProduct() + ", getPriceList()=" + getPriceList() + ", getEventType()=" + getEventType() + ", getPhase()=" + getPhase() + ", getClass()=" + getClass() + ", hashCode()=" + hashCode() + ", toString()=" + super.toString() + "]"; }
@Override public String toString() { return "NewEventSubscriptionJson [getBillingPeriod()=" + getBillingPeriod() + ", getRequestedDate()=" + getRequestedDate() + ", getProduct()=" + getProduct() + ", getPriceList()=" + getPriceList() + ", getEventType()=" + getEventType() + ", getPhase()=" + getPhase() + ", getClass()=" + getClass() + ", hashCode()=" + hashCode() + ", toString()=" + super.toString() + "]"; } }
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); }
@Override public AuditLogJson apply(@Nullable final AuditLog input) { return new AuditLogJson(input); } }));
@Override public InvoiceItemJson apply(@Nullable final InvoiceItem input) { return new InvoiceItemJson(input); } })),
@Override public boolean apply(final AccountEmail input) { return input.getEmail().equals(json.getEmail()); } })
private CreditJson createCreditJson() { final BigDecimal creditAmount = BigDecimal.TEN; final String invoiceId = UUID.randomUUID().toString(); final String invoiceNumber = UUID.randomUUID().toString(); final LocalDate effectiveDate = clock.getUTCToday(); final String accountId = UUID.randomUUID().toString(); return new CreditJson(creditAmount, invoiceId, invoiceNumber, effectiveDate, accountId, null); } }
@Override public int hashCode() { int result = account != null ? account.hashCode() : 0; result = 31 * result + (bundles != null ? bundles.hashCode() : 0); result = 31 * result + (invoices != null ? invoices.hashCode() : 0); result = 31 * result + (payments != null ? payments.hashCode() : 0); return result; } }
@Override public int hashCode() { int result = principal != null ? principal.hashCode() : 0; result = 31 * result + (isAuthenticated != null ? isAuthenticated.hashCode() : 0); result = 31 * result + (isRemembered != null ? isRemembered.hashCode() : 0); result = 31 * result + (session != null ? session.hashCode() : 0); return result; } }
@Override public int hashCode() { int result = viewId != null ? viewId.hashCode() : 0; result = 31 * result + (bundle != null ? bundle.hashCode() : 0); result = 31 * result + (payments != null ? payments.hashCode() : 0); result = 31 * result + (invoices != null ? invoices.hashCode() : 0); result = 31 * result + (reasonForChange != null ? reasonForChange.hashCode() : 0); return result; } }
@Override public int hashCode() { int result = paymentMethodId != null ? paymentMethodId.hashCode() : 0; result = 31 * result + (accountId != null ? accountId.hashCode() : 0); result = 31 * result + (isDefault != null ? isDefault.hashCode() : 0); result = 31 * result + (pluginName != null ? pluginName.hashCode() : 0); result = 31 * result + (pluginInfo != null ? pluginInfo.hashCode() : 0); return result; }
@Override public StackTraceElementJson apply(final StackTraceElement input) { return new StackTraceElementJson(input.getClassName(), input.getFileName(), input.getLineNumber(), input.getMethodName(), input.isNativeMethod()); } }));
private String getBundleExternalKey(final UUID invoiceId, final List<Invoice> invoices, final List<SubscriptionBundle> bundles) { for (final Invoice cur : invoices) { if (cur.getId().equals(invoiceId)) { return getBundleExternalKey(cur, bundles); } } return null; }
@Override public PaymentMethodProperties apply(final PaymentMethodKVInfo input) { return new PaymentMethodProperties(input.getKey(), input.getValue() == null ? null : input.getValue().toString(), input.getIsUpdatable()); } }));
public SubjectJson(final Subject subject) { this.principal = subject.getPrincipal() == null ? null : subject.getPrincipal().toString(); this.isAuthenticated = subject.isAuthenticated(); this.isRemembered = subject.isRemembered(); final Session subjectSession = subject.getSession(false); this.session = subjectSession == null ? null : new SessionJson(subjectSession); }
@Override public RefundJson apply(final Refund input) { // TODO Return adjusted items and audits return new RefundJson(input, null, null); } }));