Skip to content

Commit d925aca

Browse files
Merge changes from stripe/stripe-python master
2 parents 93a0159 + bfb694b commit d925aca

File tree

3 files changed

+56
-57
lines changed

3 files changed

+56
-57
lines changed

stripe/checkout/_session.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5023,6 +5023,10 @@ class RetrieveParams(RequestOptions):
50235023
"""
50245024
Information about the customer collected within the Checkout Session.
50255025
"""
5026+
collected_information: Optional[CollectedInformation]
5027+
"""
5028+
Information about the customer collected within the Checkout Session.
5029+
"""
50265030
consent: Optional[Consent]
50275031
"""
50285032
Results of `consent_collection` for this session.

tests/api_resources/test_invoice.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,6 @@ def test_can_send_invoice_classmethod(self, http_client_mock):
117117
)
118118
assert isinstance(resource, stripe.Invoice)
119119

120-
def test_can_upcoming(self, http_client_mock):
121-
resource = stripe.Invoice.upcoming(customer="cus_123")
122-
http_client_mock.assert_requested("get", path="/v1/invoices/upcoming")
123-
assert isinstance(resource, stripe.Invoice)
124-
125120
def test_can_void_invoice(self, http_client_mock):
126121
resource = stripe.Invoice.retrieve(TEST_RESOURCE_ID)
127122
resource = resource.void_invoice()

tests/api_resources/test_list_object.py

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import pytest
44

55
import stripe
6-
from tests.http_client_mock import HTTPClientMock
76

87

98
class TestListObject(object):
@@ -428,57 +427,58 @@ def test_forwards_api_key_to_nested_resources(self, http_client_mock):
428427
)
429428
assert lo.data[0].api_key == "sk_test_iter_forwards_options"
430429

431-
def test_iter_with_params(self, http_client_mock: HTTPClientMock):
432-
http_client_mock.stub_request(
433-
"get",
434-
path="/v1/invoices/upcoming/lines",
435-
query_string="customer=cus_123&expand[0]=data.price&limit=1",
436-
rbody=json.dumps(
437-
{
438-
"object": "list",
439-
"data": [
440-
{
441-
"id": "prod_001",
442-
"object": "product",
443-
"price": {"object": "price", "id": "price_123"},
444-
}
445-
],
446-
"url": "/v1/invoices/upcoming/lines?customer=cus_123&expand%5B%5D=data.price",
447-
"has_more": True,
448-
}
449-
),
450-
)
451-
# second page
452-
http_client_mock.stub_request(
453-
"get",
454-
path="/v1/invoices/upcoming/lines",
455-
query_string="customer=cus_123&expand[0]=data.price&limit=1&starting_after=prod_001",
456-
rbody=json.dumps(
457-
{
458-
"object": "list",
459-
"data": [
460-
{
461-
"id": "prod_002",
462-
"object": "product",
463-
"price": {"object": "price", "id": "price_123"},
464-
}
465-
],
466-
"url": "/v1/invoices/upcoming/lines?customer=cus_123&expand%5B%5D=data.price",
467-
"has_more": False,
468-
}
469-
),
470-
)
471-
472-
lo = stripe.Invoice.upcoming_lines(
473-
api_key="sk_test_invoice_lines",
474-
customer="cus_123",
475-
expand=["data.price"],
476-
limit=1,
477-
)
478-
479-
seen = [item["id"] for item in lo.auto_paging_iter()]
480-
481-
assert seen == ["prod_001", "prod_002"]
430+
# TODO(xavdid): re-add test with a new endpoint
431+
# def test_iter_with_params(self, http_client_mock: HTTPClientMock):
432+
# http_client_mock.stub_request(
433+
# "get",
434+
# path="/v1/invoices/upcoming/lines",
435+
# query_string="customer=cus_123&expand[0]=data.price&limit=1",
436+
# rbody=json.dumps(
437+
# {
438+
# "object": "list",
439+
# "data": [
440+
# {
441+
# "id": "prod_001",
442+
# "object": "product",
443+
# "price": {"object": "price", "id": "price_123"},
444+
# }
445+
# ],
446+
# "url": "/v1/invoices/upcoming/lines?customer=cus_123&expand%5B%5D=data.price",
447+
# "has_more": True,
448+
# }
449+
# ),
450+
# )
451+
# # second page
452+
# http_client_mock.stub_request(
453+
# "get",
454+
# path="/v1/invoices/upcoming/lines",
455+
# query_string="customer=cus_123&expand[0]=data.price&limit=1&starting_after=prod_001",
456+
# rbody=json.dumps(
457+
# {
458+
# "object": "list",
459+
# "data": [
460+
# {
461+
# "id": "prod_002",
462+
# "object": "product",
463+
# "price": {"object": "price", "id": "price_123"},
464+
# }
465+
# ],
466+
# "url": "/v1/invoices/upcoming/lines?customer=cus_123&expand%5B%5D=data.price",
467+
# "has_more": False,
468+
# }
469+
# ),
470+
# )
471+
472+
# lo = stripe.Invoice.upcoming_lines(
473+
# api_key="sk_test_invoice_lines",
474+
# customer="cus_123",
475+
# expand=["data.price"],
476+
# limit=1,
477+
# )
478+
479+
# seen = [item["id"] for item in lo.auto_paging_iter()]
480+
481+
# assert seen == ["prod_001", "prod_002"]
482482

483483

484484
class TestAutoPagingAsync:

0 commit comments

Comments
 (0)