Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Release 3.43.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
IngenicoEPayments committed Oct 16, 2023
1 parent de656ed commit 881f870
Show file tree
Hide file tree
Showing 25 changed files with 886 additions and 148 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include README.md
include README.rst
include LICENSE.txt
89 changes: 0 additions & 89 deletions README.md

This file was deleted.

75 changes: 25 additions & 50 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,19 @@ Ingenico Connect Python SDK
Introduction
------------

The Python SDK helps you to communicate with the `Ingenico
Connect <https://epayments.developer-ingenico.com/>`__ Server API. Its
primary features are:
The Python SDK helps you to communicate with the `Ingenico Connect <https://epayments.developer-ingenico.com/>`__ Server API. Its primary features are:

- convenient Python library for the API calls and responses

- marshalls Python request objects to HTTP requests
- unmarshalls HTTP responses to Python response objects or Python
exceptions
- unmarshalls HTTP responses to Python response objects or Python exceptions

- handling of all the details concerning authentication
- handling of required meta data

Its use is demonstrated by an example for each possible call. The
examples execute a call using the provided API keys.
Its use is demonstrated by an example for each possible call. The examples execute a call using the provided API keys.

See the `Ingenico Connect Developer
Hub <https://epayments.developer-ingenico.com/documentation/sdk/server/python/>`__
for more information on how to use the SDK.
See the `Ingenico Connect Developer Hub <https://epayments.developer-ingenico.com/documentation/sdk/server/python/>`__ for more information on how to use the SDK.

Structure of this repository
----------------------------
Expand All @@ -34,52 +28,43 @@ This repository consists out of four main components:
#. The source code of the SDK integration tests: ``/tests/integration/``
#. Usage examples: ``/examples/``

Note that the source code of the unit tests and integration tests and
the examples can only be found on GitHub.
Note that the source code of the unit tests and integration tests and the examples can only be found on GitHub.

Requirements
------------

Python 3.5 or higher is required. In addition, the following packages
are required:
Python 3.5 or higher is required. In addition, the following packages are required:

- `requests <https://requests.readthedocs.io/>`__ 2.25.0 or higher
- `requests-toolbelt <https://toolbelt.readthedocs.io/>`__ 0.8.0 or
higher
- `requests-toolbelt <https://toolbelt.readthedocs.io/>`__ 0.8.0 or higher

These packages will be installed automatically if the SDK is installed
manually or using pip following the below instructions.
These packages will be installed automatically if the SDK is installed manually or using pip following the below instructions.

Installation
------------

To install the SDK using pip, execute the following command:

::
.. code:: bash
pip install connect-sdk-python3
Alternatively, you can install the SDK from a source distribution file:

#. Download the latest version of the Python SDK from GitHub. Choose the
``connect-sdk-python3-x.y.z.zip`` file from the
`releases <https://github.com/Ingenico-ePayments/connect-sdk-python3/releases>`__
page, where ``x.y.z`` is the version number.
#. Download the latest version of the Python SDK from GitHub. Choose the ``connect-sdk-python3-x.y.z.zip`` file from the `releases <https://github.com/Ingenico-ePayments/connect-sdk-python3/releases>`__ page, where ``x.y.z`` is the version number.

#. Execute the following command in the folder where the SDK was
downloaded to:
#. Execute the following command in the folder where the SDK was downloaded to:

::
.. code:: bash
pip install connect-sdk-python3-x.y.z.zip
Uninstalling
------------

After the Python SDK has been installed, it can be uninstalled using the
following command:
After the Python SDK has been installed, it can be uninstalled using the following command:

::
.. code:: bash
pip uninstall connect-sdk-python3
Expand All @@ -88,47 +73,37 @@ The required packages can be uninstalled in the same way.
Running tests
-------------

There are two types of tests: unit tests and integration tests. The unit
tests will work out-of-the-box; for the integration tests some
configuration is required. First, some environment variables need to be
set:
There are two types of tests: unit tests and integration tests. The unit tests will work out-of-the-box; for the integration tests some configuration is required.
First, some environment variables need to be set:

- ``connect.api.apiKeyId`` for the API key id to use. This can be
retrieved from the Configuration Center.
- ``connect.api.secretApiKey`` for the secret API key to use. This can
be retrieved from the Configuration Center.
- ``connect.api.apiKeyId`` for the API key id to use. This can be retrieved from the Configuration Center.
- ``connect.api.secretApiKey`` for the secret API key to use. This can be retrieved from the Configuration Center.
- ``connect.api.merchantId`` for your merchant ID.

In addition, to run the proxy integration tests, the proxy URI, username
and password should be set in the
``tests/resources/configuration.proxy.ini`` file.
In addition, to run the proxy integration tests, the proxy URI, username and password should be set in the ``tests/resources/configuration.proxy.ini`` file.

