Skip to content

Commit c474226

Browse files
committed
https://github.com/killbill/technical-support/issues/188
Details for Hello World plugin HelloWorldInvoicePluginApi class.
1 parent 26f1f3a commit c474226

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

userguide/tutorials/plugin_development.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,16 @@ The https://github.com/killbill/killbill-hello-world-java-plugin/blob/3aa938d19f
172172

173173
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.
174174

175+
=== HelloWorldInvoicePluginApi
176+
177+
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.
178+
179+
* 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.
180+
181+
* 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 charge 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.
182+
183+
* 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.
184+
175185
=== Other Classes
176186

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

0 commit comments

Comments
 (0)