blob: 0914d6f6eee60adb31fbc3fee208fa467af29ce1 [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.
// https://w3c.github.io/webpayments-payment-apps-api/#payment-instruments
[
RuntimeEnabled=PaymentApp,
Exposed=(Window,Worker)
] interface PaymentInstruments {
[CallWith=ScriptState, RaisesException, ImplementedAs=deleteInstrument] Promise<boolean> delete(DOMString instrumentKey);
[CallWith=ScriptState, RaisesException] Promise<any> get(DOMString instrumentKey);
[CallWith=ScriptState, RaisesException] Promise<sequence<DOMString>> keys();
[CallWith=ScriptState, RaisesException] Promise<boolean> has(DOMString instrumentKey);
[CallWith=ScriptState, RaisesException] Promise<void> set(DOMString instrumentKey, PaymentInstrument details);
[CallWith=ScriptState, RaisesException] Promise<void> clear();
};