Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Side by Side Diff: components/payments/core/payment_options_provider.h

Issue 2774233005: Creating PaymentOptionsProvider interface (Closed)
Patch Set: rouslan comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/payments/core/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_PAYMENTS_CORE_PAYMENT_OPTIONS_PROVIDER_H_
6 #define COMPONENTS_PAYMENTS_CORE_PAYMENT_OPTIONS_PROVIDER_H_
7
8 namespace payments {
9
10 // See PaymentOptionsProvider::shipping_type() below.
11 enum class PaymentShippingType : int32_t {
12 SHIPPING = 0,
13 DELIVERY = 1,
14 PICKUP = 2,
15 };
16
17 // An interface which provides immutable values, specified by the merchant at
18 // request-time, describing the set of information required from the payer, and
19 // possibly the method by which the order will be fulfilled.
20 class PaymentOptionsProvider {
21 public:
22 virtual ~PaymentOptionsProvider() {}
23
24 // Returns true if this transaction requires the payer's name.
25 virtual bool request_payer_name() const = 0;
26
27 // Returns true if this transaction requires the payer's email address.
28 virtual bool request_payer_email() const = 0;
29
30 // Returns true if this transaction requires the payer's phone number.
31 virtual bool request_payer_phone() const = 0;
32
33 // Returns true if this transaction requires a shipping address.
34 virtual bool request_shipping() const = 0;
35
36 // A value, provided by the merchant at request-time, indicating the method
37 // by which the order will be fulfilled. Used only to modify presentation of
38 // the user interface, and only meaningful when request_shipping() is true.
39 virtual PaymentShippingType shipping_type() const = 0;
40 };
41
42 } // namespace payments
43
44 #endif // COMPONENTS_PAYMENTS_CORE_PAYMENT_OPTIONS_PROVIDER_H_
OLDNEW
« no previous file with comments | « components/payments/core/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698