In order to run the unit and integration tests, the
`mock <https://pypi.python.org/pypi/mock>`__ backport and
`mockito <https://pypi.python.org/pypi/mockito>`__ are required. These
can be installed using the following command:
In order to run the unit and integration tests, the `mock <https://pypi.python.org/pypi/mock>`__ backport and `mockito <https://pypi.python.org/pypi/mockito>`__ are required. These can be installed using the following command:

::
.. code:: bash
pip install mock mockito
The following commands can now be executed from the ``tests`` directory
to execute the tests:
The following commands can now be executed from the ``tests`` directory to execute the tests:

- Unit tests:

::
.. code:: bash
python run_unit_tests.py
- Integration tests:

::
.. code:: bash
python run_integration_tests.py
- Both unit and integration tests:

::
.. code:: bash
python run_all_tests.py
6 changes: 3 additions & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
# built documents.
#
# The short X.Y version.
version = '3.42.0'
version = '3.43.0'
# The full version, including alpha/beta/rc tags.
release = '3.42.0'
release = '3.43.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -138,7 +138,7 @@
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#
# html_title = 'Python SDK v3.42.0'
# html_title = 'Python SDK v3.43.0'

# A shorter title for the navigation bar. Default is the same as html_title.
#
Expand Down
4 changes: 4 additions & 0 deletions examples/merchant/installments/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#
# This file was auto-generated from the API references found at
# https://epayments-api.developer-ingenico.com/s2sapi/v1
#
34 changes: 34 additions & 0 deletions examples/merchant/installments/get_installments_info_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# This class was auto-generated from the API references found at
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
#
import os

from ingenico.connect.sdk.factory import Factory
from ingenico.connect.sdk.domain.definitions.amount_of_money import AmountOfMoney
from ingenico.connect.sdk.domain.installments.get_installment_request import GetInstallmentRequest


class GetInstallmentsInfoExample(object):

def example(self):
with self.__get_client() as client:
amount_of_money = AmountOfMoney()
amount_of_money.amount = 123
amount_of_money.currency_code = "EUR"

body = GetInstallmentRequest()
body.amount_of_money = amount_of_money
body.bin = "123455"
body.country_code = "NL"
body.payment_product_id = 123

response = client.merchant("merchantId").installments().get_installments_info(body)

def __get_client(self):
api_key_id = os.getenv("connect.api.apiKeyId", "someKey")
secret_api_key = os.getenv("connect.api.secretApiKey", "someSecret")
configuration_file_name = os.path.abspath(os.path.join(os.path.dirname(__file__),
'../../example_configuration.ini'))
return Factory.create_client_from_file(configuration_file_name=configuration_file_name,
api_key_id=api_key_id, secret_api_key=secret_api_key)
63 changes: 63 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,13 @@ API Reference
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: ingenico.connect.sdk.domain.hostedcheckout.definitions.frequency
:members:
:show-inheritance:
:undoc-members:
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: ingenico.connect.sdk.domain.hostedcheckout.definitions.hosted_checkout_specific_input
:members:
:show-inheritance:
Expand Down Expand Up @@ -737,6 +744,27 @@ API Reference
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: ingenico.connect.sdk.domain.hostedcheckout.definitions.recurring_payments_data
:members:
:show-inheritance:
:undoc-members:
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: ingenico.connect.sdk.domain.hostedcheckout.definitions.trial_information
:members:
:show-inheritance:
:undoc-members:
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: ingenico.connect.sdk.domain.hostedcheckout.definitions.trial_period
:members:
:show-inheritance:
:undoc-members:
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: ingenico.connect.sdk.domain.hostedmandatemanagement.create_hosted_mandate_management_request
:members:
:show-inheritance:
Expand Down Expand Up @@ -772,6 +800,34 @@ API Reference
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: ingenico.connect.sdk.domain.installments.get_installment_request
:members:
:show-inheritance:
:undoc-members:
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: ingenico.connect.sdk.domain.installments.installment_options_response
:members:
:show-inheritance:
:undoc-members:
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: ingenico.connect.sdk.domain.installments.definitions.installment_display_hints
:members:
:show-inheritance:
:undoc-members:
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: ingenico.connect.sdk.domain.installments.definitions.installment_options
:members:
:show-inheritance:
:undoc-members:
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: ingenico.connect.sdk.domain.mandates.create_mandate_request
:members:
:show-inheritance:
Expand Down Expand Up @@ -2998,6 +3054,13 @@ API Reference
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: ingenico.connect.sdk.merchant.installments.installments_client
:members:
:show-inheritance:
:undoc-members:
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: ingenico.connect.sdk.merchant.mandates.mandates_client
:members:
:show-inheritance:
Expand Down
Loading

0 comments on commit 881f870

Please sign in to comment.