Coder Social home page Coder Social logo

monei-python-sdk's Introduction

MONEI PYTHON SDK

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

This library is intended to help you develop an integration around our API, by using the MONEI Python Client and it's methods.

Docs in our portal

You can find the complete information and details in our documentation portal.

Requirements

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install --upgrade Monei

(you may need to run pip with root permission: sudo pip install --upgrade Monei)

Then import the package:

import Monei

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import Monei

Authorization

The MONEI API uses API key to authenticate requests. You can view and manage your API key in the MONEI Dashboard.

For more information about this process, please refer to our documentation portal.

Getting Started

Please follow the installation procedure and then run the following:

import Monei
from Monei import ApiException
from pprint import pprint

# Instantiate the client using the API key
monei = Monei.MoneiClient(api_key='YOUR_API_KEY')

try:
    # Create Payment
    result = monei.payments.create({
        'amount': 1250, # 12.50€
        'orderId': '100200000001',
        'currency': 'EUR',
        'description': 'Items description',
        'customer': {
            'email': '[email protected]',
            'name': 'John Doe'
        }
    })
    pprint(result)
except ApiException as e:
    print("Error while creating payment: %s\n" % e)

Documentation for API Endpoints

For more detailed information about this library and the full list of methods, please refer to our documentation portal.

monei-python-sdk's People

Contributors

docadam avatar jimmyn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

docadam

monei-python-sdk's Issues

Bug report: AttributeError: '__proxy__' object has no attribute 'openapi_types'

Hello!
I try create subscription as is explained in https://docs.monei.com/api/#operation/subscriptions_create.

I get an error from "AttributeError: 'proxy' object has no attribute 'openapi_types'."

Traceback:
File "/home/pc/projects/Current/project/django-project/django/../apps/courses/views.py", line 511, in subscription_create
monei.Subscriptions.create(
File "/home/pc/env/lib/python3.10/site-packages/Monei/api/subscriptions_api.py", line 308, in create
return self.create_with_http_info(create_subscription_request, **kwargs) # noqa: E501
File "/home/pc/env/lib/python3.10/site-packages/Monei/api/subscriptions_api.py", line 387, in create_with_http_info
return self.api_client.call_api(
File "/home/pc/env/lib/python3.10/site-packages/Monei/api_client.py", line 364, in call_api
return self.__call_api(resource_path, method,
File "/home/pc/env/lib/python3.10/site-packages/Monei/api_client.py", line 170, in __call_api
body = self.sanitize_for_serialization(body)
File "/home/pc/.env/lib/python3.10/site-packages/Monei/api_client.py", line 257, in sanitize_for_serialization
return {key: self.sanitize_for_serialization(val)
File "/home/pc/env/lib/python3.10/site-packages/Monei/api_client.py", line 257, in
return {key: self.sanitize_for_serialization(val)
File "/home/pc/env/lib/python3.10/site-packages/Monei/api_client.py", line 254, in sanitize_for_serialization
for attr, _ in six.iteritems(obj.openapi_types)
AttributeError: 'proxy' object has no attribute 'openapi_types'

If you require more information about the environment, etc., I am happy to be in touch.

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.