fds.sdk.ProcuretoPayProvisioning 0.9.1
Procure to Pay: Provisioning client library for Python
License: Apache-2.0
Requires Python: >=3.6
Keywords: FactSet,API,SDK

<img alt="FactSet" src="https://www.factset.com/hubfs/Assets/images/factset-logo.svg" height="56" width="290">

# Procure to Pay: Provisioning client library for Python

[![PyPi](https://img.shields.io/pypi/v/fds.sdk.ProcuretoPayProvisioning)](https://pypi.org/project/fds.sdk.ProcuretoPayProvisioning/)
[![Apache-2 license](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0)

Allows for Provisioning and Entitlement of FactSet accounts. 
 
 Authentication is provided via FactSet's [API Key System](https://developer.factset.com/authentication)
 
 Please note that the on-page \"Try it out\" features do not function. You must authorize against our API and make requests directly againt the endpoints.
 
 

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1S
- Package version: 0.9.1
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements

* Python >= 3.6

## Installation

### Poetry

```python
poetry add fds.sdk.utils fds.sdk.ProcuretoPayProvisioning
```

### pip

```python
pip install fds.sdk.utils fds.sdk.ProcuretoPayProvisioning
```

## Usage

1. [Generate authentication credentials](../../../../README.md#authentication).
2. Setup Python environment.
   1. Install and activate python 3.6+. If you're using [pyenv](https://github.com/pyenv/pyenv):

      ```sh
      pyenv install 3.9.7
      pyenv shell 3.9.7
      ```

   2. (optional) [Install poetry](https://python-poetry.org/docs/#installation).
3. [Install dependencies](#installation).
4. Run the following:

```python

from fds.sdk.utils.authentication import ConfidentialClient
import fds.sdk.ProcuretoPayProvisioning
from fds.sdk.ProcuretoPayProvisioning.api import entitlement_management_api
from fds.sdk.ProcuretoPayProvisioning.model.inline_response202 import InlineResponse202
from fds.sdk.ProcuretoPayProvisioning.model.manage_product_ids import ManageProductIds
from pprint import pprint

# See configuration.py for a list of all supported configuration parameters.

# Examples for each supported authentication method are below,
# choose one that satisfies your use case.

# (Preferred) OAuth 2.0: FactSetOAuth2
# See https://github.com/FactSet/enterprise-sdk#oauth-20
# for information on how to create the app-config.json file
# See https://github.com/FactSet/enterprise-sdk-utils-python#authentication
# for more information on using the ConfidentialClient class
configuration = fds.sdk.ProcuretoPayProvisioning.Configuration(
    fds_oauth_client = ConfidentialClient('/path/to/app-config.json')
)

# Basic authentication: FactSetApiKey
# See https://github.com/FactSet/enterprise-sdk#api-key
# for information how to create an API key
# configuration = fds.sdk.ProcuretoPayProvisioning.Configuration(
#     username = 'USERNAME-SERIAL',
#     password = 'API-KEY'
# )

# Enter a context with an instance of the API client
with fds.sdk.ProcuretoPayProvisioning.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = entitlement_management_api.EntitlementManagementApi(api_client)
    manage_product_ids = ManageProductIds(
        unique_id="unique_id_example",
        product_ids=[
            "product_ids_example",
        ],
    ) # ManageProductIds |  (optional)

    try:
        # Adds listed productIds to an individual
        api_response = api_instance.add_products_post(manage_product_ids=manage_product_ids)
        pprint(api_response)
    except fds.sdk.ProcuretoPayProvisioning.ApiException as e:
        print("Exception when calling EntitlementManagementApi->add_products_post: %s\n" % e)
```

## Documentation for API Endpoints

All URIs are relative to *https://api.factset.com/procuretopay/provisioning*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*EntitlementManagementApi* | [**add_products_post**](docs/EntitlementManagementApi.md#add_products_post) | **POST** /addProducts | Adds listed productIds to an individual
*EntitlementManagementApi* | [**remove_products_post**](docs/EntitlementManagementApi.md#remove_products_post) | **POST** /removeProducts | Removes listed productIds from an individual
*OrderStatusApi* | [**transaction_status_get**](docs/OrderStatusApi.md#transaction_status_get) | **GET** /transactionStatus | Check status of order by transactionCode
*UserManagementApi* | [**cancel_individual_post**](docs/UserManagementApi.md#cancel_individual_post) | **POST** /cancelIndividual | Cancels an individual&#39;s serial and all productIds
*UserManagementApi* | [**create_individual_post**](docs/UserManagementApi.md#create_individual_post) | **POST** /createIndividual | Provisions an individual for FactSet
*UserManagementApi* | [**get_individual_get**](docs/UserManagementApi.md#get_individual_get) | **GET** /getIndividual | Returns an individual&#39;s details by uniqueId
*UserManagementApi* | [**list_individuals_get**](docs/UserManagementApi.md#list_individuals_get) | **GET** /listIndividuals | Lists all individuals with details at all locations.
*UserManagementApi* | [**modify_individual_post**](docs/UserManagementApi.md#modify_individual_post) | **POST** /modifyIndividual | Modifies an individual&#39;s attributes as determined by the uniqueId in the body of the request. Please note that the uniqueId may not be changed. Fields not changing may be passed as NULL but never empty.


## Documentation For Models

 - [CancelIndividual](docs/CancelIndividual.md)
 - [CreateIndividual](docs/CreateIndividual.md)
 - [GetIndividual](docs/GetIndividual.md)
 - [InlineResponse202](docs/InlineResponse202.md)
 - [ListIndividuals](docs/ListIndividuals.md)
 - [ManageProductIds](docs/ManageProductIds.md)
 - [ModifyIndividual](docs/ModifyIndividual.md)
 - [TransactionStatus](docs/TransactionStatus.md)


## Documentation For Authorization


## FactSetApiKey

- **Type**: HTTP basic authentication


## FactSetOAuth2

- **Type**: OAuth
- **Flow**: application
- **Authorization URL**: 
- **Scopes**: N/A


## Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in fds.sdk.ProcuretoPayProvisioning.apis and fds.sdk.ProcuretoPayProvisioning.models may fail with a
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1:
Use specific imports for apis and models like:
- `from fds.sdk.ProcuretoPayProvisioning.api.default_api import DefaultApi`
- `from fds.sdk.ProcuretoPayProvisioning.model.pet import Pet`

Solution 2:
Before importing the package, adjust the maximum recursion limit as shown below:
```
import sys
sys.setrecursionlimit(1500)
import fds.sdk.ProcuretoPayProvisioning
from fds.sdk.ProcuretoPayProvisioning.apis import *
from fds.sdk.ProcuretoPayProvisioning.models import *
```

## Contributing

Please refer to the [contributing guide](../../../../CONTRIBUTING.md).

## Copyright

Copyright 2022 FactSet Research Systems Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.