Skip to content

Commit f7f1858

Browse files
authored
Merge pull request #247 from dodopayments/stlc-generated-27691773345
ci: bump stlc to ac3fc71, refresh spec with ID path-param examples
2 parents bceb3c0 + 0fe99ef commit f7f1858

31 files changed

Lines changed: 699 additions & 663 deletions

scripts/mock

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/api_resources/credit_entitlements/test_balances.py

Lines changed: 84 additions & 84 deletions
Large diffs are not rendered by default.

tests/api_resources/customers/test_customer_portal.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ class TestCustomerPortal:
2020
@parametrize
2121
def test_method_create(self, client: DodoPayments) -> None:
2222
customer_portal = client.customers.customer_portal.create(
23-
customer_id="customer_id",
23+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
2424
)
2525
assert_matches_type(CustomerPortalSession, customer_portal, path=["response"])
2626

2727
@parametrize
2828
def test_method_create_with_all_params(self, client: DodoPayments) -> None:
2929
customer_portal = client.customers.customer_portal.create(
30-
customer_id="customer_id",
30+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
3131
return_url="return_url",
3232
send_email=True,
3333
)
@@ -36,7 +36,7 @@ def test_method_create_with_all_params(self, client: DodoPayments) -> None:
3636
@parametrize
3737
def test_raw_response_create(self, client: DodoPayments) -> None:
3838
response = client.customers.customer_portal.with_raw_response.create(
39-
customer_id="customer_id",
39+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
4040
)
4141

4242
assert response.is_closed is True
@@ -47,7 +47,7 @@ def test_raw_response_create(self, client: DodoPayments) -> None:
4747
@parametrize
4848
def test_streaming_response_create(self, client: DodoPayments) -> None:
4949
with client.customers.customer_portal.with_streaming_response.create(
50-
customer_id="customer_id",
50+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
5151
) as response:
5252
assert not response.is_closed
5353
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -73,14 +73,14 @@ class TestAsyncCustomerPortal:
7373
@parametrize
7474
async def test_method_create(self, async_client: AsyncDodoPayments) -> None:
7575
customer_portal = await async_client.customers.customer_portal.create(
76-
customer_id="customer_id",
76+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
7777
)
7878
assert_matches_type(CustomerPortalSession, customer_portal, path=["response"])
7979

8080
@parametrize
8181
async def test_method_create_with_all_params(self, async_client: AsyncDodoPayments) -> None:
8282
customer_portal = await async_client.customers.customer_portal.create(
83-
customer_id="customer_id",
83+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
8484
return_url="return_url",
8585
send_email=True,
8686
)
@@ -89,7 +89,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncDodoPaymen
8989
@parametrize
9090
async def test_raw_response_create(self, async_client: AsyncDodoPayments) -> None:
9191
response = await async_client.customers.customer_portal.with_raw_response.create(
92-
customer_id="customer_id",
92+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
9393
)
9494

9595
assert response.is_closed is True
@@ -100,7 +100,7 @@ async def test_raw_response_create(self, async_client: AsyncDodoPayments) -> Non
100100
@parametrize
101101
async def test_streaming_response_create(self, async_client: AsyncDodoPayments) -> None:
102102
async with async_client.customers.customer_portal.with_streaming_response.create(
103-
customer_id="customer_id",
103+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
104104
) as response:
105105
assert not response.is_closed
106106
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

tests/api_resources/customers/test_wallets.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ class TestWallets:
2020
@parametrize
2121
def test_method_list(self, client: DodoPayments) -> None:
2222
wallet = client.customers.wallets.list(
23-
"customer_id",
23+
"cus_TV52uJWWXt2yIoBBxpjaa",
2424
)
2525
assert_matches_type(WalletListResponse, wallet, path=["response"])
2626

2727
@parametrize
2828
def test_raw_response_list(self, client: DodoPayments) -> None:
2929
response = client.customers.wallets.with_raw_response.list(
30-
"customer_id",
30+
"cus_TV52uJWWXt2yIoBBxpjaa",
3131
)
3232

