diff --git a/core/src/main/java/google/registry/beam/billing/BillingEvent.java b/core/src/main/java/google/registry/beam/billing/BillingEvent.java index 7158d78fb..98f13524b 100644 --- a/core/src/main/java/google/registry/beam/billing/BillingEvent.java +++ b/core/src/main/java/google/registry/beam/billing/BillingEvent.java @@ -189,7 +189,7 @@ public abstract class BillingEvent implements Serializable { .minusDays(1) .toString(), billingId(), - String.format("%s - %s", registrarId(), tld()), + registrarId(), String.format("%s | TLD: %s | TERM: %d-year", action(), tld(), years()), amount(), currency(), @@ -233,7 +233,7 @@ public abstract class BillingEvent implements Serializable { /** Returns the billing account id, which is the {@code BillingEvent.billingId}. */ abstract String productAccountKey(); - /** Returns the invoice grouping key, which is in the format "registrarId - tld". */ + /** Returns the invoice grouping key, which is the registrar ID. */ abstract String usageGroupingKey(); /** Returns a description of the item, formatted as "action | TLD: tld | TERM: n-year." */ diff --git a/core/src/test/java/google/registry/beam/billing/BillingEventTest.java b/core/src/test/java/google/registry/beam/billing/BillingEventTest.java index 8ca90914c..b86d6017b 100644 --- a/core/src/test/java/google/registry/beam/billing/BillingEventTest.java +++ b/core/src/test/java/google/registry/beam/billing/BillingEventTest.java @@ -83,7 +83,7 @@ class BillingEventTest { assertThat(invoiceKey.startDate()).isEqualTo("2017-10-01"); assertThat(invoiceKey.endDate()).isEqualTo("2022-09-30"); assertThat(invoiceKey.productAccountKey()).isEqualTo("12345-CRRHELLO"); - assertThat(invoiceKey.usageGroupingKey()).isEqualTo("myRegistrar - test"); + assertThat(invoiceKey.usageGroupingKey()).isEqualTo("myRegistrar"); assertThat(invoiceKey.description()).isEqualTo("RENEW | TLD: test | TERM: 5-year"); assertThat(invoiceKey.unitPrice()).isEqualTo(20.5); assertThat(invoiceKey.unitPriceCurrency()).isEqualTo("USD"); @@ -104,7 +104,7 @@ class BillingEventTest { assertThat(invoiceKey.toCsv(3L)) .isEqualTo( "2017-10-01,2022-09-30,12345-CRRHELLO,61.50,USD,10125,1,PURCHASE," - + "myRegistrar - test,3,RENEW | TLD: test | TERM: 5-year,20.50,USD,"); + + "myRegistrar,3,RENEW | TLD: test | TERM: 5-year,20.50,USD,"); } @Test @@ -114,7 +114,7 @@ class BillingEventTest { assertThat(invoiceKey.toCsv(3L)) .isEqualTo( "2017-10-01,,12345-CRRHELLO,61.50,USD,10125,1,PURCHASE," - + "myRegistrar - test,3,RENEW | TLD: test | TERM: 0-year,20.50,USD,"); + + "myRegistrar,3,RENEW | TLD: test | TERM: 0-year,20.50,USD,"); } @Test diff --git a/core/src/test/java/google/registry/beam/billing/InvoicingPipelineTest.java b/core/src/test/java/google/registry/beam/billing/InvoicingPipelineTest.java index 56b0c6570..b8f06ea14 100644 --- a/core/src/test/java/google/registry/beam/billing/InvoicingPipelineTest.java +++ b/core/src/test/java/google/registry/beam/billing/InvoicingPipelineTest.java @@ -224,13 +224,13 @@ class InvoicingPipelineTest { private static final ImmutableList EXPECTED_INVOICE_OUTPUT = ImmutableList.of( - "2017-10-01,2020-09-30,234,41.00,USD,10125,1,PURCHASE,theRegistrar - test,2," + "2017-10-01,2020-09-30,234,41.00,USD,10125,1,PURCHASE,theRegistrar,2," + "RENEW | TLD: test | TERM: 3-year,20.50,USD,", - "2017-10-01,2022-09-30,234,70.00,JPY,10125,1,PURCHASE,theRegistrar - hello,1," + "2017-10-01,2022-09-30,234,70.00,JPY,10125,1,PURCHASE,theRegistrar,1," + "CREATE | TLD: hello | TERM: 5-year,70.00,JPY,", - "2017-10-01,,234,20.00,USD,10125,1,PURCHASE,theRegistrar - test,1," + "2017-10-01,,234,20.00,USD,10125,1,PURCHASE,theRegistrar,1," + "SERVER_STATUS | TLD: test | TERM: 0-year,20.00,USD,", - "2017-10-01,2018-09-30,456,20.50,USD,10125,1,PURCHASE,bestdomains - test,1," + "2017-10-01,2018-09-30,456,20.50,USD,10125,1,PURCHASE,bestdomains,1," + "RENEW | TLD: test | TERM: 1-year,20.50,USD,116688"); private final InvoicingPipelineOptions options =