# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

import os
from typing import Any, cast

import pytest

from ali_test_2 import AliTest2, AsyncAliTest2
from tests.utils import assert_matches_type
from ali_test_2.types.api.v2 import (
    Order,
    CustomerCareOrder,
    OrderListResponse,
    OrderRetrieveResponse,
    OrderRetrieveApplePassesResponse,
    OrderRetrieveGooglePassesResponse,
    OrderTicketProtectionRedemptionResponse,
)

base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")


class TestOrders:
    parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])

    @pytest.mark.skip()
    @parametrize
    def test_method_create(self, client: AliTest2) -> None:
        order = client.api.v2.orders.create(
            country_code="1",
            device_data="deviceData",
            email="email",
            hold=0,
            is_guest_order=True,
            phone="+1 (333) 333-3333",
            pickup_name="pickupName",
        )
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_method_create_with_all_params(self, client: AliTest2) -> None:
        order = client.api.v2.orders.create(
            country_code="1",
            device_data="deviceData",
            email="email",
            hold=0,
            is_guest_order=True,
            phone="+1 (333) 333-3333",
            pickup_name="pickupName",
            agent_payment_reference="agentPaymentReference",
            amount=0,
            billing_zip="billingZip",
            checkout_type="BASKET",
            click_id="clickId",
            first_name="firstName",
            last_name="lastName",
            non_commissionable_markup_per_ticket=0,
            payment_details={
                "apple_pay_token": "applePayToken",
                "billing_zip": "billingZip",
                "cvv": "cvv",
                "encrypted_card_number": "encryptedCardNumber",
                "encrypted_expiry_month": "encryptedExpiryMonth",
                "encrypted_expiry_year": "encryptedExpiryYear",
                "encrypted_security_code": "encryptedSecurityCode",
                "google_pay_token": "googlePayToken",
                "payment_gateway_type": "BRAINTREE",
                "payment_nonce": "paymentNonce",
                "paypal_device_data": "paypalDeviceData",
                "upgraded3d_secure_nonce": "upgraded3dSecureNonce",
            },
            payment_gateway_type="PAYMENT_ON_ACCOUNT",
            payment_nonce="paymentNonce",
            paypal_device_data="paypalDeviceData",
            should_send_confirmation_email_override=True,
            upgraded3d_secure_nonce="upgraded3dSecureNonce",
        )
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_create(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.create(
            country_code="1",
            device_data="deviceData",
            email="email",
            hold=0,
            is_guest_order=True,
            phone="+1 (333) 333-3333",
            pickup_name="pickupName",
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_create(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.create(
            country_code="1",
            device_data="deviceData",
            email="email",
            hold=0,
            is_guest_order=True,
            phone="+1 (333) 333-3333",
            pickup_name="pickupName",
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert_matches_type(Order, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_method_retrieve(self, client: AliTest2) -> None:
        order = client.api.v2.orders.retrieve(
            hold_id="holdId",
        )
        assert_matches_type(OrderRetrieveResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_method_retrieve_with_all_params(self, client: AliTest2) -> None:
        order = client.api.v2.orders.retrieve(
            hold_id="holdId",
            secret="secret",
        )
        assert_matches_type(OrderRetrieveResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_retrieve(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.retrieve(
            hold_id="holdId",
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert_matches_type(OrderRetrieveResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_retrieve(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.retrieve(
            hold_id="holdId",
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert_matches_type(OrderRetrieveResponse, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_path_params_retrieve(self, client: AliTest2) -> None:
        with pytest.raises(ValueError, match=r"Expected a non-empty value for `hold_id` but received ''"):
            client.api.v2.orders.with_raw_response.retrieve(
                hold_id="",
            )

    @pytest.mark.skip()
    @parametrize
    def test_method_update(self, client: AliTest2) -> None:
        order = client.api.v2.orders.update(
            id="id",
        )
        assert_matches_type(object, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_method_update_with_all_params(self, client: AliTest2) -> None:
        order = client.api.v2.orders.update(
            id="id",
            country_code="1",
            customer="customer",
            email="email",
            phone="+1 (333) 333-3333",
            pickup_name="pickupName",
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert_matches_type(object, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_update(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.update(
            id="id",
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert_matches_type(object, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_update(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.update(
            id="id",
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert_matches_type(object, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_path_params_update(self, client: AliTest2) -> None:
        with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
            client.api.v2.orders.with_raw_response.update(
                id="",
            )

    @pytest.mark.skip()
    @parametrize
    def test_method_list(self, client: AliTest2) -> None:
        order = client.api.v2.orders.list()
        assert_matches_type(OrderListResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_method_list_with_all_params(self, client: AliTest2) -> None:
        order = client.api.v2.orders.list(
            customer="customer",
        )
        assert_matches_type(OrderListResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_list(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.list()

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert_matches_type(OrderListResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_list(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.list() as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert_matches_type(OrderListResponse, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_method_assigned_customers(self, client: AliTest2) -> None:
        order = client.api.v2.orders.assigned_customers(
            id=0,
            email="email",
            first_name="firstName",
            last_name="lastName",
        )
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_method_assigned_customers_with_all_params(self, client: AliTest2) -> None:
        order = client.api.v2.orders.assigned_customers(
            id=0,
            email="email",
            first_name="firstName",
            last_name="lastName",
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_assigned_customers(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.assigned_customers(
            id=0,
            email="email",
            first_name="firstName",
            last_name="lastName",
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_assigned_customers(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.assigned_customers(
            id=0,
            email="email",
            first_name="firstName",
            last_name="lastName",
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert_matches_type(Order, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_method_initiate_transfer(self, client: AliTest2) -> None:
        order = client.api.v2.orders.initiate_transfer(
            "confirmationNumber",
        )
        assert order is None

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_initiate_transfer(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.initiate_transfer(
            "confirmationNumber",
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert order is None

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_initiate_transfer(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.initiate_transfer(
            "confirmationNumber",
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert order is None

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_path_params_initiate_transfer(self, client: AliTest2) -> None:
        with pytest.raises(ValueError, match=r"Expected a non-empty value for `confirmation_number` but received ''"):
            client.api.v2.orders.with_raw_response.initiate_transfer(
                "",
            )

    @pytest.mark.skip()
    @parametrize
    def test_method_refund_voucher(self, client: AliTest2) -> None:
        order = client.api.v2.orders.refund_voucher(
            id=0,
        )
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_method_refund_voucher_with_all_params(self, client: AliTest2) -> None:
        order = client.api.v2.orders.refund_voucher(
            id=0,
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_refund_voucher(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.refund_voucher(
            id=0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_refund_voucher(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.refund_voucher(
            id=0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert_matches_type(CustomerCareOrder, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_method_reissue_ticket(self, client: AliTest2) -> None:
        order = client.api.v2.orders.reissue_ticket(
            0,
        )
        assert_matches_type(str, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_reissue_ticket(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.reissue_ticket(
            0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert_matches_type(str, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_reissue_ticket(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.reissue_ticket(
            0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert_matches_type(str, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_method_relist(self, client: AliTest2) -> None:
        order = client.api.v2.orders.relist(
            id=0,
        )
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_method_relist_with_all_params(self, client: AliTest2) -> None:
        order = client.api.v2.orders.relist(
            id=0,
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_relist(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.relist(
            id=0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_relist(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.relist(
            id=0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert_matches_type(CustomerCareOrder, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_method_resend_confirmation_email(self, client: AliTest2) -> None:
        order = client.api.v2.orders.resend_confirmation_email(
            id=0,
        )
        assert order is None

    @pytest.mark.skip()
    @parametrize
    def test_method_resend_confirmation_email_with_all_params(self, client: AliTest2) -> None:
        order = client.api.v2.orders.resend_confirmation_email(
            id=0,
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert order is None

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_resend_confirmation_email(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.resend_confirmation_email(
            id=0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert order is None

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_resend_confirmation_email(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.resend_confirmation_email(
            id=0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert order is None

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_method_retrieve_apple_passes(self, client: AliTest2) -> None:
        order = client.api.v2.orders.retrieve_apple_passes(
            0,
        )
        assert_matches_type(OrderRetrieveApplePassesResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_retrieve_apple_passes(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.retrieve_apple_passes(
            0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert_matches_type(OrderRetrieveApplePassesResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_retrieve_apple_passes(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.retrieve_apple_passes(
            0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert_matches_type(OrderRetrieveApplePassesResponse, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_method_retrieve_customer_care_information(self, client: AliTest2) -> None:
        order = client.api.v2.orders.retrieve_customer_care_information(
            confirmation_number="confirmationNumber",
            secret="secret",
        )
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_retrieve_customer_care_information(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.retrieve_customer_care_information(
            confirmation_number="confirmationNumber",
            secret="secret",
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_retrieve_customer_care_information(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.retrieve_customer_care_information(
            confirmation_number="confirmationNumber",
            secret="secret",
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert_matches_type(CustomerCareOrder, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_path_params_retrieve_customer_care_information(self, client: AliTest2) -> None:
        with pytest.raises(ValueError, match=r"Expected a non-empty value for `confirmation_number` but received ''"):
            client.api.v2.orders.with_raw_response.retrieve_customer_care_information(
                confirmation_number="",
                secret="secret",
            )

    @pytest.mark.skip()
    @parametrize
    def test_method_retrieve_google_passes(self, client: AliTest2) -> None:
        order = client.api.v2.orders.retrieve_google_passes(
            0,
        )
        assert_matches_type(OrderRetrieveGooglePassesResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_retrieve_google_passes(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.retrieve_google_passes(
            0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert_matches_type(OrderRetrieveGooglePassesResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_retrieve_google_passes(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.retrieve_google_passes(
            0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert_matches_type(OrderRetrieveGooglePassesResponse, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_method_retrieve_relist_info(self, client: AliTest2) -> None:
        order = client.api.v2.orders.retrieve_relist_info(
            id=0,
        )
        assert_matches_type(object, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_method_retrieve_relist_info_with_all_params(self, client: AliTest2) -> None:
        order = client.api.v2.orders.retrieve_relist_info(
            id=0,
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert_matches_type(object, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_retrieve_relist_info(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.retrieve_relist_info(
            id=0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert_matches_type(object, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_retrieve_relist_info(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.retrieve_relist_info(
            id=0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert_matches_type(object, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_method_ticket_protection_redemption(self, client: AliTest2) -> None:
        order = client.api.v2.orders.ticket_protection_redemption(
            id=0,
        )
        assert_matches_type(OrderTicketProtectionRedemptionResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_method_ticket_protection_redemption_with_all_params(self, client: AliTest2) -> None:
        order = client.api.v2.orders.ticket_protection_redemption(
            id=0,
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert_matches_type(OrderTicketProtectionRedemptionResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_ticket_protection_redemption(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.ticket_protection_redemption(
            id=0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert_matches_type(OrderTicketProtectionRedemptionResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_ticket_protection_redemption(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.ticket_protection_redemption(
            id=0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert_matches_type(OrderTicketProtectionRedemptionResponse, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_method_update_reclaim(self, client: AliTest2) -> None:
        order = client.api.v2.orders.update_reclaim(
            id=0,
        )
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_method_update_reclaim_with_all_params(self, client: AliTest2) -> None:
        order = client.api.v2.orders.update_reclaim(
            id=0,
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_update_reclaim(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.update_reclaim(
            id=0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_update_reclaim(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.update_reclaim(
            id=0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert_matches_type(Order, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_method_void(self, client: AliTest2) -> None:
        order = client.api.v2.orders.void(
            hold_id="holdId",
        )
        assert order is None

    @pytest.mark.skip()
    @parametrize
    def test_method_void_with_all_params(self, client: AliTest2) -> None:
        order = client.api.v2.orders.void(
            hold_id="holdId",
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert order is None

    @pytest.mark.skip()
    @parametrize
    def test_raw_response_void(self, client: AliTest2) -> None:
        response = client.api.v2.orders.with_raw_response.void(
            hold_id="holdId",
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = response.parse()
        assert order is None

    @pytest.mark.skip()
    @parametrize
    def test_streaming_response_void(self, client: AliTest2) -> None:
        with client.api.v2.orders.with_streaming_response.void(
            hold_id="holdId",
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = response.parse()
            assert order is None

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    def test_path_params_void(self, client: AliTest2) -> None:
        with pytest.raises(ValueError, match=r"Expected a non-empty value for `hold_id` but received ''"):
            client.api.v2.orders.with_raw_response.void(
                hold_id="",
            )


class TestAsyncOrders:
    parametrize = pytest.mark.parametrize(
        "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
    )

    @pytest.mark.skip()
    @parametrize
    async def test_method_create(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.create(
            country_code="1",
            device_data="deviceData",
            email="email",
            hold=0,
            is_guest_order=True,
            phone="+1 (333) 333-3333",
            pickup_name="pickupName",
        )
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_method_create_with_all_params(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.create(
            country_code="1",
            device_data="deviceData",
            email="email",
            hold=0,
            is_guest_order=True,
            phone="+1 (333) 333-3333",
            pickup_name="pickupName",
            agent_payment_reference="agentPaymentReference",
            amount=0,
            billing_zip="billingZip",
            checkout_type="BASKET",
            click_id="clickId",
            first_name="firstName",
            last_name="lastName",
            non_commissionable_markup_per_ticket=0,
            payment_details={
                "apple_pay_token": "applePayToken",
                "billing_zip": "billingZip",
                "cvv": "cvv",
                "encrypted_card_number": "encryptedCardNumber",
                "encrypted_expiry_month": "encryptedExpiryMonth",
                "encrypted_expiry_year": "encryptedExpiryYear",
                "encrypted_security_code": "encryptedSecurityCode",
                "google_pay_token": "googlePayToken",
                "payment_gateway_type": "BRAINTREE",
                "payment_nonce": "paymentNonce",
                "paypal_device_data": "paypalDeviceData",
                "upgraded3d_secure_nonce": "upgraded3dSecureNonce",
            },
            payment_gateway_type="PAYMENT_ON_ACCOUNT",
            payment_nonce="paymentNonce",
            paypal_device_data="paypalDeviceData",
            should_send_confirmation_email_override=True,
            upgraded3d_secure_nonce="upgraded3dSecureNonce",
        )
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_create(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.create(
            country_code="1",
            device_data="deviceData",
            email="email",
            hold=0,
            is_guest_order=True,
            phone="+1 (333) 333-3333",
            pickup_name="pickupName",
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_create(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.create(
            country_code="1",
            device_data="deviceData",
            email="email",
            hold=0,
            is_guest_order=True,
            phone="+1 (333) 333-3333",
            pickup_name="pickupName",
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert_matches_type(Order, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_method_retrieve(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.retrieve(
            hold_id="holdId",
        )
        assert_matches_type(OrderRetrieveResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_method_retrieve_with_all_params(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.retrieve(
            hold_id="holdId",
            secret="secret",
        )
        assert_matches_type(OrderRetrieveResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_retrieve(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.retrieve(
            hold_id="holdId",
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert_matches_type(OrderRetrieveResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_retrieve(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.retrieve(
            hold_id="holdId",
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert_matches_type(OrderRetrieveResponse, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_path_params_retrieve(self, async_client: AsyncAliTest2) -> None:
        with pytest.raises(ValueError, match=r"Expected a non-empty value for `hold_id` but received ''"):
            await async_client.api.v2.orders.with_raw_response.retrieve(
                hold_id="",
            )

    @pytest.mark.skip()
    @parametrize
    async def test_method_update(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.update(
            id="id",
        )
        assert_matches_type(object, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_method_update_with_all_params(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.update(
            id="id",
            country_code="1",
            customer="customer",
            email="email",
            phone="+1 (333) 333-3333",
            pickup_name="pickupName",
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert_matches_type(object, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_update(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.update(
            id="id",
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert_matches_type(object, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_update(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.update(
            id="id",
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert_matches_type(object, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_path_params_update(self, async_client: AsyncAliTest2) -> None:
        with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
            await async_client.api.v2.orders.with_raw_response.update(
                id="",
            )

    @pytest.mark.skip()
    @parametrize
    async def test_method_list(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.list()
        assert_matches_type(OrderListResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_method_list_with_all_params(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.list(
            customer="customer",
        )
        assert_matches_type(OrderListResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_list(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.list()

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert_matches_type(OrderListResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_list(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.list() as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert_matches_type(OrderListResponse, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_method_assigned_customers(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.assigned_customers(
            id=0,
            email="email",
            first_name="firstName",
            last_name="lastName",
        )
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_method_assigned_customers_with_all_params(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.assigned_customers(
            id=0,
            email="email",
            first_name="firstName",
            last_name="lastName",
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_assigned_customers(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.assigned_customers(
            id=0,
            email="email",
            first_name="firstName",
            last_name="lastName",
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_assigned_customers(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.assigned_customers(
            id=0,
            email="email",
            first_name="firstName",
            last_name="lastName",
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert_matches_type(Order, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_method_initiate_transfer(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.initiate_transfer(
            "confirmationNumber",
        )
        assert order is None

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_initiate_transfer(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.initiate_transfer(
            "confirmationNumber",
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert order is None

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_initiate_transfer(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.initiate_transfer(
            "confirmationNumber",
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert order is None

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_path_params_initiate_transfer(self, async_client: AsyncAliTest2) -> None:
        with pytest.raises(ValueError, match=r"Expected a non-empty value for `confirmation_number` but received ''"):
            await async_client.api.v2.orders.with_raw_response.initiate_transfer(
                "",
            )

    @pytest.mark.skip()
    @parametrize
    async def test_method_refund_voucher(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.refund_voucher(
            id=0,
        )
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_method_refund_voucher_with_all_params(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.refund_voucher(
            id=0,
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_refund_voucher(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.refund_voucher(
            id=0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_refund_voucher(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.refund_voucher(
            id=0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert_matches_type(CustomerCareOrder, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_method_reissue_ticket(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.reissue_ticket(
            0,
        )
        assert_matches_type(str, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_reissue_ticket(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.reissue_ticket(
            0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert_matches_type(str, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_reissue_ticket(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.reissue_ticket(
            0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert_matches_type(str, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_method_relist(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.relist(
            id=0,
        )
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_method_relist_with_all_params(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.relist(
            id=0,
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_relist(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.relist(
            id=0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_relist(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.relist(
            id=0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert_matches_type(CustomerCareOrder, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_method_resend_confirmation_email(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.resend_confirmation_email(
            id=0,
        )
        assert order is None

    @pytest.mark.skip()
    @parametrize
    async def test_method_resend_confirmation_email_with_all_params(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.resend_confirmation_email(
            id=0,
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert order is None

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_resend_confirmation_email(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.resend_confirmation_email(
            id=0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert order is None

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_resend_confirmation_email(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.resend_confirmation_email(
            id=0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert order is None

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_method_retrieve_apple_passes(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.retrieve_apple_passes(
            0,
        )
        assert_matches_type(OrderRetrieveApplePassesResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_retrieve_apple_passes(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.retrieve_apple_passes(
            0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert_matches_type(OrderRetrieveApplePassesResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_retrieve_apple_passes(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.retrieve_apple_passes(
            0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert_matches_type(OrderRetrieveApplePassesResponse, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_method_retrieve_customer_care_information(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.retrieve_customer_care_information(
            confirmation_number="confirmationNumber",
            secret="secret",
        )
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_retrieve_customer_care_information(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.retrieve_customer_care_information(
            confirmation_number="confirmationNumber",
            secret="secret",
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert_matches_type(CustomerCareOrder, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_retrieve_customer_care_information(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.retrieve_customer_care_information(
            confirmation_number="confirmationNumber",
            secret="secret",
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert_matches_type(CustomerCareOrder, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_path_params_retrieve_customer_care_information(self, async_client: AsyncAliTest2) -> None:
        with pytest.raises(ValueError, match=r"Expected a non-empty value for `confirmation_number` but received ''"):
            await async_client.api.v2.orders.with_raw_response.retrieve_customer_care_information(
                confirmation_number="",
                secret="secret",
            )

    @pytest.mark.skip()
    @parametrize
    async def test_method_retrieve_google_passes(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.retrieve_google_passes(
            0,
        )
        assert_matches_type(OrderRetrieveGooglePassesResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_retrieve_google_passes(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.retrieve_google_passes(
            0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert_matches_type(OrderRetrieveGooglePassesResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_retrieve_google_passes(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.retrieve_google_passes(
            0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert_matches_type(OrderRetrieveGooglePassesResponse, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_method_retrieve_relist_info(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.retrieve_relist_info(
            id=0,
        )
        assert_matches_type(object, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_method_retrieve_relist_info_with_all_params(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.retrieve_relist_info(
            id=0,
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert_matches_type(object, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_retrieve_relist_info(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.retrieve_relist_info(
            id=0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert_matches_type(object, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_retrieve_relist_info(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.retrieve_relist_info(
            id=0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert_matches_type(object, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_method_ticket_protection_redemption(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.ticket_protection_redemption(
            id=0,
        )
        assert_matches_type(OrderTicketProtectionRedemptionResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_method_ticket_protection_redemption_with_all_params(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.ticket_protection_redemption(
            id=0,
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert_matches_type(OrderTicketProtectionRedemptionResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_ticket_protection_redemption(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.ticket_protection_redemption(
            id=0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert_matches_type(OrderTicketProtectionRedemptionResponse, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_ticket_protection_redemption(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.ticket_protection_redemption(
            id=0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert_matches_type(OrderTicketProtectionRedemptionResponse, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_method_update_reclaim(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.update_reclaim(
            id=0,
        )
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_method_update_reclaim_with_all_params(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.update_reclaim(
            id=0,
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_update_reclaim(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.update_reclaim(
            id=0,
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert_matches_type(Order, order, path=["response"])

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_update_reclaim(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.update_reclaim(
            id=0,
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert_matches_type(Order, order, path=["response"])

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_method_void(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.void(
            hold_id="holdId",
        )
        assert order is None

    @pytest.mark.skip()
    @parametrize
    async def test_method_void_with_all_params(self, async_client: AsyncAliTest2) -> None:
        order = await async_client.api.v2.orders.void(
            hold_id="holdId",
            secret="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        )
        assert order is None

    @pytest.mark.skip()
    @parametrize
    async def test_raw_response_void(self, async_client: AsyncAliTest2) -> None:
        response = await async_client.api.v2.orders.with_raw_response.void(
            hold_id="holdId",
        )

        assert response.is_closed is True
        assert response.http_request.headers.get("X-Stainless-Lang") == "python"
        order = await response.parse()
        assert order is None

    @pytest.mark.skip()
    @parametrize
    async def test_streaming_response_void(self, async_client: AsyncAliTest2) -> None:
        async with async_client.api.v2.orders.with_streaming_response.void(
            hold_id="holdId",
        ) as response:
            assert not response.is_closed
            assert response.http_request.headers.get("X-Stainless-Lang") == "python"

            order = await response.parse()
            assert order is None

        assert cast(Any, response.is_closed) is True

    @pytest.mark.skip()
    @parametrize
    async def test_path_params_void(self, async_client: AsyncAliTest2) -> None:
        with pytest.raises(ValueError, match=r"Expected a non-empty value for `hold_id` but received ''"):
            await async_client.api.v2.orders.with_raw_response.void(
                hold_id="",
            )
