klarna-on-demand
Version:
SDK for Klarna's on-demand purchase service.
401 lines (278 loc) • 12.3 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>KlarnaOnDemand - klarna-on-demand</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
<link rel="icon" href="../assets/favicon.ico">
<script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="doc">
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="../assets/css/logo.png" title="klarna-on-demand" width="117" height="52"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0.2</em>
</div>
</div>
<div id="bd" class="yui3-g">
<div class="yui3-u-1-4">
<div id="docs-sidebar" class="sidebar apidocs">
<div id="api-list">
<h2 class="off-left">APIs</h2>
<div id="api-tabview" class="tabview">
<ul class="tabs">
<li><a href="#api-classes">Classes</a></li>
<li><a href="#api-modules">Modules</a></li>
</ul>
<div id="api-tabview-filter">
<input type="search" id="api-filter" placeholder="Type to filter APIs">
</div>
<div id="api-tabview-panel">
<ul id="api-classes" class="apis classes">
<li><a href="../classes/KlarnaOnDemand.html">KlarnaOnDemand</a></li>
<li><a href="../classes/KlarnaOnDemand.OriginProof.html">KlarnaOnDemand.OriginProof</a></li>
</ul>
<ul id="api-modules" class="apis modules">
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="yui3-u-3-4">
<div id="api-options">
Show:
<label for="api-show-inherited">
<input type="checkbox" id="api-show-inherited" checked>
Inherited
</label>
<label for="api-show-protected">
<input type="checkbox" id="api-show-protected">
Protected
</label>
<label for="api-show-private">
<input type="checkbox" id="api-show-private">
Private
</label>
<label for="api-show-deprecated">
<input type="checkbox" id="api-show-deprecated">
Deprecated
</label>
</div>
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1>KlarnaOnDemand Class</h1>
<div class="box meta">
<div class="foundat">
Defined in: <a href="../files/lib_klarna-on-demand.js.html#l92"><code>lib/klarna-on-demand.js:92</code></a>
</div>
</div>
<div class="box intro">
<p>Manages application-wide settings and allows access to the SDK's views.</p>
<h1></h1>
</div>
<div id="classdocs" class="tabview">
<ul class="api-class-tabs">
<li class="api-class-tab index"><a href="#index">Index</a></li>
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
</ul>
<div>
<div id="index" class="api-class-tabpanel index">
<h2 class="off-left">Item Index</h2>
<div class="index-section methods">
<h3>Methods</h3>
<ul class="index-list methods">
<li class="index-item method">
<a href="#method_openPreferencesView">openPreferencesView</a>
</li>
<li class="index-item method">
<a href="#method_openRegistrationView">openRegistrationView</a>
</li>
<li class="index-item method">
<a href="#method_setApiKey">setApiKey</a>
</li>
</ul>
</div>
</div>
<div id="methods" class="api-class-tabpanel">
<h2 class="off-left">Methods</h2>
<div id="method_openPreferencesView" class="method item">
<h3 class="name"><code>openPreferencesView</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>userToken</code>
</li>
<li class="arg">
<code>onError</code>
</li>
<li class="arg">
<code class="optional">[locale='en']</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>
Defined in
<a href="../files/lib_klarna-on-demand.js.html#l171"><code>lib/klarna-on-demand.js:171</code></a>
</p>
</div>
<div class="description">
<p>Presents the preferences view in an iframe that covers the entirety of the current document.</p>
<h1></h1>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">userToken</code>
<span class="type">String</span>
<div class="param-description">
<p>The token of the user whose preferences are to be changed.</p>
</div>
</li>
<li class="param">
<code class="param-name">onError</code>
<span class="type">Function</span>
<div class="param-description">
<p>A callback that will be activated if an error occurs while setting
the user's preferences. This callback will be passed an error code related to the error.
This code should not be presented to the user and is mainly for debugging purposes.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[locale='en']</code>
<span class="type">String</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>The locale in which to present the view, in ISO 639-1 form.</p>
</div>
</li>
</ul>
</div>
</div>
<div id="method_openRegistrationView" class="method item">
<h3 class="name"><code>openRegistrationView</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>onSuccess</code>
</li>
<li class="arg">
<code>onError</code>
</li>
<li class="arg">
<code class="optional">[confirmedUserDataId=null]</code>
</li>
<li class="arg">
<code class="optional">[locale='en']</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>
Defined in
<a href="../files/lib_klarna-on-demand.js.html#l136"><code>lib/klarna-on-demand.js:136</code></a>
</p>
</div>
<div class="description">
<p>Presents the registration view in an iframe that covers the entirety of the current document.</p>
<h1></h1>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">onSuccess</code>
<span class="type">Function</span>
<div class="param-description">
<p>A callback that will be activated upon successful registration.
This callback will be passed the user token received during the registration process.</p>
</div>
</li>
<li class="param">
<code class="param-name">onError</code>
<span class="type">Function</span>
<div class="param-description">
<p>A callback that will be activated if an error occurs during
registration. This callback will be passed an error code related to the error. This
code should not be presented to the user and is mainly for debugging purposes.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[confirmedUserDataId=null]</code>
<span class="type">String</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>ID for pre-confirmed user data that allows the
registration view to already know the user's identity without requesting a phone number.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[locale='en']</code>
<span class="type">String</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>The locale in which to present the view, in ISO 639-1 form.</p>
</div>
</li>
</ul>
</div>
</div>
<div id="method_setApiKey" class="method item">
<h3 class="name"><code>setApiKey</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>apiKey</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>
Defined in
<a href="../files/lib_klarna-on-demand.js.html#l114"><code>lib/klarna-on-demand.js:114</code></a>
</p>
</div>
<div class="description">
<p>Sets the API key to use in following calls.</p>
<h1></h1>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">apiKey</code>
<span class="type">String</span>
<div class="param-description">
<p>Merchant’s public API key for this application.</p>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>