Haven API
Project description
haven
This Python package is (mostly) automatically generated by the OpenAPI Generator project:
Requirements.
Python 2.7 and 3.4+
Installation & Usage
pip install haven-client
Getting Started
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 | POST /v1/tokens | |
DefaultApi | create_webhook | POST /v1/webhooks | |
DefaultApi | delete_account | DELETE /v1/accounts/{AccountId} | |
DefaultApi | delete_for_user | DELETE /v1/users/{EndUserId} | |
DefaultApi | delete_transaction | DELETE /v1/transactions/{TransactionId} | |
DefaultApi | delete_webhook | DELETE /v1/webhooks/{WebhookId} | |
DefaultApi | get_accounts_for_user | GET /v1/accounts/user/{EndUserId} | |
DefaultApi | get_merchant | GET /v1/merchants/{MerchantId} | |
DefaultApi | get_transactions | GET /v1/transactions/{EndUserId} | |
DefaultApi | get_webhooks | GET /v1/webhooks | |
DefaultApi | upsert_account | PUT /v1/accounts | |
DefaultApi | upsert_batch_transactions | POST /v1/transactions/batch | |
DefaultApi | upsert_one_transaction | POST /v1/transactions/online | |
DefaultApi | upsert_user_annotation | POST /v1/annotations/{TransactionId} |
Documentation For Models
- AccountRequestWrapper
- AccountSubType
- AccountType
- AddAnnotationRequest
- AddAnnotationResponse
- Address
- ApiAccount
- BadRequestServiceError
- Balance
- BootstrapStrategy
- CleanCategory
- CleanSingleTransactionRequest
- CleanSingleTransactionResponse
- CleanTransaction
- ConflictServiceError
- CreateWebhookRequest
- CreateWebhookResponse
- EmptyResponse
- GetAccountsResponse
- GetMerchantResponse
- GetTransactionsResponse
- GetWebhooksResponse
- LatLong
- Merchant
- NotFoundServiceError
- OpenHours
- RawMerchant
- RawMerchantStore
- RawTransaction
- ServiceError
- TenantServiceAccountAgentLoginRequest
- TenantServiceAccountAgentLoginResponse
- TransactionKind
- TransactionState
- UnauthorizedServiceError
- UncaughtExceptionServiceError
- UploadBatchTransactionsRequest
- Webhook
- WebhookSubscription
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
haven-client-0.0.2.tar.gz
(37.7 kB
view details)
Built Distribution
haven_client-0.0.2-py3-none-any.whl
(100.6 kB
view details)
File details
Details for the file haven-client-0.0.2.tar.gz
.
File metadata
- Download URL: haven-client-0.0.2.tar.gz
- Upload date:
- Size: 37.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ee87ecada3478f620038de9879e853bb227dd1d5193bd6f840bdec9d5b964382
|
|
MD5 |
8007d29840634f2ba90841954546a809
|
|
BLAKE2b-256 |
29a9f342a34149b291feba07a5d4f6d7de40607c2796d3bc41a30ad3e9ec58df
|
File details
Details for the file haven_client-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: haven_client-0.0.2-py3-none-any.whl
- Upload date:
- Size: 100.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4f8e414d5ff3efb9da9699272a9a82def4075ad9657d49302ea3ceee99977675
|
|
MD5 |
efa23edd40b18353f8216c7cf6765d30
|
|
BLAKE2b-256 |
5323da516f797522a24dd2a12b30ea8aa9a8faf0be6a73d01c598c6cd083848b
|