google-nomulus/java/google/registry
jianglai ff221fba96 Validate individual fee types
Currently we validate the fee extension by summing up all fees present in the extension and comparing it against the total fee to be charged. While this works in most cases, we'd like the ability to individually validate each fee. This is especially useful during EAP when two fees are charged, a regular "create" fee that would also be amount we charge during renewal, and a one time "EAP" fee.

Because we can only distinguish fees by their descriptions, we try to match the description to the format string of the fee type enums. We also only require individual fee matches when we are charging more than one type of fees, which makes the change compatible with most existing use cases where only one fees is charged and the description field is ignored in the extension.

We expect the workflow to be that a registrar sends a domain check, and we reply with exactly what fees we are expecting, and then it will use the descriptions in the response to send us a domain create with the correct fees.

Note that we aggregate fees within the same FeeType together. Normally there will only be one fee per type, but in case of custom logic there could be more than one fee for the same type. There is no way to distinguish them as they both use the same description. So it is simpler to just aggregate them.

This CL also includes some reformatting that conforms to google-java-format output.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186530316
2018-03-06 18:48:39 -05:00
..
backup Rationalize logging statements across codebase 2018-01-19 14:56:45 -05:00
batch Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
beam Refactor ICANN reporting and billing into common package 2018-02-01 21:56:06 -05:00
bigquery Rationalize logging statements across codebase 2018-01-19 14:56:45 -05:00
braintree Switch from Guava Optionals to Java 8 Optionals 2017-10-24 16:53:47 -04:00
builddefs Rename set to depset in .bzl and BUILD files 2017-08-29 16:53:21 -04:00
config Allow over 1000 dns-updates to be handled at once 2018-02-20 15:42:09 -05:00
cron Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
dns Add metric for DNS UPDATE latency 2018-02-20 15:54:15 -05:00
eclipse Switch from Guava Optionals to Java 8 Optionals 2017-10-24 16:53:47 -04:00
env Update publish queue with practical retry params 2018-02-20 16:00:33 -05:00
export Refactor ICANN reporting and billing into common package 2018-02-01 21:56:06 -05:00
flows Validate individual fee types 2018-03-06 18:48:39 -05:00
gcs Add publish functionality to billing pipeline 2018-01-04 17:17:59 -05:00
groups Clean up some code quality issues 2017-12-01 22:14:06 -05:00
idn Update IDN tables to comply with https://www.iana.org/help/idn-repository-procedure 2018-02-01 21:59:14 -05:00
keyring Rationalize logging statements across codebase 2018-01-19 14:56:45 -05:00
loadtest Replace com.google.common.base.Function with java.util.function.Function 2017-12-27 11:08:55 -05:00
mapreduce Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
model Validate individual fee types 2018-03-06 18:48:39 -05:00
module Refactor ICANN reporting and billing into common package 2018-02-01 21:56:06 -05:00
monitoring/whitebox Rationalize logging statements across codebase 2018-01-19 14:56:45 -05:00
pricing Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
proxy Containerize GCP proxy 2018-02-20 15:56:13 -05:00
rdap RDAP: Change data policy remark for redacted contacts 2018-02-20 15:33:31 -05:00
rde Add //third_party/java/jaxb dependency to targets using javax.xml.bind 2018-01-23 16:18:35 -05:00
reporting Refactor ICANN reporting and billing into common package 2018-02-01 21:56:06 -05:00
request Refactor ICANN reporting and billing into common package 2018-02-01 21:56:06 -05:00
security Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
storage/drive Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
tldconfig/idn Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
tmch Rationalize logging statements across codebase 2018-01-19 14:56:45 -05:00
tools Rename Soy map to legacy_object_map (first step of migration) 2018-02-20 15:34:57 -05:00
ui Remove references to SoySyntaxException 2018-02-20 15:37:48 -05:00
util Add //third_party/java/jaxb dependency to targets using javax.xml.bind 2018-01-23 16:18:35 -05:00
whois Rationalize logging statements across codebase 2018-01-19 14:56:45 -05:00
xjc Add //third_party/java/jaxb dependency to targets using javax.xml.bind 2018-01-23 16:18:35 -05:00
xml Add //third_party/java/jaxb dependency to targets using javax.xml.bind 2018-01-23 16:18:35 -05:00
BUILD Add nocron ear and deployer rules for the crash environment 2017-10-04 16:16:45 -04:00
repositories.bzl Update FOSS bazel version to 0.10.0 2018-02-05 23:54:49 -05:00