# organizze_api

Python client library for the [Organizze API](https://github.com/organizze/api-doc).

[![PyPI version](https://badge.fury.io/py/organizze-api.svg)](https://pypi.org/project/organizze_api/)
[![Python versions](https://img.shields.io/pypi/pyversions/organizze-api.svg)](https://pypi.org/project/organizze_api/)

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

## Requirements

Python 3.9+

## Installation

### From PyPI (Recommended)

```bash
pip install organizze_api
```

### From Source

```bash
# Clone the repository
git clone https://github.com/BarretoTech/organizze-api-sdk.git
cd organizze-api-sdk/clients/python

# Install
pip install -e .
```

### From Git

```bash
pip install git+https://github.com/BarretoTech/organizze-api-sdk.git#subdirectory=clients/python
```

## Quick Start

```python
import organizze_api
from organizze_api.rest import ApiException

# Configure authentication
configuration = organizze_api.Configuration(
    host="https://api.organizze.com.br/rest/v2",
    username="your.email@example.com",
    password="your_api_token"
)

# Set required User-Agent header
configuration.api_key['userAgent'] = 'MyApp (your.email@example.com)'

# Use the API
with organizze_api.ApiClient(configuration) as api_client:
    # List bank accounts
    bank_accounts_api = organizze_api.BankAccountsApi(api_client)
    accounts = bank_accounts_api.list_bank_accounts()
    print(accounts)
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

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

```python

import organizze_api
from organizze_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.organizze.com.br/rest/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = organizze_api.Configuration(
    host = "https://api.organizze.com.br/rest/v2"
)

# 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 HTTP basic authorization: basicAuth
configuration = organizze_api.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

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

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


# Enter a context with an instance of the API client
with organizze_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = organizze_api.BankAccountsApi(api_client)
    bank_account = organizze_api.BankAccount() # BankAccount |

    try:
        # Create Bank Account
        api_response = api_instance.create_bank_account(bank_account)
        print("The response of BankAccountsApi->create_bank_account:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling BankAccountsApi->create_bank_account: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://api.organizze.com.br/rest/v2*

| Class             | Method                                                                                            | HTTP request                                                                 | Description                       |
| ----------------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | --------------------------------- |
| _BankAccountsApi_ | [**create_bank_account**](docs/BankAccountsApi.md#create_bank_account)                            | **POST** /accounts                                                           | Create Bank Account               |
| _BankAccountsApi_ | [**delete_bank_account**](docs/BankAccountsApi.md#delete_bank_account)                            | **DELETE** /accounts/{bankAccountID}                                         | Delete Bank Account               |
| _BankAccountsApi_ | [**list_bank_accounts**](docs/BankAccountsApi.md#list_bank_accounts)                              | **GET** /accounts                                                            | List Bank Accounts                |
| _BankAccountsApi_ | [**read_bank_account**](docs/BankAccountsApi.md#read_bank_account)                                | **GET** /accounts/{bankAccountID}                                            | Read Account                      |
| _BankAccountsApi_ | [**update_bank_account**](docs/BankAccountsApi.md#update_bank_account)                            | **PUT** /accounts/{bankAccountID}                                            | Update Bank Account               |
| _BudgetsApi_      | [**list_annual_budgets**](docs/BudgetsApi.md#list_annual_budgets)                                 | **GET** /budgets/{year}                                                      | Get Annual Budgets                |
| _BudgetsApi_      | [**list_current_month_budgets**](docs/BudgetsApi.md#list_current_month_budgets)                   | **GET** /budgets                                                             | Get Current Month Budgets         |
| _BudgetsApi_      | [**list_monthly_budgets**](docs/BudgetsApi.md#list_monthly_budgets)                               | **GET** /budgets/{year}/{month}                                              | Get Monthly Budgets               |
| _CategoriesApi_   | [**create_category**](docs/CategoriesApi.md#create_category)                                      | **POST** /categories                                                         | Create Category                   |
| _CategoriesApi_   | [**delete_category**](docs/CategoriesApi.md#delete_category)                                      | **DELETE** /categories/{categoryID}                                          | Delete Category                   |
| _CategoriesApi_   | [**list_categories**](docs/CategoriesApi.md#list_categories)                                      | **GET** /categories                                                          | List Categories                   |
| _CategoriesApi_   | [**read_category**](docs/CategoriesApi.md#read_category)                                          | **GET** /categories/{categoryID}                                             | Read Category                     |
| _CategoriesApi_   | [**update_category**](docs/CategoriesApi.md#update_category)                                      | **PUT** /categories/{categoryID}                                             | Update Category                   |
| _CreditCardsApi_  | [**create_credit_card**](docs/CreditCardsApi.md#create_credit_card)                               | **POST** /credit_cards                                                       | Create Credit Card                |
| _CreditCardsApi_  | [**delete_credit_card**](docs/CreditCardsApi.md#delete_credit_card)                               | **DELETE** /credit_cards/{creditCardID}                                      | Delete Credit Card                |
| _CreditCardsApi_  | [**list_credit_card_invoice_payments**](docs/CreditCardsApi.md#list_credit_card_invoice_payments) | **GET** /credit_cards/{creditCardID}/invoices/{creditCardInvoiceID}/payments | List Credit Card Invoice Payments |
| _CreditCardsApi_  | [**list_credit_card_invoices**](docs/CreditCardsApi.md#list_credit_card_invoices)                 | **GET** /credit_cards/{creditCardID}/invoices                                | List Credit Card Invoices         |
| _CreditCardsApi_  | [**list_credit_cards**](docs/CreditCardsApi.md#list_credit_cards)                                 | **GET** /credit_cards                                                        | List Credit Cards                 |
| _CreditCardsApi_  | [**read_credit_card**](docs/CreditCardsApi.md#read_credit_card)                                   | **GET** /credit_cards/{creditCardID}                                         | Read Credit Card                  |
| _CreditCardsApi_  | [**read_credit_card_invoice**](docs/CreditCardsApi.md#read_credit_card_invoice)                   | **GET** /credit_cards/{creditCardID}/invoices/{creditCardInvoiceID}          | Read Credit Card Invoice          |
| _CreditCardsApi_  | [**update_credit_card**](docs/CreditCardsApi.md#update_credit_card)                               | **PUT** /credit_cards/{creditCardID}                                         | Update Credit Card                |
| _TransactionsApi_ | [**create_transaction**](docs/TransactionsApi.md#create_transaction)                              | **POST** /transactions                                                       | Create Transaction                |
| _TransactionsApi_ | [**delete_transaction**](docs/TransactionsApi.md#delete_transaction)                              | **DELETE** /transactions/{transactionID}                                     | Delete Transaction                |
| _TransactionsApi_ | [**list_transactions**](docs/TransactionsApi.md#list_transactions)                                | **GET** /transactions                                                        | List Transactions                 |
| _TransactionsApi_ | [**read_transaction**](docs/TransactionsApi.md#read_transaction)                                  | **GET** /transactions/{transactionID}                                        | Read Transaction                  |
| _TransactionsApi_ | [**update_transaction**](docs/TransactionsApi.md#update_transaction)                              | **PUT** /transactions/{transactionID}                                        | Update Transaction                |
| _UsersApi_        | [**list_users**](docs/UsersApi.md#list_users)                                                     | **GET** /users                                                               | List Users                        |
| _UsersApi_        | [**read_user**](docs/UsersApi.md#read_user)                                                       | **GET** /users/{userID}                                                      | Read User                         |

## Documentation For Models

- [BankAccount](docs/BankAccount.md)
- [Budget](docs/Budget.md)
- [Category](docs/Category.md)
- [CreateTransactionRequest](docs/CreateTransactionRequest.md)
- [CreditCard](docs/CreditCard.md)
- [CreditCardInvoice](docs/CreditCardInvoice.md)
- [CreditCardInvoiceFull](docs/CreditCardInvoiceFull.md)
- [DeleteTransactionRequest](docs/DeleteTransactionRequest.md)
- [FailedAuthentication](docs/FailedAuthentication.md)
- [InstallmentTransaction](docs/InstallmentTransaction.md)
- [InstallmentTransactionAllOfInstallmentsAttributes](docs/InstallmentTransactionAllOfInstallmentsAttributes.md)
- [NotFound](docs/NotFound.md)
- [RecurringTransaction](docs/RecurringTransaction.md)
- [RecurringTransactionAllOfRecurrenceAttributes](docs/RecurringTransactionAllOfRecurrenceAttributes.md)
- [Transaction](docs/Transaction.md)
- [UpdateTransactionRequest](docs/UpdateTransactionRequest.md)
- [User](docs/User.md)
- [ValidationError](docs/ValidationError.md)

<a id="documentation-for-authorization"></a>

## Documentation For Authorization

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

### basicAuth

- **Type**: HTTP basic authentication

<a id="userAgent"></a>

### userAgent

- **Type**: API key
- **API key parameter name**: User-Agent
- **Location**: HTTP header
