| Index: components/payments/core/payment_method_data.h
|
| diff --git a/components/payments/core/payment_method_data.h b/components/payments/core/payment_method_data.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5993de3445509506c90c65e9575e60e6613f074b
|
| --- /dev/null
|
| +++ b/components/payments/core/payment_method_data.h
|
| @@ -0,0 +1,50 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_PAYMENTS_CORE_PAYMENT_METHOD_DATA_H_
|
| +#define COMPONENTS_PAYMENTS_CORE_PAYMENT_METHOD_DATA_H_
|
| +
|
| +#include <memory>
|
| +#include <vector>
|
| +
|
| +#include "base/strings/string16.h"
|
| +
|
| +namespace base {
|
| +class DictionaryValue;
|
| +}
|
| +
|
| +namespace payments {
|
| +
|
| +// A set of supported payment methods and any associated payment method specific
|
| +// data for those methods.
|
| +class PaymentMethodData {
|
| + public:
|
| + PaymentMethodData();
|
| + PaymentMethodData(const PaymentMethodData& other);
|
| + ~PaymentMethodData();
|
| +
|
| + bool operator==(const PaymentMethodData& other) const;
|
| + bool operator!=(const PaymentMethodData& other) const;
|
| +
|
| + // Populates the properties of this PaymentMethodData from |value|. Returns
|
| + // true if the required values are present.
|
| + bool FromDictionaryValue(const base::DictionaryValue& value);
|
| +
|
| + // Payment method identifiers for payment methods that the merchant web site
|
| + // accepts.
|
| + std::vector<base::string16> supported_methods;
|
| +
|
| + // A JSON-serialized object that provides optional information that might be
|
| + // needed by the supported payment methods.
|
| + base::string16 data;
|
| +
|
| + // When the methods include "basic-card", a list of networks and types that
|
| + // are supported.
|
| + std::vector<base::string16> supported_networks;
|
| + std::vector<base::string16> supported_types;
|
| +};
|
| +
|
| +} // namespace payments
|
| +
|
| +#endif // COMPONENTS_PAYMENTS_CORE_PAYMENT_METHOD_DATA_H_
|
|
|