telnyx 2.0.0__py2.py3-none-any.whl → 2.1.2__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of telnyx might be problematic. Click here for more details.
- telnyx/__init__.py +1 -1
- telnyx/api_requestor.py +19 -17
- telnyx/api_resources/__init__.py +159 -19
- telnyx/api_resources/abstract/api_resource.py +5 -4
- telnyx/api_resources/abstract/nested_resource_class_methods.py +11 -1
- telnyx/api_resources/abstract/updateable_api_resource.py +2 -1
- telnyx/api_resources/{whatsapp_contact.py → access_token.py} +2 -2
- telnyx/api_resources/address.py +13 -0
- telnyx/api_resources/advanced_optinoptout.py +17 -0
- telnyx/api_resources/ai.py +36 -0
- telnyx/api_resources/autorechargepreference.py +7 -0
- telnyx/api_resources/{whatsapp_business_account.py → billing.py} +2 -2
- telnyx/api_resources/bucket.py +17 -0
- telnyx/api_resources/bucket_usage.py +7 -0
- telnyx/api_resources/bulk_credential.py +13 -0
- telnyx/api_resources/bulk_phone_number_campaign.py +7 -0
- telnyx/api_resources/bulk_phone_number_operation.py +7 -0
- telnyx/api_resources/bulk_sole_proprietor_creation.py +7 -0
- telnyx/api_resources/business_identity.py +17 -0
- telnyx/api_resources/call.py +87 -53
- telnyx/api_resources/call_information.py +7 -0
- telnyx/api_resources/call_recording.py +22 -0
- telnyx/api_resources/cdr_usage_report.py +7 -0
- telnyx/api_resources/credential_connection.py +9 -0
- telnyx/api_resources/csv_download.py +7 -0
- telnyx/api_resources/customer_service_record.py +7 -0
- telnyx/api_resources/debugging.py +7 -0
- telnyx/api_resources/detail_record.py +7 -0
- telnyx/api_resources/dialogflow_integration.py +17 -0
- telnyx/api_resources/document.py +0 -5
- telnyx/api_resources/dynamic_emergency_endpoint.py +13 -0
- telnyx/api_resources/enum.py +7 -0
- telnyx/api_resources/external_connection.py +17 -0
- telnyx/api_resources/fax.py +6 -8
- telnyx/api_resources/inventory_level.py +7 -0
- telnyx/api_resources/{whatsapp_media.py → ip_address.py} +3 -3
- telnyx/api_resources/ip_range.py +11 -0
- telnyx/api_resources/list_object.py +2 -1
- telnyx/api_resources/managed_account.py +2 -2
- telnyx/api_resources/mdr_detail_report.py +11 -0
- telnyx/api_resources/mdr_usage_report.py +11 -0
- telnyx/api_resources/media_storage_api.py +17 -0
- telnyx/api_resources/message.py +2 -2
- telnyx/api_resources/messaging_hosted_number.py +15 -2
- telnyx/api_resources/messaging_tollfree_verification.py +17 -0
- telnyx/api_resources/messaging_url_domain.py +7 -0
- telnyx/api_resources/mobile_network_operator.py +7 -0
- telnyx/api_resources/network.py +17 -0
- telnyx/api_resources/notification.py +17 -0
- telnyx/api_resources/{whatsapp_phone_number.py → number_configuration.py} +2 -2
- telnyx/api_resources/number_portout.py +11 -0
- telnyx/api_resources/numbers_feature.py +7 -0
- telnyx/api_resources/ota_update.py +7 -0
- telnyx/api_resources/phone_number.py +4 -2
- telnyx/api_resources/phone_number_block_order.py +7 -0
- telnyx/api_resources/phone_number_blocks_background_job.py +7 -0
- telnyx/api_resources/phone_number_campaign.py +0 -4
- telnyx/api_resources/phone_number_configuration.py +24 -0
- telnyx/api_resources/{whatsapp_message.py → phone_number_order.py} +2 -2
- telnyx/api_resources/phone_number_order_document.py +13 -0
- telnyx/api_resources/phone_number_porting.py +7 -0
- telnyx/api_resources/phone_number_reservation.py +15 -0
- telnyx/api_resources/phone_number_search.py +7 -0
- telnyx/api_resources/porting_order.py +1 -8
- telnyx/api_resources/presigned_object_url.py +7 -0
- telnyx/api_resources/private_wireless_gateway.py +13 -0
- telnyx/api_resources/public_internet_gateway.py +13 -0
- telnyx/api_resources/push_credential.py +11 -0
- telnyx/api_resources/queue_command.py +7 -0
- telnyx/api_resources/recordings_command.py +7 -0
- telnyx/api_resources/region.py +7 -0
- telnyx/api_resources/register_call.py +7 -0
- telnyx/api_resources/report.py +7 -0
- telnyx/api_resources/reporting.py +11 -0
- telnyx/api_resources/requirement.py +7 -0
- telnyx/api_resources/requirement_type.py +7 -0
- telnyx/api_resources/room_composition.py +11 -0
- telnyx/api_resources/room_recording.py +7 -0
- telnyx/api_resources/rooms_client_token.py +24 -0
- telnyx/api_resources/shared_campaign.py +7 -0
- telnyx/api_resources/sim_card.py +49 -19
- telnyx/api_resources/sim_card_group.py +17 -0
- telnyx/api_resources/ssl_certificate.py +11 -0
- telnyx/api_resources/texml_application.py +17 -0
- telnyx/api_resources/texml_rest_command.py +13 -0
- telnyx/api_resources/verified_calls_display_profile.py +17 -0
- telnyx/api_resources/verified_number.py +16 -0
- telnyx/api_resources/verify.py +22 -0
- telnyx/api_resources/virtual_cross_connect.py +24 -0
- telnyx/api_resources/wdr_detail_report.py +7 -0
- telnyx/api_resources/webhook.py +7 -0
- telnyx/api_resources/wireguard_interface.py +17 -0
- telnyx/error.py +1 -2
- telnyx/http_client.py +10 -9
- telnyx/multipart_data_generator.py +1 -1
- telnyx/telnyx_object.py +3 -1
- telnyx/util.py +86 -20
- telnyx/webhook.py +0 -2
- {telnyx-2.0.0.dist-info → telnyx-2.1.2.dist-info}/METADATA +24 -24
- telnyx-2.1.2.dist-info/RECORD +168 -0
- {telnyx-2.0.0.dist-info → telnyx-2.1.2.dist-info}/WHEEL +1 -1
- telnyx/six.py +0 -892
- telnyx-2.0.0.dist-info/RECORD +0 -102
- {telnyx-2.0.0.dist-info → telnyx-2.1.2.dist-info}/LICENSE +0 -0
- {telnyx-2.0.0.dist-info → telnyx-2.1.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from __future__ import absolute_import, division, print_function
|
|
2
|
+
|
|
3
|
+
from telnyx.api_resources.abstract import (
|
|
4
|
+
CreateableAPIResource,
|
|
5
|
+
DeletableAPIResource,
|
|
6
|
+
ListableAPIResource,
|
|
7
|
+
UpdateableAPIResource,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class BusinessIdentity(
|
|
12
|
+
CreateableAPIResource,
|
|
13
|
+
DeletableAPIResource,
|
|
14
|
+
ListableAPIResource,
|
|
15
|
+
UpdateableAPIResource,
|
|
16
|
+
):
|
|
17
|
+
OBJECT_NAME = "business_identity"
|
telnyx/api_resources/call.py
CHANGED
|
@@ -6,130 +6,164 @@ from telnyx.api_resources.abstract import (
|
|
|
6
6
|
)
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
@nested_resource_class_methods(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@nested_resource_class_methods("bridge", path="actions/bridge", operations=["create"])
|
|
13
|
-
@nested_resource_class_methods("speak", path="actions/speak", operations=["create"])
|
|
9
|
+
@nested_resource_class_methods(
|
|
10
|
+
"transcription_stop", path="actions/transcription_stop", operations=["create"]
|
|
11
|
+
)
|
|
14
12
|
@nested_resource_class_methods(
|
|
15
13
|
"fork_start", path="actions/fork_start", operations=["create"]
|
|
16
14
|
)
|
|
17
15
|
@nested_resource_class_methods(
|
|
18
|
-
"
|
|
16
|
+
"suppression_start", path="actions/suppression_start", operations=["create"]
|
|
19
17
|
)
|
|
20
18
|
@nested_resource_class_methods(
|
|
21
|
-
"
|
|
19
|
+
"transfer", path="actions/transfer", operations=["create"]
|
|
20
|
+
)
|
|
21
|
+
@nested_resource_class_methods("answer", path="actions/answer", operations=["create"])
|
|
22
|
+
@nested_resource_class_methods(
|
|
23
|
+
"playback_stop", path="actions/playback_stop", operations=["create"]
|
|
22
24
|
)
|
|
23
25
|
@nested_resource_class_methods(
|
|
24
|
-
"
|
|
26
|
+
"suppression_stop", path="actions/suppression_stop", operations=["create"]
|
|
25
27
|
)
|
|
26
28
|
@nested_resource_class_methods(
|
|
27
29
|
"gather_stop", path="actions/gather_stop", operations=["create"]
|
|
28
30
|
)
|
|
31
|
+
@nested_resource_class_methods("hangup", path="actions/hangup", operations=["create"])
|
|
32
|
+
@nested_resource_class_methods("refer", path="actions/refer", operations=["create"])
|
|
29
33
|
@nested_resource_class_methods(
|
|
30
|
-
"
|
|
34
|
+
"record_resume", path="actions/record_resume", operations=["create"]
|
|
31
35
|
)
|
|
32
36
|
@nested_resource_class_methods(
|
|
33
|
-
"
|
|
37
|
+
"gather_using_audio", path="actions/gather_using_audio", operations=["create"]
|
|
38
|
+
)
|
|
39
|
+
@nested_resource_class_methods(
|
|
40
|
+
"send_dtmf", path="actions/send_dtmf", operations=["create"]
|
|
41
|
+
)
|
|
42
|
+
@nested_resource_class_methods("gather", path="actions/gather", operations=["create"])
|
|
43
|
+
@nested_resource_class_methods(
|
|
44
|
+
"leave_queue", path="actions/leave_queue", operations=["create"]
|
|
45
|
+
)
|
|
46
|
+
@nested_resource_class_methods(
|
|
47
|
+
"record_stop", path="actions/record_stop", operations=["create"]
|
|
34
48
|
)
|
|
35
49
|
@nested_resource_class_methods(
|
|
36
50
|
"record_pause", path="actions/record_pause", operations=["create"]
|
|
37
51
|
)
|
|
38
52
|
@nested_resource_class_methods(
|
|
39
|
-
"
|
|
53
|
+
"playback_start", path="actions/playback_start", operations=["create"]
|
|
40
54
|
)
|
|
41
55
|
@nested_resource_class_methods(
|
|
42
56
|
"record_start", path="actions/record_start", operations=["create"]
|
|
43
57
|
)
|
|
58
|
+
@nested_resource_class_methods("bridge", path="actions/bridge", operations=["create"])
|
|
44
59
|
@nested_resource_class_methods(
|
|
45
|
-
"
|
|
60
|
+
"streaming_start", path="actions/streaming_start", operations=["create"]
|
|
46
61
|
)
|
|
47
|
-
@nested_resource_class_methods("
|
|
62
|
+
@nested_resource_class_methods("enqueue", path="actions/enqueue", operations=["create"])
|
|
63
|
+
@nested_resource_class_methods("speak", path="actions/speak", operations=["create"])
|
|
48
64
|
@nested_resource_class_methods(
|
|
49
|
-
"
|
|
65
|
+
"fork_stop", path="actions/fork_stop", operations=["create"]
|
|
50
66
|
)
|
|
67
|
+
@nested_resource_class_methods("reject", path="actions/reject", operations=["create"])
|
|
51
68
|
@nested_resource_class_methods(
|
|
52
69
|
"transcription_start", path="actions/transcription_start", operations=["create"]
|
|
53
70
|
)
|
|
54
71
|
@nested_resource_class_methods(
|
|
55
|
-
"
|
|
72
|
+
"client_state_update", path="actions/client_state_update", operations=["put"]
|
|
56
73
|
)
|
|
57
74
|
@nested_resource_class_methods(
|
|
58
|
-
"
|
|
75
|
+
"gather_using_speak", path="actions/gather_using_speak", operations=["create"]
|
|
59
76
|
)
|
|
60
|
-
@nested_resource_class_methods("enqueue", path="actions/enqueue", operations=["create"])
|
|
61
77
|
@nested_resource_class_methods(
|
|
62
|
-
"
|
|
78
|
+
"streaming_stop", path="actions/streaming_stop", operations=["create"]
|
|
63
79
|
)
|
|
64
80
|
class Call(CreateableAPIResource):
|
|
65
81
|
OBJECT_NAME = "call"
|
|
66
82
|
|
|
67
|
-
def
|
|
68
|
-
return Call.
|
|
83
|
+
def transcription_stop(self, **params):
|
|
84
|
+
return Call.create_transcription_stop(self.call_control_id, **params)
|
|
85
|
+
|
|
86
|
+
def fork_start(self, **params):
|
|
87
|
+
return Call.create_fork_start(self.call_control_id, **params)
|
|
88
|
+
|
|
89
|
+
def suppression_start(self, **params):
|
|
90
|
+
return Call.create_suppression_start(self.call_control_id, **params)
|
|
91
|
+
|
|
92
|
+
def transfer(self, **params):
|
|
93
|
+
return Call.create_transfer(self.call_control_id, **params)
|
|
69
94
|
|
|
70
95
|
def answer(self, **params):
|
|
71
96
|
return Call.create_answer(self.call_control_id, **params)
|
|
72
97
|
|
|
98
|
+
def playback_stop(self, **params):
|
|
99
|
+
return Call.create_playback_stop(self.call_control_id, **params)
|
|
100
|
+
|
|
101
|
+
def suppression_stop(self, **params):
|
|
102
|
+
return Call.create_suppression_stop(self.call_control_id, **params)
|
|
103
|
+
|
|
104
|
+
def gather_stop(self, **params):
|
|
105
|
+
return Call.create_gather_stop(self.call_control_id, **params)
|
|
106
|
+
|
|
73
107
|
def hangup(self, **params):
|
|
74
108
|
return Call.create_hangup(self.call_control_id, **params)
|
|
75
109
|
|
|
76
|
-
def
|
|
77
|
-
return Call.
|
|
78
|
-
|
|
79
|
-
def fork_start(self, **params):
|
|
80
|
-
return Call.create_fork_start(self.call_control_id, **params)
|
|
110
|
+
def refer(self, **params):
|
|
111
|
+
return Call.create_refer(self.call_control_id, **params)
|
|
81
112
|
|
|
82
|
-
def
|
|
83
|
-
return Call.
|
|
113
|
+
def record_resume(self, **params):
|
|
114
|
+
return Call.create_record_resume(self.call_control_id, **params)
|
|
84
115
|
|
|
85
116
|
def gather_using_audio(self, **params):
|
|
86
117
|
return Call.create_gather_using_audio(self.call_control_id, **params)
|
|
87
118
|
|
|
88
|
-
def
|
|
89
|
-
return Call.
|
|
119
|
+
def send_dtmf(self, **params):
|
|
120
|
+
return Call.create_send_dtmf(self.call_control_id, **params)
|
|
90
121
|
|
|
91
|
-
def
|
|
92
|
-
return Call.
|
|
122
|
+
def gather(self, **params):
|
|
123
|
+
return Call.create_gather(self.call_control_id, **params)
|
|
93
124
|
|
|
94
|
-
def
|
|
95
|
-
return Call.
|
|
125
|
+
def leave_queue(self, **params):
|
|
126
|
+
return Call.create_leave_queue(self.call_control_id, **params)
|
|
96
127
|
|
|
97
|
-
def
|
|
98
|
-
return Call.
|
|
128
|
+
def record_stop(self, **params):
|
|
129
|
+
return Call.create_record_stop(self.call_control_id, **params)
|
|
99
130
|
|
|
100
131
|
def record_pause(self, **params):
|
|
101
132
|
return Call.create_record_pause(self.call_control_id, **params)
|
|
102
133
|
|
|
103
|
-
def
|
|
104
|
-
return Call.
|
|
134
|
+
def playback_start(self, **params):
|
|
135
|
+
return Call.create_playback_start(self.call_control_id, **params)
|
|
105
136
|
|
|
106
137
|
def record_start(self, **params):
|
|
107
138
|
return Call.create_record_start(self.call_control_id, **params)
|
|
108
139
|
|
|
109
|
-
def
|
|
110
|
-
return Call.
|
|
140
|
+
def bridge(self, **params):
|
|
141
|
+
return Call.create_bridge(self.call_control_id, **params)
|
|
111
142
|
|
|
112
|
-
def
|
|
113
|
-
return Call.
|
|
143
|
+
def streaming_start(self, **params):
|
|
144
|
+
return Call.create_streaming_start(self.call_control_id, **params)
|
|
114
145
|
|
|
115
|
-
def
|
|
116
|
-
|
|
146
|
+
def enqueue(self, queue_name, **params):
|
|
147
|
+
params["queue_name"] = queue_name
|
|
148
|
+
return Call.create_enqueue(self.call_control_id, **params)
|
|
117
149
|
|
|
118
150
|
def speak(self, **params):
|
|
119
151
|
return Call.create_speak(self.call_control_id, **params)
|
|
120
152
|
|
|
153
|
+
def fork_stop(self, **params):
|
|
154
|
+
return Call.create_fork_stop(self.call_control_id, **params)
|
|
155
|
+
|
|
156
|
+
def reject(self, **params):
|
|
157
|
+
return Call.create_reject(self.call_control_id, **params)
|
|
158
|
+
|
|
121
159
|
def transcription_start(self, **params):
|
|
122
160
|
return Call.create_transcription_start(self.call_control_id, **params)
|
|
123
161
|
|
|
124
|
-
def
|
|
125
|
-
return Call.
|
|
126
|
-
|
|
127
|
-
def transfer(self, **params):
|
|
128
|
-
return Call.create_transfer(self.call_control_id, **params)
|
|
162
|
+
def client_state_update(self, **params):
|
|
163
|
+
return Call.put_client_state_update(self.call_control_id, **params)
|
|
129
164
|
|
|
130
|
-
def
|
|
131
|
-
|
|
132
|
-
return Call.create_enqueue(self.call_control_id, **params)
|
|
165
|
+
def gather_using_speak(self, **params):
|
|
166
|
+
return Call.create_gather_using_speak(self.call_control_id, **params)
|
|
133
167
|
|
|
134
|
-
def
|
|
135
|
-
return Call.
|
|
168
|
+
def streaming_stop(self, **params):
|
|
169
|
+
return Call.create_streaming_stop(self.call_control_id, **params)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from __future__ import absolute_import, division, print_function
|
|
2
|
+
|
|
3
|
+
from telnyx.api_resources.abstract import (
|
|
4
|
+
CreateableAPIResource,
|
|
5
|
+
DeletableAPIResource,
|
|
6
|
+
ListableAPIResource,
|
|
7
|
+
UpdateableAPIResource,
|
|
8
|
+
nested_resource_class_methods,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@nested_resource_class_methods("delete", path="actions/delete", operations=["delete"])
|
|
13
|
+
class CallRecording(
|
|
14
|
+
CreateableAPIResource,
|
|
15
|
+
DeletableAPIResource,
|
|
16
|
+
ListableAPIResource,
|
|
17
|
+
UpdateableAPIResource,
|
|
18
|
+
):
|
|
19
|
+
OBJECT_NAME = "call_recording"
|
|
20
|
+
|
|
21
|
+
def delete(self, **params):
|
|
22
|
+
return self.delete_delete(**params)
|
|
@@ -5,9 +5,15 @@ from telnyx.api_resources.abstract import (
|
|
|
5
5
|
DeletableAPIResource,
|
|
6
6
|
ListableAPIResource,
|
|
7
7
|
UpdateableAPIResource,
|
|
8
|
+
nested_resource_class_methods,
|
|
8
9
|
)
|
|
9
10
|
|
|
10
11
|
|
|
12
|
+
@nested_resource_class_methods(
|
|
13
|
+
"check_registration_status",
|
|
14
|
+
path="actions/check_registration_status",
|
|
15
|
+
operations=["create"],
|
|
16
|
+
)
|
|
11
17
|
class CredentialConnection(
|
|
12
18
|
CreateableAPIResource,
|
|
13
19
|
DeletableAPIResource,
|
|
@@ -15,3 +21,6 @@ class CredentialConnection(
|
|
|
15
21
|
UpdateableAPIResource,
|
|
16
22
|
):
|
|
17
23
|
OBJECT_NAME = "credential_connection"
|
|
24
|
+
|
|
25
|
+
def check_registration_status(self, **params):
|
|
26
|
+
return self.create_check_registration_status(**params)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
from __future__ import absolute_import, division, print_function
|
|
2
|
+
|
|
3
|
+
from telnyx.api_resources.abstract import CreateableAPIResource, ListableAPIResource
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class CustomerServiceRecord(CreateableAPIResource, ListableAPIResource):
|
|
7
|
+
OBJECT_NAME = "customer_service_record"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from __future__ import absolute_import, division, print_function
|
|
2
|
+
|
|
3
|
+
from telnyx.api_resources.abstract import (
|
|
4
|
+
CreateableAPIResource,
|
|
5
|
+
DeletableAPIResource,
|
|
6
|
+
ListableAPIResource,
|
|
7
|
+
UpdateableAPIResource,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class DialogflowIntegration(
|
|
12
|
+
CreateableAPIResource,
|
|
13
|
+
DeletableAPIResource,
|
|
14
|
+
ListableAPIResource,
|
|
15
|
+
UpdateableAPIResource,
|
|
16
|
+
):
|
|
17
|
+
OBJECT_NAME = "dialogflow_integration"
|
telnyx/api_resources/document.py
CHANGED
|
@@ -5,11 +5,9 @@ from telnyx.api_resources.abstract import (
|
|
|
5
5
|
DeletableAPIResource,
|
|
6
6
|
ListableAPIResource,
|
|
7
7
|
UpdateableAPIResource,
|
|
8
|
-
nested_resource_class_methods,
|
|
9
8
|
)
|
|
10
9
|
|
|
11
10
|
|
|
12
|
-
@nested_resource_class_methods("download", path="download", operations=["list"])
|
|
13
11
|
class Document(
|
|
14
12
|
CreateableAPIResource,
|
|
15
13
|
DeletableAPIResource,
|
|
@@ -18,9 +16,6 @@ class Document(
|
|
|
18
16
|
):
|
|
19
17
|
OBJECT_NAME = "document"
|
|
20
18
|
|
|
21
|
-
def download(self, **params):
|
|
22
|
-
return Document.list_download(self.name, **params)
|
|
23
|
-
|
|
24
19
|
|
|
25
20
|
class DocumentLink(ListableAPIResource):
|
|
26
21
|
OBJECT_NAME = "document_link"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from __future__ import absolute_import, division, print_function
|
|
2
|
+
|
|
3
|
+
from telnyx.api_resources.abstract import (
|
|
4
|
+
CreateableAPIResource,
|
|
5
|
+
DeletableAPIResource,
|
|
6
|
+
ListableAPIResource,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DynamicEmergencyEndpoint(
|
|
11
|
+
CreateableAPIResource, DeletableAPIResource, ListableAPIResource
|
|
12
|
+
):
|
|
13
|
+
OBJECT_NAME = "dynamic_emergency_endpoint"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from __future__ import absolute_import, division, print_function
|
|
2
|
+
|
|
3
|
+
from telnyx.api_resources.abstract import (
|
|
4
|
+
CreateableAPIResource,
|
|
5
|
+
DeletableAPIResource,
|
|
6
|
+
ListableAPIResource,
|
|
7
|
+
UpdateableAPIResource,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ExternalConnection(
|
|
12
|
+
CreateableAPIResource,
|
|
13
|
+
DeletableAPIResource,
|
|
14
|
+
ListableAPIResource,
|
|
15
|
+
UpdateableAPIResource,
|
|
16
|
+
):
|
|
17
|
+
OBJECT_NAME = "external_connection"
|
telnyx/api_resources/fax.py
CHANGED
|
@@ -4,18 +4,13 @@ from telnyx.api_resources.abstract import (
|
|
|
4
4
|
CreateableAPIResource,
|
|
5
5
|
DeletableAPIResource,
|
|
6
6
|
ListableAPIResource,
|
|
7
|
-
UpdateableAPIResource,
|
|
8
7
|
nested_resource_class_methods,
|
|
9
8
|
)
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
@nested_resource_class_methods("refresh", path="actions/refresh", operations=["create"])
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
DeletableAPIResource,
|
|
16
|
-
ListableAPIResource,
|
|
17
|
-
UpdateableAPIResource,
|
|
18
|
-
):
|
|
12
|
+
@nested_resource_class_methods("cancel", path="actions/cancel", operations=["create"])
|
|
13
|
+
class Fax(CreateableAPIResource, DeletableAPIResource, ListableAPIResource):
|
|
19
14
|
OBJECT_NAME = "fax"
|
|
20
15
|
|
|
21
16
|
@classmethod
|
|
@@ -23,4 +18,7 @@ class Fax(
|
|
|
23
18
|
return "/v2/faxes"
|
|
24
19
|
|
|
25
20
|
def refresh(self, **params):
|
|
26
|
-
return
|
|
21
|
+
return self.create_refresh(**params)
|
|
22
|
+
|
|
23
|
+
def cancel(self, **params):
|
|
24
|
+
return self.create_cancel(**params)
|
|
@@ -7,9 +7,9 @@ from telnyx.api_resources.abstract import (
|
|
|
7
7
|
)
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class
|
|
11
|
-
OBJECT_NAME = "
|
|
10
|
+
class IPAddress(CreateableAPIResource, DeletableAPIResource, ListableAPIResource):
|
|
11
|
+
OBJECT_NAME = "ip_address"
|
|
12
12
|
|
|
13
13
|
@classmethod
|
|
14
14
|
def class_url(cls):
|
|
15
|
-
return "/v2/
|
|
15
|
+
return "/v2/ip_addresses"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from __future__ import absolute_import, division, print_function
|
|
2
|
+
|
|
3
|
+
from telnyx.api_resources.abstract import (
|
|
4
|
+
CreateableAPIResource,
|
|
5
|
+
DeletableAPIResource,
|
|
6
|
+
ListableAPIResource,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class IPRange(CreateableAPIResource, DeletableAPIResource, ListableAPIResource):
|
|
11
|
+
OBJECT_NAME = "ip_range"
|
|
@@ -14,7 +14,7 @@ class ManagedAccount(CreateableAPIResource, ListableAPIResource, UpdateableAPIRe
|
|
|
14
14
|
OBJECT_NAME = "managed_account"
|
|
15
15
|
|
|
16
16
|
def enable(self, **params):
|
|
17
|
-
return
|
|
17
|
+
return self.create_enable(**params)
|
|
18
18
|
|
|
19
19
|
def disable(self, **params):
|
|
20
|
-
return
|
|
20
|
+
return self.create_disable(**params)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from __future__ import absolute_import, division, print_function
|
|
2
|
+
|
|
3
|
+
from telnyx.api_resources.abstract import (
|
|
4
|
+
CreateableAPIResource,
|
|
5
|
+
DeletableAPIResource,
|
|
6
|
+
ListableAPIResource,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MdrDetailReport(CreateableAPIResource, DeletableAPIResource, ListableAPIResource):
|
|
11
|
+
OBJECT_NAME = "mdr_detail_report"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from __future__ import absolute_import, division, print_function
|
|
2
|
+
|
|
3
|
+
from telnyx.api_resources.abstract import (
|
|
4
|
+
CreateableAPIResource,
|
|
5
|
+
DeletableAPIResource,
|
|
6
|
+
ListableAPIResource,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MdrUsageReport(CreateableAPIResource, DeletableAPIResource, ListableAPIResource):
|
|
11
|
+
OBJECT_NAME = "mdr_usage_report"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from __future__ import absolute_import, division, print_function
|
|
2
|
+
|
|
3
|
+
from telnyx.api_resources.abstract import (
|
|
4
|
+
CreateableAPIResource,
|
|
5
|
+
DeletableAPIResource,
|
|
6
|
+
ListableAPIResource,
|
|
7
|
+
UpdateableAPIResource,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MediaStorageApi(
|
|
12
|
+
CreateableAPIResource,
|
|
13
|
+
DeletableAPIResource,
|
|
14
|
+
ListableAPIResource,
|
|
15
|
+
UpdateableAPIResource,
|
|
16
|
+
):
|
|
17
|
+
OBJECT_NAME = "media_storage_api"
|
telnyx/api_resources/message.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from __future__ import absolute_import, division, print_function
|
|
2
2
|
|
|
3
|
-
from telnyx.api_resources.abstract import CreateableAPIResource
|
|
3
|
+
from telnyx.api_resources.abstract import CreateableAPIResource, ListableAPIResource
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class Message(CreateableAPIResource):
|
|
6
|
+
class Message(CreateableAPIResource, ListableAPIResource):
|
|
7
7
|
OBJECT_NAME = "message"
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
from __future__ import absolute_import, division, print_function
|
|
2
2
|
|
|
3
|
-
from telnyx.api_resources.abstract import
|
|
3
|
+
from telnyx.api_resources.abstract import (
|
|
4
|
+
CreateableAPIResource,
|
|
5
|
+
DeletableAPIResource,
|
|
6
|
+
ListableAPIResource,
|
|
7
|
+
nested_resource_class_methods,
|
|
8
|
+
)
|
|
4
9
|
|
|
5
10
|
|
|
6
|
-
|
|
11
|
+
@nested_resource_class_methods(
|
|
12
|
+
"file_upload", path="actions/file_upload", operations=["create"]
|
|
13
|
+
)
|
|
14
|
+
class MessagingHostedNumber(
|
|
15
|
+
CreateableAPIResource, DeletableAPIResource, ListableAPIResource
|
|
16
|
+
):
|
|
7
17
|
OBJECT_NAME = "messaging_hosted_number"
|
|
18
|
+
|
|
19
|
+
def file_upload(self, **params):
|
|
20
|
+
return self.create_file_upload(**params)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from __future__ import absolute_import, division, print_function
|
|
2
|
+
|
|
3
|
+
from telnyx.api_resources.abstract import (
|
|
4
|
+
CreateableAPIResource,
|
|
5
|
+
DeletableAPIResource,
|
|
6
|
+
ListableAPIResource,
|
|
7
|
+
UpdateableAPIResource,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MessagingTollfreeVerification(
|
|
12
|
+
CreateableAPIResource,
|
|
13
|
+
DeletableAPIResource,
|
|
14
|
+
ListableAPIResource,
|
|
15
|
+
UpdateableAPIResource,
|
|
16
|
+
):
|
|
17
|
+
OBJECT_NAME = "messaging_tollfree_verification"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from __future__ import absolute_import, division, print_function
|
|
2
|
+
|
|
3
|
+
from telnyx.api_resources.abstract import (
|
|
4
|
+
CreateableAPIResource,
|
|
5
|
+
DeletableAPIResource,
|
|
6
|
+
ListableAPIResource,
|
|
7
|
+
UpdateableAPIResource,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Network(
|
|
12
|
+
CreateableAPIResource,
|
|
13
|
+
DeletableAPIResource,
|
|
14
|
+
ListableAPIResource,
|
|
15
|
+
UpdateableAPIResource,
|
|
16
|
+
):
|
|
17
|
+
OBJECT_NAME = "network"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from __future__ import absolute_import, division, print_function
|
|
2
|
+
|
|
3
|
+
from telnyx.api_resources.abstract import (
|
|
4
|
+
CreateableAPIResource,
|
|
5
|
+
DeletableAPIResource,
|
|
6
|
+
ListableAPIResource,
|
|
7
|
+
UpdateableAPIResource,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Notification(
|
|
12
|
+
CreateableAPIResource,
|
|
13
|
+
DeletableAPIResource,
|
|
14
|
+
ListableAPIResource,
|
|
15
|
+
UpdateableAPIResource,
|
|
16
|
+
):
|
|
17
|
+
OBJECT_NAME = "notification"
|