Skip to content

Commit 66fce90

Browse files
Merge pull request #32 from reshmabidikar/custom-invoice-v6
Create InvoiceFormatterFactory for custom invoice plugin
2 parents cd3fb25 + 98f4a08 commit 66fce90

2 files changed

Lines changed: 42 additions & 1 deletion

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright 2020-2024 Equinix, Inc
3+
* Copyright 2014-2024 The Billing Project, LLC
4+
*
5+
* The Billing Project licenses this file to you under the Apache License, version 2.0
6+
* (the "License"); you may not use this file except in compliance with the
7+
* License. You may obtain a copy of the License at:
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations
15+
* under the License.
16+
*/
17+
18+
package org.killbill.billing.invoice.plugin.api;
19+
20+
import java.util.Locale;
21+
import java.util.ResourceBundle;
22+
23+
import org.killbill.billing.currency.api.CurrencyConversionApi;
24+
import org.killbill.billing.invoice.api.Invoice;
25+
import org.killbill.billing.invoice.api.formatters.InvoiceFormatter;
26+
27+
public interface InvoiceFormatterFactory {
28+
29+
/**
30+
*
31+
* @param defaultLocale Default Killbill locale
32+
* @param catalogBundlePath Path to the catalog translation bundle
33+
* @param invoice the invoice that is being formatted
34+
* @param locale locale associated with the account
35+
* @param currencyConversionApi API used for currency conversion
36+
* @param bundle ResourceBundle corresponding to the account locale and catalogBundlePath
37+
* @param defaultBundle ResourceBundle corresponding to the default locale and catalogBundlePath
38+
* @return InvoiceFormatter corresponding to the formatted invoice
39+
*/
40+
InvoiceFormatter createInvoiceFormatter(final String defaultLocale, final String catalogBundlePath, final Invoice invoice, final Locale locale, final CurrencyConversionApi currencyConversionApi, ResourceBundle bundle, ResourceBundle defaultBundle);
41+
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>org.kill-bill.billing</groupId>
2323
<artifactId>killbill-oss-parent</artifactId>
24-
<version>0.146.1</version>
24+
<version>0.146.27</version>
2525
</parent>
2626
<groupId>org.kill-bill.billing.plugin</groupId>
2727
<artifactId>killbill-plugin-api</artifactId>

0 commit comments

Comments
 (0)