Skip to content

Commit

Permalink
invoice corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
reshmabidikar committed Oct 16, 2023
1 parent 61bfbda commit bebcf7f
Showing 1 changed file with 39 additions and 20 deletions.
59 changes: 39 additions & 20 deletions source/includes/_invoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ An invoice can have one of the following status values: DRAFT, COMMITTED, or VOI

An `Invoice` resource represents an invoice associated with a specific account. The attributes contained in this resource are the following:

| Name | Type | Generated by | Description |
|---------------------|---------|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **invoiceId** | string | system | UUID for the invoice |
| **accountId** | string | system | UUID for the account |
| **amount** | number | user or system | Sum of all item amounts |
| **currency** | string | user or system | Currency associated with the account |
| **status** | string | system | Status of the invoice: DRAFT, COMMITTED or VOID |
| **creditAdj** | number | system | Invoice credit (amount that we owe to the customer). It is calculated as the sum of `CBA_ADJ` invoice items |
| **refundAdj** | number | system | Refund amount associated with an invoice. It is calculated as the sum of all invoice payment amounts of type `REFUND` and `CHARGED_BACK`. |
| **invoiceDate** | date | system | Date when this invoice was generated |
| **targetDate** | date | user or system | Date up to which the account has been invoiced |
| **invoiceNumber** | number | system | Invoice number |
| Name | Type | Generated by | Description |
|---------------------|---------|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **invoiceId** | string | system | UUID for the invoice |
| **accountId** | string | system | UUID for the account |
| **amount** | number | user or system | Sum of all item amounts |
| **currency** | string | user or system | Currency associated with the account |
| **status** | string | system | Status of the invoice: DRAFT, COMMITTED or VOID |
| **creditAdj** | number | system | Invoice credit (amount that we owe to the customer). It is calculated as the sum of `CBA_ADJ` invoice items |
| **refundAdj** | number | system | Refund amount associated with an invoice. It is calculated as the sum of all invoice payment amounts of type `REFUND` and `CHARGED_BACK`. |
| **invoiceDate** | date | system | Date when this invoice was generated |
| **targetDate** | date | user or system | Date up to which the account has been invoiced |
| **invoiceNumber** | number | system | Invoice number |
| **balance** | number | system | Invoice balance (amount that a customer owes as part of an invoice). At a high level, it is calculated as the sum of all item amounts minus the payment amount. See [Invoice Balance](https://docs.killbill.io/latest/invoice_examples.html#_invoice_balance) for further details. |
| **bundleKeys** | list | system | List of bundles invoiced. Deprecated.|
| **credits** | list | system | List of credits associated with this invoice. Deprecated. |
| **items** | list | system | List of invoice items on this invoice. See Invoice Item resource below. |
| **items** | list | system | List of invoice items on this invoice. See InvoiceItem resource below. |
| **trackingIds** | list | user | List of usage tracking ids associated with this invoice |
| **isParentInvoice** | boolean | system | If true, this invoice is the parent in the hierarchical model |
| **parentInvoiceId** | string | system | In the hierarchical model, UUID of the parent invoice |
Expand Down Expand Up @@ -767,6 +767,7 @@ invoice = KillBillClient::Model::Invoice.find_by_id(invoice_id,

```python
invoiceApi = killbill.api.InvoiceApi()

invoice_id = '4b16ad29-2f32-4e7e-85f9-99beda4ae7dd'

invoice = invoiceApi.get_invoice(invoice_id)
Expand Down Expand Up @@ -900,6 +901,7 @@ invoice = KillBillClient::Model::Invoice.find_by_number(invoice_number,

```python
invoiceApi = killbill.api.InvoiceApi()

invoice_number = '7452'

invoice = invoiceApi.get_invoice_by_number(invoice_number)
Expand Down Expand Up @@ -1035,6 +1037,7 @@ invoice = KillBillClient::Model::Invoice.find_by_invoice_item_id(invoice_item_id

```python
invoiceApi = killbill.api.InvoiceApi()

invoice_item_id = '5cc1dce5-7f95-4d8e-987b-27ddd9e5b171'

invoice = invoiceApi.get_invoice_by_item_id(invoice_item_id,
Expand Down Expand Up @@ -1161,6 +1164,7 @@ invoiceHTML = KillBillClient::Model::Invoice.as_html(invoice_id, options)

```python
invoiceApi = killbill.api.InvoiceApi()

invoice_id = '4b16ad29-2f32-4e7e-85f9-99beda4ae7dd'

invoiceHTML = invoiceApi.get_invoice_as_html(invoice_id)
Expand Down Expand Up @@ -1347,6 +1351,7 @@ invoice.commit(user,

```python
invoiceApi = killbill.api.InvoiceApi()

invoice_id = '18d23ef1-ea82-442d-8602-43305232f3e5'

invoiceApi.commit_invoice(invoice_id,
Expand Down Expand Up @@ -1437,6 +1442,7 @@ invoice.void(user,

```python
invoiceApi = killbill.api.InvoiceApi()

invoice_id = '18d23ef1-ea82-442d-8602-43305232f3e5'

invoiceApi.void_invoice(invoice_id,
Expand Down Expand Up @@ -1547,6 +1553,7 @@ invoice_item.update(user,

```python
invoiceApi = killbill.api.InvoiceApi()

invoice_id = '4b16ad29-2f32-4e7e-85f9-99beda4ae7dd'
body = InvoiceItem(account_id='bdbed417-a84b-4303-958c-b88a36807416',
invoice_id='4b16ad29-2f32-4e7e-85f9-99beda4ae7dd',
Expand Down Expand Up @@ -1668,6 +1675,7 @@ invoice_item.delete(user,

```python
invoiceApi = killbill.api.InvoiceApi()

invoice_id='a493320b-29ab-4228-ad84-58d53e88b73b'
invoice_item_id='b3aeb9d7-4501-4285-8071-f5c02f45a659'
account_id = 'bdbed417-a84b-4303-958c-b88a36807416'
Expand Down Expand Up @@ -1889,6 +1897,7 @@ KillBillClient::Model::Invoice.trigger_invoice_dry_run(account_id,
# to see what is the next invoice that the system will generate for this account
#
invoiceApi = killbill.api.InvoiceApi()

body = InvoiceDryRun(dry_run_type='UPCOMING_INVOICE')
account_id = '00e87495-92dc-4640-8490-e2c794748151'

Expand Down Expand Up @@ -3401,6 +3410,7 @@ KillBillClient::Model::Invoice.upload_catalog_translation(catalog_translation,
```python
invoiceApi = killbill.api.InvoiceApi()
locale = 'fr_FR'
body = 'sports-monthly = Voiture Sport'
Expand Down Expand Up @@ -3490,6 +3500,7 @@ translations = KillBillClient::Model::Invoice.get_catalog_translation(locale, op
```python
invoiceApi = killbill.api.InvoiceApi()
locale = 'fr_FR'
translations = invoiceApi.get_catalog_translation(locale)
Expand Down Expand Up @@ -3602,6 +3613,7 @@ KillBillClient::Model::Invoice.upload_invoice_translation(invoice_translation,
```python
invoiceApi = killbill.api.InvoiceApi()
locale = 'fr_FR'
body = "invoiceDate = date de facture"
delete_if_exists = True
Expand Down Expand Up @@ -3698,6 +3710,7 @@ translations = KillBillClient::Model::Invoice.get_invoice_translation(locale,opt
```python
invoiceApi = killbill.api.InvoiceApi()
locale = 'fr_FR'
translations = invoiceApi.get_invoice_translation(locale)
Expand Down Expand Up @@ -3811,6 +3824,7 @@ KillBillClient::Model::Invoice.upload_invoice_template(invoice_template,
```python
invoiceApi = killbill.api.InvoiceApi()
body = 'Some_HTML_String'
invoiceApi.upload_invoice_mp_template(body,
Expand Down Expand Up @@ -3892,6 +3906,7 @@ template = KillBillClient::Model::Invoice.get_invoice_template(is_manual_pay, lo
```python
invoiceApi = killbill.api.InvoiceApi()
locale = 'fr_FR'
template = invoiceApi.get_invoice_mp_template(locale)
Expand Down Expand Up @@ -4093,6 +4108,7 @@ KillBillClient::Model::Invoice.upload_invoice_template(invoice_template,
```python
invoiceApi = killbill.api.InvoiceApi()
body = 'Some_HTML_String'
delete_if_exists = True
Expand Down Expand Up @@ -4336,6 +4352,7 @@ Audit logs provide a record of events that occur involving various specific reso
Retrieve a list of audit log records showing events that occurred involving changes to a specified invoice. History information (a copy of the full invoice object) is included with each record.
Some examples:
* Assuming the API is invoked after an invoice is generated, it would return one record:
* An `INSERT` record corresponding to the invoice creation
* Assuming the API is invoked after an invoice is voided, it would return two records:
Expand Down Expand Up @@ -4452,7 +4469,8 @@ If successful, returns a status code of 200 and a list of audit logs with histor
Retrieve a list of audit log records showing events that occurred involving changes to a specified invoice item. History information (a copy of the full invoice item object) is included with each record.
Some examples:
Assuming this API is invoked with an invoice item id as soon as the invoice is generated, it would return:
* Assuming this API is invoked with an invoice item id as soon as the invoice is generated, it would return:
* An `INSERT` record corresponding to the invoice item creation
* Assuming a CBA_ADJ invoice item is deleted, and this API is invoked with the CBA_ADJ invoice item id, this API would return two records:
* An `INSERT` record corresponding to the invoice item creation
Expand Down Expand Up @@ -4841,6 +4859,7 @@ invoices = KillBillClient::Model::Invoice.find_in_batches_by_search_key(search_k
```python
invoiceApi = killbill.api.InvoiceApi()
search_key = 'USD'
invoices = invoiceApi.search_invoices(search_key)
Expand Down Expand Up @@ -4894,12 +4913,12 @@ $result = $apiInstance->searchInvoices($searchKey, $offset, $limit, $audit);
**Query Parameters**
| Name | Type | Required | Default | Description |
| ---- | -----| -------- | ---- | ------------
| **searchKey** | string | yes | none | What you want to find |
| **offset** | long | none | 0 | Starting index for items listed |
| **limit** | long | none | 100 | Maximum number of items to return on this page |
| **audit** | string | no | "NONE" | Level of audit information to return: "NONE", "MINIMAL" (only inserts), or "FULL" |
| Name | Type | Required | Default | Description |
|---------------|--------|----------|---------|-----------------------------------------------------------------------------------|
| **searchKey** | string | yes | none | What you want to find |
| **offset** | long | none | 0 | Starting index for items listed |
| **limit** | long | none | 100 | Maximum number of items to return on this page |
| **audit** | string | no | "NONE" | Level of audit information to return: "NONE", "MINIMAL" (only inserts), or "FULL" |
**Response**
Expand Down

0 comments on commit bebcf7f

Please sign in to comment.