Skip to content

Commit 58c33a0

Browse files
refactor: remove unused services for beneficiary payouts, charge, payment intents, and payout; update charges and payouts services with new methods
1 parent d3f99dd commit 58c33a0

9 files changed

Lines changed: 46 additions & 131 deletions

File tree

lomi/client.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,15 @@ def __init__(
3737
{"X-API-KEY": api_key, "Content-Type": "application/json"}
3838
)
3939
self.accounts = AccountsService(self)
40-
self.beneficiary_payouts = BeneficiaryPayoutsService(self)
41-
self.charge = ChargeService(self)
4240
self.charges = ChargesService(self)
4341
self.checkout_sessions = CheckoutSessionsService(self)
4442
self.customers = CustomersService(self)
4543
self.customer_subscriptions = CustomerSubscriptionsService(self)
4644
self.discount_coupons = DiscountCouponsService(self)
4745
self.merchants = MerchantsService(self)
4846
self.organizations = OrganizationsService(self)
49-
self.payment_intents = PaymentIntentsService(self)
5047
self.payment_links = PaymentLinksService(self)
5148
self.payment_requests = PaymentRequestsService(self)
52-
self.payout = PayoutService(self)
5349
self.payouts = PayoutsService(self)
5450
self.products = ProductsService(self)
5551
self.providers = ProvidersService(self)

lomi/sdk_python_methods.json

Lines changed: 15 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"generatedAt": "2026-05-20T06:18:00.222Z",
2+
"generatedAt": "2026-05-20T10:09:11.303Z",
33
"language": "python",
44
"naming": "ts_method_names_manifest_pep8_sdk_methods_are_snake_case_in_code",
55
"sdk": {
@@ -10,16 +10,12 @@
1010
"getBalanceBreakdown",
1111
"list"
1212
],
13-
"beneficiaryPayouts": [
14-
"create",
15-
"get",
16-
"list"
17-
],
18-
"charge": [
19-
"createMtnCharge"
20-
],
2113
"charges": [
22-
"createWaveCharge"
14+
"cancelCardCharge",
15+
"createCardCharge",
16+
"createMtnCharge",
17+
"createWaveCharge",
18+
"getCardCharge"
2319
],
2420
"checkoutSessions": [
2521
"create",
@@ -59,11 +55,6 @@
5955
"getMetrics",
6056
"list"
6157
],
62-
"paymentIntents": [
63-
"cancel",
64-
"create",
65-
"get"
66-
],
6758
"paymentLinks": [
6859
"create",
6960
"get",
@@ -74,11 +65,9 @@
7465
"get",
7566
"list"
7667
],
77-
"payout": [
78-
"createSpiPayout"
79-
],
8068
"payouts": [
81-
"createWavePayout",
69+
"create",
70+
"get",
8271
"list"
8372
],
8473
"products": [
@@ -129,16 +118,12 @@
129118
"get_balance_breakdown",
130119
"list"
131120
],
132-
"beneficiary_payouts": [
133-
"create",
134-
"get",
135-
"list"
136-
],
137-
"charge": [
138-
"create_mtn_charge"
139-
],
140121
"charges": [
141-
"create_wave_charge"
122+
"cancel_card_charge",
123+
"create_card_charge",
124+
"create_mtn_charge",
125+
"create_wave_charge",
126+
"get_card_charge"
142127
],
143128
"checkout_sessions": [
144129
"create",
@@ -178,11 +163,6 @@
178163
"get_metrics",
179164
"list"
180165
],
181-
"payment_intents": [
182-
"cancel",
183-
"create",
184-
"get"
185-
],
186166
"payment_links": [
187167
"create",
188168
"get",
@@ -193,11 +173,9 @@
193173
"get",
194174
"list"
195175
],
196-
"payout": [
197-
"create_spi_payout"
198-
],
199176
"payouts": [
200-
"create_wave_payout",
177+
"create",
178+
"get",
201179
"list"
202180
],
203181
"products": [

lomi/services/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
from .accounts import AccountsService
2-
from .beneficiary_payouts import BeneficiaryPayoutsService
3-
from .charge import ChargeService
42
from .charges import ChargesService
53
from .checkout_sessions import CheckoutSessionsService
64
from .customer_subscriptions import CustomerSubscriptionsService
75
from .customers import CustomersService
86
from .discount_coupons import DiscountCouponsService
97
from .merchants import MerchantsService
108
from .organizations import OrganizationsService
11-
from .payment_intents import PaymentIntentsService
129
from .payment_links import PaymentLinksService
1310
from .payment_requests import PaymentRequestsService
14-
from .payout import PayoutService
1511
from .payouts import PayoutsService
1612
from .products import ProductsService
1713
from .providers import ProvidersService

lomi/services/beneficiary_payouts.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

lomi/services/charge.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

lomi/services/charges.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,30 @@
88
class ChargesService(ClientBase):
99
"""Public merchant API — generated from OpenAPI allowlist."""
1010

11+
def cancel_card_charge(self, id: str) -> Any:
12+
"""Annuler un encaissement carte"""
13+
path = "/charge/card/{id}/cancel"
14+
path = path.replace("{id}", str(id))
15+
return self._request("POST", path)
16+
17+
def create_card_charge(self, body: Optional[Dict[str, Any]] = None) -> Any:
18+
"""Créer un encaissement carte (client_secret)"""
19+
path = "/charge/card"
20+
return self._request("POST", path, data=body)
21+
22+
def create_mtn_charge(self) -> Any:
23+
"""Lancer un encaissement direct MTN MoMo"""
24+
path = "/charge/mtn"
25+
return self._request("POST", path)
26+
1127
def create_wave_charge(self) -> Any:
1228
"""Lancer un encaissement direct Wave"""
1329
path = "/charge/wave"
1430
return self._request("POST", path)
1531

32+
def get_card_charge(self, id: str) -> Any:
33+
"""Obtenir un encaissement carte"""
34+
path = "/charge/card/{id}"
35+
path = path.replace("{id}", str(id))
36+
return self._request("GET", path)
37+

lomi/services/payment_intents.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

lomi/services/payout.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

lomi/services/payouts.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@
88
class PayoutsService(ClientBase):
99
"""Public merchant API — generated from OpenAPI allowlist."""
1010

11-
def create_wave_payout(self) -> Any:
12-
"""Lancer un virement Wave"""
13-
path = "/payout/wave"
11+
def create(self) -> Any:
12+
"""Créer un virement"""
13+
path = "/payouts"
1414
return self._request("POST", path)
1515

16+
def get(self, id: str) -> Any:
17+
"""Obtenir un virement"""
18+
path = "/payouts/{id}"
19+
path = path.replace("{id}", str(id))
20+
return self._request("GET", path)
21+
1622
def list(self, params: Optional[Dict[str, Any]] = None) -> Any:
1723
"""Lister les virements"""
1824
path = "/payouts"

0 commit comments

Comments
 (0)