File: __init__.py

package info (click to toggle)
python-twilio 9.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,756 kB
  • sloc: python: 8,281; makefile: 65
file content (55 lines) | stat: -rw-r--r-- 1,569 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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