Skip to content

Commit b32c5c4

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#362)
1 parent c2a1922 commit b32c5c4

File tree

4 files changed

+21
-165
lines changed

4 files changed

+21
-165
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 93
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-f7a9ce053743cf34e86ef2a3fec65b24f39847fd7e09c89a61e8fe222ac33e01.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-af2e129bdcee200185e3fb82837268c03686680beafec3e04b3b17ba32782b48.yml

tests/api_resources/test_customers.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ class TestCustomers:
2525
def test_method_create(self, client: Orb) -> None:
2626
customer = client.customers.create(
2727
email="email",
28-
name="name",
28+
name="x",
2929
)
3030
assert_matches_type(Customer, customer, path=["response"])
3131

3232
@parametrize
3333
def test_method_create_with_all_params(self, client: Orb) -> None:
3434
customer = client.customers.create(
3535
email="email",
36-
name="name",
36+
name="x",
3737
accounting_sync_configuration={
3838
"accounting_providers": [
3939
{
@@ -89,7 +89,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None:
8989
def test_raw_response_create(self, client: Orb) -> None:
9090
response = client.customers.with_raw_response.create(
9191
email="email",
92-
name="name",
92+
name="x",
9393
)
9494

9595
assert response.is_closed is True
@@ -101,7 +101,7 @@ def test_raw_response_create(self, client: Orb) -> None:
101101
def test_streaming_response_create(self, client: Orb) -> None:
102102
with client.customers.with_streaming_response.create(
103103
email="email",
104-
name="name",
104+
name="x",
105105
) as response:
106106
assert not response.is_closed
107107
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -459,15 +459,15 @@ class TestAsyncCustomers:
459459
async def test_method_create(self, async_client: AsyncOrb) -> None:
460460
customer = await async_client.customers.create(
461461
email="email",
462-
name="name",
462+
name="x",
463463
)
464464
assert_matches_type(Customer, customer, path=["response"])
465465

466466
@parametrize
467467
async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> None:
468468
customer = await async_client.customers.create(
469469
email="email",
470-
name="name",
470+
name="x",
471471
accounting_sync_configuration={
472472
"accounting_providers": [
473473
{
@@ -523,7 +523,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No
523523
async def test_raw_response_create(self, async_client: AsyncOrb) -> None:
524524
response = await async_client.customers.with_raw_response.create(
525525
email="email",
526-
name="name",
526+
name="x",
527527
)
528528

529529
assert response.is_closed is True
@@ -535,7 +535,7 @@ async def test_raw_response_create(self, async_client: AsyncOrb) -> None:
535535
async def test_streaming_response_create(self, async_client: AsyncOrb) -> None:
536536
async with async_client.customers.with_streaming_response.create(
537537
email="email",
538-
name="name",
538+
name="x",
539539
) as response:
540540
assert not response.is_closed
541541
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

tests/api_resources/test_invoices.py

+8-152
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,7 @@ def test_method_create(self, client: Orb) -> None:
3636
"quantity": 1,
3737
"start_date": parse_date("2023-09-22"),
3838
"unit_config": {"unit_amount": "unit_amount"},
39-
},
40-
{
41-
"end_date": parse_date("2023-09-22"),
42-
"item_id": "4khy3nwzktxv7",
43-
"model_type": "unit",
44-
"name": "Line Item Name",
45-
"quantity": 1,
46-
"start_date": parse_date("2023-09-22"),
47-
"unit_config": {"unit_amount": "unit_amount"},
48-
},
49-
{
50-
"end_date": parse_date("2023-09-22"),
51-
"item_id": "4khy3nwzktxv7",
52-
"model_type": "unit",
53-
"name": "Line Item Name",
54-
"quantity": 1,
55-
"start_date": parse_date("2023-09-22"),
56-
"unit_config": {"unit_amount": "unit_amount"},
57-
},
39+
}
5840
],
5941
net_terms=0,
6042
)
@@ -74,25 +56,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None:
7456
"quantity": 1,
7557
"start_date": parse_date("2023-09-22"),
7658
"unit_config": {"unit_amount": "unit_amount"},
77-
},
78-
{
79-
"end_date": parse_date("2023-09-22"),
80-
"item_id": "4khy3nwzktxv7",
81-
"model_type": "unit",
82-
"name": "Line Item Name",
83-
"quantity": 1,
84-
"start_date": parse_date("2023-09-22"),
85-
"unit_config": {"unit_amount": "unit_amount"},
86-
},
87-
{
88-
"end_date": parse_date("2023-09-22"),
89-
"item_id": "4khy3nwzktxv7",
90-
"model_type": "unit",
91-
"name": "Line Item Name",
92-
"quantity": 1,
93-
"start_date": parse_date("2023-09-22"),
94-
"unit_config": {"unit_amount": "unit_amount"},
95-
},
59+
}
9660
],
9761
net_terms=0,
9862
customer_id="4khy3nwzktxv7",
@@ -123,25 +87,7 @@ def test_raw_response_create(self, client: Orb) -> None:
12387
"quantity": 1,
12488
"start_date": parse_date("2023-09-22"),
12589
"unit_config": {"unit_amount": "unit_amount"},
126-
},
127-
{
128-
"end_date": parse_date("2023-09-22"),
129-
"item_id": "4khy3nwzktxv7",
130-
"model_type": "unit",
131-
"name": "Line Item Name",
132-
"quantity": 1,
133-
"start_date": parse_date("2023-09-22"),
134-
"unit_config": {"unit_amount": "unit_amount"},
135-
},
136-
{
137-
"end_date": parse_date("2023-09-22"),
138-
"item_id": "4khy3nwzktxv7",
139-
"model_type": "unit",
140-
"name": "Line Item Name",
141-
"quantity": 1,
142-
"start_date": parse_date("2023-09-22"),
143-
"unit_config": {"unit_amount": "unit_amount"},
144-
},
90+
}
14591
],
14692
net_terms=0,
14793
)
@@ -165,25 +111,7 @@ def test_streaming_response_create(self, client: Orb) -> None:
165111
"quantity": 1,
166112
"start_date": parse_date("2023-09-22"),
167113
"unit_config": {"unit_amount": "unit_amount"},
168-
},
169-
{
170-
"end_date": parse_date("2023-09-22"),
171-
"item_id": "4khy3nwzktxv7",
172-
"model_type": "unit",
173-
"name": "Line Item Name",
174-
"quantity": 1,
175-
"start_date": parse_date("2023-09-22"),
176-
"unit_config": {"unit_amount": "unit_amount"},
177-
},
178-
{
179-
"end_date": parse_date("2023-09-22"),
180-
"item_id": "4khy3nwzktxv7",
181-
"model_type": "unit",
182-
"name": "Line Item Name",
183-
"quantity": 1,
184-
"start_date": parse_date("2023-09-22"),
185-
"unit_config": {"unit_amount": "unit_amount"},
186-
},
114+
}
187115
],
188116
net_terms=0,
189117
) as response:
@@ -507,25 +435,7 @@ async def test_method_create(self, async_client: AsyncOrb) -> None:
507435
"quantity": 1,
508436
"start_date": parse_date("2023-09-22"),
509437
"unit_config": {"unit_amount": "unit_amount"},
510-
},
511-
{
512-
"end_date": parse_date("2023-09-22"),
513-
"item_id": "4khy3nwzktxv7",
514-
"model_type": "unit",
515-
"name": "Line Item Name",
516-
"quantity": 1,
517-
"start_date": parse_date("2023-09-22"),
518-
"unit_config": {"unit_amount": "unit_amount"},
519-
},
520-
{
521-
"end_date": parse_date("2023-09-22"),
522-
"item_id": "4khy3nwzktxv7",
523-
"model_type": "unit",
524-
"name": "Line Item Name",
525-
"quantity": 1,
526-
"start_date": parse_date("2023-09-22"),
527-
"unit_config": {"unit_amount": "unit_amount"},
528-
},
438+
}
529439
],
530440
net_terms=0,
531441
)
@@ -545,25 +455,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No
545455
"quantity": 1,
546456
"start_date": parse_date("2023-09-22"),
547457
"unit_config": {"unit_amount": "unit_amount"},
548-
},
549-
{
550-
"end_date": parse_date("2023-09-22"),
551-
"item_id": "4khy3nwzktxv7",
552-
"model_type": "unit",
553-
"name": "Line Item Name",
554-
"quantity": 1,
555-
"start_date": parse_date("2023-09-22"),
556-
"unit_config": {"unit_amount": "unit_amount"},
557-
},
558-
{
559-
"end_date": parse_date("2023-09-22"),
560-
"item_id": "4khy3nwzktxv7",
561-
"model_type": "unit",
562-
"name": "Line Item Name",
563-
"quantity": 1,
564-
"start_date": parse_date("2023-09-22"),
565-
"unit_config": {"unit_amount": "unit_amount"},
566-
},
458+
}
567459
],
568460
net_terms=0,
569461
customer_id="4khy3nwzktxv7",
@@ -594,25 +486,7 @@ async def test_raw_response_create(self, async_client: AsyncOrb) -> None:
594486
"quantity": 1,
595487
"start_date": parse_date("2023-09-22"),
596488
"unit_config": {"unit_amount": "unit_amount"},
597-
},
598-
{
599-
"end_date": parse_date("2023-09-22"),
600-
"item_id": "4khy3nwzktxv7",
601-
"model_type": "unit",
602-
"name": "Line Item Name",
603-
"quantity": 1,
604-
"start_date": parse_date("2023-09-22"),
605-
"unit_config": {"unit_amount": "unit_amount"},
606-
},
607-
{
608-
"end_date": parse_date("2023-09-22"),
609-
"item_id": "4khy3nwzktxv7",
610-
"model_type": "unit",
611-
"name": "Line Item Name",
612-
"quantity": 1,
613-
"start_date": parse_date("2023-09-22"),
614-
"unit_config": {"unit_amount": "unit_amount"},
615-
},
489+
}
616490
],
617491
net_terms=0,
618492
)
@@ -636,25 +510,7 @@ async def test_streaming_response_create(self, async_client: AsyncOrb) -> None:
636510
"quantity": 1,
637511
"start_date": parse_date("2023-09-22"),
638512
"unit_config": {"unit_amount": "unit_amount"},
639-
},
640-
{
641-
"end_date": parse_date("2023-09-22"),
642-
"item_id": "4khy3nwzktxv7",
643-
"model_type": "unit",
644-
"name": "Line Item Name",
645-
"quantity": 1,
646-
"start_date": parse_date("2023-09-22"),
647-
"unit_config": {"unit_amount": "unit_amount"},
648-
},
649-
{
650-
"end_date": parse_date("2023-09-22"),
651-
"item_id": "4khy3nwzktxv7",
652-
"model_type": "unit",
653-
"name": "Line Item Name",
654-
"quantity": 1,
655-
"start_date": parse_date("2023-09-22"),
656-
"unit_config": {"unit_amount": "unit_amount"},
657-
},
513+
}
658514
],
659515
net_terms=0,
660516
) as response:

tests/test_client.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
766766

767767
respx_mock.post("/customers").mock(side_effect=retry_handler)
768768

769-
response = client.customers.with_raw_response.create(email="email", name="name")
769+
response = client.customers.with_raw_response.create(email="email", name="x")
770770

771771
assert response.retries_taken == failures_before_success
772772

@@ -789,7 +789,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
789789

790790
respx_mock.post("/customers").mock(side_effect=retry_handler)
791791

792-
with client.customers.with_streaming_response.create(email="email", name="name") as response:
792+
with client.customers.with_streaming_response.create(email="email", name="x") as response:
793793
assert response.retries_taken == failures_before_success
794794

795795

@@ -1531,7 +1531,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
15311531

15321532
respx_mock.post("/customers").mock(side_effect=retry_handler)
15331533

1534-
response = await client.customers.with_raw_response.create(email="email", name="name")
1534+
response = await client.customers.with_raw_response.create(email="email", name="x")
15351535

15361536
assert response.retries_taken == failures_before_success
15371537

@@ -1555,5 +1555,5 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
15551555

15561556
respx_mock.post("/customers").mock(side_effect=retry_handler)
15571557

1558-
async with client.customers.with_streaming_response.create(email="email", name="name") as response:
1558+
async with client.customers.with_streaming_response.create(email="email", name="x") as response:
15591559
assert response.retries_taken == failures_before_success

0 commit comments

Comments
 (0)