3333
assert response.is_closed is True
@@ -38,7 +38,7 @@ def test_raw_response_list(self, client: DodoPayments) -> None:
3838
@parametrize
3939
def test_streaming_response_list(self, client: DodoPayments) -> None:
4040
with client.customers.wallets.with_streaming_response.list(
41-
"customer_id",
41+
"cus_TV52uJWWXt2yIoBBxpjaa",
4242
) as response:
4343
assert not response.is_closed
4444
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -64,14 +64,14 @@ class TestAsyncWallets:
6464
@parametrize
6565
async def test_method_list(self, async_client: AsyncDodoPayments) -> None:
6666
wallet = await async_client.customers.wallets.list(
67-
"customer_id",
67+
"cus_TV52uJWWXt2yIoBBxpjaa",
6868
)
6969
assert_matches_type(WalletListResponse, wallet, path=["response"])
7070

7171
@parametrize
7272
async def test_raw_response_list(self, async_client: AsyncDodoPayments) -> None:
7373
response = await async_client.customers.wallets.with_raw_response.list(
74-
"customer_id",
74+
"cus_TV52uJWWXt2yIoBBxpjaa",
7575
)
7676

7777
assert response.is_closed is True
@@ -82,7 +82,7 @@ async def test_raw_response_list(self, async_client: AsyncDodoPayments) -> None:
8282
@parametrize
8383
async def test_streaming_response_list(self, async_client: AsyncDodoPayments) -> None:
8484
async with async_client.customers.wallets.with_streaming_response.list(
85-
"customer_id",
85+
"cus_TV52uJWWXt2yIoBBxpjaa",
8686
) as response:
8787
assert not response.is_closed
8888
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

