Export billing account map to registrar sheet

The billing account map will be serialized in the following format:

{currency1=id1, currency2=id2, ...}

In order for the output to be deterministic, the billing account map is stored as a sorted map.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161075814
This commit is contained in:
jianglai 2017-07-06 07:09:33 -07:00 committed by Ben McIlwain
parent 80f8f5ac7f
commit 0013312f5c
5 changed files with 39 additions and 25 deletions

View file

@ -78,8 +78,7 @@ class SyncRegistrarsSheet {
final DateTime executionTime = clock.nowUtc();
sheetSynchronizer.synchronize(
spreadsheetId,
FluentIterable
.from(
FluentIterable.from(
new Ordering<Registrar>() {
@Override
public int compare(Registrar left, Registrar right) {
@ -128,6 +127,7 @@ class SyncRegistrarsSheet {
builder.put("state", convert(registrar.getState()));
builder.put("ianaIdentifier", convert(registrar.getIanaIdentifier()));
builder.put("billingIdentifier", convert(registrar.getBillingIdentifier()));
builder.put("billingAccountMap", convert(registrar.getBillingAccountMap()));
builder.put("primaryContacts", convertContacts(contacts, byType(ADMIN)));
builder.put("techContacts", convertContacts(contacts, byType(TECH)));
builder.put("marketingContacts", convertContacts(contacts, byType(MARKETING)));