mirror of
https://github.com/google/nomulus.git
synced 2025-07-20 01:35:59 +02:00
Add publish functionality to billing pipeline
This closes the end-to-end billing pipeline, allowing us to share generated detail reports with registrars via Drive and e-mail the invoicing team a link to the generated invoice. This also factors out the email configs from ICANN reporting into the common 'misc' config, since we'll likely need alert e-mails for future periodic tasks. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=180805972
This commit is contained in:
parent
27f12b9390
commit
ab5e16ab67
25 changed files with 721 additions and 95 deletions
|
@ -509,27 +509,15 @@ public final class RegistryConfig {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the email address from which we send ICANN reporting email summaries from.
|
||||
* Returns the list of addresses that receive monthly invoicing emails.
|
||||
*
|
||||
* @see google.registry.reporting.ReportingEmailUtils
|
||||
* @see google.registry.billing.BillingEmailUtils
|
||||
*/
|
||||
@Provides
|
||||
@Config("icannReportingSenderEmailAddress")
|
||||
public static String provideIcannReportingEmailSenderAddress(
|
||||
@Config("projectId") String projectId, RegistryConfigSettings config) {
|
||||
return String.format(
|
||||
"%s@%s", projectId, config.icannReporting.icannReportingEmailSenderDomain);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the email address from which we send ICANN reporting email summaries to.
|
||||
*
|
||||
* @see google.registry.reporting.ReportingEmailUtils
|
||||
*/
|
||||
@Provides
|
||||
@Config("icannReportingRecipientEmailAddress")
|
||||
public static String provideIcannReportingEmailRecipientAddress(RegistryConfigSettings config) {
|
||||
return config.icannReporting.icannReportingEmailRecipient;
|
||||
@Config("invoiceEmailRecipients")
|
||||
public static ImmutableList<String> provideInvoiceEmailRecipients(
|
||||
RegistryConfigSettings config) {
|
||||
return ImmutableList.copyOf(config.billing.invoiceEmailRecipients);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -712,6 +700,35 @@ public final class RegistryConfig {
|
|||
return Optional.ofNullable(config.misc.sheetExportId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the email address we send various alert e-mails to.
|
||||
*
|
||||
* <p>This allows us to easily verify the success or failure of periodic tasks by passively
|
||||
* checking e-mail.
|
||||
*
|
||||
* @see google.registry.reporting.ReportingEmailUtils
|
||||
* @see google.registry.billing.BillingEmailUtils
|
||||
*/
|
||||
@Provides
|
||||
@Config("alertRecipientEmailAddress")
|
||||
public static String provideAlertRecipientEmailAddress(RegistryConfigSettings config) {
|
||||
return config.misc.alertRecipientEmailAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the email address we send emails from.
|
||||
*
|
||||
* @see google.registry.reporting.ReportingEmailUtils
|
||||
* @see google.registry.billing.BillingEmailUtils
|
||||
*/
|
||||
|
||||
@Provides
|
||||
@Config("alertSenderEmailAddress")
|
||||
public static String provideAlertSenderEmailAddress(
|
||||
@Config("projectId") String projectId, RegistryConfigSettings config) {
|
||||
return String.format("%s@%s", projectId, config.misc.alertEmailSenderDomain);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns SSH client connection and read timeout.
|
||||
*
|
||||
|
|
|
@ -28,6 +28,7 @@ public class RegistryConfigSettings {
|
|||
public CloudDns cloudDns;
|
||||
public Caching caching;
|
||||
public IcannReporting icannReporting;
|
||||
public Billing billing;
|
||||
public Rde rde;
|
||||
public RegistrarConsole registrarConsole;
|
||||
public Monitoring monitoring;
|
||||
|
@ -114,8 +115,11 @@ public class RegistryConfigSettings {
|
|||
public static class IcannReporting {
|
||||
public String icannTransactionsReportingUploadUrl;
|
||||
public String icannActivityReportingUploadUrl;
|
||||
public String icannReportingEmailSenderDomain;
|
||||
public String icannReportingEmailRecipient;
|
||||
}
|
||||
|
||||
/** Configuration for monthly invoices. */
|
||||
public static class Billing {
|
||||
public List<String> invoiceEmailRecipients;
|
||||
}
|
||||
|
||||
/** Configuration for Registry Data Escrow (RDE). */
|
||||
|
@ -145,6 +149,8 @@ public class RegistryConfigSettings {
|
|||
/** Miscellaneous configuration that doesn't quite fit in anywhere else. */
|
||||
public static class Misc {
|
||||
public String sheetExportId;
|
||||
public String alertRecipientEmailAddress;
|
||||
public String alertEmailSenderDomain;
|
||||
}
|
||||
|
||||
/** Configuration for Braintree credit card payment processing. */
|
||||
|
|
|
@ -160,11 +160,8 @@ icannReporting:
|
|||
# URL we PUT monthly ICANN activity reports to.
|
||||
icannActivityReportingUploadUrl: https://ry-api.icann.org/report/registry-functions-activity
|
||||
|
||||
# Domain for the email address we send reporting pipeline summary emails from.
|
||||
icannReportingEmailSenderDomain: appspotmail.com
|
||||
|
||||
# Address we send reporting pipeline summary emails to.
|
||||
icannReportingEmailRecipient: email@example.com
|
||||
billing:
|
||||
invoiceEmailRecipients: []
|
||||
|
||||
rde:
|
||||
# URL prefix of ICANN's server to upload RDE reports to. Nomulus adds /TLD/ID
|
||||
|
@ -215,6 +212,12 @@ misc:
|
|||
# to. Leave this null to disable syncing.
|
||||
sheetExportId: null
|
||||
|
||||
# Address we send alert summary emails to.
|
||||
alertRecipientEmailAddress: email@example.com
|
||||
|
||||
# Domain for the email address we send alert summary emails from.
|
||||
alertEmailSenderDomain: appspotmail.com
|
||||
|
||||
# Braintree is a credit card payment processor that is used on the registrar
|
||||
# console to allow registrars to pay their invoices.
|
||||
braintree:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue