Metadata-Version: 2.1
Name: netvisor-api-client
Version: 0.9.4
Summary: # Netvisor: Python API client
Home-page: https://github.com/Heltti/netvisor-api-client
Author: Heltti Oy
Author-email: dev@heltti.fi
License: The MIT License (MIT)
        
        Copyright (c) 2019-     Heltti Oy
        Copyright (c) 2013-2016 Fast Monkeys Oy
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Platform: any
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
License-File: LICENSE

# Netvisor: Python API client

[![PyPI version](https://badge.fury.io/py/netvisor_api_client.svg)](https://badge.fury.io/py/netvisor_api_client)
[![License](https://img.shields.io/pypi/l/netvisor_api_client)](https://pypi.org/project/netvisor_api_client)
[![Downloads](https://pepy.tech/badge/netvisor_api_client)](https://pepy.tech/project/netvisor_api_client)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1)](https://pycqa.github.io/isort/)

___


Python client for the Netvisor API.

___

## Installation

You can install netvisor with pip::

    $ pip install netvisor-api-client

## Usage example

````python
from netvisor_api_client import Netvisor
from datetime import date, timedelta

# Create a client
client = Netvisor(
    host="https://isvapi.netvisor.fi",
    sender="Test client",
    partner_id="x",
    partner_key="x",
    customer_id="x",
    customer_key="x",
    organization_id="1967543-8",
    language="EN"
)

# Get a list of sales invoices for last 14 days
invoices = client.sales_invoices.list(start_date=date.today() - timedelta(days=14), end_date=date.today())

# Get detailed information for the first invoice
invoice_details = client.sales_invoices.get(invoices[0]['netvisor_key'])
````

Known issues
------------

### Language

Using language other than `EN` can cause failures when parsing responses containing localised boolean like values.

Example: `"Yes"` and `"No"` parsed to bool `True` and `False` fails when language is FI

````python
from netvisor_api_client.schemas.fields import Boolean

# Current schema
match_partial_payments_by_default = Boolean(true="Yes", false="No")

# i.e. for FI this should be 
match_partial_payments_by_default = Boolean(true="Kyllä", false="Ei")
````

Resources
---------

* Bug Tracker <https://github.com/Heltti/netvisor-api-client/issues>
* Code <https://github.com/Heltti/netvisor-api-client>
