@@ -184,12 +184,13 @@ async def test_list_transactions(self, extend):
184184
185185 # Verify response structure
186186 assert isinstance (response , dict ), "Response should be a dictionary"
187- assert "transactions" in response , "Response should contain 'transactions ' key"
188- assert isinstance (response ["transactions" ], list ), "Transactions should be a list"
187+ assert "transactions" in response [ "report" ] , "Response should contain 'report ' key"
188+ assert isinstance (response ["report" ][ " transactions" ], list ), "Transactions should be a list"
189189
190190 # If there are transactions, verify their structure
191- if response ["transactions" ]:
192- transaction = response ["transactions" ][0 ]
191+ if response ["report" ] and response ["report" ]['transactions' ]:
192+ transactions = response ["report" ]['transactions' ]
193+ transaction = transactions [0 ]
193194 required_fields = ["id" , "status" , "virtualCardId" , "merchantName" , "type" , "authBillingAmountCents" ]
194195 for field in required_fields :
195196 assert field in transaction , f"Transaction should contain '{ field } ' field"
@@ -216,10 +217,11 @@ async def test_list_transactions_with_sorting(self, extend):
216217
217218 # Verify response contains transactions and basic structure
218219 assert isinstance (response , dict ), f"Response for sort { sort_field } should be a dictionary"
219- assert "transactions" in response , f"Response for sort { sort_field } should contain 'transactions' key"
220+ assert "report" in response , f"Response for sort { sort_field } should contain 'report' key"
221+ assert "transactions" in response ["report" ], f"Report should contain 'transactions' key"
220222
221223 # If we have enough data, test opposite sort direction for comparison
222- if len (response ["transactions" ]) > 1 :
224+ if len (response ["report" ][ " transactions" ]) > 1 :
223225 # Determine the field name and opposite sort field
224226 is_desc = sort_field .startswith ("-" )
225227 field_name = sort_field [1 :] if is_desc else sort_field
@@ -232,8 +234,8 @@ async def test_list_transactions_with_sorting(self, extend):
232234 )
233235
234236 # Get IDs in both sort orders for comparison
235- sorted_ids = [tx ["id" ] for tx in response ["transactions" ]]
236- opposite_sorted_ids = [tx ["id" ] for tx in opposite_response ["transactions" ]]
237+ sorted_ids = [tx ["id" ] for tx in response ["report" ][ " transactions" ]]
238+ opposite_sorted_ids = [tx ["id" ] for tx in opposite_response ["report" ][ " transactions" ]]
237239
238240 # If we have the same set of transactions in both responses,
239241 # verify that different sort directions produce different orders
@@ -469,8 +471,9 @@ async def test_create_receipt_attachment(self, extend):
469471
470472 # Retrieve a valid transaction id from existing transactions
471473 transactions_response = await extend .transactions .get_transactions (page = 0 , per_page = 1 )
472- assert transactions_response .get ("transactions" ), "No transactions available for testing receipt attachment"
473- transaction_id = transactions_response ["transactions" ][0 ]["id" ]
474+ assert transactions_response ["report" ][
475+ "transactions" ], "No transactions available for testing receipt attachment"
476+ transaction_id = transactions_response ["report" ]["transactions" ][0 ]["id" ]
474477
475478 # Call the receipt attachment upload method
476479 response = await extend .receipt_attachments .create_receipt_attachment (
0 commit comments