Skip to content

Commit d3f99dd

Browse files
feat: add new services for charge, customer subscriptions, merchants, payouts, and providers; enhance existing services with additional methods and update SDK documentation
1 parent bc30ec3 commit d3f99dd

14 files changed

Lines changed: 271 additions & 13 deletions

lomi/client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,21 @@ def __init__(
3838
)
3939
self.accounts = AccountsService(self)
4040
self.beneficiary_payouts = BeneficiaryPayoutsService(self)
41+
self.charge = ChargeService(self)
4142
self.charges = ChargesService(self)
4243
self.checkout_sessions = CheckoutSessionsService(self)
4344
self.customers = CustomersService(self)
45+
self.customer_subscriptions = CustomerSubscriptionsService(self)
4446
self.discount_coupons = DiscountCouponsService(self)
47+
self.merchants = MerchantsService(self)
4548
self.organizations = OrganizationsService(self)
4649
self.payment_intents = PaymentIntentsService(self)
4750
self.payment_links = PaymentLinksService(self)
4851
self.payment_requests = PaymentRequestsService(self)
52+
self.payout = PayoutService(self)
4953
self.payouts = PayoutsService(self)
5054
self.products = ProductsService(self)
55+
self.providers = ProvidersService(self)
5156
self.refunds = RefundsService(self)
5257
self.subscriptions = SubscriptionsService(self)
5358
self.transactions = TransactionsService(self)

lomi/sdk_python_methods.json

Lines changed: 75 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"generatedAt": "2026-05-08T14:16:39.253Z",
2+
"generatedAt": "2026-05-20T06:18:00.222Z",
33
"language": "python",
44
"naming": "ts_method_names_manifest_pep8_sdk_methods_are_snake_case_in_code",
55
"sdk": {
@@ -15,6 +15,9 @@
1515
"get",
1616
"list"
1717
],
18+
"charge": [
19+
"createMtnCharge"
20+
],
1821
"charges": [
1922
"createWaveCharge"
2023
],
@@ -25,25 +28,41 @@
2528
],
2629
"customers": [
2730
"create",
31+
"createPortalLaunchSession",
2832
"delete",
2933
"get",
34+
"getPortalAudit",
3035
"getTransactions",
3136
"list",
3237
"update"
3338
],
39+
"customerSubscriptions": [
40+
"delete",
41+
"get",
42+
"list",
43+
"update"
44+
],
3445
"discountCoupons": [
3546
"create",
3647
"get",
3748
"getPerformance",
3849
"list"
3950
],
51+
"merchants": [
52+
"get",
53+
"getArr",
54+
"getBalance",
55+
"getMrr"
56+
],
4057
"organizations": [
4158
"get",
4259
"getMetrics",
4360
"list"
4461
],
4562
"paymentIntents": [
46-
"create"
63+
"cancel",
64+
"create",
65+
"get"
4766
],
4867
"paymentLinks": [
4968
"create",
@@ -55,8 +74,12 @@
5574
"get",
5675
"list"
5776
],
77+
"payout": [
78+
"createSpiPayout"
79+
],
5880
"payouts": [
59-
"createWavePayout"
81+
"createWavePayout",
82+
"list"
6083
],
6184
"products": [
6285
"addPrice",
@@ -65,14 +88,20 @@
6588
"list",
6689
"setDefaultPrice"
6790
],
91+
"providers": [
92+
"list"
93+
],
6894
"refunds": [
69-
"createWaveRefund"
95+
"create",
96+
"get",
97+
"list"
7098
],
7199
"subscriptions": [
72100
"cancel",
73101
"findByCustomer",
74102
"get",
75-
"list"
103+
"list",
104+
"update"
76105
],
77106
"transactions": [
78107
"get",
@@ -83,8 +112,12 @@
83112
"list"
84113
],
85114
"webhooks": [
115+
"create",
116+
"delete",
86117
"get",
87118
"list",
119+
"retryDelivery",
120+
"test",
88121
"update"
89122
]
90123
},
@@ -101,6 +134,9 @@
101134
"get",
102135
"list"
103136
],
137+
"charge": [
138+
"create_mtn_charge"
139+
],
104140
"charges": [
105141
"create_wave_charge"
106142
],
@@ -111,25 +147,41 @@
111147
],
112148
"customers": [
113149
"create",
150+
"create_portal_launch_session",
114151
"delete",
115152
"get",
153+
"get_portal_audit",
116154
"get_transactions",
117155
"list",
118156
"update"
119157
],
158+
"customer_subscriptions": [
159+
"delete",
160+
"get",
161+
"list",
162+
"update"
163+
],
120164
"discount_coupons": [
121165
"create",
122166
"get",
123167
"get_performance",
124168
"list"
125169
],
170+
"merchants": [
171+
"get",
172+
"get_arr",
173+
"get_balance",
174+
"get_mrr"
175+
],
126176
"organizations": [
127177
"get",
128178
"get_metrics",
129179
"list"
130180
],
131181
"payment_intents": [
132-
"create"
182+
"cancel",
183+
"create",
184+
"get"
133185
],
134186
"payment_links": [
135187
"create",
@@ -141,8 +193,12 @@
141193
"get",
142194
"list"
143195
],
196+
"payout": [
197+
"create_spi_payout"
198+
],
144199
"payouts": [
145-
"create_wave_payout"
200+
"create_wave_payout",
201+
"list"
146202
],
147203
"products": [
148204
"add_price",
@@ -151,14 +207,20 @@
151207
"list",
152208
"set_default_price"
153209
],
210+
"providers": [
211+
"list"
212+
],
154213
"refunds": [
155-
"create_wave_refund"
214+
"create",
215+
"get",
216+
"list"
156217
],
157218
"subscriptions": [
158219
"cancel",
159220
"find_by_customer",
160221
"get",
161-
"list"
222+
"list",
223+
"update"
162224
],
163225
"transactions": [
164226
"get",
@@ -169,8 +231,12 @@
169231
"list"
170232
],
171233
"webhooks": [
234+
"create",
235+
"delete",
172236
"get",
173237
"list",
238+
"retry_delivery",
239+
"test",
174240
"update"
175241
]
176242
}

lomi/services/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
from .accounts import AccountsService
22
from .beneficiary_payouts import BeneficiaryPayoutsService
3+
from .charge import ChargeService
34
from .charges import ChargesService
45
from .checkout_sessions import CheckoutSessionsService
6+
from .customer_subscriptions import CustomerSubscriptionsService
57
from .customers import CustomersService
68
from .discount_coupons import DiscountCouponsService
9+
from .merchants import MerchantsService
710
from .organizations import OrganizationsService
811
from .payment_intents import PaymentIntentsService
912
from .payment_links import PaymentLinksService
1013
from .payment_requests import PaymentRequestsService
14+
from .payout import PayoutService
1115
from .payouts import PayoutsService
1216
from .products import ProductsService
17+
from .providers import ProvidersService
1318
from .refunds import RefundsService
1419
from .subscriptions import SubscriptionsService
1520
from .transactions import TransactionsService

lomi/services/charge.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from __future__ import annotations
2+
3+
from typing import Any, Dict, Optional
4+
5+
from ..client_base import ClientBase
6+
7+
8+
class ChargeService(ClientBase):
9+
"""Public merchant API — generated from OpenAPI allowlist."""
10+
11+
def create_mtn_charge(self) -> Any:
12+
"""Lancer un encaissement direct MTN MoMo"""
13+
path = "/charge/mtn"
14+
return self._request("POST", path)
15+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
from __future__ import annotations
2+
3+
from typing import Any, Dict, Optional
4+
5+
from ..client_base import ClientBase
6+
7+
8+
class CustomerSubscriptionsService(ClientBase):
9+
"""Public merchant API — generated from OpenAPI allowlist."""
10+
11+
def delete(self, subscription_id: str) -> Any:
12+
"""Cancel customer subscription"""
13+
path = "/customer-subscriptions/{subscription_id}"
14+
path = path.replace("{subscription_id}", str(subscription_id))
15+
return self._request("DELETE", path)
16+
17+
def get(self, subscription_id: str) -> Any:
18+
"""Get customer subscription"""
19+
path = "/customer-subscriptions/{subscription_id}"
20+
path = path.replace("{subscription_id}", str(subscription_id))
21+
return self._request("GET", path)
22+
23+
def list(self, params: Optional[Dict[str, Any]] = None) -> Any:
24+
"""List customer subscriptions"""
25+
path = "/customer-subscriptions"
26+
return self._request("GET", path, params=params)
27+
28+
def update(self, subscription_id: str) -> Any:
29+
"""Update customer subscription"""
30+
path = "/customer-subscriptions/{subscription_id}"
31+
path = path.replace("{subscription_id}", str(subscription_id))
32+
return self._request("PATCH", path)
33+

lomi/services/customers.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ def create(self, body: Optional[Dict[str, Any]] = None) -> Any:
1313
path = "/customers"
1414
return self._request("POST", path, data=body)
1515

16+
def create_portal_launch_session(self, id: str, body: Optional[Dict[str, Any]] = None) -> Any:
17+
"""Créer une session de lancement du portail client"""
18+
path = "/customers/{id}/portal-launch-session"
19+
path = path.replace("{id}", str(id))
20+
return self._request("POST", path, data=body)
21+
1622
def delete(self, id: str) -> Any:
1723
"""Supprimer un client"""
1824
path = "/customers/{id}"
@@ -25,6 +31,12 @@ def get(self, id: str) -> Any:
2531
path = path.replace("{id}", str(id))
2632
return self._request("GET", path)
2733

34+
def get_portal_audit(self, id: str, params: Optional[Dict[str, Any]] = None) -> Any:
35+
"""Hosted customer portal audit"""
36+
path = "/customers/{id}/portal-audit"
37+
path = path.replace("{id}", str(id))
38+
return self._request("GET", path, params=params)
39+
2840
def get_transactions(self, id: str) -> Any:
2941
"""Transactions du client"""
3042
path = "/customers/{id}/transactions"

lomi/services/merchants.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
from __future__ import annotations
2+
3+
from typing import Any, Dict, Optional
4+
5+
from ..client_base import ClientBase
6+
7+
8+
class MerchantsService(ClientBase):
9+
"""Public merchant API — generated from OpenAPI allowlist."""
10+
11+
def get(self, id: str) -> Any:
12+
"""Get merchant details"""
13+
path = "/merchants/{id}"
14+
path = path.replace("{id}", str(id))
15+
return self._request("GET", path)
16+
17+
def get_arr(self, id: str) -> Any:
18+
"""Get merchant ARR"""
19+
path = "/merchants/{id}/arr"
20+
path = path.replace("{id}", str(id))
21+
return self._request("GET", path)
22+
23+
def get_balance(self, id: str, params: Optional[Dict[str, Any]] = None) -> Any:
24+
"""Get merchant account balance for a currency"""
25+
path = "/merchants/{id}/balance"
26+
path = path.replace("{id}", str(id))
27+
return self._request("GET", path, params=params)
28+
29+
def get_mrr(self, id: str) -> Any:
30+
"""Get merchant MRR"""
31+
path = "/merchants/{id}/mrr"
32+
path = path.replace("{id}", str(id))
33+
return self._request("GET", path)
34+

lomi/services/payment_intents.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,20 @@
88
class PaymentIntentsService(ClientBase):
99
"""Public merchant API — generated from OpenAPI allowlist."""
1010

11+
def cancel(self, id: str) -> Any:
12+
"""Annuler un intent de paiement carte"""
13+
path = "/payment-intents/{id}/cancel"
14+
path = path.replace("{id}", str(id))
15+
return self._request("POST", path)
16+
1117
def create(self, body: Optional[Dict[str, Any]] = None) -> Any:
12-
"""Créer un Payment Intent carte (client_secret)"""
18+
"""Créer un intent de paiement carte (client_secret)"""
1319
path = "/payment-intents"
1420
return self._request("POST", path, data=body)
1521

22+
def get(self, id: str) -> Any:
23+
"""Récupérer un intent de paiement carte"""
24+
path = "/payment-intents/{id}"
25+
path = path.replace("{id}", str(id))
26+
return self._request("GET", path)
27+

0 commit comments

Comments
 (0)