tests/api_resources/customers/wallets/test_ledger_entries.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class TestLedgerEntries:
2424
@parametrize
2525
def test_method_create(self, client: DodoPayments) -> None:
2626
ledger_entry = client.customers.wallets.ledger_entries.create(
27-
customer_id="customer_id",
27+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
2828
amount=0,
2929
currency="AED",
3030
entry_type="credit",
@@ -34,7 +34,7 @@ def test_method_create(self, client: DodoPayments) -> None:
3434
@parametrize
3535
def test_method_create_with_all_params(self, client: DodoPayments) -> None:
3636
ledger_entry = client.customers.wallets.ledger_entries.create(
37-
customer_id="customer_id",
37+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
3838
amount=0,
3939
currency="AED",
4040
entry_type="credit",
@@ -46,7 +46,7 @@ def test_method_create_with_all_params(self, client: DodoPayments) -> None:
4646
@parametrize
4747
def test_raw_response_create(self, client: DodoPayments) -> None:
4848
response = client.customers.wallets.ledger_entries.with_raw_response.create(
49-
customer_id="customer_id",
49+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
5050
amount=0,
5151
currency="AED",
5252
entry_type="credit",
@@ -60,7 +60,7 @@ def test_raw_response_create(self, client: DodoPayments) -> None:
6060
@parametrize
6161
def test_streaming_response_create(self, client: DodoPayments) -> None:
6262
with client.customers.wallets.ledger_entries.with_streaming_response.create(
63-
customer_id="customer_id",
63+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
6464
amount=0,
6565
currency="AED",
6666
entry_type="credit",
@@ -86,14 +86,14 @@ def test_path_params_create(self, client: DodoPayments) -> None:
8686
@parametrize
8787
def test_method_list(self, client: DodoPayments) -> None:
8888
ledger_entry = client.customers.wallets.ledger_entries.list(
89-
customer_id="customer_id",
89+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
9090
)
9191
assert_matches_type(SyncDefaultPageNumberPagination[CustomerWalletTransaction], ledger_entry, path=["response"])
9292

9393
@parametrize
9494
def test_method_list_with_all_params(self, client: DodoPayments) -> None:
9595
ledger_entry = client.customers.wallets.ledger_entries.list(
96-
customer_id="customer_id",
96+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
9797
currency="AED",
9898
page_number=0,
9999
page_size=0,
@@ -103,7 +103,7 @@ def test_method_list_with_all_params(self, client: DodoPayments) -> None:
103103
@parametrize
104104
def test_raw_response_list(self, client: DodoPayments) -> None:
105105
response = client.customers.wallets.ledger_entries.with_raw_response.list(
106-
customer_id="customer_id",
106+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
107107
)
108108

109109
assert response.is_closed is True
@@ -114,7 +114,7 @@ def test_raw_response_list(self, client: DodoPayments) -> None:
114114
@parametrize
115115
def test_streaming_response_list(self, client: DodoPayments) -> None:
116116
with client.customers.wallets.ledger_entries.with_streaming_response.list(
117-
customer_id="customer_id",
117+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
118118
) as response:
119119
assert not response.is_closed
120120
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -142,7 +142,7 @@ class TestAsyncLedgerEntries:
142142
@parametrize
143143
async def test_method_create(self, async_client: AsyncDodoPayments) -> None:
144144
ledger_entry = await async_client.customers.wallets.ledger_entries.create(
145-
customer_id="customer_id",
145+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
146146
amount=0,
147147
currency="AED",
148148
entry_type="credit",
@@ -152,7 +152,7 @@ async def test_method_create(self, async_client: AsyncDodoPayments) -> None:
152152
@parametrize
153153
async def test_method_create_with_all_params(self, async_client: AsyncDodoPayments) -> None:
154154
ledger_entry = await async_client.customers.wallets.ledger_entries.create(
155-
customer_id="customer_id",
155+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
156156
amount=0,
157157
currency="AED",
158158
entry_type="credit",
@@ -164,7 +164,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncDodoPaymen
164164
@parametrize
165165
async def test_raw_response_create(self, async_client: AsyncDodoPayments) -> None:
166166
response = await async_client.customers.wallets.ledger_entries.with_raw_response.create(
167-
customer_id="customer_id",
167+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
168168
amount=0,
169169
currency="AED",
170170
entry_type="credit",
@@ -178,7 +178,7 @@ async def test_raw_response_create(self, async_client: AsyncDodoPayments) -> Non
178178
@parametrize
179179
async def test_streaming_response_create(self, async_client: AsyncDodoPayments) -> None:
180180
async with async_client.customers.wallets.ledger_entries.with_streaming_response.create(
181-
customer_id="customer_id",
181+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
182182
amount=0,
183183
currency="AED",
184184
entry_type="credit",
@@ -204,7 +204,7 @@ async def test_path_params_create(self, async_client: AsyncDodoPayments) -> None
204204
@parametrize
205205
async def test_method_list(self, async_client: AsyncDodoPayments) -> None:
206206
ledger_entry = await async_client.customers.wallets.ledger_entries.list(
207-
customer_id="customer_id",
207+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
208208
)
209209
assert_matches_type(
210210
AsyncDefaultPageNumberPagination[CustomerWalletTransaction], ledger_entry, path=["response"]
@@ -213,7 +213,7 @@ async def test_method_list(self, async_client: AsyncDodoPayments) -> None:
213213
@parametrize
214214
async def test_method_list_with_all_params(self, async_client: AsyncDodoPayments) -> None:
215215
ledger_entry = await async_client.customers.wallets.ledger_entries.list(
216-
customer_id="customer_id",
216+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
217217
currency="AED",
218218
page_number=0,
219219
page_size=0,
@@ -225,7 +225,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncDodoPayments
225225
@parametrize
226226
async def test_raw_response_list(self, async_client: AsyncDodoPayments) -> None:
227227
response = await async_client.customers.wallets.ledger_entries.with_raw_response.list(
228-
customer_id="customer_id",
228+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
229229
)
230230

231231
assert response.is_closed is True
@@ -238,7 +238,7 @@ async def test_raw_response_list(self, async_client: AsyncDodoPayments) -> None:
238238
@parametrize
239239
async def test_streaming_response_list(self, async_client: AsyncDodoPayments) -> None:
240240
async with async_client.customers.wallets.ledger_entries.with_streaming_response.list(
241-
customer_id="customer_id",
241+
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
242242
) as response:
243243
assert not response.is_closed
244244
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

tests/api_resources/entitlements/test_files.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ class TestFiles:
2121
def test_method_delete(self, client: DodoPayments) -> None:
2222
file = client.entitlements.files.delete(
2323
file_id="file_id",
24-
id="id",
24+
id="ent_jt7jcvI79Xh8eehqgWdcm",
2525
)
2626
assert file is None
2727

2828
@parametrize
2929
def test_raw_response_delete(self, client: DodoPayments) -> None:
3030
response = client.entitlements.files.with_raw_response.delete(
3131
file_id="file_id",
32-
id="id",
32+
id="ent_jt7jcvI79Xh8eehqgWdcm",
3333
)
3434

3535
assert response.is_closed is True
@@ -41,7 +41,7 @@ def test_raw_response_delete(self, client: DodoPayments) -> None:
4141
def test_streaming_response_delete(self, client: DodoPayments) -> None:
4242
with client.entitlements.files.with_streaming_response.delete(
4343
file_id="file_id",
44-
id="id",
44+
id="ent_jt7jcvI79Xh8eehqgWdcm",
4545
) as response:
4646
assert not response.is_closed
4747
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -62,20 +62,20 @@ def test_path_params_delete(self, client: DodoPayments) -> None:
6262
with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"):
6363
client.entitlements.files.with_raw_response.delete(
6464
file_id="",
65-
id="id",
65+
id="ent_jt7jcvI79Xh8eehqgWdcm",
6666
)
6767

6868
@parametrize
6969
def test_method_upload(self, client: DodoPayments) -> None:
7070
file = client.entitlements.files.upload(
71-
"id",
71+
"ent_jt7jcvI79Xh8eehqgWdcm",
7272
)
7373
assert_matches_type(FileUploadResponse, file, path=["response"])
7474

7575
@parametrize
7676
def test_raw_response_upload(self, client: DodoPayments) -> None:
7777
response = client.entitlements.files.with_raw_response.upload(
78-
"id",
78+
"ent_jt7jcvI79Xh8eehqgWdcm",
7979
)
8080

8181
assert response.is_closed is True
@@ -86,7 +86,7 @@ def test_raw_response_upload(self, client: DodoPayments) -> None:
8686
@parametrize
8787
def test_streaming_response_upload(self, client: DodoPayments) -> None:
8888
with client.entitlements.files.with_streaming_response.upload(
89-
"id",
89+
"ent_jt7jcvI79Xh8eehqgWdcm",
9090
) as response:
9191
assert not response.is_closed
9292
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -113,15 +113,15 @@ class TestAsyncFiles:
113113
async def test_method_delete(self, async_client: AsyncDodoPayments) -> None:
114114
file = await async_client.entitlements.files.delete(
115115
file_id="file_id",
116-
id="id",
116+
id="ent_jt7jcvI79Xh8eehqgWdcm",
117117
)
118118
assert file is None
119119

120120
@parametrize
121121
async def test_raw_response_delete(self, async_client: AsyncDodoPayments) -> None:
122122
response = await async_client.entitlements.files.with_raw_response.delete(
123123
file_id="file_id",
124-
id="id",
124+
id="ent_jt7jcvI79Xh8eehqgWdcm",
125125
)
126126

127127
assert response.is_closed is True
@@ -133,7 +133,7 @@ async def test_raw_response_delete(self, async_client: AsyncDodoPayments) -> Non
133133
async def test_streaming_response_delete(self, async_client: AsyncDodoPayments) -> None:
134134
async with async_client.entitlements.files.with_streaming_response.delete(
135135
file_id="file_id",
136-
id="id",
136+
id="ent_jt7jcvI79Xh8eehqgWdcm",
137137
) as response:
138138
assert not response.is_closed
139139
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -154,20 +154,20 @@ async def test_path_params_delete(self, async_client: AsyncDodoPayments) -> None
154154
with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"):
155155
await async_client.entitlements.files.with_raw_response.delete(
156156
file_id="",
157-
id="id",
157+
id="ent_jt7jcvI79Xh8eehqgWdcm",
158158
)
159159

160160
@parametrize
161161
async def test_method_upload(self, async_client: AsyncDodoPayments) -> None:
162162
file = await async_client.entitlements.files.upload(
163-
"id",
163+
"ent_jt7jcvI79Xh8eehqgWdcm",
164164
)
165165
assert_matches_type(FileUploadResponse, file, path=["response"])
166166

167167
@parametrize
168168
async def test_raw_response_upload(self, async_client: AsyncDodoPayments) -> None:
169169
response = await async_client.entitlements.files.with_raw_response.upload(
170-
"id",
170+
"ent_jt7jcvI79Xh8eehqgWdcm",
171171
)
172172

173173
assert response.is_closed is True
@@ -178,7 +178,7 @@ async def test_raw_response_upload(self, async_client: AsyncDodoPayments) -> Non
178178
@parametrize
179179
async def test_streaming_response_upload(self, async_client: AsyncDodoPayments) -> None:
180180
async with async_client.entitlements.files.with_streaming_response.upload(
181-
"id",
181+
"ent_jt7jcvI79Xh8eehqgWdcm",
182182
) as response:
183183
assert not response.is_closed
184184
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

0 commit comments

Comments
 (0)