Commit 7a87fccd authored by Siyu An's avatar Siyu An Committed by Commit Bot

[Autofill Offer] Update some fields in the proto

1. Merchant domain and merchant app package name
should be repeated field.

2. The instrument id for credit card should be
int64. This is the type of it in payments server.

3. Deleted legacy_instrument_id from offer specifics.
No legacy instrument id will be synced down with
offer data if flow does not go through Payments
Orchestration.

Bug: 1112095
Change-Id: Ic6e801bc49d0716d7e50196c8314d27977d010b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2380577
Commit-Queue: Siyu An <siyua@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803249}
parent c36cc35b
...@@ -16,18 +16,19 @@ package sync_pb; ...@@ -16,18 +16,19 @@ package sync_pb;
// Properties of Autofill wallet offer related objects. // Properties of Autofill wallet offer related objects.
// Next tag: 9
message AutofillOfferSpecifics { message AutofillOfferSpecifics {
// The id for this offer data. Will be used as the client tag. // The id for this offer data. Will be used as the client tag.
optional int64 id = 1; optional int64 id = 1;
// The link leading to the offer details page on Gpay app. Will be populated // The link leading to the offer details page on Gpay app. Will be populated
// on Android only. // on Android only.
optional string offer_details_deep_link_clank = 2; optional string offer_details_url = 2;
// Merchant domain and merchant app package name refers to the merchant this // Merchant domain and merchant app package name refers to the merchant this
// offer is applied to. // offer is applied to.
optional string merchant_domain = 3; repeated string merchant_domain = 3;
optional string merchant_app_package = 4; repeated string merchant_app_package = 4;
// The expiry of this offer. Will be represented in the form of unix epoch // The expiry of this offer. Will be represented in the form of unix epoch
// time in seconds. Once the offer is expired it will not be shown in the // time in seconds. Once the offer is expired it will not be shown in the
...@@ -35,13 +36,10 @@ message AutofillOfferSpecifics { ...@@ -35,13 +36,10 @@ message AutofillOfferSpecifics {
optional int64 offer_expiry_date = 5; optional int64 offer_expiry_date = 5;
message CardLinkedOfferData { message CardLinkedOfferData {
// The server id of the card to which the offer is linked. Both the id and reserved 1, 2;
// the legacy id should be passed down to the client. Right now only the
// legacy_instrument_id will be used but in the future the server will // The server id of the card to which the offer is linked.
// migrate to instrument_id. The legacy_instrument_id matches the id in the repeated int64 instrument_id = 3;
// masked_credit_cards table.
repeated string instrument_id = 1;
repeated string legacy_instrument_id = 2;
} }
// The unique offer data for different offer types. // The unique offer data for different offer types.
......
...@@ -188,7 +188,7 @@ message CardIssuer { ...@@ -188,7 +188,7 @@ message CardIssuer {
} }
message WalletMaskedCreditCard { message WalletMaskedCreditCard {
reserved 9; reserved 9, 14;
reserved "card_class"; reserved "card_class";
enum WalletCardStatus { enum WalletCardStatus {
...@@ -247,9 +247,9 @@ message WalletMaskedCreditCard { ...@@ -247,9 +247,9 @@ message WalletMaskedCreditCard {
// Issuer of the card. // Issuer of the card.
optional CardIssuer card_issuer = 13; optional CardIssuer card_issuer = 13;
// Server-generated unique ID string. This is opaque to the client. // Server-generated unique ID. This is opaque to the client.
// |id| is the legacy version of this. // |id| is the legacy version of this.
optional string instrument_id = 14; optional int64 instrument_id = 15;
} }
// Different than an AutofillProfile because this represents some known address // Different than an AutofillProfile because this represents some known address
......
...@@ -139,9 +139,9 @@ VISIT_PROTO_FIELDS(const sync_pb::AutofillCullingFlags& proto) { ...@@ -139,9 +139,9 @@ VISIT_PROTO_FIELDS(const sync_pb::AutofillCullingFlags& proto) {
VISIT_PROTO_FIELDS(const sync_pb::AutofillOfferSpecifics& proto) { VISIT_PROTO_FIELDS(const sync_pb::AutofillOfferSpecifics& proto) {
VISIT(id); VISIT(id);
VISIT(offer_details_deep_link_clank); VISIT(offer_details_url);
VISIT(merchant_domain); VISIT_REP(merchant_domain);
VISIT(merchant_app_package); VISIT_REP(merchant_app_package);
VISIT(offer_expiry_date); VISIT(offer_expiry_date);
VISIT(card_linked_offer_data); VISIT(card_linked_offer_data);
VISIT(percentage_reward); VISIT(percentage_reward);
...@@ -151,7 +151,6 @@ VISIT_PROTO_FIELDS(const sync_pb::AutofillOfferSpecifics& proto) { ...@@ -151,7 +151,6 @@ VISIT_PROTO_FIELDS(const sync_pb::AutofillOfferSpecifics& proto) {
VISIT_PROTO_FIELDS( VISIT_PROTO_FIELDS(
const sync_pb::AutofillOfferSpecifics::CardLinkedOfferData& proto) { const sync_pb::AutofillOfferSpecifics::CardLinkedOfferData& proto) {
VISIT_REP(instrument_id); VISIT_REP(instrument_id);
VISIT_REP(legacy_instrument_id);
} }
VISIT_PROTO_FIELDS( VISIT_PROTO_FIELDS(
......
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