public interface InvoiceUserApi extends KillbillApi
| Modifier and Type | Method and Description |
|---|---|
void |
consumeExstingCBAOnAccountWithUnpaidInvoices(UUID accountId,
CallContext context)
Rebalance CBA for account which have credit and unpaid invoices-- only needed if system is configured to not rebalance automatically.
|
void |
deleteCBA(UUID accountId,
UUID invoiceId,
UUID invoiceItemId,
CallContext context)
Delete a CBA item.
|
BigDecimal |
getAccountBalance(UUID accountId,
TenantContext context)
Retrieve the account balance.
|
BigDecimal |
getAccountCBA(UUID accountId,
TenantContext context)
Retrieve the account CBA.
|
InvoiceItem |
getCreditById(UUID creditId,
TenantContext context)
Retrieve a credit by id.
|
InvoiceItem |
getExternalChargeById(UUID externalChargeId,
TenantContext context)
Retrieve an external charge by id.
|
Invoice |
getInvoice(UUID invoiceId,
TenantContext context)
Retrieve an invoice by id.
|
String |
getInvoiceAsHTML(UUID invoiceId,
TenantContext context)
Retrieve the invoice formatted in HTML.
|
Invoice |
getInvoiceByNumber(Integer number,
TenantContext context)
Retrieve an invoice by invoice number.
|
Invoice |
getInvoiceByPayment(UUID paymentId,
TenantContext context)
Get all invoices for a given payment.
|
Pagination<Invoice> |
getInvoices(Long offset,
Long limit,
TenantContext context) |
List<Invoice> |
getInvoicesByAccount(UUID accountId,
org.joda.time.LocalDate fromDate,
TenantContext context)
Find invoices from a given day, for a given account.
|
List<Invoice> |
getInvoicesByAccount(UUID accountId,
TenantContext context)
Get all invoices for a given account.
|
Collection<Invoice> |
getUnpaidInvoicesByAccountId(UUID accountId,
org.joda.time.LocalDate upToDate,
TenantContext context)
Find unpaid invoices for a given account, up to a given day.
|
InvoiceItem |
insertCredit(UUID accountId,
BigDecimal amount,
org.joda.time.LocalDate effectiveDate,
Currency currency,
CallContext context)
Add a credit to an account.
|
InvoiceItem |
insertCreditForInvoice(UUID accountId,
UUID invoiceId,
BigDecimal amount,
org.joda.time.LocalDate effectiveDate,
Currency currency,
CallContext context)
Add a credit to an invoice.
|
List<InvoiceItem> |
insertExternalCharges(UUID accountId,
org.joda.time.LocalDate effectiveDate,
Iterable<InvoiceItem> charges,
CallContext context)
Add one or multiple external charges to an account.
|
InvoiceItem |
insertInvoiceItemAdjustment(UUID accountId,
UUID invoiceId,
UUID invoiceItemId,
org.joda.time.LocalDate effectiveDate,
BigDecimal amount,
Currency currency,
CallContext context)
Adjust partially a given invoice item.
|
InvoiceItem |
insertInvoiceItemAdjustment(UUID accountId,
UUID invoiceId,
UUID invoiceItemId,
org.joda.time.LocalDate effectiveDate,
CallContext context)
Adjust fully a given invoice item.
|
Pagination<Invoice> |
searchInvoices(String searchKey,
Long offset,
Long limit,
TenantContext context)
Find all invoices having their id, number, account id or currency matching the search key
|
void |
tagInvoiceAsNotWrittenOff(UUID invoiceId,
CallContext context)
Unmark an invoice as written off.
|
void |
tagInvoiceAsWrittenOff(UUID invoiceId,
CallContext context)
Mark an invoice as written off.
|
Invoice |
triggerInvoiceGeneration(UUID accountId,
org.joda.time.LocalDate targetDate,
boolean dryRun,
CallContext context)
Trigger an invoice for a given account and a given day.
|
List<Invoice> getInvoicesByAccount(UUID accountId, TenantContext context)
accountId - account idcontext - the tenant contextList<Invoice> getInvoicesByAccount(UUID accountId, org.joda.time.LocalDate fromDate, TenantContext context)
accountId - account idfromDate - the earliest target day to consider, in the account timezonecontext - the tenant contextPagination<Invoice> getInvoices(Long offset, Long limit, TenantContext context)
context - the user contextoffset - the offset of the first resultlimit - the maximum number of results to retrievePagination<Invoice> searchInvoices(String searchKey, Long offset, Long limit, TenantContext context)
searchKey - the search keyoffset - the offset of the first resultlimit - the maximum number of results to retrievecontext - the user contextBigDecimal getAccountBalance(UUID accountId, TenantContext context)
accountId - account idcontext - the tenant contextBigDecimal getAccountCBA(UUID accountId, TenantContext context)
accountId - account idcontext - the tenant contextInvoice getInvoice(UUID invoiceId, TenantContext context) throws InvoiceApiException
invoiceId - invoice idcontext - the tenant contextInvoiceApiExceptionInvoice getInvoiceByPayment(UUID paymentId, TenantContext context) throws InvoiceApiException
paymentId - payment idcontext - the tenant contextInvoiceApiExceptionInvoice getInvoiceByNumber(Integer number, TenantContext context) throws InvoiceApiException
number - invoice numbercontext - the tenant contextInvoiceApiExceptionCollection<Invoice> getUnpaidInvoicesByAccountId(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(UUID accountId, org.joda.time.LocalDate targetDate, boolean dryRun, CallContext context) throws InvoiceApiException
accountId - account idtargetDate - the target day, in the account timezonedryRun - dry run mode or notcontext - the call contextInvoiceApiExceptionvoid tagInvoiceAsWrittenOff(UUID invoiceId, CallContext context) throws TagApiException, InvoiceApiException
invoiceId - invoice idcontext - call contextTagApiExceptionInvoiceApiExceptionvoid tagInvoiceAsNotWrittenOff(UUID invoiceId, CallContext context) throws TagApiException, InvoiceApiException
invoiceId - invoice idcontext - call contextTagApiExceptionInvoiceApiExceptionInvoiceItem getExternalChargeById(UUID externalChargeId, TenantContext context) throws InvoiceApiException
externalChargeId - external charge idcontext - the tenant contextInvoiceApiExceptionList<InvoiceItem> insertExternalCharges(UUID accountId, org.joda.time.LocalDate effectiveDate, Iterable<InvoiceItem> charges, CallContext context) throws InvoiceApiException
accountId - account ideffectiveDate - the effective date for newly created invoices (in the account timezone)charges - the chargescontext - the call contextInvoiceApiExceptionInvoiceItem getCreditById(UUID creditId, TenantContext context) throws InvoiceApiException
creditId - credit idcontext - the tenant contextInvoiceApiExceptionInvoiceItem insertCredit(UUID accountId, BigDecimal amount, org.joda.time.LocalDate effectiveDate, Currency currency, CallContext context) throws InvoiceApiException
accountId - account idamount - the credit amounteffectiveDate - the day to grant the credit, in the account timezonecurrency - the credit currencycontext - the call contextInvoiceApiExceptionInvoiceItem insertCreditForInvoice(UUID accountId, UUID invoiceId, BigDecimal amount, org.joda.time.LocalDate effectiveDate, Currency currency, CallContext context) throws InvoiceApiException
accountId - account idinvoiceId - invoice idamount - the credit amounteffectiveDate - the day to grant the credit, in the account timezonecurrency - the credit currencycontext - the call contextInvoiceApiExceptionInvoiceItem insertInvoiceItemAdjustment(UUID accountId, UUID invoiceId, UUID invoiceItemId, org.joda.time.LocalDate effectiveDate, CallContext context) throws InvoiceApiException
accountId - account idinvoiceId - invoice idinvoiceItemId - invoice item ideffectiveDate - the effective date for this adjustment invoice item (in the account timezone)context - the call contextInvoiceApiExceptionInvoiceItem insertInvoiceItemAdjustment(UUID accountId, UUID invoiceId, UUID invoiceItemId, org.joda.time.LocalDate effectiveDate, BigDecimal amount, Currency currency, 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 currencycontext - the call contextInvoiceApiExceptionvoid deleteCBA(UUID accountId, UUID invoiceId, UUID invoiceItemId, CallContext context) throws InvoiceApiException
accountId - account idinvoiceId - invoice idinvoiceItemId - invoice item id (must be of type CBA_ADJ)context - the call contextInvoiceApiExceptionString getInvoiceAsHTML(UUID invoiceId, TenantContext context) throws AccountApiException, IOException, InvoiceApiException
invoiceId - invoice idcontext - the tenant contextAccountApiExceptionIOExceptionInvoiceApiExceptionvoid consumeExstingCBAOnAccountWithUnpaidInvoices(UUID accountId, CallContext context)
accountId - account idcontext - the callcontextCopyright © 2010-2014. All Rights Reserved.