summaryrefslogtreecommitdiffstats
path: root/dom/interfaces/payments/nsIPaymentRequest.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /dom/interfaces/payments/nsIPaymentRequest.idl
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/interfaces/payments/nsIPaymentRequest.idl')
-rw-r--r--dom/interfaces/payments/nsIPaymentRequest.idl93
1 files changed, 93 insertions, 0 deletions
diff --git a/dom/interfaces/payments/nsIPaymentRequest.idl b/dom/interfaces/payments/nsIPaymentRequest.idl
new file mode 100644
index 0000000000..ea5b6cba47
--- /dev/null
+++ b/dom/interfaces/payments/nsIPaymentRequest.idl
@@ -0,0 +1,93 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nsISupports.idl"
+#include "nsIVariant.idl"
+#include "nsIPrincipal.idl"
+
+interface nsIArray;
+
+[scriptable, builtinclass, uuid(2fe296cc-d917-4820-b492-aa42df23f9b4)]
+interface nsIPaymentMethodData : nsISupports
+{
+ readonly attribute AString supportedMethods;
+ [implicit_jscontext]
+ readonly attribute jsval data;
+};
+
+[scriptable, builtinclass, uuid(d22a6f5f-767b-4fea-bf92-68b0b8003eba)]
+interface nsIPaymentCurrencyAmount : nsISupports
+{
+ readonly attribute AString currency;
+ readonly attribute AString value;
+};
+
+[scriptable, builtinclass, uuid(4f78a59f-b5ff-4fb5-ab48-3b37d0101b02)]
+interface nsIPaymentItem : nsISupports
+{
+ readonly attribute AString label;
+ readonly attribute nsIPaymentCurrencyAmount amount;
+ readonly attribute boolean pending;
+};
+
+[scriptable, builtinclass, uuid(74259861-c318-40e8-b3d5-518e701bed80)]
+interface nsIPaymentDetailsModifier : nsISupports
+{
+ readonly attribute AString supportedMethods;
+ readonly attribute nsIPaymentItem total;
+ readonly attribute nsIArray additionalDisplayItems;
+ [implicit_jscontext]
+ readonly attribute jsval data;
+};
+
+[scriptable, builtinclass, uuid(68341551-3605-4381-b936-41e830aa88fb)]
+interface nsIPaymentShippingOption : nsISupports
+{
+ readonly attribute AString id;
+ readonly attribute AString label;
+ readonly attribute nsIPaymentCurrencyAmount amount;
+ attribute boolean selected;
+};
+
+[scriptable, builtinclass, uuid(73a5a3f1-45b9-4605-a6e6-7aa60daa9039)]
+interface nsIPaymentDetails : nsISupports
+{
+ readonly attribute AString id;
+ readonly attribute nsIPaymentItem totalItem;
+ readonly attribute nsIArray displayItems;
+ readonly attribute nsIArray shippingOptions;
+ readonly attribute nsIArray modifiers;
+ readonly attribute AString error;
+ [implicit_jscontext]
+ readonly attribute jsval shippingAddressErrors;
+ [implicit_jscontext]
+ readonly attribute jsval payerErrors;
+ [implicit_jscontext]
+ readonly attribute jsval paymentMethodErrors;
+};
+
+[scriptable, builtinclass, uuid(d53f9f20-138e-47cc-9fd5-db16a3f6d301)]
+interface nsIPaymentOptions : nsISupports
+{
+ readonly attribute boolean requestPayerName;
+ readonly attribute boolean requestPayerEmail;
+ readonly attribute boolean requestPayerPhone;
+ readonly attribute boolean requestShipping;
+ readonly attribute boolean requestBillingAddress;
+ readonly attribute AString shippingType;
+};
+
+[scriptable, builtinclass, uuid(2fa36783-d684-4487-b7a8-9def6ae3128f)]
+interface nsIPaymentRequest : nsISupports
+{
+ readonly attribute uint64_t topOuterWindowId;
+ readonly attribute nsIPrincipal topLevelPrincipal;
+ readonly attribute AString requestId;
+ readonly attribute AString completeStatus;
+ readonly attribute nsIArray paymentMethods;
+ readonly attribute nsIPaymentDetails paymentDetails;
+ readonly attribute nsIPaymentOptions paymentOptions;
+ readonly attribute AString shippingOption;
+};