File: autofill_offer_specifics.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (108 lines) | stat: -rw-r--r-- 3,993 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// If you change or add any fields in this file, update proto_visitors.h and
// potentially proto_enum_conversions.{h, cc}.

syntax = "proto2";

option java_multiple_files = true;
option java_package = "org.chromium.components.sync.protocol";

option optimize_for = LITE_RUNTIME;

package sync_pb;

// Properties of Autofill wallet offer related objects.

// Next tag: 11
message AutofillOfferSpecifics {
  // The id for this offer data. Will be used as the client tag.
  optional int64 id = 1;

  // The link leading to the offer details page on Gpay app. Will be populated
  // on Android only.
  optional string offer_details_url = 2;

  // Merchant domain and merchant app package name refers to the merchant this
  // offer is applied to.
  repeated string merchant_domain = 3;
  repeated string merchant_app_package = 4;

  // 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
  // client.
  optional int64 offer_expiry_date = 5;

  // Proto containing data specific to a card-linked offer.
  message CardLinkedOfferData {
    reserved 1, 2;

    // The server id of the card to which the offer is linked.
    repeated int64 instrument_id = 3;
  }

  // Proto containing data specific to a promo code offer.
  message PromoCodeOfferData {
    // The actual promo code which can be applied at checkout.
    optional string promo_code = 1;
  }

  // The unique offer data for different offer types.
  oneof type_specific_offer_data {
    CardLinkedOfferData card_linked_offer_data = 6;
    PromoCodeOfferData promo_code_offer_data = 9;
  }

  // Strings to be shown in client UI, based on the offer type and details.
  message DisplayStrings {
    // A message translated in the user's GPay app locale, explaining the value
    // of the offer. For example, a promo code offer might display
    // "$5 off on shoes, up to $50."
    optional string value_prop_text = 1;

    // A message translated in the user's GPay app locale and shown on mobile as
    // a link, prompting the user to click it to learn more about the offer.
    // Generally, "See details".
    optional string see_details_text_mobile = 2;

    // A message translated in the user's GPay app locale and shown on desktop
    // (not as a link), informing the user that exclusions and restrictions may
    // apply to the value prop text. Generally, "Terms apply."
    optional string see_details_text_desktop = 3;

    // A message translated in the user's GPay app locale and shown on mobile,
    // instructing them on how to redeem the offer. For example, a promo code
    // offer might display "Tap the promo code field at checkout to autofill
    // it."
    optional string usage_instructions_text_mobile = 4;

    // A message translated in the user's GPay app locale and shown on desktop,
    // instructing them on how to redeem the offer. For example, a promo code
    // offer might display "Click the promo code field at checkout to autofill
    // it."
    optional string usage_instructions_text_desktop = 5;
  }
  optional DisplayStrings display_strings = 10;

  // This value will be shown in the offer text template as "XXX% cashback".
  // Percentage has a range of (0, 100].
  message PercentageReward {
    // The string contains a number and a percent sign.
    optional string percentage = 1;
  }

  // This value will be shown in the offer text template as "XXX$ off".
  message FixedAmountReward {
    // The string contains a number and a currency sign.
    optional string amount = 1;
  }

  // The reward type of the offer. Will be used to generate the display text in
  // the UI. Each type has its own client side text template.
  oneof reward_type {
    PercentageReward percentage_reward = 7;
    FixedAmountReward fixed_amount_reward = 8;
  }
}