Skip to content

Commit

Permalink
2.4.5 (#84)
Browse files Browse the repository at this point in the history
Co-authored-by: Unknown <[email protected]>
  • Loading branch information
magnomoreira and samuelleitemundipagg authored Jun 19, 2023
1 parent 55a11af commit 95c80c3
Show file tree
Hide file tree
Showing 15 changed files with 220 additions and 89 deletions.
76 changes: 39 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ In order to setup authentication and initialization of the API client, you need

| Parameter | Description |
|-----------|-------------|
| service_referer_name | TODO: add a description |
| basic_auth_user_name | The username to use with basic authentication |
| basic_auth_password | The password to use with basic authentication |

Expand All @@ -97,10 +98,11 @@ API client can be initialized as following.

```python
# Configuration parameters and credentials
service_referer_name = 'service_referer_name'
basic_auth_user_name = 'basic_auth_user_name' # The username to use with basic authentication
basic_auth_password = 'basic_auth_password' # The password to use with basic authentication

client = MundiapiClient(basic_auth_user_name, basic_auth_password)
client = MundiapiClient(service_referer_name, basic_auth_user_name, basic_auth_password)
```


Expand Down Expand Up @@ -758,8 +760,8 @@ def get_subscriptions(self,
#### Example Usage

```python
page = 180
size = 180
page = 142
size = 142
code = 'code'
billing_type = 'billing_type'
customer_id = 'customer_id'
Expand Down Expand Up @@ -821,8 +823,8 @@ def get_usages_details(self,
```python
subscription_id = 'subscription_id'
cycle_id = 'cycle_id'
size = 180
page = 180
size = 142
page = 142
item_id = 'item_id'
group = 'group'

Expand Down Expand Up @@ -1015,8 +1017,8 @@ def get_usages(self,
```python
subscription_id = 'subscription_id'
item_id = 'item_id'
page = 180
size = 180
page = 142
size = 142
code = 'code'
group = 'group'
used_since = datetime.now()
Expand Down Expand Up @@ -1111,8 +1113,8 @@ def get_increments(self,

```python
subscription_id = 'subscription_id'
page = 180
size = 180
page = 142
size = 142

result = subscriptions_controller.get_increments(subscription_id, page, size)

Expand Down Expand Up @@ -1215,8 +1217,8 @@ def get_subscription_items(self,

```python
subscription_id = 'subscription_id'
page = 180
size = 180
page = 142
size = 142
name = 'name'
code = 'code'
status = 'status'
Expand Down Expand Up @@ -1589,8 +1591,8 @@ def get_discounts(self,

```python
subscription_id = 'subscription_id'
page = 16
size = 16
page = 142
size = 142

result = subscriptions_controller.get_discounts(subscription_id, page, size)

Expand Down Expand Up @@ -2056,8 +2058,8 @@ def get_orders(self,
#### Example Usage

```python
page = 16
size = 16
page = 233
size = 233
code = 'code'
status = 'status'
created_since = datetime.now()
Expand Down Expand Up @@ -2531,8 +2533,8 @@ def get_plans(self,
#### Example Usage

```python
page = 16
size = 16
page = 233
size = 233
name = 'name'
status = 'status'
billing_type = 'billing_type'
Expand Down Expand Up @@ -3091,8 +3093,8 @@ def get_invoices(self,
#### Example Usage

```python
page = 230
size = 230
page = 191
size = 191
code = 'code'
customer_id = 'customer_id'
subscription_id = 'subscription_id'
Expand Down Expand Up @@ -3204,8 +3206,8 @@ def get_access_tokens(self,

```python
customer_id = 'customer_id'
page = 230
size = 230
page = 191
size = 191

result = customers_controller.get_access_tokens(customer_id, page, size)

Expand Down Expand Up @@ -3376,8 +3378,8 @@ def get_addresses(self,

```python
customer_id = 'customer_id'
page = 230
size = 230
page = 191
size = 191

result = customers_controller.get_addresses(customer_id, page, size)

Expand Down Expand Up @@ -3741,8 +3743,8 @@ def get_cards(self,

```python
customer_id = 'customer_id'
page = 230
size = 230
page = 191
size = 191

result = customers_controller.get_cards(customer_id, page, size)

Expand Down Expand Up @@ -4316,8 +4318,8 @@ def get_charges(self,
#### Example Usage

```python
page = 230
size = 230
page = 28
size = 28
code = 'code'
status = 'status'
payment_method = 'payment_method'
Expand Down Expand Up @@ -4639,8 +4641,8 @@ def get_charge_transactions(self,

```python
charge_id = 'charge_id'
page = 66
size = 66
page = 28
size = 28

result = charges_controller.get_charge_transactions(charge_id, page, size)

Expand Down Expand Up @@ -4875,8 +4877,8 @@ def get_recipients(self,
#### Example Usage

```python
page = 66
size = 66
page = 28
size = 28

result = recipients_controller.get_recipients(page, size)

Expand Down Expand Up @@ -5016,8 +5018,8 @@ def get_anticipations(self,

```python
recipient_id = 'recipient_id'
page = 66
size = 66
page = 28
size = 28
status = 'status'
timeframe = 'timeframe'
payment_date_since = datetime.now()
Expand Down Expand Up @@ -5295,8 +5297,8 @@ def get_transfers(self,

```python
recipient_id = 'recipient_id'
page = 66
size = 66
page = 28
size = 28
status = 'status'
created_since = datetime.now()
created_until = datetime.now()
Expand Down Expand Up @@ -5485,8 +5487,8 @@ def get_withdrawals(self,

```python
recipient_id = 'recipient_id'
page = 66
size = 66
page = 28
size = 28
status = 'status'
created_since = datetime.now()
created_until = datetime.now()
Expand Down
3 changes: 3 additions & 0 deletions mundiapi/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class Configuration(object):
# The base Uri for API calls
base_uri = 'https://api.mundipagg.com/core/v1'

# TODO: Set an appropriate value
service_referer_name = None

# The username to use with basic authentication
# TODO: Set an appropriate value
basic_auth_user_name = None
Expand Down
2 changes: 1 addition & 1 deletion mundiapi/controllers/base_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class BaseController(object):
http_call_back = None

global_headers = {
'user-agent': 'MundiSDK - Python 2.4.4'
'user-agent': 'MundiSDK - Python 2.4.5'
}

def __init__(self, client=None, call_back=None):
Expand Down
21 changes: 17 additions & 4 deletions mundiapi/controllers/charges_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def get_charge(self,

# Prepare headers
_headers = {
'accept': 'application/json'
'accept': 'application/json',
'ServiceRefererName': Configuration.service_referer_name
}

# Prepare and execute request
Expand Down Expand Up @@ -122,6 +123,7 @@ def cancel_charge(self,
# Prepare headers
_headers = {
'accept': 'application/json',
'ServiceRefererName': Configuration.service_referer_name,
'Content-Type': 'application/json',
'idempotency-key': idempotency_key
}
Expand Down Expand Up @@ -187,6 +189,7 @@ def confirm_payment(self,
# Prepare headers
_headers = {
'accept': 'application/json',
'ServiceRefererName': Configuration.service_referer_name,
'Content-Type': 'application/json',
'idempotency-key': idempotency_key
}
Expand Down Expand Up @@ -251,6 +254,7 @@ def update_charge_card(self,
# Prepare headers
_headers = {
'accept': 'application/json',
'ServiceRefererName': Configuration.service_referer_name,
'Content-Type': 'application/json',
'idempotency-key': idempotency_key
}
Expand Down Expand Up @@ -338,7 +342,8 @@ def get_charges(self,

# Prepare headers
_headers = {
'accept': 'application/json'
'accept': 'application/json',
'ServiceRefererName': Configuration.service_referer_name
}

# Prepare and execute request
Expand Down Expand Up @@ -399,6 +404,7 @@ def retry_charge(self,
# Prepare headers
_headers = {
'accept': 'application/json',
'ServiceRefererName': Configuration.service_referer_name,
'idempotency-key': idempotency_key
}

Expand Down Expand Up @@ -463,6 +469,7 @@ def update_charge_payment_method(self,
# Prepare headers
_headers = {
'accept': 'application/json',
'ServiceRefererName': Configuration.service_referer_name,
'Content-Type': 'application/json',
'idempotency-key': idempotency_key
}
Expand Down Expand Up @@ -528,6 +535,7 @@ def update_charge_metadata(self,
# Prepare headers
_headers = {
'accept': 'application/json',
'ServiceRefererName': Configuration.service_referer_name,
'Content-Type': 'application/json',
'idempotency-key': idempotency_key
}
Expand Down Expand Up @@ -593,6 +601,7 @@ def capture_charge(self,
# Prepare headers
_headers = {
'accept': 'application/json',
'ServiceRefererName': Configuration.service_referer_name,
'Content-Type': 'application/json',
'idempotency-key': idempotency_key
}
Expand Down Expand Up @@ -657,6 +666,7 @@ def update_charge_due_date(self,
# Prepare headers
_headers = {
'accept': 'application/json',
'ServiceRefererName': Configuration.service_referer_name,
'Content-Type': 'application/json',
'idempotency-key': idempotency_key
}
Expand Down Expand Up @@ -716,6 +726,7 @@ def create_charge(self,
# Prepare headers
_headers = {
'accept': 'application/json',
'ServiceRefererName': Configuration.service_referer_name,
'Content-Type': 'application/json',
'idempotency-key': idempotency_key
}
Expand Down Expand Up @@ -784,7 +795,8 @@ def get_charge_transactions(self,

# Prepare headers
_headers = {
'accept': 'application/json'
'accept': 'application/json',
'ServiceRefererName': Configuration.service_referer_name
}

# Prepare and execute request
Expand Down Expand Up @@ -851,7 +863,8 @@ def get_charges_summary(self,

# Prepare headers
_headers = {
'accept': 'application/json'
'accept': 'application/json',
'ServiceRefererName': Configuration.service_referer_name
}

# Prepare and execute request
Expand Down
Loading

0 comments on commit 95c80c3

Please sign in to comment.