Skip to content

Commit

Permalink
Merge pull request #561 from reshmabidikar/invoice-plugin-doc-correct…
Browse files Browse the repository at this point in the history
…ions

Minor corrections to docs
  • Loading branch information
pierre authored Aug 2, 2024
2 parents 958300b + fb391dc commit d4cae87
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions userguide/getting-started/includes/tomcat.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,16 @@ Sometimes, you may wish to mask some sensitive data in the logs. For this, you n
<conversionRule conversionWord="maskedMsg" converterClass="org.killbill.billing.server.log.obfuscators.ObfuscatorConverter" />
. Restart Kill Bill - Sensitive data in the logs (as configured by the system properties above) should now be masked.

Some key-value pattern examples that can be specified corresponding to the `killbill.server.log.obfuscate.patterns` property:

* \s*=\s*'([^']+)' - Matches `key = 'value'`
* \s*=\s*"([^"]+)" - Matches `key = "value"`
* \s*:\s*'([^']+)' - Matches `key: 'value'`
* \s*=\s*([^ '",{}]+) - Matches `name = value`
* \s*:\s*'([^'",{}]+)' - Matches `key: 'value'`




=== Setting up KPM in Kaui

Expand Down
6 changes: 3 additions & 3 deletions userguide/tutorials/invoice_plugin.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

The https://github.com/killbill/killbill-plugin-api/blob/master/invoice/src/main/java/org/killbill/billing/invoice/plugin/api/InvoicePluginApi.java[InvoicePluginApi] exists to develop `invoice plugins`. The core invoice system calls those plugins each time the system is generating a new invoice. The invoice system will first compute all the items based on the existing subscriptions or usage data associated to the account and then invoke the registered plugins to allow to add extra items on that invoice.

Plugins need to implement one api `getAdditionalInvoiceItems`, whose purpose is to to allow plugins to add additional items and which takes the following parameters:
Plugins need to implement one api https://github.com/killbill/killbill-plugin-api/blob/a20776687fc61ce4ca94d84e2b117e4cce0a255c/invoice/src/main/java/org/killbill/billing/invoice/plugin/api/InvoicePluginApi.java#L39[getAdditionalInvoiceItems], whose purpose is to to allow plugins to add additional items and which takes the following parameters:

* `invoice`: A copy of the current invoice being generated by the system (including all items generated by the system, and only items generated by the system)
* `properties`: An empty list of `PluginProperty`, which means this field exists only for symmetry with other plugin apis, but is not used.
Expand All @@ -27,9 +27,9 @@ Invoice plugins are registered through the per-tenant `org.killbill.invoice.plug

=== Retries

Invoice generation can be aborted and retried at a later time if the plugin is unable to compute the additional items (e.g. third-party tax service unavailable). The mechanism to do so is very similar to the retry mechanism for notification plugins: the plugin simple needs to throw an `InvoicePluginApiRetryException` with a specified retry schedule.
Invoice generation can be aborted and retried at a later time if the plugin is unable to compute the additional items (e.g. third-party tax service unavailable). The mechanism to do so is very similar to the retry mechanism for notification plugins: the plugin simple needs to throw an https://github.com/killbill/killbill-plugin-api/blob/master/invoice/src/main/java/org/killbill/billing/invoice/plugin/api/InvoicePluginApiRetryException.java[InvoicePluginApiRetryException]. The default retry schedule is `5m, 15m,1h,6h,15h` as defined https://github.com/killbill/killbill-api/blob/7ea823b25e8fd6299350ec62d700e265022be34e/src/main/java/org/killbill/billing/util/queue/QueueRetryException.java#L26[here]. However, users can also specify a custom retry schedule.

Take a look at the https://docs.killbill.io/latest/notification_plugin.html[Notification Plugins] documentation for more details.
Take a look at the https://docs.killbill.io/latest/notification_plugin#_retries[Notification Plugin] documentation for more details.

=== A note about invoice item ids

Expand Down

0 comments on commit d4cae87

Please sign in to comment.