# 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+2678344852
- 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"
)



# 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.HealthApi(api_client)

    try:
        # Health check
        api_response = await api_instance.health_health_get()
        print("The response of HealthApi->health_health_get:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling HealthApi->health_health_get: %s\n" % e)

```

## Documentation for API Endpoints

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

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*HealthApi* | [**health_health_get**](docs/HealthApi.md#health_health_get) | **GET** /health | Health check
*ImportApi* | [**import_orders_v1_import_orders_post**](docs/ImportApi.md#import_orders_v1_import_orders_post) | **POST** /v1/import/orders | Import historical purchases as proper orders (batch)
*IntegrationsApi* | [**create_v1_integrations_post**](docs/IntegrationsApi.md#create_v1_integrations_post) | **POST** /v1/integrations | Connect a provider integration
*IntegrationsApi* | [**delete_integration_v1_integrations_integration_id_delete**](docs/IntegrationsApi.md#delete_integration_v1_integrations_integration_id_delete) | **DELETE** /v1/integrations/{integration_id} | Disconnect (delete) an integration
*IntegrationsApi* | [**get_integration_v1_integrations_integration_id_get**](docs/IntegrationsApi.md#get_integration_v1_integrations_integration_id_get) | **GET** /v1/integrations/{integration_id} | Get one integration
*IntegrationsApi* | [**list_integrations_v1_integrations_get**](docs/IntegrationsApi.md#list_integrations_v1_integrations_get) | **GET** /v1/integrations | List the portal&#39;s provider integrations
*IntegrationsApi* | [**setup_webhooks_v1_integrations_integration_id_webhooks_setup_post**](docs/IntegrationsApi.md#setup_webhooks_v1_integrations_integration_id_webhooks_setup_post) | **POST** /v1/integrations/{integration_id}/webhooks/setup | (Re-)register the provider-side webhook
*IntegrationsApi* | [**sync_products_v1_integrations_integration_id_products_sync_post**](docs/IntegrationsApi.md#sync_products_v1_integrations_integration_id_products_sync_post) | **POST** /v1/integrations/{integration_id}/products/sync | Sync products from one integration&#39;s provider
*IntegrationsApi* | [**test_credentials_v1_integrations_test_post**](docs/IntegrationsApi.md#test_credentials_v1_integrations_test_post) | **POST** /v1/integrations/test | Test provider credentials (before saving)
*IntegrationsApi* | [**test_integration_v1_integrations_integration_id_test_post**](docs/IntegrationsApi.md#test_integration_v1_integrations_integration_id_test_post) | **POST** /v1/integrations/{integration_id}/test | Test an integration&#39;s saved connection
*IntegrationsApi* | [**update_integration_v1_integrations_integration_id_patch**](docs/IntegrationsApi.md#update_integration_v1_integrations_integration_id_patch) | **PATCH** /v1/integrations/{integration_id} | Update an integration (rotate credentials / enable-disable)
*ProductsApi* | [**count_products_v1_products_count_get**](docs/ProductsApi.md#count_products_v1_products_count_get) | **GET** /v1/products/count | Count the portal&#39;s products
*ProductsApi* | [**create_product_v1_products_post**](docs/ProductsApi.md#create_product_v1_products_post) | **POST** /v1/products | Register a product
*ProductsApi* | [**delete_product_v1_products_product_id_delete**](docs/ProductsApi.md#delete_product_v1_products_product_id_delete) | **DELETE** /v1/products/{product_id} | Delete a product
*ProductsApi* | [**import_products_v1_products_import_post**](docs/ProductsApi.md#import_products_v1_products_import_post) | **POST** /v1/products/import | Bulk-add products by hand (upsert a list)
*ProductsApi* | [**list_products_v1_products_get**](docs/ProductsApi.md#list_products_v1_products_get) | **GET** /v1/products | List the portal&#39;s products (paginated)
*ProductsApi* | [**sync_all_v1_products_sync_post**](docs/ProductsApi.md#sync_all_v1_products_sync_post) | **POST** /v1/products/sync | Sync products from ALL of the portal&#39;s integrations
*ProductsApi* | [**update_product_v1_products_product_id_patch**](docs/ProductsApi.md#update_product_v1_products_product_id_patch) | **PATCH** /v1/products/{product_id} | Edit a product (title / external id / archive-restore)
*ServerApi* | [**drain_v1_admin_drain_post**](docs/ServerApi.md#drain_v1_admin_drain_post) | **POST** /v1/admin/drain | Process queued IPNs then relay pending outbox rows
*WebhooksApi* | [**ingest_access_v1_ipn_provider_post**](docs/WebhooksApi.md#ingest_access_v1_ipn_provider_post) | **POST** /v1/ipn/{provider} | Creator -&gt; student webhooks (access flow)
*WebhooksApi* | [**ingest_portal_v1_ipn_portal_provider_post**](docs/WebhooksApi.md#ingest_portal_v1_ipn_portal_provider_post) | **POST** /v1/ipn/portal/{provider} | Portal-plan webhooks (mentortools&#39; own merchant account)


## Documentation For Models

 - [DrainOut](docs/DrainOut.md)
 - [Flow](docs/Flow.md)
 - [HTTPValidationError](docs/HTTPValidationError.md)
 - [HealthOut](docs/HealthOut.md)
 - [IdOut](docs/IdOut.md)
 - [ImportBuyerIn](docs/ImportBuyerIn.md)
 - [ImportOrderIn](docs/ImportOrderIn.md)
 - [ImportOrdersIn](docs/ImportOrdersIn.md)
 - [ImportOrdersOut](docs/ImportOrdersOut.md)
 - [IntegrationIn](docs/IntegrationIn.md)
 - [IntegrationOut](docs/IntegrationOut.md)
 - [IntegrationPatchIn](docs/IntegrationPatchIn.md)
 - [IntegrationSyncOut](docs/IntegrationSyncOut.md)
 - [IntegrationTestIn](docs/IntegrationTestIn.md)
 - [IntegrationTestOut](docs/IntegrationTestOut.md)
 - [IpnAcceptedOut](docs/IpnAcceptedOut.md)
 - [LocationInner](docs/LocationInner.md)
 - [PaymentType](docs/PaymentType.md)
 - [ProductIn](docs/ProductIn.md)
 - [ProductItemIn](docs/ProductItemIn.md)
 - [ProductOut](docs/ProductOut.md)
 - [ProductPatchIn](docs/ProductPatchIn.md)
 - [ProductsImportIn](docs/ProductsImportIn.md)
 - [ProductsImportOut](docs/ProductsImportOut.md)
 - [Provider](docs/Provider.md)
 - [ValidationError](docs/ValidationError.md)
 - [WebhookSetupOut](docs/WebhookSetupOut.md)
 - [WrappedResponseDrainOut](docs/WrappedResponseDrainOut.md)
 - [WrappedResponseHealthOut](docs/WrappedResponseHealthOut.md)
 - [WrappedResponseIdOut](docs/WrappedResponseIdOut.md)
 - [WrappedResponseImportOrdersOut](docs/WrappedResponseImportOrdersOut.md)
 - [WrappedResponseInt](docs/WrappedResponseInt.md)
 - [WrappedResponseIntegrationOut](docs/WrappedResponseIntegrationOut.md)
 - [WrappedResponseIntegrationSyncOut](docs/WrappedResponseIntegrationSyncOut.md)
 - [WrappedResponseIntegrationTestOut](docs/WrappedResponseIntegrationTestOut.md)
 - [WrappedResponseIpnAcceptedOut](docs/WrappedResponseIpnAcceptedOut.md)
 - [WrappedResponseListIntegrationOut](docs/WrappedResponseListIntegrationOut.md)
 - [WrappedResponseListIntegrationSyncOut](docs/WrappedResponseListIntegrationSyncOut.md)
 - [WrappedResponseListProductOut](docs/WrappedResponseListProductOut.md)
 - [WrappedResponseProductsImportOut](docs/WrappedResponseProductsImportOut.md)
 - [WrappedResponseWebhookSetupOut](docs/WrappedResponseWebhookSetupOut.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




