Metadata-Version: 2.4
Name: credoxa-billing-sdk
Version: 1.0.0
Summary: Credoxa Billing API
Home-page: 
Author: OpenAPI Generator community
Author-email: OpenAPI Generator Community <team@openapitools.org>
License-Expression: LicenseRef-Proprietary
Project-URL: Repository, https://github.com/alhiedi/credoxa
Keywords: OpenAPI,OpenAPI-Generator,Credoxa Billing API
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: urllib3<3.0.0,>=2.1.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pydantic>=2
Requires-Dist: typing-extensions>=4.7.1
Dynamic: author

# credoxa-billing-sdk
Public HTTP contract for Credoxa Billing.

Billing owns commercial truth for subscriptions, usage,
invoices, payments, refunds, and derived entitlement access.

Tenant and caller identity are established by the trusted
Credoxa Gateway boundary. Clients must not treat tenant identity
in request bodies as authority.


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

- API version: 1.0.0
- Package version: 1.0.0
- Generator version: 7.14.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.9+

## 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 credoxa_billing
```

### 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 credoxa_billing
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

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

```python

import credoxa_billing
from credoxa_billing.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 = credoxa_billing.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 API key authorization: CredoxaGatewayIdentity
configuration.api_key['CredoxaGatewayIdentity'] = os.environ["API_KEY"]

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


# Enter a context with an instance of the API client
with credoxa_billing.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = credoxa_billing.CatalogApi(api_client)

    try:
        api_response = api_instance.list_plans()
        print("The response of CatalogApi->list_plans:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CatalogApi->list_plans: %s\n" % e)

```

## Documentation for API Endpoints

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

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*CatalogApi* | [**list_plans**](docs/CatalogApi.md#list_plans) | **GET** /api/v1/plans | 
*CatalogApi* | [**list_prices**](docs/CatalogApi.md#list_prices) | **GET** /api/v1/prices | 
*CatalogApi* | [**list_products**](docs/CatalogApi.md#list_products) | **GET** /api/v1/products | 
*EntitlementsApi* | [**get_subscription_access**](docs/EntitlementsApi.md#get_subscription_access) | **GET** /api/v1/subscriptions/{subscription_id}/access | 
*EntitlementsApi* | [**list_subscription_entitlements**](docs/EntitlementsApi.md#list_subscription_entitlements) | **GET** /api/v1/subscriptions/{subscription_id}/entitlements | 
*InvoicesApi* | [**get_invoice**](docs/InvoicesApi.md#get_invoice) | **GET** /api/v1/invoices/{invoice_id} | 
*InvoicesApi* | [**list_invoices**](docs/InvoicesApi.md#list_invoices) | **GET** /api/v1/invoices | 
*PaymentsApi* | [**create_invoice_payment**](docs/PaymentsApi.md#create_invoice_payment) | **POST** /api/v1/invoices/{invoice_id}/payments | 
*PaymentsApi* | [**get_payment**](docs/PaymentsApi.md#get_payment) | **GET** /api/v1/payments/{payment_id} | 
*ProviderEventsApi* | [**ingest_stripe_provider_event**](docs/ProviderEventsApi.md#ingest_stripe_provider_event) | **POST** /api/v1/provider-events/stripe | 
*RefundsApi* | [**create_refund**](docs/RefundsApi.md#create_refund) | **POST** /api/v1/payments/{payment_id}/refunds | 
*SubscriptionsApi* | [**create_subscription**](docs/SubscriptionsApi.md#create_subscription) | **POST** /api/v1/subscriptions | 
*SubscriptionsApi* | [**get_subscription**](docs/SubscriptionsApi.md#get_subscription) | **GET** /api/v1/subscriptions/{subscription_id} | 
*SubscriptionsApi* | [**list_subscriptions**](docs/SubscriptionsApi.md#list_subscriptions) | **GET** /api/v1/subscriptions | 
*UsageApi* | [**create_usage_event**](docs/UsageApi.md#create_usage_event) | **POST** /api/v1/usage-events | 


## Documentation For Models

 - [Entitlement](docs/Entitlement.md)
 - [IdempotencyReplay](docs/IdempotencyReplay.md)
 - [Invoice](docs/Invoice.md)
 - [InvoiceLine](docs/InvoiceLine.md)
 - [Money](docs/Money.md)
 - [PaginatedInvoices](docs/PaginatedInvoices.md)
 - [PaginatedPlans](docs/PaginatedPlans.md)
 - [PaginatedPrices](docs/PaginatedPrices.md)
 - [PaginatedProducts](docs/PaginatedProducts.md)
 - [PaginatedSubscriptions](docs/PaginatedSubscriptions.md)
 - [Payment](docs/Payment.md)
 - [PaymentCreateRequest](docs/PaymentCreateRequest.md)
 - [Plan](docs/Plan.md)
 - [Price](docs/Price.md)
 - [Product](docs/Product.md)
 - [ProviderEventReceipt](docs/ProviderEventReceipt.md)
 - [Refund](docs/Refund.md)
 - [RefundCreateRequest](docs/RefundCreateRequest.md)
 - [Subscription](docs/Subscription.md)
 - [SubscriptionAccess](docs/SubscriptionAccess.md)
 - [SubscriptionCreateRequest](docs/SubscriptionCreateRequest.md)
 - [SubscriptionEntitlements](docs/SubscriptionEntitlements.md)
 - [UsageEvent](docs/UsageEvent.md)
 - [UsageEventCreateRequest](docs/UsageEventCreateRequest.md)


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


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

- **Type**: API key
- **API key parameter name**: X-Credoxa-Subject
- **Location**: HTTP header


## Author




