Skip to content

Commit

Permalink
Merge pull request #36 from pagarme/CodeGen-Python
Browse files Browse the repository at this point in the history
Automated commit message
  • Loading branch information
andreals authored Jun 27, 2024
2 parents 66ac31c + 2487552 commit 7813c06
Show file tree
Hide file tree
Showing 30 changed files with 4,585 additions and 4,585 deletions.
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ To run the file within your test project, right click on your Python file inside

## Initialize the API Client

**_Note:_** Documentation for the client can be found [here.](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/client.md)
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/client.md)

The following parameters are configurable for the API Client:

Expand All @@ -85,7 +85,7 @@ The following parameters are configurable for the API Client:
| `backoff_factor` | `float` | A backoff factor to apply between attempts after the second try. <br> **Default: 2** |
| `retry_statuses` | `Array of int` | The http statuses on which retry is to be done. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
| `retry_methods` | `Array of string` | The http methods on which retry is to be done. <br> **Default: ['GET', 'PUT']** |
| `basic_auth_credentials` | [`BasicAuthCredentials`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/$a/https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/basic-authentication.md) | The credential object for Basic Authentication |
| `basic_auth_credentials` | [`BasicAuthCredentials`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/$a/https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/basic-authentication.md) | The credential object for Basic Authentication |

The API client can be initialized as follows:

Expand All @@ -104,39 +104,39 @@ client = PagarmeapisdkClient(

This API uses the following authentication schemes.

* [`httpBasic (Basic Authentication)`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/$a/https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/basic-authentication.md)
* [`httpBasic (Basic Authentication)`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/$a/https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/basic-authentication.md)

## API Errors

Here is the list of errors that the API might throw.

| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
| 400 | Invalid request | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/models/error-exception.md) |
| 401 | Invalid API key | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/models/error-exception.md) |
| 404 | An informed resource was not found | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/models/error-exception.md) |
| 412 | Business validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/models/error-exception.md) |
| 422 | Contract validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/models/error-exception.md) |
| 500 | Internal server error | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/models/error-exception.md) |
| 400 | Invalid request | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/models/error-exception.md) |
| 401 | Invalid API key | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/models/error-exception.md) |
| 404 | An informed resource was not found | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/models/error-exception.md) |
| 412 | Business validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/models/error-exception.md) |
| 422 | Contract validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/models/error-exception.md) |
| 500 | Internal server error | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/models/error-exception.md) |

## List of APIs

* [Subscriptions](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/controllers/subscriptions.md)
* [Orders](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/controllers/orders.md)
* [Plans](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/controllers/plans.md)
* [Invoices](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/controllers/invoices.md)
* [Customers](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/controllers/customers.md)
* [Charges](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/controllers/charges.md)
* [Recipients](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/controllers/recipients.md)
* [Tokens](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/controllers/tokens.md)
* [Transactions](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/controllers/transactions.md)
* [Transfers](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/controllers/transfers.md)
* [Payables](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/controllers/payables.md)
* [Balance Operations](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/controllers/balance-operations.md)
* [Subscriptions](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/controllers/subscriptions.md)
* [Orders](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/controllers/orders.md)
* [Plans](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/controllers/plans.md)
* [Invoices](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/controllers/invoices.md)
* [Customers](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/controllers/customers.md)
* [Charges](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/controllers/charges.md)
* [Recipients](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/controllers/recipients.md)
* [Tokens](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/controllers/tokens.md)
* [Transactions](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/controllers/transactions.md)
* [Transfers](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/controllers/transfers.md)
* [Payables](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/controllers/payables.md)
* [Balance Operations](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/controllers/balance-operations.md)

## Classes Documentation

* [Utility Classes](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/utility-classes.md)
* [HttpResponse](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/http-response.md)
* [HttpRequest](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.9/doc/http-request.md)
* [Utility Classes](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/utility-classes.md)
* [HttpResponse](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/http-response.md)
* [HttpRequest](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/doc/http-request.md)

44 changes: 22 additions & 22 deletions doc/controllers/balance-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,64 +10,64 @@ balance_operations_controller = client.balance_operations

## Methods

* [Get Balance Operations](../../doc/controllers/balance-operations.md#get-balance-operations)
* [Get Balance Operation by Id](../../doc/controllers/balance-operations.md#get-balance-operation-by-id)
* [Get Balance Operation by Id](../../doc/controllers/balance-operations.md#get-balance-operation-by-id)
* [Get Balance Operations](../../doc/controllers/balance-operations.md#get-balance-operations)


# Get Balance Operations
# Get Balance Operation by Id

```python
def get_balance_operations(self,
status=None,
created_since=None,
created_until=None,
recipient_id=None)
def get_balance_operation_by_id(self,
id)
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `status` | `str` | Query, Optional | - |
| `created_since` | `datetime` | Query, Optional | - |
| `created_until` | `datetime` | Query, Optional | - |
| `recipient_id` | `str` | Query, Optional | - |
| `id` | `long\|int` | Template, Required | - |

## Response Type

[`ListBalanceOperationResponse`](../../doc/models/list-balance-operation-response.md)
[`GetBalanceOperationResponse`](../../doc/models/get-balance-operation-response.md)

## Example Usage

```python
result = balance_operations_controller.get_balance_operations()
id = 112

result = balance_operations_controller.get_balance_operation_by_id(id)
print(result)
```


# Get Balance Operation by Id
# Get Balance Operations

```python
def get_balance_operation_by_id(self,
id)
def get_balance_operations(self,
status=None,
created_since=None,
created_until=None,
recipient_id=None)
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `id` | `long\|int` | Template, Required | - |
| `status` | `str` | Query, Optional | - |
| `created_since` | `datetime` | Query, Optional | - |
| `created_until` | `datetime` | Query, Optional | - |
| `recipient_id` | `str` | Query, Optional | - |

## Response Type

[`GetBalanceOperationResponse`](../../doc/models/get-balance-operation-response.md)
[`ListBalanceOperationResponse`](../../doc/models/list-balance-operation-response.md)

## Example Usage

```python
id = 112

result = balance_operations_controller.get_balance_operation_by_id(id)
result = balance_operations_controller.get_balance_operations()
print(result)
```

Loading

0 comments on commit 7813c06

Please sign in to comment.