Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gray-adeyi committed Aug 23, 2022
1 parent e0f2af4 commit ee5ab9f
Show file tree
Hide file tree
Showing 123 changed files with 1,258 additions and 32,156 deletions.
1 change: 1 addition & 0 deletions docs/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../paystack-client-turorial.html">Tutorial 1</a></li>
<li class="toctree-l1"><a class="reference internal" href="../modules.html">pypaystack2</a></li>
</ul>

Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/apple_pay.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/bulk_charges.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/charge.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/control_panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/customers.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/dedicated_accounts.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/disputes.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/invoices.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/miscellaneous.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/payment_pages.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/plans.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/products.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/refunds.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/settlements.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/splits.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/subaccounts.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/subscriptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/transactions.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/transfer_recipients.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/transfers.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/transfers_control.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/api/verification.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
14 changes: 7 additions & 7 deletions docs/_modules/pypaystack2/baseapi.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down Expand Up @@ -66,8 +67,7 @@

<h1>Source code for pypaystack2.baseapi</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">NamedTuple</span><span class="p">,</span> <span class="n">Union</span>
<span class="kn">from</span> <span class="nn">pyparsing</span> <span class="kn">import</span> <span class="n">Optional</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">NamedTuple</span><span class="p">,</span> <span class="n">Union</span><span class="p">,</span> <span class="n">Optional</span>
<span class="kn">import</span> <span class="nn">requests</span>
<span class="kn">from</span> <span class="nn">requests</span> <span class="kn">import</span> <span class="n">Response</span> <span class="k">as</span> <span class="n">RResponse</span>
<span class="kn">import</span> <span class="nn">json</span>
Expand All @@ -82,7 +82,7 @@ <h1>Source code for pypaystack2.baseapi</h1><div class="highlight"><pre>

<div class="viewcode-block" id="Response"><a class="viewcode-back" href="../../pypaystack2.html#pypaystack2.baseapi.Response">[docs]</a><span class="k">class</span> <span class="nc">Response</span><span class="p">(</span><span class="n">NamedTuple</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;A namedtuple that models the data gotten from making a request to</span>
<span class="sd"> paystacks API endpoints.</span>
<span class="sd"> paystack&#39;s API endpoints.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
Expand Down Expand Up @@ -111,13 +111,13 @@ <h1>Source code for pypaystack2.baseapi</h1><div class="highlight"><pre>
<span class="n">_CONTENT_TYPE</span> <span class="o">=</span> <span class="s2">&quot;application/json&quot;</span>
<span class="n">_BASE_END_POINT</span> <span class="o">=</span> <span class="s2">&quot;https://api.paystack.co&quot;</span>

<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">auth_key</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">auth_key</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> auth_key:</span>
<span class="sd"> Your paystack authorization key. Required only</span>
<span class="sd"> if it is not provided in your enviromental</span>
<span class="sd"> if it is not provided in your environmental</span>
<span class="sd"> variables as ``PAYSTACK_AUTHORIZATION_KEY=your_key``</span>

<span class="sd"> &quot;&quot;&quot;</span>
Expand Down Expand Up @@ -145,7 +145,7 @@ <h1>Source code for pypaystack2.baseapi</h1><div class="highlight"><pre>
<span class="k">def</span> <span class="nf">_parse_json</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">response_obj</span><span class="p">:</span> <span class="n">RResponse</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Response</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This function takes in every json response sent back by the</span>
<span class="sd"> server and trys to get out the important return variables</span>
<span class="sd"> server and tries to get out the important return variables</span>

<span class="sd"> Returns a python namedtuple of Response which contains</span>
<span class="sd"> status code, status(bool), message, data</span>
Expand Down Expand Up @@ -177,7 +177,7 @@ <h1>Source code for pypaystack2.baseapi</h1><div class="highlight"><pre>
<span class="n">request</span> <span class="o">=</span> <span class="n">method_map</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">method</span><span class="p">)</span>

<span class="k">if</span> <span class="ow">not</span> <span class="n">request</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">InvalidMethodError</span><span class="p">(</span><span class="s2">&quot;Request method not recognised or implemented&quot;</span><span class="p">)</span>
<span class="k">raise</span> <span class="n">InvalidMethodError</span><span class="p">(</span><span class="s2">&quot;Request method not recognized or implemented&quot;</span><span class="p">)</span>

<span class="n">response</span> <span class="o">=</span> <span class="n">request</span><span class="p">(</span><span class="n">url</span><span class="p">,</span> <span class="n">headers</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_headers</span><span class="p">(),</span> <span class="n">data</span><span class="o">=</span><span class="n">payload</span><span class="p">,</span> <span class="n">verify</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="k">if</span> <span class="n">response</span><span class="o">.</span><span class="n">status_code</span> <span class="o">==</span> <span class="mi">404</span><span class="p">:</span>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/errors.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_modules/pypaystack2/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">pypaystack2</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../paystack-client-turorial.html">Paystack Command line Client</a></li>
</ul>

</div>
Expand Down
6 changes: 4 additions & 2 deletions docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ your python project. for example
from pypaystack2.api import Miscellaneous # assumes you have installed pypaystack2
from pypaystack2.utils import Country
miscellaneous_wrapper = Miscellaneous() # assumes that your paystack auth key is in
# your enviromental variables i.e PAYSTACK_AUTHORIZATION_KEY=your_key otherwise instatiate
# your environmental variables i.e PAYSTACK_AUTHORIZATION_KEY=your_key otherwise instantiate
# the Miscellaneous API wrapper as it is done below.
# miscellaneous_wrapper = Miscellaneous(auth_key=your_paystack_auth_key)
response = miscellaneous_wrapper.get_banks(country=Country.NIGERIA,use_cursor=False) # Requires internet connection.
Expand Down Expand Up @@ -69,7 +69,7 @@ in the ``Invoice`` wrapper. Say you wanted to create an invoice by sending a
from pypaystack2.api import Invoice
invoice_wrapper = Invoice()
response = invoice_wrapper.create(custmer="CUS_xwaj0txjryg393b",amount=1000) # Creates an invoice with a charge of ₦100
response = invoice_wrapper.create(customer="CUS_xwaj0txjryg393b",amount=1000) # Creates an invoice with a charge of ₦100
From here you can check out the tutorials section to get more examples and get familiar or surf the
documentation for wrappers and methods you'll need for your next project. Hurray!
Expand All @@ -78,8 +78,10 @@ documentation for wrappers and methods you'll need for your next project. Hurray
:maxdepth: 2
:caption: Contents:

paystack-client-turorial
modules



Indices and tables
==================
Expand Down
Loading

0 comments on commit ee5ab9f

Please sign in to comment.