mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Add MR to expand billing events into OneTimes
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=124837292
This commit is contained in:
parent
7cf4ddce97
commit
2a83d122ef
6 changed files with 69 additions and 8 deletions
|
@ -14,11 +14,11 @@ java_library(
|
|||
"//java/com/google/common/net",
|
||||
"//java/google/registry/backup",
|
||||
"//java/google/registry/bigquery",
|
||||
"//java/google/registry/billing",
|
||||
"//java/google/registry/config",
|
||||
"//java/google/registry/cron",
|
||||
"//java/google/registry/dns",
|
||||
"//java/google/registry/dns/writer/api",
|
||||
"//java/google/registry/dns/writer/dnsupdate",
|
||||
"//java/google/registry/export",
|
||||
"//java/google/registry/export/sheet",
|
||||
"//java/google/registry/flows",
|
||||
|
@ -35,6 +35,7 @@ java_library(
|
|||
"//java/google/registry/util",
|
||||
"//third_party/java/bouncycastle",
|
||||
"//third_party/java/dagger",
|
||||
"//third_party/java/joda_time",
|
||||
"//third_party/java/jsr305_annotations",
|
||||
"//third_party/java/jsr330_inject",
|
||||
"//third_party/java/servlet/servlet_api",
|
||||
|
|
|
@ -15,14 +15,20 @@
|
|||
package google.registry.module.backend;
|
||||
|
||||
import static google.registry.model.registry.Registries.assertTldExists;
|
||||
import static google.registry.request.RequestParameters.extractOptionalDatetimeParameter;
|
||||
import static google.registry.request.RequestParameters.extractRequiredParameter;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
|
||||
import google.registry.billing.ExpandRecurringBillingEventsAction;
|
||||
import google.registry.request.Parameter;
|
||||
import google.registry.request.RequestParameters;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
|
@ -36,4 +42,11 @@ public class BackendModule {
|
|||
static String provideTld(HttpServletRequest req) {
|
||||
return assertTldExists(extractRequiredParameter(req, RequestParameters.PARAM_TLD));
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Parameter("cursorTime")
|
||||
static Optional<DateTime> provideCursorTime(HttpServletRequest req) {
|
||||
return extractOptionalDatetimeParameter(
|
||||
req, ExpandRecurringBillingEventsAction.PARAM_CURSOR_TIME);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue