Skip to content

Commit

Permalink
Merge pull request #37 from pagarme/CodeGen-Python
Browse files Browse the repository at this point in the history
  • Loading branch information
grazielcosta authored Jul 31, 2024
2 parents 7813c06 + 66c9ae6 commit 2b4f3e4
Show file tree
Hide file tree
Showing 232 changed files with 3,449 additions and 3,518 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.10/doc/client.md)
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.11/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.10/doc/$a/https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/basic-authentication.md) | The credential object for Basic Authentication |
| `basic_auth_credentials` | [`BasicAuthCredentials`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.11/doc/auth/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.10/doc/$a/https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.10/basic-authentication.md)
* [`httpBasic (Basic Authentication)`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.11/doc/auth/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.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) |
| 400 | Invalid request | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.11/doc/models/error-exception.md) |
| 401 | Invalid API key | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.11/doc/models/error-exception.md) |
| 404 | An informed resource was not found | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.11/doc/models/error-exception.md) |
| 412 | Business validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.11/doc/models/error-exception.md) |
| 422 | Contract validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.11/doc/models/error-exception.md) |
| 500 | Internal server error | [`ErrorException`](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.11/doc/models/error-exception.md) |

## List of APIs

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

## Classes Documentation

* [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)
* [Utility Classes](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.11/doc/utility-classes.md)
* [HttpResponse](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.11/doc/http-response.md)
* [HttpRequest](https://www.github.com/pagarme/pagarme-python-sdk/tree/6.8.11/doc/http-request.md)

2 changes: 1 addition & 1 deletion doc/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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`]($a/basic-authentication.md) | The credential object for Basic Authentication |
| `basic_auth_credentials` | [`BasicAuthCredentials`](auth/basic-authentication.md) | The credential object for Basic Authentication |

The API client can be initialized as follows:

Expand Down
6 changes: 2 additions & 4 deletions doc/controllers/balance-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ def get_balance_operation_by_id(self,
```python
id = 112

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


Expand Down Expand Up @@ -67,7 +66,6 @@ def get_balance_operations(self,
## Example Usage

```python
result = balance_operations_controller.get_balance_operations()
print(result)
result = balance_operations_controller.get_balance_operations()
```

39 changes: 13 additions & 26 deletions doc/controllers/charges.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ request = UpdateMetadataRequest(
result = charges_controller.update_charge_metadata(
charge_id,
request
)
print(result)
)
```


Expand Down Expand Up @@ -95,8 +94,7 @@ def capture_charge(self,
```python
charge_id = 'charge_id8'

result = charges_controller.capture_charge(charge_id)
print(result)
result = charges_controller.capture_charge(charge_id)
```


Expand Down Expand Up @@ -124,8 +122,7 @@ def get_charge(self,
```python
charge_id = 'charge_id8'

result = charges_controller.get_charge(charge_id)
print(result)
result = charges_controller.get_charge(charge_id)
```


Expand Down Expand Up @@ -155,8 +152,7 @@ def confirm_payment(self,
```python
charge_id = 'charge_id8'

result = charges_controller.confirm_payment(charge_id)
print(result)
result = charges_controller.confirm_payment(charge_id)
```


Expand Down Expand Up @@ -186,8 +182,7 @@ def get_charge_transactions(self,
```python
charge_id = 'charge_id8'

result = charges_controller.get_charge_transactions(charge_id)
print(result)
result = charges_controller.get_charge_transactions(charge_id)
```


Expand Down Expand Up @@ -231,8 +226,7 @@ request = UpdateChargeCardRequest(
result = charges_controller.update_charge_card(
charge_id,
request
)
print(result)
)
```


Expand Down Expand Up @@ -268,8 +262,7 @@ request = CreateChargeRequest(
order_id='order_id0'
)

result = charges_controller.create_charge(request)
print(result)
result = charges_controller.create_charge(request)
```


Expand Down Expand Up @@ -349,8 +342,7 @@ request = UpdateChargePaymentMethodRequest(
result = charges_controller.update_charge_payment_method(
charge_id,
request
)
print(result)
)
```


Expand Down Expand Up @@ -387,8 +379,7 @@ request = UpdateChargeDueDateRequest()
result = charges_controller.update_charge_due_date(
charge_id,
request
)
print(result)
)
```


Expand Down Expand Up @@ -418,8 +409,7 @@ def get_charges_summary(self,
```python
status = 'status8'

result = charges_controller.get_charges_summary(status)
print(result)
result = charges_controller.get_charges_summary(status)
```


Expand Down Expand Up @@ -449,8 +439,7 @@ def retry_charge(self,
```python
charge_id = 'charge_id8'

result = charges_controller.retry_charge(charge_id)
print(result)
result = charges_controller.retry_charge(charge_id)
```


Expand Down Expand Up @@ -492,8 +481,7 @@ def get_charges(self,
## Example Usage

```python
result = charges_controller.get_charges()
print(result)
result = charges_controller.get_charges()
```


Expand Down Expand Up @@ -525,7 +513,6 @@ def cancel_charge(self,
```python
charge_id = 'charge_id8'

result = charges_controller.cancel_charge(charge_id)
print(result)
result = charges_controller.cancel_charge(charge_id)
```

Loading

0 comments on commit 2b4f3e4

Please sign in to comment.