blob: 48919c2f2460740687758b07e0cefef4ac21b45e [file] [log] [blame]
// 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.
#include <memory>
#include <string>
#include "components/payments/mojom/payment_request_data.mojom.h"
// C++ bindings for the PaymentRequest API PaymentCurrencyAmount. Conforms to
// the following spec:
namespace base {
class DictionaryValue;
namespace payments {
// Populates the properties of |amount| from |value|. Returns true if the
// required values are present.
bool PaymentCurrencyAmountFromDictionaryValue(
const base::DictionaryValue& dictionary_value,
mojom::PaymentCurrencyAmount* amount);
// Creates a base::DictionaryValue with the properties of the given
// PaymentCurrencyAmount.
std::unique_ptr<base::DictionaryValue> PaymentCurrencyAmountToDictionaryValue(
const mojom::PaymentCurrencyAmount& amount);
} // namespace payments