# marketplace-server-connector
Mentortools service for ingesting payment-provider webhooks into normalized order events

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

- API version: 0.1.0
- Package version: 1.0.0+2656171593
- Generator version: 7.23.0
- Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen

## Requirements.

Python 3.7+

## Installation & Usage
### pip install

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

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import marketplace_server_connector
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import marketplace_server_connector
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import time
import marketplace_server_connector
from marketplace_server_connector.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = marketplace_server_connector.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: Bearer Authorization
configuration = marketplace_server_connector.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Configure API key authorization: ServerName Authorization
configuration.api_key['ServerName Authorization'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ServerName Authorization'] = 'Bearer'


# Enter a context with an instance of the API client
async with marketplace_server_connector.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = marketplace_server_connector.AdminApi(api_client)
    origin = 'origin_example' # str |  (optional)
    referer = 'referer_example' # str |  (optional)
    portal_id = 56 # int |  (optional)

    try:
        # Process queued IPNs then relay pending outbox rows
        api_response = await api_instance.drain_v1_admin_drain_post(origin=origin, referer=referer, portal_id=portal_id)
        print("The response of AdminApi->drain_v1_admin_drain_post:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AdminApi->drain_v1_admin_drain_post: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AdminApi* | [**drain_v1_admin_drain_post**](docs/AdminApi.md#drain_v1_admin_drain_post) | **POST** /v1/admin/drain | Process queued IPNs then relay pending outbox rows
*AdminApi* | [**health_health_get**](docs/AdminApi.md#health_health_get) | **GET** /health | Health check
*CatalogApi* | [**count_products_v1_catalog_products_count_get**](docs/CatalogApi.md#count_products_v1_catalog_products_count_get) | **GET** /v1/catalog/products/count | Count the portal&#39;s marketplace products
*CatalogApi* | [**create_account_v1_catalog_accounts_post**](docs/CatalogApi.md#create_account_v1_catalog_accounts_post) | **POST** /v1/catalog/accounts | Connect a provider account
*CatalogApi* | [**create_product_v1_catalog_products_post**](docs/CatalogApi.md#create_product_v1_catalog_products_post) | **POST** /v1/catalog/products | Register a marketplace product
*CatalogApi* | [**list_products_v1_catalog_products_get**](docs/CatalogApi.md#list_products_v1_catalog_products_get) | **GET** /v1/catalog/products | List the portal&#39;s marketplace products (paginated)
*IpnApi* | [**ingest_access_v1_ipn_provider_post**](docs/IpnApi.md#ingest_access_v1_ipn_provider_post) | **POST** /v1/ipn/{provider} | Creator -&gt; student webhooks (access flow)
*IpnApi* | [**ingest_portal_v1_ipn_portal_provider_post**](docs/IpnApi.md#ingest_portal_v1_ipn_portal_provider_post) | **POST** /v1/ipn/portal/{provider} | Portal-plan webhooks (mentortools&#39; own merchant account)


## Documentation For Models

 - [AccountIn](docs/AccountIn.md)
 - [DrainOut](docs/DrainOut.md)
 - [Flow](docs/Flow.md)
 - [HTTPValidationError](docs/HTTPValidationError.md)
 - [HealthOut](docs/HealthOut.md)
 - [IdOut](docs/IdOut.md)
 - [IpnAcceptedOut](docs/IpnAcceptedOut.md)
 - [LocationInner](docs/LocationInner.md)
 - [ProductIn](docs/ProductIn.md)
 - [ProductOut](docs/ProductOut.md)
 - [Provider](docs/Provider.md)
 - [ValidationError](docs/ValidationError.md)
 - [WrappedResponseDrainOut](docs/WrappedResponseDrainOut.md)
 - [WrappedResponseHealthOut](docs/WrappedResponseHealthOut.md)
 - [WrappedResponseIdOut](docs/WrappedResponseIdOut.md)
 - [WrappedResponseInt](docs/WrappedResponseInt.md)
 - [WrappedResponseIpnAcceptedOut](docs/WrappedResponseIpnAcceptedOut.md)
 - [WrappedResponseListProductOut](docs/WrappedResponseListProductOut.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="ServerName Authorization"></a>
### ServerName Authorization

- **Type**: API key
- **API key parameter name**: server_name
- **Location**: HTTP header

<a id="Bearer Authorization"></a>
### Bearer Authorization

- **Type**: Bearer authentication


## Author




