mirror of
https://github.com/google/nomulus.git
synced 2025-06-02 10:38:41 +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
|
@ -33,10 +33,18 @@ import javax.servlet.http.HttpServletRequest;
|
|||
@Module
|
||||
public final class BillingModule {
|
||||
|
||||
public static final String DETAIL_REPORT_PREFIX = "invoice_details";
|
||||
public static final String OVERALL_INVOICE_PREFIX = "CRR-INV";
|
||||
|
||||
static final String PARAM_JOB_ID = "jobId";
|
||||
static final String PARAM_DIRECTORY_PREFIX = "directoryPrefix";
|
||||
static final String BILLING_QUEUE = "billing";
|
||||
static final String CRON_QUEUE = "retryable-cron-tasks";
|
||||
// TODO(larryruili): Replace with invoices/yyyy-MM after verifying 2017-12 invoice.
|
||||
static final String RESULTS_DIRECTORY_PREFIX = "results/";
|
||||
|
||||
private static final String CLOUD_PLATFORM_SCOPE =
|
||||
"https://www.googleapis.com/auth/cloud-platform";
|
||||
static final String BILLING_QUEUE = "billing";
|
||||
static final String PARAM_JOB_ID = "jobId";
|
||||
|
||||
/** Provides the invoicing Dataflow jobId enqueued by {@link GenerateInvoicesAction}. */
|
||||
@Provides
|
||||
|
@ -45,6 +53,13 @@ public final class BillingModule {
|
|||
return extractRequiredParameter(req, PARAM_JOB_ID);
|
||||
}
|
||||
|
||||
/** Provides the subdirectory under a GCS bucket that we copy detail reports from. */
|
||||
@Provides
|
||||
@Parameter(PARAM_DIRECTORY_PREFIX)
|
||||
static String provideDirectoryPrefix(HttpServletRequest req) {
|
||||
return extractRequiredParameter(req, PARAM_DIRECTORY_PREFIX);
|
||||
}
|
||||
|
||||
/** Constructs a {@link Dataflow} API client with default settings. */
|
||||
@Provides
|
||||
static Dataflow provideDataflow(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue