haven-client 0.0.2
Haven API
Keywords: Haven API

# haven

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

## Requirements.

Python 2.7 and 3.4+

## Installation & Usage
### pip install haven-client


## Getting Started
```python
import haven
from haven.authed_api_client import AuthedApiClient

from datetime import datetime
from dateutil.tz import tzutc


def main():
    config = haven.Configuration(host="https://haven.dev/api")
    api = haven.DefaultApi(AuthedApiClient(
        id="YOUR_ID_HERE",
        secret="YOUR_SECRET_HERE",
        configuration=config))

    # upload a transaction
    api.upsert_one_transaction(haven.CleanSingleTransactionRequest(
        transaction=haven.RawTransaction(
            id="txn-1",
            account="account-a",
            user="user-0",
            raw_memo="Uber ***232**123",
            merchant=None,
            store=None,
            network="VISA",
            user_transacted_at=datetime.now().replace(tzinfo=tzutc()),
            amount="-12.34",
            categories=[],
            kind=haven.TransactionKind.CREDIT_CARD,
            state=haven.TransactionState.COMPLETED)))

    transactions = api.get_transactions("user-0", limit=10)
    print(transactions)


if __name__ == "__main__":
    main()
```

See 

## Documentation for API Endpoints

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**create_access_token**](docs/DefaultApi.md#create_access_token) | **POST** /v1/tokens | 
*DefaultApi* | [**create_webhook**](docs/DefaultApi.md#create_webhook) | **POST** /v1/webhooks | 
*DefaultApi* | [**delete_account**](docs/DefaultApi.md#delete_account) | **DELETE** /v1/accounts/{AccountId} | 
*DefaultApi* | [**delete_for_user**](docs/DefaultApi.md#delete_for_user) | **DELETE** /v1/users/{EndUserId} | 
*DefaultApi* | [**delete_transaction**](docs/DefaultApi.md#delete_transaction) | **DELETE** /v1/transactions/{TransactionId} | 
*DefaultApi* | [**delete_webhook**](docs/DefaultApi.md#delete_webhook) | **DELETE** /v1/webhooks/{WebhookId} | 
*DefaultApi* | [**get_accounts_for_user**](docs/DefaultApi.md#get_accounts_for_user) | **GET** /v1/accounts/user/{EndUserId} | 
*DefaultApi* | [**get_merchant**](docs/DefaultApi.md#get_merchant) | **GET** /v1/merchants/{MerchantId} | 
*DefaultApi* | [**get_transactions**](docs/DefaultApi.md#get_transactions) | **GET** /v1/transactions/{EndUserId} | 
*DefaultApi* | [**get_webhooks**](docs/DefaultApi.md#get_webhooks) | **GET** /v1/webhooks | 
*DefaultApi* | [**upsert_account**](docs/DefaultApi.md#upsert_account) | **PUT** /v1/accounts | 
*DefaultApi* | [**upsert_batch_transactions**](docs/DefaultApi.md#upsert_batch_transactions) | **POST** /v1/transactions/batch | 
*DefaultApi* | [**upsert_one_transaction**](docs/DefaultApi.md#upsert_one_transaction) | **POST** /v1/transactions/online | 
*DefaultApi* | [**upsert_user_annotation**](docs/DefaultApi.md#upsert_user_annotation) | **POST** /v1/annotations/{TransactionId} | 


## Documentation For Models

 - [AccountRequestWrapper](docs/AccountRequestWrapper.md)
 - [AccountSubType](docs/AccountSubType.md)
 - [AccountType](docs/AccountType.md)
 - [AddAnnotationRequest](docs/AddAnnotationRequest.md)
 - [AddAnnotationResponse](docs/AddAnnotationResponse.md)
 - [Address](docs/Address.md)
 - [ApiAccount](docs/ApiAccount.md)
 - [BadRequestServiceError](docs/BadRequestServiceError.md)
 - [Balance](docs/Balance.md)
 - [BootstrapStrategy](docs/BootstrapStrategy.md)
 - [CleanCategory](docs/CleanCategory.md)
 - [CleanSingleTransactionRequest](docs/CleanSingleTransactionRequest.md)
 - [CleanSingleTransactionResponse](docs/CleanSingleTransactionResponse.md)
 - [CleanTransaction](docs/CleanTransaction.md)
 - [ConflictServiceError](docs/ConflictServiceError.md)
 - [CreateWebhookRequest](docs/CreateWebhookRequest.md)
 - [CreateWebhookResponse](docs/CreateWebhookResponse.md)
 - [EmptyResponse](docs/EmptyResponse.md)
 - [GetAccountsResponse](docs/GetAccountsResponse.md)
 - [GetMerchantResponse](docs/GetMerchantResponse.md)
 - [GetTransactionsResponse](docs/GetTransactionsResponse.md)
 - [GetWebhooksResponse](docs/GetWebhooksResponse.md)
 - [LatLong](docs/LatLong.md)
 - [Merchant](docs/Merchant.md)
 - [NotFoundServiceError](docs/NotFoundServiceError.md)
 - [OpenHours](docs/OpenHours.md)
 - [RawMerchant](docs/RawMerchant.md)
 - [RawMerchantStore](docs/RawMerchantStore.md)
 - [RawTransaction](docs/RawTransaction.md)
 - [ServiceError](docs/ServiceError.md)
 - [TenantServiceAccountAgentLoginRequest](docs/TenantServiceAccountAgentLoginRequest.md)
 - [TenantServiceAccountAgentLoginResponse](docs/TenantServiceAccountAgentLoginResponse.md)
 - [TransactionKind](docs/TransactionKind.md)
 - [TransactionState](docs/TransactionState.md)
 - [UnauthorizedServiceError](docs/UnauthorizedServiceError.md)
 - [UncaughtExceptionServiceError](docs/UncaughtExceptionServiceError.md)
 - [UploadBatchTransactionsRequest](docs/UploadBatchTransactionsRequest.md)
 - [Webhook](docs/Webhook.md)
 - [WebhookSubscription](docs/WebhookSubscription.md)