|
17 | 17 | from .. import models as _models
|
18 | 18 |
|
19 | 19 |
|
20 |
| -class AvailablePhoneNumber(_serialization.Model): |
21 |
| - """Represents a phone number available in inventory. |
22 |
| -
|
23 |
| - Variables are only populated by the server, and will be ignored when sending a request. |
24 |
| -
|
25 |
| - All required parameters must be populated in order to send to server. |
26 |
| -
|
27 |
| - :ivar id: The id of the phone number. Required. |
28 |
| - :vartype id: str |
29 |
| - :ivar country_code: The ISO 3166-2 country code, e.g. US. Required. |
30 |
| - :vartype country_code: str |
31 |
| - :ivar phone_number: The phone number in E.164 format, e.g. +11234567890. Required. |
32 |
| - :vartype phone_number: str |
33 |
| - :ivar capabilities: Capabilities of a phone number. Required. |
34 |
| - :vartype capabilities: ~azure.communication.phonenumbers.models.PhoneNumberCapabilities |
35 |
| - :ivar phone_number_type: Represents the number type of the offering. Required. Known values |
36 |
| - are: "geographic" and "tollFree". |
37 |
| - :vartype phone_number_type: str or ~azure.communication.phonenumbers.models.PhoneNumberType |
38 |
| - :ivar assignment_type: Represents the assignment type of the offering. Also known as the use |
39 |
| - case. Required. Known values are: "person" and "application". |
40 |
| - :vartype assignment_type: str or |
41 |
| - ~azure.communication.phonenumbers.models.PhoneNumberAssignmentType |
42 |
| - :ivar cost: Required. |
43 |
| - :vartype cost: ~azure.communication.phonenumbers.models.AvailablePhoneNumberCost |
44 |
| - """ |
45 |
| - |
46 |
| - _validation = { |
47 |
| - "id": {"required": True, "readonly": True}, |
48 |
| - "country_code": {"required": True}, |
49 |
| - "phone_number": {"required": True, "readonly": True}, |
50 |
| - "capabilities": {"required": True}, |
51 |
| - "phone_number_type": {"required": True}, |
52 |
| - "assignment_type": {"required": True}, |
53 |
| - "cost": {"required": True, "readonly": True}, |
54 |
| - } |
55 |
| - |
56 |
| - _attribute_map = { |
57 |
| - "id": {"key": "id", "type": "str"}, |
58 |
| - "country_code": {"key": "countryCode", "type": "str"}, |
59 |
| - "phone_number": {"key": "phoneNumber", "type": "str"}, |
60 |
| - "capabilities": {"key": "capabilities", "type": "PhoneNumberCapabilities"}, |
61 |
| - "phone_number_type": {"key": "phoneNumberType", "type": "str"}, |
62 |
| - "assignment_type": {"key": "assignmentType", "type": "str"}, |
63 |
| - "cost": {"key": "cost", "type": "AvailablePhoneNumberCost"}, |
64 |
| - } |
65 |
| - |
66 |
| - def __init__( |
67 |
| - self, |
68 |
| - *, |
69 |
| - country_code: str, |
70 |
| - capabilities: "_models.PhoneNumberCapabilities", |
71 |
| - phone_number_type: Union[str, "_models.PhoneNumberType"], |
72 |
| - assignment_type: Union[str, "_models.PhoneNumberAssignmentType"], |
73 |
| - **kwargs: Any |
74 |
| - ) -> None: |
75 |
| - """ |
76 |
| - :keyword country_code: The ISO 3166-2 country code, e.g. US. Required. |
77 |
| - :paramtype country_code: str |
78 |
| - :keyword capabilities: Capabilities of a phone number. Required. |
79 |
| - :paramtype capabilities: ~azure.communication.phonenumbers.models.PhoneNumberCapabilities |
80 |
| - :keyword phone_number_type: Represents the number type of the offering. Required. Known values |
81 |
| - are: "geographic" and "tollFree". |
82 |
| - :paramtype phone_number_type: str or ~azure.communication.phonenumbers.models.PhoneNumberType |
83 |
| - :keyword assignment_type: Represents the assignment type of the offering. Also known as the use |
84 |
| - case. Required. Known values are: "person" and "application". |
85 |
| - :paramtype assignment_type: str or |
86 |
| - ~azure.communication.phonenumbers.models.PhoneNumberAssignmentType |
87 |
| - """ |
88 |
| - super().__init__(**kwargs) |
89 |
| - self.id = None |
90 |
| - self.country_code = country_code |
91 |
| - self.phone_number = None |
92 |
| - self.capabilities = capabilities |
93 |
| - self.phone_number_type = phone_number_type |
94 |
| - self.assignment_type = assignment_type |
95 |
| - self.cost = None |
96 |
| - |
97 |
| - |
98 |
| -class PhoneNumberCost(_serialization.Model): |
99 |
| - """The incurred cost for a single phone number. |
100 |
| -
|
101 |
| - All required parameters must be populated in order to send to server. |
102 |
| -
|
103 |
| - :ivar amount: The cost amount. Required. |
104 |
| - :vartype amount: float |
105 |
| - :ivar currency_code: The ISO 4217 currency code for the cost amount, e.g. USD. Required. |
106 |
| - :vartype currency_code: str |
107 |
| - :ivar billing_frequency: The frequency with which the cost gets billed. Required. "monthly" |
108 |
| - :vartype billing_frequency: str or ~azure.communication.phonenumbers.models.BillingFrequency |
109 |
| - """ |
110 |
| - |
111 |
| - _validation = { |
112 |
| - "amount": {"required": True}, |
113 |
| - "currency_code": {"required": True}, |
114 |
| - "billing_frequency": {"required": True}, |
115 |
| - } |
116 |
| - |
117 |
| - _attribute_map = { |
118 |
| - "amount": {"key": "amount", "type": "float"}, |
119 |
| - "currency_code": {"key": "currencyCode", "type": "str"}, |
120 |
| - "billing_frequency": {"key": "billingFrequency", "type": "str"}, |
121 |
| - } |
122 |
| - |
123 |
| - def __init__( |
124 |
| - self, |
125 |
| - *, |
126 |
| - amount: float, |
127 |
| - currency_code: str, |
128 |
| - billing_frequency: Union[str, "_models.BillingFrequency"], |
129 |
| - **kwargs: Any |
130 |
| - ) -> None: |
131 |
| - """ |
132 |
| - :keyword amount: The cost amount. Required. |
133 |
| - :paramtype amount: float |
134 |
| - :keyword currency_code: The ISO 4217 currency code for the cost amount, e.g. USD. Required. |
135 |
| - :paramtype currency_code: str |
136 |
| - :keyword billing_frequency: The frequency with which the cost gets billed. Required. "monthly" |
137 |
| - :paramtype billing_frequency: str or ~azure.communication.phonenumbers.models.BillingFrequency |
138 |
| - """ |
139 |
| - super().__init__(**kwargs) |
140 |
| - self.amount = amount |
141 |
| - self.currency_code = currency_code |
142 |
| - self.billing_frequency = billing_frequency |
143 |
| - |
144 |
| - |
145 |
| -class AvailablePhoneNumberCost(PhoneNumberCost): |
146 |
| - """AvailablePhoneNumberCost. |
147 |
| -
|
148 |
| - All required parameters must be populated in order to send to server. |
149 |
| -
|
150 |
| - :ivar amount: The cost amount. Required. |
151 |
| - :vartype amount: float |
152 |
| - :ivar currency_code: The ISO 4217 currency code for the cost amount, e.g. USD. Required. |
153 |
| - :vartype currency_code: str |
154 |
| - :ivar billing_frequency: The frequency with which the cost gets billed. Required. "monthly" |
155 |
| - :vartype billing_frequency: str or ~azure.communication.phonenumbers.models.BillingFrequency |
156 |
| - """ |
157 |
| - |
158 |
| - |
159 | 20 | class CommunicationError(_serialization.Model):
|
160 | 21 | """The Communication Services error.
|
161 | 22 |
|
@@ -571,6 +432,53 @@ def __init__(
|
571 | 432 | self.sms = sms
|
572 | 433 |
|
573 | 434 |
|
| 435 | +class PhoneNumberCost(_serialization.Model): |
| 436 | + """The incurred cost for a single phone number. |
| 437 | +
|
| 438 | + All required parameters must be populated in order to send to server. |
| 439 | +
|
| 440 | + :ivar amount: The cost amount. Required. |
| 441 | + :vartype amount: float |
| 442 | + :ivar currency_code: The ISO 4217 currency code for the cost amount, e.g. USD. Required. |
| 443 | + :vartype currency_code: str |
| 444 | + :ivar billing_frequency: The frequency with which the cost gets billed. Required. "monthly" |
| 445 | + :vartype billing_frequency: str or ~azure.communication.phonenumbers.models.BillingFrequency |
| 446 | + """ |
| 447 | + |
| 448 | + _validation = { |
| 449 | + "amount": {"required": True}, |
| 450 | + "currency_code": {"required": True}, |
| 451 | + "billing_frequency": {"required": True}, |
| 452 | + } |
| 453 | + |
| 454 | + _attribute_map = { |
| 455 | + "amount": {"key": "amount", "type": "float"}, |
| 456 | + "currency_code": {"key": "currencyCode", "type": "str"}, |
| 457 | + "billing_frequency": {"key": "billingFrequency", "type": "str"}, |
| 458 | + } |
| 459 | + |
| 460 | + def __init__( |
| 461 | + self, |
| 462 | + *, |
| 463 | + amount: float, |
| 464 | + currency_code: str, |
| 465 | + billing_frequency: Union[str, "_models.BillingFrequency"], |
| 466 | + **kwargs: Any |
| 467 | + ) -> None: |
| 468 | + """ |
| 469 | + :keyword amount: The cost amount. Required. |
| 470 | + :paramtype amount: float |
| 471 | + :keyword currency_code: The ISO 4217 currency code for the cost amount, e.g. USD. Required. |
| 472 | + :paramtype currency_code: str |
| 473 | + :keyword billing_frequency: The frequency with which the cost gets billed. Required. "monthly" |
| 474 | + :paramtype billing_frequency: str or ~azure.communication.phonenumbers.models.BillingFrequency |
| 475 | + """ |
| 476 | + super().__init__(**kwargs) |
| 477 | + self.amount = amount |
| 478 | + self.currency_code = currency_code |
| 479 | + self.billing_frequency = billing_frequency |
| 480 | + |
| 481 | + |
574 | 482 | class PhoneNumberCountries(_serialization.Model):
|
575 | 483 | """Represents a wrapper around a list of countries.
|
576 | 484 |
|
|
0 commit comments