public interface InvoiceUserApi extends KillbillApi
| Modifier and Type | Method and Description |
|---|---|
void |
commitInvoice(java.util.UUID invoiceId,
CallContext context)
Move the invoice status from DRAFT to COMMITTED
|
void |
consumeExistingCBAOnAccountWithUnpaidInvoices(java.util.UUID accountId,
CallContext context)
Rebalance CBA for account which have credit and unpaid invoices-- only needed if system is configured to not rebalance automatically.
|
java.util.UUID |
createMigrationInvoice(java.util.UUID accountId,
org.joda.time.LocalDate invoiceDate,
java.lang.Iterable<InvoiceItem> items,
CallContext context) |
void |
deleteCBA(java.util.UUID accountId,
java.util.UUID invoiceId,
java.util.UUID invoiceItemId,
CallContext context)
Delete a CBA item.
|
java.math.BigDecimal |
getAccountBalance(java.util.UUID accountId,
TenantContext context)
Retrieve the account balance.
|
java.math.BigDecimal |
getAccountCBA(java.util.UUID accountId,
TenantContext context)
Retrieve the account CBA.
|
InvoiceItem |
getCreditById(java.util.UUID creditId,
TenantContext context)
Retrieve a credit by id.
|
InvoiceItem |
getExternalChargeById(java.util.UUID externalChargeId,
TenantContext context)
Retrieve an external charge by id.
|
Invoice |
getInvoice(java.util.UUID invoiceId,
TenantContext context)
Retrieve an invoice by id.
|
java.lang.String |
getInvoiceAsHTML(java.util.UUID invoiceId,
TenantContext context)
Retrieve the invoice formatted in HTML.
|
Invoice |
getInvoiceByInvoiceItem(java.util.UUID invoiceItemId,
TenantContext context) |
Invoice |
getInvoiceByNumber(java.lang.Integer number,
TenantContext context)
Retrieve an invoice by invoice number.
|
Invoice |
getInvoiceByPayment(java.util.UUID paymentId,
TenantContext context)
Get all invoices for a given payment.
|
java.util.List<InvoiceItem> |
getInvoiceItemsByParentInvoice(java.util.UUID parentInvoiceId,
TenantContext context)
Retrieve invoice items details associated to Parent SUMMARY invoice item
|
Pagination<Invoice> |
getInvoices(java.lang.Long offset,
java.lang.Long limit,
TenantContext context) |
java.util.List<Invoice> |
getInvoicesByAccount(java.util.UUID accountId,
boolean includesMigrated,
boolean includeVoidedInvoices,
TenantContext context)
Get all invoices for a given account.
|
java.util.List<Invoice> |
getInvoicesByAccount(java.util.UUID accountId,
org.joda.time.LocalDate fromDate,
boolean includeVoidedInvoices,
TenantContext context)
Find invoices from a given day, for a given account.
|
java.util.Collection<Invoice> |
getUnpaidInvoicesByAccountId(java.util.UUID accountId,
org.joda.time.LocalDate upToDate,
TenantContext context)
Find unpaid invoices for a given account, up to a given day.
|
InvoiceItem |
insertCredit(java.util.UUID accountId,
java.math.BigDecimal amount,
org.joda.time.LocalDate effectiveDate,
Currency currency,
boolean autoCommit,
java.lang.String description,
java.lang.String itemDetails,
java.lang.Iterable<PluginProperty> properties,
CallContext context)
Add a credit to an account.
|
InvoiceItem |
insertCreditForInvoice(java.util.UUID accountId,
java.util.UUID invoiceId,
java.math.BigDecimal amount,
org.joda.time.LocalDate effectiveDate,
Currency currency,
java.lang.String description,
java.lang.String itemDetails,
java.lang.Iterable<PluginProperty> properties,
CallContext context)
Add a credit to an invoice.
|
java.util.List<InvoiceItem> |
insertExternalCharges(java.util.UUID accountId,
org.joda.time.LocalDate effectiveDate,
java.lang.Iterable<InvoiceItem> charges,
boolean autoCommit,
java.lang.Iterable<PluginProperty> properties,
CallContext context)
Add one or multiple external charges to an account.
|
InvoiceItem |
insertInvoiceItemAdjustment(java.util.UUID accountId,
java.util.UUID invoiceId,
java.util.UUID invoiceItemId,
org.joda.time.LocalDate effectiveDate,
java.math.BigDecimal amount,
Currency currency,
java.lang.String description,
java.lang.String itemDetails,
java.lang.Iterable<PluginProperty> properties,
CallContext context)
Adjust partially a given invoice item.
|
InvoiceItem |
insertInvoiceItemAdjustment(java.util.UUID accountId,
java.util.UUID invoiceId,
java.util.UUID invoiceItemId,
org.joda.time.LocalDate effectiveDate,
java.lang.String description,
java.lang.String itemDetails,
java.lang.Iterable<PluginProperty> properties,
CallContext context)
Adjust fully a given invoice item.
|
java.util.List<InvoiceItem> |
insertTaxItems(java.util.UUID accountId,
org.joda.time.LocalDate effectiveDate,
java.lang.Iterable<InvoiceItem> taxes,
boolean autoCommit,
java.lang.Iterable<PluginProperty> properties,
CallContext context)
Add one or multiple tax items to one invoice.
|
Pagination<Invoice> |
searchInvoices(java.lang.String searchKey,
java.lang.Long offset,
java.lang.Long limit,
TenantContext context)
Find all invoices having their id, number, account id or currency matching the search key
|
void |
tagInvoiceAsNotWrittenOff(java.util.UUID invoiceId,
CallContext context)
Unmark an invoice as written off.
|
void |
tagInvoiceAsWrittenOff(java.util.UUID invoiceId,
CallContext context)
Mark an invoice as written off.
|
void |
transferChildCreditToParent(java.util.UUID childAccountId,
CallContext context)
Move a given child credit to the parent level
|
Invoice |
triggerDryRunInvoiceGeneration(java.util.UUID accountId,
org.joda.time.LocalDate targetDate,
DryRunArguments dryRunArguments,
CallContext context)
Trigger an invoice for a given account and a given day.
|
Invoice |
triggerInvoiceGeneration(java.util.UUID accountId,
org.joda.time.LocalDate targetDate,
CallContext context)
Trigger an invoice for a given account and a given day.
|
void |
voidInvoice(java.util.UUID invoiceId,
CallContext context)
Move the invoice status from DRAFT or COMMITTED to VOID
|
java.util.List<Invoice> getInvoicesByAccount(java.util.UUID accountId, boolean includesMigrated, boolean includeVoidedInvoices, TenantContext context)
accountId - account idcontext - the tenant contextjava.util.List<Invoice> getInvoicesByAccount(java.util.UUID accountId, org.joda.time.LocalDate fromDate, boolean includeVoidedInvoices, TenantContext context)
accountId - account idfromDate - the earliest target day to consider, in the account timezonecontext - the tenant contextPagination<Invoice> getInvoices(java.lang.Long offset, java.lang.Long limit, TenantContext context)
context - the user contextoffset - the offset of the first resultlimit - the maximum number of results to retrievePagination<Invoice> searchInvoices(java.lang.String searchKey, java.lang.Long offset, java.lang.Long limit, TenantContext context)
searchKey - the search keyoffset - the offset of the first resultlimit - the maximum number of results to retrievecontext - the user contextjava.math.BigDecimal getAccountBalance(java.util.UUID accountId,
TenantContext context)
accountId - account idcontext - the tenant contextjava.math.BigDecimal getAccountCBA(java.util.UUID accountId,
TenantContext context)
accountId - account idcontext - the tenant contextInvoice getInvoice(java.util.UUID invoiceId, TenantContext context) throws InvoiceApiException
invoiceId - invoice idcontext - the tenant contextInvoiceApiExceptionInvoice getInvoiceByPayment(java.util.UUID paymentId, TenantContext context) throws InvoiceApiException
paymentId - payment idcontext - the tenant contextInvoiceApiExceptionInvoice getInvoiceByNumber(java.lang.Integer number, TenantContext context) throws InvoiceApiException
number - invoice numbercontext - the tenant contextInvoiceApiExceptionInvoice getInvoiceByInvoiceItem(java.util.UUID invoiceItemId, TenantContext context) throws InvoiceApiException
invoiceItemId - invoice item idcontext - the tenant contextInvoiceApiExceptionjava.util.Collection<Invoice> getUnpaidInvoicesByAccountId(java.util.UUID accountId, org.joda.time.LocalDate upToDate, TenantContext context)
accountId - account idupToDate - the latest target day to consider, in the account timezonecontext - the tenant contextInvoice triggerInvoiceGeneration(java.util.UUID accountId, org.joda.time.LocalDate targetDate, CallContext context) throws InvoiceApiException
accountId - account idtargetDate - the target day, in the account timezonecontext - the call contextInvoiceApiExceptionInvoice triggerDryRunInvoiceGeneration(java.util.UUID accountId, org.joda.time.LocalDate targetDate, DryRunArguments dryRunArguments, CallContext context) throws InvoiceApiException
accountId - account idtargetDate - the target day, in the account timezonedryRunArguments - dry run argumentscontext - the call contextInvoiceApiExceptionvoid tagInvoiceAsWrittenOff(java.util.UUID invoiceId,
CallContext context)
throws TagApiException,
InvoiceApiException
invoiceId - invoice idcontext - call contextTagApiExceptionInvoiceApiExceptionvoid tagInvoiceAsNotWrittenOff(java.util.UUID invoiceId,
CallContext context)
throws TagApiException,
InvoiceApiException
invoiceId - invoice idcontext - call contextTagApiExceptionInvoiceApiExceptionInvoiceItem getExternalChargeById(java.util.UUID externalChargeId, TenantContext context) throws InvoiceApiException
externalChargeId - external charge idcontext - the tenant contextInvoiceApiExceptionjava.util.List<InvoiceItem> insertExternalCharges(java.util.UUID accountId, org.joda.time.LocalDate effectiveDate, java.lang.Iterable<InvoiceItem> charges, boolean autoCommit, java.lang.Iterable<PluginProperty> properties, CallContext context) throws InvoiceApiException
accountId - account ideffectiveDate - the effective date for newly created invoices (in the account timezone)charges - the chargesautoCommit - the flag to indicate if the invoice is set to COMMITTED or DRAFT and events are sentcontext - the call contextInvoiceApiExceptionjava.util.List<InvoiceItem> insertTaxItems(java.util.UUID accountId, org.joda.time.LocalDate effectiveDate, java.lang.Iterable<InvoiceItem> taxes, boolean autoCommit, java.lang.Iterable<PluginProperty> properties, CallContext context) throws InvoiceApiException
accountId - account ideffectiveDate - the effective date for newly created invoice (in the account timezone)taxes - the tax itemsautoCommit - the flag to indicate if the invoice is set to COMMITTED or DRAFT and events are sentcontext - the call contextInvoiceApiExceptionInvoiceItem getCreditById(java.util.UUID creditId, TenantContext context) throws InvoiceApiException
creditId - credit idcontext - the tenant contextInvoiceApiExceptionInvoiceItem insertCredit(java.util.UUID accountId, java.math.BigDecimal amount, org.joda.time.LocalDate effectiveDate, Currency currency, boolean autoCommit, java.lang.String description, java.lang.String itemDetails, java.lang.Iterable<PluginProperty> properties, CallContext context) throws InvoiceApiException
accountId - account idamount - the credit amounteffectiveDate - the day to grant the credit, in the account timezonecurrency - the credit currencyautoCommit - the flag to indicate if the invoice is set to COMMITTED or DRAFT and events are sentcontext - the call contextdescription - the item descriptionitemDetails - the item detailsproperties - the plugin specific propertiesInvoiceApiExceptionInvoiceItem insertCreditForInvoice(java.util.UUID accountId, java.util.UUID invoiceId, java.math.BigDecimal amount, org.joda.time.LocalDate effectiveDate, Currency currency, java.lang.String description, java.lang.String itemDetails, java.lang.Iterable<PluginProperty> properties, CallContext context) throws InvoiceApiException
accountId - account idinvoiceId - invoice idamount - the credit amounteffectiveDate - the day to grant the credit, in the account timezonecurrency - the credit currencydescription - the item descriptionitemDetails - the item detailsproperties - the plugin specific propertiescontext - the call contextInvoiceApiExceptionInvoiceItem insertInvoiceItemAdjustment(java.util.UUID accountId, java.util.UUID invoiceId, java.util.UUID invoiceItemId, org.joda.time.LocalDate effectiveDate, java.lang.String description, java.lang.String itemDetails, java.lang.Iterable<PluginProperty> properties, CallContext context) throws InvoiceApiException
accountId - account idinvoiceId - invoice idinvoiceItemId - invoice item ideffectiveDate - the effective date for this adjustment invoice item (in the account timezone)description - the item descriptionitemDetails - the item detailsproperties - the plugin specific propertiescontext - the call contextInvoiceApiExceptionInvoiceItem insertInvoiceItemAdjustment(java.util.UUID accountId, java.util.UUID invoiceId, java.util.UUID invoiceItemId, org.joda.time.LocalDate effectiveDate, java.math.BigDecimal amount, Currency currency, java.lang.String description, java.lang.String itemDetails, java.lang.Iterable<PluginProperty> properties, CallContext context) throws InvoiceApiException
accountId - account idinvoiceId - invoice idinvoiceItemId - invoice item ideffectiveDate - the effective date for this adjustment invoice item (in the account timezone)amount - the adjustment amountcurrency - adjustment currencydescription - the item descriptionitemDetails - the item detailsproperties - the plugin specific propertiescontext - the call contextInvoiceApiExceptionvoid deleteCBA(java.util.UUID accountId,
java.util.UUID invoiceId,
java.util.UUID invoiceItemId,
CallContext context)
throws InvoiceApiException
accountId - account idinvoiceId - invoice idinvoiceItemId - invoice item id (must be of type CBA_ADJ)context - the call contextInvoiceApiExceptionjava.lang.String getInvoiceAsHTML(java.util.UUID invoiceId,
TenantContext context)
throws AccountApiException,
java.io.IOException,
InvoiceApiException
invoiceId - invoice idcontext - the tenant contextAccountApiExceptionjava.io.IOExceptionInvoiceApiExceptionvoid consumeExistingCBAOnAccountWithUnpaidInvoices(java.util.UUID accountId,
CallContext context)
accountId - account idcontext - the call contextvoid commitInvoice(java.util.UUID invoiceId,
CallContext context)
throws InvoiceApiException
invoiceId - invoice idcontext - the tenant contextInvoiceApiExceptionjava.util.UUID createMigrationInvoice(java.util.UUID accountId,
org.joda.time.LocalDate invoiceDate,
java.lang.Iterable<InvoiceItem> items,
CallContext context)
accountId - account idinvoiceDate - maximum billing event day to consider (in the account timezone)items - items to be placed on the migration invoicecontext - call call contextvoid transferChildCreditToParent(java.util.UUID childAccountId,
CallContext context)
throws InvoiceApiException
childAccountId - child account idcontext - the tenant contextInvoiceApiExceptionjava.util.List<InvoiceItem> getInvoiceItemsByParentInvoice(java.util.UUID parentInvoiceId, TenantContext context) throws InvoiceApiException
parentInvoiceId - the parent invoice idcontext - the tenant contextInvoiceApiException - if any unexpected error occursvoid voidInvoice(java.util.UUID invoiceId,
CallContext context)
throws InvoiceApiException
invoiceId - invoice idcontext - the tenant contextInvoiceApiExceptionCopyright © 2010-2018. All Rights Reserved.