Skip to content

Commit 597c3d5

Browse files
committed
Update README
1 parent 5196d60 commit 597c3d5

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

README.md

+45
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,57 @@ else:
7474
print(result_charge.errors)
7575
```
7676

77+
### List Charges
78+
```python
79+
response = juno.charge.find_all(
80+
query_params={
81+
"created_on_start": "2022-02-13", "created_on_end": "2022-02-14", "order_asc": False
82+
}
83+
)
84+
85+
# You can pass the argument with keyword or not
86+
# ... charge.find_all({"created_on_start": "2022-02-13", ...})
87+
88+
for charge in response.charges:
89+
print(charge)
90+
```
91+
92+
### Detail Charge
93+
```python
94+
response = juno.charge.find_by_id("chr_1EECDF55648943D78BDFC6D852E19266")
95+
print(response.charge)
96+
```
97+
98+
### Cancel Charge
99+
```python
100+
response = juno.charge.cancelation("chr_1EECDF55648943D78BDFC6D852E19266")
101+
print(response)
102+
```
103+
77104
### Capture Delayed
78105
```python
79106
# ...
107+
juno.payment.capture(result_payment.payment.id, {"charge_id": result_charge.charge.id})
108+
```
109+
110+
### Partial Capture Delayed
111+
```python
112+
# ...
80113
juno.payment.capture(result_payment.payment.id, {"charge_id": result_charge.charge.id, "amount": "100.00"})
81114
```
82115

116+
### Refund Payment
117+
```python
118+
response = juno.payment.refund("pay_879D6006555C3309E4504C63B743BF59")
119+
print(response)
120+
```
121+
122+
### Partial Refund Payment
123+
```python
124+
response = juno.payment.refund("pay_879D6006555C3309E4504C63B743BF59", {"amount": "10.00"})
125+
print(response)
126+
```
127+
83128
## Support
84129
If you have any problem or suggestion please open an issue [here](https://github.com/mjr/juno-python/issues).
85130

0 commit comments

Comments
 (0)