HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib/python3.10/site-packages/twilio/rest/pricing/__init__.py
from warnings import warn

from twilio.rest.pricing.PricingBase import PricingBase
from twilio.rest.pricing.v1.messaging import MessagingList
from twilio.rest.pricing.v1.phone_number import PhoneNumberList
from twilio.rest.pricing.v2.country import CountryList
from twilio.rest.pricing.v2.number import NumberList
from twilio.rest.pricing.v2.voice import VoiceList


class Pricing(PricingBase):
    @property
    def messaging(self) -> MessagingList:
        warn(
            "messaging is deprecated. Use v1.messaging instead.",
            DeprecationWarning,
            stacklevel=2,
        )
        return self.v1.messaging

    @property
    def phone_numbers(self) -> PhoneNumberList:
        warn(
            "phone_numbers is deprecated. Use v1.phone_numbers instead.",
            DeprecationWarning,
            stacklevel=2,
        )
        return self.v1.phone_numbers

    @property
    def voice(self) -> VoiceList:
        warn(
            "voice is deprecated. Use v2.voice instead.",
            DeprecationWarning,
            stacklevel=2,
        )
        return self.v2.voice

    @property
    def countries(self) -> CountryList:
        warn(
            "countries is deprecated. Use v2.countries instead.",
            DeprecationWarning,
            stacklevel=2,
        )
        return self.v2.countries

    @property
    def numbers(self) -> NumberList:
        warn(
            "numbers is deprecated. Use v2.numbers instead.",
            DeprecationWarning,
            stacklevel=2,
        )
        return self.v2.numbers