Commit 773536e9 authored by Anne Lim's avatar Anne Lim Committed by Commit Bot

[AF] Add instrument_id field to AutofillWalletSpecifics

The field is added for the Offers project(go/autofill-buyflow-offer-design).

Chrome uses legacy_intrument_id for credit cards, while the Payments server mostly uses
instrument_id. Usually, this gets converted in Orchestration. However, it
has been decided that for the Offers project, we will not go through Orchestration
like the credit cards do, but will instead call the Offer backend directly.
Hence, instrument_id is added here so that it can be passed down current credit card sync flow.

This will also help migrate from legacy_instrument_id to Instrument_id,
as the former will be completely deprecated in the future.

Change-Id: I965b35784a5af9be50d3be5695c3b10ddca5751d
Bug: 1121806
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368459
Commit-Queue: Anne Lim <annelim@google.com>
Reviewed-by: default avatarSiyu An <siyua@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801891}
parent 1dc48032
......@@ -105,7 +105,9 @@ std::string WalletMaskedCreditCardSpecificsAsDebugString(
<< ", exp_year: " << specifics.masked_card().exp_year()
<< ", billing_address_id: "
<< specifics.masked_card().billing_address_id()
<< ", bank_name: " << specifics.masked_card().bank_name() << "]";
<< ", bank_name: " << specifics.masked_card().bank_name()
<< ", instrument_id: " << specifics.masked_card().instrument_id()
<< "]";
return output.str();
}
......
......@@ -210,6 +210,7 @@ message WalletMaskedCreditCard {
}
// Server-generated unique ID string. This is opaque to the client.
// This is the legacy version of |instrument_id|.
optional string id = 1;
// What the server thinks of this card.
......@@ -245,6 +246,10 @@ message WalletMaskedCreditCard {
// Issuer of the card.
optional CardIssuer card_issuer = 13;
// Server-generated unique ID string. This is opaque to the client.
// |id| is the legacy version of this.
optional string instrument_id = 14;
}
// Different than an AutofillProfile because this represents some known address
......
......@@ -1116,6 +1116,7 @@ VISIT_PROTO_FIELDS(const sync_pb::WalletMaskedCreditCard& proto) {
VISIT(bank_name);
VISIT(nickname);
VISIT(card_issuer);
VISIT(instrument_id);
}
VISIT_PROTO_FIELDS(const sync_pb::WalletMetadataSpecifics& proto) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment