Implementing the billing summary plugin
To support the PolicyCenter
billing summary screens (one in policy file, one in account file), implement
the IBillingSummaryPlugin plugin interface. PolicyCenter
uses the information that this plugin returns only as part of the billing
summary screen. PolicyCenter does not use the information as part of
binding, issuing, changing, or renewing a policy. You can remove the
billing summary screen from the user interface and PolicyCenter would
continue to work normally.
See also
Interfaces used by the billing summary plugin
The methods in the
billing summary plugin interface must return instances of classes that
implement one of several pre-defined interfaces. You define your own
Gosu classes that are concrete implementations of these Java interfaces,
which are in the gw.plugin.billing
package. To write a new implementation of the billing summary plugin
itself (IBillingSummaryPlugin), write classes that are concrete
implementations of all of the following interfaces:
BillingAccountInfoBillingInvoiceInfoBillingPeriodInfo
These interfaces define methods. Many of the methods
are property getter methods. In Gosu, these getters are exposed as properties.
For example, the BillingPeriodInfo
interface (defined in Java) has a getPolicyTermInfos
method. Write a new Gosu class that implements this interface, which
would implement a getter for the PolicyTermInfos
property. Gosu code can access its PolicyTermInfos
property directly or by calling the getPolicyTermInfos
method. You can also add additional getters and setters for other properties
that you create.
Other methods on these interfaces are
regular methods and not getter methods. For example, BillingPeriodInfo interface has
a findPolicyPeriod method.
PolicyCenter includes two implementations
of IBillingSummaryPlugin:
BCBillingSummaryPlugin– Base configuration plugin implementation for PolicyCenter integration with BillingCenter.StandAloneBillingSummaryPlugin– Example plugin implementation that mimics integration with a third-party billing system.
In Studio, view these classes as examples
of implementing the IBillingSummaryPlugin plugin interface and its additional
interfaces BillingAccountInfo, BillingInvoiceInfo, and BillingPeriodInfo.
Getting policies billed to accounts
To retrieve all open policies billed to an
account, implement the getPoliciesBilledToAccount
method in the billing summary plugin. This method takes an account number
String and returns an
array of open policy periods that bill to the account. Each array member
is an instance of a class that implements the BillingPeriodInfo interface.
BillingPeriodInfo[] getPoliciesBilledToAccount(String accountNumber);Retrieving account billing summaries
To retrieve a billing
summary for an account, implement the retrieveAccountBillingSummary method. This method
takes an account number String
and returns an instance of a class that implements the BillingAccountInfo interface.
The class instance contains billing information for the account.
BillingAccountInfo retrieveAccountBillingSummary(String accountNumber);Retrieving account invoices
To retrieve the account invoices associated
with an account, implement the retrieveAccountInvoices
method. This method takes an account number String and returns an array of
instances of a class that implements the BillingInvoiceInfo interface.
Each instance contains information about the invoice for the account.
BillingInvoiceInfo[] retrieveAccountInvoices(String accountNumber);Retrieving billing summaries for policy periods
To retrieve billing
summaries for all open policy periods associated with an account, implement
the retrieveBillingPolicies method. This method takes
an account number String
and returns an array of instances of a class that implements the BillingPeriodInfo interface. Each array member contains
a billing summary for a policy period associated with the account.
BillingPeriodInfo[] retrieveBillingPolicies(String accountNumber);Retrieving policy billing summary
To retrieve a billing
summary for a policy period, implement the retrievePolicyBillingSummary method. This method
takes a policy number String
and the term of the policy period and returns an instance of a class
that implements the BillingPeriodInfo interface. This instance contains
the billing summary for the policy period.
BillingPeriodInfo retrievePolicyBillingSummary(String policyNumber, int termNumber);