{ "info": { "author": "Adam J Hartz", "author_email": "adamha@payoneer.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Office/Business :: Financial", "Topic :: Software Development" ], "description": "Payoneer Escrow\r\n----------------\r\n\r\nThis is intended to be a clean, idiomatic client for the `Payoneer Escrow API\r\n`_. This will handle generating the\r\nauthenticated headers and constructing the properly nested request URI, as well\r\nas parsing any response JSON for you.\r\n\r\nInstallation\r\n------------\r\n\r\nYou can install using pip_ or from source_.\r\n\r\n.. _pip:\r\n\r\npip\r\n~~~\r\n\r\nInstallation via pip is as easy as any other Python package.\r\n\r\n.. code-block:: sh\r\n\r\n $ pip install payoneer-escrow-sdk\r\n\r\n # Alternatively, add to your requirements file and install from there\r\n $ echo 'payoneer-escrow-sdk' >> requirements.txt\r\n\r\n $ pip install -r requirements.txt\r\n\r\n.. _source:\r\n\r\nSource\r\n~~~~~~\r\n\r\nDownload the payoneer-escrow-python source:\r\n\r\n.. code-block:: sh\r\n\r\n $ git clone https://github.com/Payoneer-Escrow/payoneer-escrow-python\r\n\r\n $ cd payoneer-escrow-python\r\n\r\n # Install the package\r\n $ python setup.py install\r\n\r\nQuickstart\r\n----------\r\n\r\nThis project's GitHub repo contains example files to help you get going. To\r\navoid any potential risk, these files are not included in the package installed\r\nvia ``pip``. ``example.py`` is recommended for all who are new to this SDK\u2014it\r\nallows you to confirm your api credentials and shows example handling of an\r\n``HTTPError`` encountered by a bad request. There is also an end-to-end goods\r\nmilestone order in the ``examples/`` directory to demonstrate use of the API\r\nwith one of the more complicated order types.\r\n\r\n.. code-block:: sh\r\n\r\n # If you installed via pip, you will need to get the example file\r\n $ curl https://raw.githubusercontent.com/Payoneer-Escrow/payoneer-escrow-python/master/example.py > example.py\r\n\r\n # Replace the key and secret values with your own credentials\r\n $ echo 'PAYONEER_ESCROW_API_KEY = \"ENTER_YOUR_API_KEY_HERE\"\r\n PAYONEER_ESCROW_SECRET = \"ENTER_YOUR_API_SECRET_HERE\"' > api_credentials.py\r\n\r\n $ python example.py\r\n\r\nUsage\r\n-----\r\n\r\nThe Payoneer Escrow API is REST-ish and nested, so the client relies on\r\nchaining. We return an object (or array of objects) decoded from the JSON\r\nresponse, if possible.\r\n\r\n.. code-block:: python\r\n\r\n from payoneer_escrow_sdk.client import Client\r\n\r\n # `should_use_sandbox` is a boolean passed to Client, indicating which\r\n # Payoneer Escrow environment should be used; default is Production.\r\n\r\n client = Client('your-key', 'your-secret', should_use_sandbox)\r\n\r\n # There are two top-level resources: accounts and shipmentcarriers\r\n # Querying users and orders requires an account_id\r\n\r\n client.accounts().all()\r\n client.accounts().get(account_id)\r\n\r\n client.shipmentcarriers().all()\r\n client.shipmentcarriers().get(carrier_id)\r\n\r\n # From accounts, we chain users, orders, bank accounts\r\n\r\n client.accounts().users(account_id).all()\r\n client.accounts().users(account_id).get(user_id)\r\n\r\n client.accounts().orders(account_id).all()\r\n client.accounts().orders(account_id).get(order_id)\r\n\r\n client.accounts().bankaccounts(account_id).all()\r\n client.accounts().bankaccounts(account_id).get(bank_account_id)\r\n\r\n # From orders, many things chain: documents, notes, disputes, shipments,\r\n # payment instructions, order events, and order ledgers\r\n\r\n client.accounts().orders(account_id).documents(order_id).all()\r\n client.accounts().orders(account_id).documents(order_id).get(document_id)\r\n\r\n client.accounts().orders(account_id).notes(order_id).all()\r\n client.accounts().orders(account_id).notes(order_id).get(note_id)\r\n\r\n client.accounts().orders(account_id).disputes(order_id).all()\r\n client.accounts().orders(account_id).disputes(order_id).get(dispute_id)\r\n\r\n client.accounts().orders(account_id).shipments(order_id).all()\r\n client.accounts().orders(account_id).shipments(order_id).get(shipment_id)\r\n\r\n client.accounts().orders(account_id).paymentinstructions(order_id).all()\r\n\r\n client.accounts().orders(account_id).orderevents(order_id).all()\r\n client.accounts().orders(account_id).orderevents(order_id).get(event_id)\r\n\r\n client.accounts().orders(account_id).orderledgers(order_id).all()\r\n client.accounts().orders(account_id).orderledgers(order_id).get(ledger_entry_id)\r\n\r\n # From disputes, further things chain: documents, notes, offers\r\n\r\n client.accounts().orders(account_id).disputes(order_id).documents(\r\n dispute_id).all()\r\n client.accounts().orders(account_id).disputes(order_id).documents(\r\n dispute_id).get(document_id)\r\n\r\n client.accounts().orders(account_id).disputes(order_id).notes(\r\n dispute_id).all()\r\n client.accounts().orders(account_id).disputes(order_id).notes(\r\n dispute_id).get(note_id)\r\n\r\n client.accounts().orders(account_id).disputes(order_id).offers(\r\n dispute_id).all()\r\n client.accounts().orders(account_id).disputes(order_id).offers(\r\n dispute_id).get(offer_id)\r\n\r\n # From offers, documents and notes chain\r\n\r\n client.accounts().orders(account_id).disputes(order_id).offers(\r\n dispute_id).documents(offer_id).all()\r\n client.accounts().orders(account_id).disputes(order_id).offers(\r\n dispute_id).documents(offer_id).get(document_id)\r\n\r\n client.accounts().orders(account_id).disputes(order_id).offers(\r\n dispute_id).notes(offer_id).all()\r\n client.accounts().orders(account_id).disputes(order_id).offers(\r\n dispute_id).notes(offer_id).get(note_id)\r\n\r\nSome of the resource endpoints support Create/Update `POST` operations, and\r\nthis client aims to support those as well:\r\n\r\n.. code-block:: python\r\n\r\n # Account-related\r\n client.accounts().create(your_data)\r\n client.accounts().update(account_id, your_data)\r\n\r\n client.accounts().users(account_id).create(your_data)\r\n client.accounts().users(account_id).update(user_id, your_data)\r\n\r\n\r\n # Authenticate a URI for display in a lightbox\r\n client.accounts().users(account_id).authentications(user_id).create(your_data)\r\n\r\n\r\n # Order-related\r\n client.accounts().orders(account_id).create(your_data)\r\n client.accounts().orders(account_id).update(order_id, your_data)\r\n\r\n client.accounts().orders(account_id).documents(order_id).create(your_data)\r\n\r\n client.accounts().orders(account_id).notes(order_id).create(your_data)\r\n\r\n client.accounts().orders(account_id).shipments(order_id).create(your_data)\r\n\r\n\r\n # Dispute-related\r\n client.accounts().orders(account_id).disputes(order_id).create(your_data)\r\n\r\n client.accounts().orders(account_id).disputes(order_id).documents(\r\n dispute_id).create(your_data)\r\n\r\n client.accounts().orders(account_id).disputes(order_id).notes(\r\n dispute_id).create(your_data)\r\n\r\n client.accounts().orders(account_id).disputes(order_id).offers(\r\n dispute_id).create(your_data)\r\n client.accounts().orders(account_id).disputes(order_id).offers(\r\n dispute_id).update(offer_id, your_data)\r\n\r\n client.accounts().orders(account_id).disputes(order_id).offers(\r\n dispute_id).documents(offer_id).create(your_data)\r\n\r\n client.accounts().orders(account_id).disputes(order_id).offers(\r\n dispute_id).notes(offer_id).create(your_data)\r\n\r\nContributing\r\n------------\r\n\r\n1. Fork it\r\n2. Create your feature branch (``git checkout -b my-new-feature``)\r\n3. Commit your changes (``git commit -am 'Add some feature'``)\r\n4. Push to the branch (``git push origin my-new-feature``)\r\n5. Create new Pull Request", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Payoneer-Escrow/payoneer-escrow-python", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "payoneer-escrow-sdk", "package_url": "https://pypi.org/project/payoneer-escrow-sdk/", "platform": "", "project_url": "https://pypi.org/project/payoneer-escrow-sdk/", "project_urls": { "Homepage": "https://github.com/Payoneer-Escrow/payoneer-escrow-python" }, "release_url": "https://pypi.org/project/payoneer-escrow-sdk/0.1.0/", "requires_dist": [ "requests", "nose; extra == 'tests'" ], "requires_python": "", "summary": "An SDK for working with the Payoneer Escrow API", "version": "0.1.0" }, "last_serial": 2867164, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "bf647c6de2c932ed0c9c9dee4cd3de56", "sha256": "89ea320fa92f7e5107867b637d59da7e392d12c1b3a1593c3b2ee0df5930764d" }, "downloads": -1, "filename": "payoneer_escrow_sdk-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bf647c6de2c932ed0c9c9dee4cd3de56", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15851, "upload_time": "2017-05-11T14:23:34", "url": "https://files.pythonhosted.org/packages/c7/af/c9dd1b120995268ff1bcd214775504974076bb8759786c47b48cf3d99070/payoneer_escrow_sdk-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb2c7b0c5ee21a6d284522185390bfca", "sha256": "3967cc171a7c2a2511f2eded62f40f043da05b45ef41bb5af7e5e8592ffe140e" }, "downloads": -1, "filename": "payoneer-escrow-sdk-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bb2c7b0c5ee21a6d284522185390bfca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8231, "upload_time": "2017-05-11T14:23:35", "url": "https://files.pythonhosted.org/packages/d2/78/ebd1c01d8eafa9ec64637bb68c0f4392ebaec0fec7e2a7ca595f0631d88c/payoneer-escrow-sdk-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bf647c6de2c932ed0c9c9dee4cd3de56", "sha256": "89ea320fa92f7e5107867b637d59da7e392d12c1b3a1593c3b2ee0df5930764d" }, "downloads": -1, "filename": "payoneer_escrow_sdk-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bf647c6de2c932ed0c9c9dee4cd3de56", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15851, "upload_time": "2017-05-11T14:23:34", "url": "https://files.pythonhosted.org/packages/c7/af/c9dd1b120995268ff1bcd214775504974076bb8759786c47b48cf3d99070/payoneer_escrow_sdk-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb2c7b0c5ee21a6d284522185390bfca", "sha256": "3967cc171a7c2a2511f2eded62f40f043da05b45ef41bb5af7e5e8592ffe140e" }, "downloads": -1, "filename": "payoneer-escrow-sdk-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bb2c7b0c5ee21a6d284522185390bfca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8231, "upload_time": "2017-05-11T14:23:35", "url": "https://files.pythonhosted.org/packages/d2/78/ebd1c01d8eafa9ec64637bb68c0f4392ebaec0fec7e2a7ca595f0631d88c/payoneer-escrow-sdk-0.1.0.tar.gz" } ] }