diff options
author | Bjørn Christian Seime <bjorncs@vespa.ai> | 2023-10-30 15:58:22 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@vespa.ai> | 2023-10-30 16:13:23 +0100 |
commit | 6a3584d8b799bc815ec339aa2038dccc8a415f1a (patch) | |
tree | f6e45f921e1a0a54dac1675794ce60328c1b4d3e /controller-api/src | |
parent | 8b6c5e37aff416b59f4182f901328479d543a71e (diff) |
Make tax id optional for some countries
Diffstat (limited to 'controller-api/src')
2 files changed, 3 insertions, 3 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/billing/AcceptedCountries.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/billing/AcceptedCountries.java index c665b4fb7c2..082eaac7315 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/billing/AcceptedCountries.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/billing/AcceptedCountries.java @@ -13,7 +13,7 @@ public record AcceptedCountries(List<Country> countries) { countries = List.copyOf(countries); } - public record Country(String code, String displayName, List<TaxType> taxTypes) { + public record Country(String code, String displayName, boolean taxIdMandatory, List<TaxType> taxTypes) { public Country { taxTypes = List.copyOf(taxTypes); } diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/billing/MockBillingController.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/billing/MockBillingController.java index 92a84ad9918..9012b45748c 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/billing/MockBillingController.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/billing/MockBillingController.java @@ -210,10 +210,10 @@ public class MockBillingController implements BillingController { public AcceptedCountries getAcceptedCountries() { return new AcceptedCountries(List.of( new AcceptedCountries.Country( - "NO", "Norway", + "NO", "Norway", true, List.of(new AcceptedCountries.TaxType("no_vat", "Norwegian VAT number", "[0-9]{9}MVA", "123456789MVA"))), new AcceptedCountries.Country( - "CA", "Canada", + "CA", "Canada", true, List.of(new AcceptedCountries.TaxType("ca_gst_hst", "Canadian GST/HST number", "([0-9]{9}) ?RT ?([0-9]{4})", "123456789RT0002"), new AcceptedCountries.TaxType("ca_pst_bc", "Canadian PST number (British Columbia)", "PST-?([0-9]{4})-?([0-9]{4})", "PST-1234-5678"))) )); |