tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsIPaymentRequest.idl (3147B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 #include "nsISupports.idl"
      7 #include "nsIVariant.idl"
      8 #include "nsIPrincipal.idl"
      9 
     10 interface nsIArray;
     11 
     12 [scriptable, builtinclass, uuid(2fe296cc-d917-4820-b492-aa42df23f9b4)]
     13 interface nsIPaymentMethodData : nsISupports
     14 {
     15  readonly attribute AString supportedMethods;
     16  [implicit_jscontext]
     17  readonly attribute jsval data;
     18 };
     19 
     20 [scriptable, builtinclass, uuid(d22a6f5f-767b-4fea-bf92-68b0b8003eba)]
     21 interface nsIPaymentCurrencyAmount : nsISupports
     22 {
     23  readonly attribute AString currency;
     24  readonly attribute AString value;
     25 };
     26 
     27 [scriptable, builtinclass, uuid(4f78a59f-b5ff-4fb5-ab48-3b37d0101b02)]
     28 interface nsIPaymentItem : nsISupports
     29 {
     30  readonly attribute AString label;
     31  readonly attribute nsIPaymentCurrencyAmount amount;
     32  readonly attribute boolean pending;
     33 };
     34 
     35 [scriptable, builtinclass, uuid(74259861-c318-40e8-b3d5-518e701bed80)]
     36 interface nsIPaymentDetailsModifier : nsISupports
     37 {
     38  readonly attribute AString supportedMethods;
     39  readonly attribute nsIPaymentItem total;
     40  readonly attribute nsIArray additionalDisplayItems;
     41  [implicit_jscontext]
     42  readonly attribute jsval data;
     43 };
     44 
     45 [scriptable, builtinclass, uuid(68341551-3605-4381-b936-41e830aa88fb)]
     46 interface nsIPaymentShippingOption : nsISupports
     47 {
     48  readonly attribute AString id;
     49  readonly attribute AString label;
     50  readonly attribute nsIPaymentCurrencyAmount amount;
     51  attribute boolean selected;
     52 };
     53 
     54 [scriptable, builtinclass, uuid(73a5a3f1-45b9-4605-a6e6-7aa60daa9039)]
     55 interface nsIPaymentDetails : nsISupports
     56 {
     57  readonly attribute AString id;
     58  readonly attribute nsIPaymentItem totalItem;
     59  readonly attribute nsIArray displayItems;
     60  readonly attribute nsIArray shippingOptions;
     61  readonly attribute nsIArray modifiers;
     62  readonly attribute AString error;
     63  [implicit_jscontext]
     64  readonly attribute jsval shippingAddressErrors;
     65  [implicit_jscontext]
     66  readonly attribute jsval payerErrors;
     67  [implicit_jscontext]
     68  readonly attribute jsval paymentMethodErrors;
     69 };
     70 
     71 [scriptable, builtinclass, uuid(d53f9f20-138e-47cc-9fd5-db16a3f6d301)]
     72 interface nsIPaymentOptions : nsISupports
     73 {
     74  readonly attribute boolean requestPayerName;
     75  readonly attribute boolean requestPayerEmail;
     76  readonly attribute boolean requestPayerPhone;
     77  readonly attribute boolean requestShipping;
     78  readonly attribute boolean requestBillingAddress;
     79  readonly attribute AString shippingType;
     80 };
     81 
     82 [scriptable, builtinclass, uuid(2fa36783-d684-4487-b7a8-9def6ae3128f)]
     83 interface nsIPaymentRequest : nsISupports
     84 {
     85  readonly attribute uint64_t topOuterWindowId;
     86  readonly attribute nsIPrincipal topLevelPrincipal;
     87  readonly attribute AString requestId;
     88  readonly attribute AString completeStatus;
     89  readonly attribute nsIArray paymentMethods;
     90  readonly attribute nsIPaymentDetails paymentDetails;
     91  readonly attribute nsIPaymentOptions paymentOptions;
     92  readonly attribute AString shippingOption;
     93 };