| OLD | NEW |
| (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_METHOD_DATA_H_ |
| 6 #define COMPONENTS_PAYMENTS_CORE_PAYMENT_METHOD_DATA_H_ |
| 7 |
| 8 #include <memory> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/strings/string16.h" |
| 12 |
| 13 namespace base { |
| 14 class DictionaryValue; |
| 15 } |
| 16 |
| 17 namespace payments { |
| 18 |
| 19 // A set of supported payment methods and any associated payment method specific |
| 20 // data for those methods. |
| 21 class PaymentMethodData { |
| 22 public: |
| 23 PaymentMethodData(); |
| 24 PaymentMethodData(const PaymentMethodData& other); |
| 25 ~PaymentMethodData(); |
| 26 |
| 27 bool operator==(const PaymentMethodData& other) const; |
| 28 bool operator!=(const PaymentMethodData& other) const; |
| 29 |
| 30 // Populates the properties of this PaymentMethodData from |value|. Returns |
| 31 // true if the required values are present. |
| 32 bool FromDictionaryValue(const base::DictionaryValue& value); |
| 33 |
| 34 // Payment method identifiers for payment methods that the merchant web site |
| 35 // accepts. |
| 36 std::vector<base::string16> supported_methods; |
| 37 |
| 38 // A JSON-serialized object that provides optional information that might be |
| 39 // needed by the supported payment methods. |
| 40 base::string16 data; |
| 41 |
| 42 // When the methods include "basic-card", a list of networks and types that |
| 43 // are supported. |
| 44 std::vector<base::string16> supported_networks; |
| 45 std::vector<base::string16> supported_types; |
| 46 }; |
| 47 |
| 48 } // namespace payments |
| 49 |
| 50 #endif // COMPONENTS_PAYMENTS_CORE_PAYMENT_METHOD_DATA_H_ |
| OLD | NEW |