Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions userguide/tutorials/plugin_development.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@ The https://github.com/killbill/killbill-hello-world-java-plugin/blob/3aa938d19f

The https://github.com/killbill/killbill-hello-world-java-plugin/blob/3aa938d19fdfba81c7c035b45c3f17cac74db177/src/main/java/org/killbill/billing/plugin/helloworld/HelloWorldPaymentPluginApi.java[_HelloWorldPaymentPluginApi_] class provides sample code for developing a payment plugin. It implements the https://github.com/killbill/killbill-plugin-api/blob/d9eca5af0e37541069b1c608f95e100dbe13b301/payment/src/main/java/org/killbill/billing/payment/plugin/api/PaymentPluginApi.java[_PaymentPluginApi_] interface. You can extend this class as required to develop a payment plugin. See the https://docs.killbill.io/latest/payment_plugin.html[_Payment Plugin Tutorial_] for further information.

=== HelloWorldInvoicePluginApi

The https://github.com/killbill/killbill-hello-world-java-plugin/blob/3aa938d19fdfba81c7c035b45c3f17cac74db177/src/main/java/org/killbill/billing/plugin/helloworld/HelloWorldInvoicePluginApi.java[_HelloWorldInvoicePluginApi_] class provides sample code for developing an invoice plugin. It implements the https://github.com/killbill/killbill-plugin-api/blob/a20776687fc61ce4ca94d84e2b117e4cce0a255c/invoice/src/main/java/org/killbill/billing/invoice/plugin/api/InvoicePluginApi.java[_InvoicePluginApi_] interface. You can extend this class as required to develop an invoice plugin. See the https://docs.killbill.io/latest/invoice_plugin.html[_https://docs.killbill.io/latest/invoice_plugin_] for further information. The HelloWorldInvoicePluginApi class shows examples of adding three item types.

* https://github.com/killbill/killbill-hello-world-java-plugin/blob/master/src/main/java/org/killbill/billing/plugin/helloworld/HelloWorldInvoicePluginApi.java#L83[_External_Charge_]: It applies a fixed static charge linked to the very first item of the current invoice being generated. An example could be, a fixed charge that you always wish to add to the invoice, like handling charge, acquisition cost etc.

* https://github.com/killbill/killbill-hello-world-java-plugin/blob/master/src/main/java/org/killbill/billing/plugin/helloworld/HelloWorldInvoicePluginApi.java#L78[_Tax_Item_]: It applies a fixed tax linked to the very first item of the current invoice being generated. For simplicity this is fixed in this example, however, it could be percentage based calculation as well.

* https://github.com/killbill/killbill-hello-world-java-plugin/blob/master/src/main/java/org/killbill/billing/plugin/helloworld/HelloWorldInvoicePluginApi.java#L88[_Item_Adj_]: It checks the historical invoices for the account and applies the adjustment linked to each item of the first invoice where adjustment item type is not present.

=== Other Classes

In addition to the classes listed above, some of the other classes in the `hello-world-plugin` are as follows:
Expand Down
Loading