twilio-api-sdk 1.0.0 → 1.0.1
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.
- checksums.yaml +4 -4
- data/README.md +84 -79
- data/lib/twilio_ap_is/apis/base_api.rb +1 -1
- data/lib/twilio_ap_is/apis/sms_api.rb +218 -0
- data/lib/twilio_ap_is/client.rb +6 -0
- data/lib/twilio_ap_is/configuration.rb +5 -2
- data/lib/twilio_ap_is/models/api_v2010_account_message.rb +336 -0
- data/lib/twilio_ap_is/models/message_enum_address_retention.rb +37 -0
- data/lib/twilio_ap_is/models/message_enum_content_retention.rb +37 -0
- data/lib/twilio_ap_is/models/message_enum_direction.rb +47 -0
- data/lib/twilio_ap_is/models/message_enum_schedule_type.rb +28 -0
- data/lib/twilio_ap_is/models/message_enum_traffic_type.rb +26 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_message_status.rb +6 -1
- data/lib/twilio_ap_is/models/verification_enum_risk_check.rb +3 -1
- data/lib/twilio_ap_is.rb +7 -0
- metadata +9 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e99b9e711875c08660b52f6aaf64d7a9e77a16cc0a5ecaf5aaab07c032e50ea5
|
|
4
|
+
data.tar.gz: 3988bca7b26660286b27feda1464ba4cc3e59c8bb6f7ee282ab4ff946291b209
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 36055f66220e966454b07428c32ea07b4966d4dca2d6420b100c83215e10b83c73cc861599abf7e1938f49ae8162bc224127de827ef3b99092d62fbc2a4ad260
|
|
7
|
+
data.tar.gz: ec6043723c7cc5cff28d9bb36fa156c7452d6572bbee04c13597cb2a7edecc2e22cfa61770855a245448492d833cfbdc4e0c7293417f7388bc4284f2c4d6d649
|
data/README.md
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
|
|
2
2
|
# Getting Started with Twilio APIs
|
|
3
3
|
|
|
4
|
+
## Introduction
|
|
5
|
+
|
|
6
|
+
This is the public Twilio REST API.
|
|
7
|
+
|
|
4
8
|
## Install the Package
|
|
5
9
|
|
|
6
10
|
Install the gem from the command line:
|
|
7
11
|
|
|
8
12
|
```bash
|
|
9
|
-
gem install twilio-api-sdk -v 1.0.
|
|
13
|
+
gem install twilio-api-sdk -v 1.0.1
|
|
10
14
|
```
|
|
11
15
|
|
|
12
16
|
Or add the gem to your Gemfile and run `bundle`:
|
|
13
17
|
|
|
14
18
|
```ruby
|
|
15
|
-
gem 'twilio-api-sdk', '1.0.
|
|
19
|
+
gem 'twilio-api-sdk', '1.0.1'
|
|
16
20
|
```
|
|
17
21
|
|
|
18
|
-
For additional gem details, see the [RubyGems page for the twilio-api-sdk gem](https://rubygems.org/gems/twilio-api-sdk/versions/1.0.
|
|
22
|
+
For additional gem details, see the [RubyGems page for the twilio-api-sdk gem](https://rubygems.org/gems/twilio-api-sdk/versions/1.0.1).
|
|
19
23
|
|
|
20
24
|
## IRB Console Usage
|
|
21
25
|
|
|
@@ -54,13 +58,13 @@ ruby bin/console
|
|
|
54
58
|
|
|
55
59
|
## Initialize the API Client
|
|
56
60
|
|
|
57
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
61
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/client.md)
|
|
58
62
|
|
|
59
63
|
The following parameters are configurable for the API Client:
|
|
60
64
|
|
|
61
65
|
| Parameter | Type | Description |
|
|
62
66
|
| --- | --- | --- |
|
|
63
|
-
| environment | [`Environment`](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
67
|
+
| environment | [`Environment`](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/README.md#environments) | The API environment. <br> **Default: `Environment.PRODUCTION`** |
|
|
64
68
|
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
|
65
69
|
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
|
66
70
|
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 30** |
|
|
@@ -70,9 +74,9 @@ The following parameters are configurable for the API Client:
|
|
|
70
74
|
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
71
75
|
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
|
72
76
|
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
|
73
|
-
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
74
|
-
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
75
|
-
| basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
77
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
78
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
79
|
+
| basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/auth/basic-authentication.md) | The credential object for Basic Authentication |
|
|
76
80
|
|
|
77
81
|
The API client can be initialized as follows:
|
|
78
82
|
|
|
@@ -110,7 +114,7 @@ include TwilioApIs
|
|
|
110
114
|
client = Client.from_env
|
|
111
115
|
```
|
|
112
116
|
|
|
113
|
-
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
117
|
+
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/environment-based-client-initialization.md) section for details.
|
|
114
118
|
|
|
115
119
|
## Environments
|
|
116
120
|
|
|
@@ -126,88 +130,89 @@ The SDK can be configured to use a different environment for making API calls. A
|
|
|
126
130
|
|
|
127
131
|
This API uses the following authentication schemes.
|
|
128
132
|
|
|
129
|
-
* [`accountSid_authToken (Basic Authentication)`](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
133
|
+
* [`accountSid_authToken (Basic Authentication)`](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/auth/basic-authentication.md)
|
|
130
134
|
|
|
131
135
|
## List of APIs
|
|
132
136
|
|
|
133
|
-
* [Accounts V1 Auth Token Promotion](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
134
|
-
* [Accounts V1 Aws](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
135
|
-
* [Accounts V1 Bulk Consents](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
136
|
-
* [Accounts V1 Bulk Contacts](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
137
|
-
* [Accounts V1 Messaging Geopermissions](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
138
|
-
* [Accounts V1 Public Key](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
139
|
-
* [Accounts V1 Safelist](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
140
|
-
* [Accounts V1 Secondary Auth Token](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
141
|
-
* [Chat V3 Channel](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
142
|
-
* [Conversations V1 Address Configuration](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
143
|
-
* [Conversations V1 Binding](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
144
|
-
* [Conversations V1 Configuration](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
145
|
-
* [Conversations V1 Conversation](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
146
|
-
* [Conversations V1 Conversation with Participants](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
147
|
-
* [Conversations V1 Credential](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
148
|
-
* [Conversations V1 Delivery Receipt](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
149
|
-
* [Conversations V1 Message](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
150
|
-
* [Conversations V1 Notification](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
151
|
-
* [Conversations V1 Participant](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
152
|
-
* [Conversations V1 Participant Conversation](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
153
|
-
* [Conversations V1 Role](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
154
|
-
* [Conversations V1 Service](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
155
|
-
* [Conversations V1 User](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
156
|
-
* [Conversations V1 User Conversation](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
157
|
-
* [Conversations V1 Webhook](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
158
|
-
* [Notify V1 Binding](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
159
|
-
* [Notify V1 Credential](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
160
|
-
* [Notify V1 Notification](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
161
|
-
* [Notify V1 Service](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
162
|
-
* [Taskrouter V1 Activity](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
163
|
-
* [Taskrouter V1 Event](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
164
|
-
* [Taskrouter V1 Task](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
165
|
-
* [Taskrouter V1 Task Channel](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
166
|
-
* [Taskrouter V1 Task Queue](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
167
|
-
* [Taskrouter V1 Task Queue Bulk Real Time Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
168
|
-
* [Taskrouter V1 Task Queue Cumulative Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
169
|
-
* [Taskrouter V1 Task Queue Real Time Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
170
|
-
* [Taskrouter V1 Task Queue Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
171
|
-
* [Taskrouter V1 Task Queues Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
172
|
-
* [Taskrouter V1 Task Reservation](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
173
|
-
* [Taskrouter V1 Worker](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
174
|
-
* [Taskrouter V1 Worker Channel](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
175
|
-
* [Taskrouter V1 Worker Reservation](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
176
|
-
* [Taskrouter V1 Worker Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
177
|
-
* [Taskrouter V1 Workers Cumulative Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
178
|
-
* [Taskrouter V1 Workers Real Time Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
179
|
-
* [Taskrouter V1 Workers Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
180
|
-
* [Taskrouter V1 Workflow](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
181
|
-
* [Taskrouter V1 Workflow Cumulative Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
182
|
-
* [Taskrouter V1 Workflow Real Time Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
183
|
-
* [Taskrouter V1 Workflow Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
184
|
-
* [Taskrouter V1 Workspace](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
185
|
-
* [Taskrouter V1 Workspace Cumulative Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
186
|
-
* [Taskrouter V1 Workspace Real Time Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
187
|
-
* [Taskrouter V1 Workspace Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
188
|
-
* [Verify V2 Service](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
189
|
-
* [Verify V2 Verification](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
190
|
-
* [Verify V2 Verification Check](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
137
|
+
* [Accounts V1 Auth Token Promotion](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/accounts-v1-auth-token-promotion.md)
|
|
138
|
+
* [Accounts V1 Aws](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/accounts-v1-aws.md)
|
|
139
|
+
* [Accounts V1 Bulk Consents](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/accounts-v1-bulk-consents.md)
|
|
140
|
+
* [Accounts V1 Bulk Contacts](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/accounts-v1-bulk-contacts.md)
|
|
141
|
+
* [Accounts V1 Messaging Geopermissions](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/accounts-v1-messaging-geopermissions.md)
|
|
142
|
+
* [Accounts V1 Public Key](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/accounts-v1-public-key.md)
|
|
143
|
+
* [Accounts V1 Safelist](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/accounts-v1-safelist.md)
|
|
144
|
+
* [Accounts V1 Secondary Auth Token](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/accounts-v1-secondary-auth-token.md)
|
|
145
|
+
* [Chat V3 Channel](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/chat-v3-channel.md)
|
|
146
|
+
* [Conversations V1 Address Configuration](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-address-configuration.md)
|
|
147
|
+
* [Conversations V1 Binding](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-binding.md)
|
|
148
|
+
* [Conversations V1 Configuration](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-configuration.md)
|
|
149
|
+
* [Conversations V1 Conversation](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-conversation.md)
|
|
150
|
+
* [Conversations V1 Conversation with Participants](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-conversation-with-participants.md)
|
|
151
|
+
* [Conversations V1 Credential](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-credential.md)
|
|
152
|
+
* [Conversations V1 Delivery Receipt](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-delivery-receipt.md)
|
|
153
|
+
* [Conversations V1 Message](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-message.md)
|
|
154
|
+
* [Conversations V1 Notification](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-notification.md)
|
|
155
|
+
* [Conversations V1 Participant](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-participant.md)
|
|
156
|
+
* [Conversations V1 Participant Conversation](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-participant-conversation.md)
|
|
157
|
+
* [Conversations V1 Role](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-role.md)
|
|
158
|
+
* [Conversations V1 Service](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-service.md)
|
|
159
|
+
* [Conversations V1 User](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-user.md)
|
|
160
|
+
* [Conversations V1 User Conversation](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-user-conversation.md)
|
|
161
|
+
* [Conversations V1 Webhook](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/conversations-v1-webhook.md)
|
|
162
|
+
* [Notify V1 Binding](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/notify-v1-binding.md)
|
|
163
|
+
* [Notify V1 Credential](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/notify-v1-credential.md)
|
|
164
|
+
* [Notify V1 Notification](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/notify-v1-notification.md)
|
|
165
|
+
* [Notify V1 Service](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/notify-v1-service.md)
|
|
166
|
+
* [Taskrouter V1 Activity](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-activity.md)
|
|
167
|
+
* [Taskrouter V1 Event](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-event.md)
|
|
168
|
+
* [Taskrouter V1 Task](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-task.md)
|
|
169
|
+
* [Taskrouter V1 Task Channel](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-task-channel.md)
|
|
170
|
+
* [Taskrouter V1 Task Queue](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-task-queue.md)
|
|
171
|
+
* [Taskrouter V1 Task Queue Bulk Real Time Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-task-queue-bulk-real-time-statistics.md)
|
|
172
|
+
* [Taskrouter V1 Task Queue Cumulative Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-task-queue-cumulative-statistics.md)
|
|
173
|
+
* [Taskrouter V1 Task Queue Real Time Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-task-queue-real-time-statistics.md)
|
|
174
|
+
* [Taskrouter V1 Task Queue Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-task-queue-statistics.md)
|
|
175
|
+
* [Taskrouter V1 Task Queues Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-task-queues-statistics.md)
|
|
176
|
+
* [Taskrouter V1 Task Reservation](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-task-reservation.md)
|
|
177
|
+
* [Taskrouter V1 Worker](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-worker.md)
|
|
178
|
+
* [Taskrouter V1 Worker Channel](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-worker-channel.md)
|
|
179
|
+
* [Taskrouter V1 Worker Reservation](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-worker-reservation.md)
|
|
180
|
+
* [Taskrouter V1 Worker Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-worker-statistics.md)
|
|
181
|
+
* [Taskrouter V1 Workers Cumulative Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-workers-cumulative-statistics.md)
|
|
182
|
+
* [Taskrouter V1 Workers Real Time Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-workers-real-time-statistics.md)
|
|
183
|
+
* [Taskrouter V1 Workers Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-workers-statistics.md)
|
|
184
|
+
* [Taskrouter V1 Workflow](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-workflow.md)
|
|
185
|
+
* [Taskrouter V1 Workflow Cumulative Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-workflow-cumulative-statistics.md)
|
|
186
|
+
* [Taskrouter V1 Workflow Real Time Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-workflow-real-time-statistics.md)
|
|
187
|
+
* [Taskrouter V1 Workflow Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-workflow-statistics.md)
|
|
188
|
+
* [Taskrouter V1 Workspace](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-workspace.md)
|
|
189
|
+
* [Taskrouter V1 Workspace Cumulative Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-workspace-cumulative-statistics.md)
|
|
190
|
+
* [Taskrouter V1 Workspace Real Time Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-workspace-real-time-statistics.md)
|
|
191
|
+
* [Taskrouter V1 Workspace Statistics](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/taskrouter-v1-workspace-statistics.md)
|
|
192
|
+
* [Verify V2 Service](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/verify-v2-service.md)
|
|
193
|
+
* [Verify V2 Verification](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/verify-v2-verification.md)
|
|
194
|
+
* [Verify V2 Verification Check](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/verify-v2-verification-check.md)
|
|
195
|
+
* [SMS](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/controllers/sms.md)
|
|
191
196
|
|
|
192
197
|
## SDK Infrastructure
|
|
193
198
|
|
|
194
199
|
### Configuration
|
|
195
200
|
|
|
196
|
-
* [ProxySettings](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
197
|
-
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
198
|
-
* [AbstractLogger](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
199
|
-
* [LoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
200
|
-
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
201
|
-
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
201
|
+
* [ProxySettings](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/proxy-settings.md)
|
|
202
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/environment-based-client-initialization.md)
|
|
203
|
+
* [AbstractLogger](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/abstract-logger.md)
|
|
204
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/logging-configuration.md)
|
|
205
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/request-logging-configuration.md)
|
|
206
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/response-logging-configuration.md)
|
|
202
207
|
|
|
203
208
|
### HTTP
|
|
204
209
|
|
|
205
|
-
* [HttpResponse](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
206
|
-
* [HttpRequest](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
210
|
+
* [HttpResponse](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/http-response.md)
|
|
211
|
+
* [HttpRequest](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/http-request.md)
|
|
207
212
|
|
|
208
213
|
### Utilities
|
|
209
214
|
|
|
210
|
-
* [ApiResponse](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
211
|
-
* [ApiHelper](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
212
|
-
* [DateTimeHelper](https://www.github.com/sdks-io/twilio-api-sdk-ruby
|
|
215
|
+
* [ApiResponse](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/api-response.md)
|
|
216
|
+
* [ApiHelper](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/api-helper.md)
|
|
217
|
+
* [DateTimeHelper](https://www.github.com/sdks-io/twilio-api-sdk-ruby/tree/1.0.1/doc/date-time-helper.md)
|
|
213
218
|
|
|
@@ -10,7 +10,7 @@ module TwilioApIs
|
|
|
10
10
|
attr_accessor :config, :http_call_back
|
|
11
11
|
|
|
12
12
|
def self.user_agent
|
|
13
|
-
'Ruby-SDK/1.0.
|
|
13
|
+
'Ruby-SDK/1.0.1 (OS: {os-info}, Engine: {engine}/{engine-version})'
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def self.user_agent_parameters
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# SmsApi
|
|
8
|
+
class SmsApi < BaseApi
|
|
9
|
+
# Send a message
|
|
10
|
+
# @param [String] account_sid Required parameter: The SID of the
|
|
11
|
+
# [Account](https://www.twilio.com/docs/iam/api/account) creating the
|
|
12
|
+
# Message resource.
|
|
13
|
+
# @param [String] to Required parameter: The recipient's phone number in
|
|
14
|
+
# [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for
|
|
15
|
+
# SMS/MMS) or [channel
|
|
16
|
+
# address](https://www.twilio.com/docs/messaging/channels), e.g.
|
|
17
|
+
# `whatsapp:+15552229999`.
|
|
18
|
+
# @param [String] status_callback Optional parameter: The URL of the
|
|
19
|
+
# endpoint to which Twilio sends [Message status callback
|
|
20
|
+
# requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-req
|
|
21
|
+
# uest-to-the-statuscallback-url). URL must contain a valid hostname and
|
|
22
|
+
# underscores are not allowed. If you include this parameter with the
|
|
23
|
+
# `messaging_service_sid`, Twilio uses this URL instead of the Status
|
|
24
|
+
# Callback URL of the [Messaging
|
|
25
|
+
# Service](https://www.twilio.com/docs/messaging/api/service-resource).
|
|
26
|
+
# @param [String] application_sid Optional parameter: The SID of the
|
|
27
|
+
# associated [TwiML
|
|
28
|
+
# Application](https://www.twilio.com/docs/usage/api/applications). [Message
|
|
29
|
+
# status callback
|
|
30
|
+
# requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-req
|
|
31
|
+
# uest-to-the-statuscallback-url) are sent to the TwiML App's
|
|
32
|
+
# `message_status_callback` URL. Note that the `status_callback` parameter
|
|
33
|
+
# of a request takes priority over the `application_sid` parameter; if both
|
|
34
|
+
# are included `application_sid` is ignored.
|
|
35
|
+
# @param [Float] max_price Optional parameter: [OBSOLETE] This parameter
|
|
36
|
+
# will no longer have any effect as of 2024-06-03.
|
|
37
|
+
# @param [TrueClass | FalseClass] provide_feedback Optional parameter:
|
|
38
|
+
# Boolean indicating whether or not you intend to provide delivery
|
|
39
|
+
# confirmation feedback to Twilio (used in conjunction with the [Message
|
|
40
|
+
# Feedback
|
|
41
|
+
# subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource
|
|
42
|
+
# )). Default value is `false`.
|
|
43
|
+
# @param [Integer] attempt Optional parameter: Total number of attempts made
|
|
44
|
+
# (including this request) to send the message regardless of the provider
|
|
45
|
+
# used
|
|
46
|
+
# @param [Integer] validity_period Optional parameter: The maximum length in
|
|
47
|
+
# seconds that the Message can remain in Twilio's outgoing message queue. If
|
|
48
|
+
# a queued Message exceeds the `validity_period`, the Message is not sent.
|
|
49
|
+
# Accepted values are integers from `1` to `36000`. Default value is
|
|
50
|
+
# `36000`. A `validity_period` greater than `5` is recommended. [Learn more
|
|
51
|
+
# about the validity
|
|
52
|
+
# period](https://www.twilio.com/blog/take-more-control-of-outbound-messages
|
|
53
|
+
# -using-validity-period-html)
|
|
54
|
+
# @param [TrueClass | FalseClass] force_delivery Optional parameter:
|
|
55
|
+
# Reserved
|
|
56
|
+
# @param [MessageEnumContentRetention] content_retention Optional parameter:
|
|
57
|
+
# Determines if the message content can be stored or redacted based on
|
|
58
|
+
# privacy settings
|
|
59
|
+
# @param [MessageEnumAddressRetention] address_retention Optional parameter:
|
|
60
|
+
# Determines if the address can be stored or obfuscated based on privacy
|
|
61
|
+
# settings
|
|
62
|
+
# @param [TrueClass | FalseClass] smart_encoded Optional parameter: Whether
|
|
63
|
+
# to detect Unicode characters that have a similar GSM-7 character and
|
|
64
|
+
# replace them. Can be: `true` or `false`.
|
|
65
|
+
# @param [Array[String]] persistent_action Optional parameter: Rich actions
|
|
66
|
+
# for non-SMS/MMS channels. Used for [sending location in WhatsApp
|
|
67
|
+
# messages](https://www.twilio.com/docs/whatsapp/message-features#location-m
|
|
68
|
+
# essages-with-whatsapp).
|
|
69
|
+
# @param [MessageEnumTrafficType] traffic_type Optional parameter: TODO:
|
|
70
|
+
# type description here
|
|
71
|
+
# @param [TrueClass | FalseClass] shorten_urls Optional parameter: For
|
|
72
|
+
# Messaging Services with [Link Shortening
|
|
73
|
+
# configured](https://www.twilio.com/docs/messaging/features/link-shortening
|
|
74
|
+
# ) only: A Boolean indicating whether or not Twilio should shorten links in
|
|
75
|
+
# the `body` of the Message. Default value is `false`. If `true`, the
|
|
76
|
+
# `messaging_service_sid` parameter must also be provided.
|
|
77
|
+
# @param [MessageEnumScheduleType] schedule_type Optional parameter: For
|
|
78
|
+
# Messaging Services only: Include this parameter with a value of `fixed` in
|
|
79
|
+
# conjuction with the `send_time` parameter in order to [schedule a
|
|
80
|
+
# Message](https://www.twilio.com/docs/messaging/features/message-scheduling
|
|
81
|
+
# ).
|
|
82
|
+
# @param [DateTime] send_at Optional parameter: The time that Twilio will
|
|
83
|
+
# send the message. Must be in ISO 8601 format.
|
|
84
|
+
# @param [TrueClass | FalseClass] send_as_mms Optional parameter: If set to
|
|
85
|
+
# `true`, Twilio delivers the message as a single MMS message, regardless of
|
|
86
|
+
# the presence of media.
|
|
87
|
+
# @param [String] content_variables Optional parameter: For [Content
|
|
88
|
+
# Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of
|
|
89
|
+
# [Template
|
|
90
|
+
# variables](https://www.twilio.com/docs/content/using-variables-with-conten
|
|
91
|
+
# t-api) and their substitution values. `content_sid` parameter must also be
|
|
92
|
+
# provided. If values are not defined in the `content_variables` parameter,
|
|
93
|
+
# the [Template's default placeholder
|
|
94
|
+
# values](https://www.twilio.com/docs/content/content-api-resources#create-t
|
|
95
|
+
# emplates) are used.
|
|
96
|
+
# @param [VerificationEnumRiskCheck] risk_check Optional parameter: Include
|
|
97
|
+
# this parameter with a value of `disable` to skip any kind of risk check on
|
|
98
|
+
# the respective message request.
|
|
99
|
+
# @param [String] from Optional parameter: The sender's Twilio phone number
|
|
100
|
+
# (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric
|
|
101
|
+
# sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless
|
|
102
|
+
# SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-m
|
|
103
|
+
# achine-machine-sms-commands), [short
|
|
104
|
+
# code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or
|
|
105
|
+
# [channel address](https://www.twilio.com/docs/messaging/channels) (e.g.,
|
|
106
|
+
# `whatsapp:+15554449999`). The value of the `from` parameter must be a
|
|
107
|
+
# sender that is hosted within Twilio and belongs to the Account creating
|
|
108
|
+
# the Message. If you are using `messaging_service_sid`, this parameter can
|
|
109
|
+
# be empty (Twilio assigns a `from` value from the Messaging Service's
|
|
110
|
+
# Sender Pool) or you can provide a specific sender from your Sender Pool.
|
|
111
|
+
# @param [String] messaging_service_sid Optional parameter: The SID of the
|
|
112
|
+
# [Messaging Service](https://www.twilio.com/docs/messaging/services) you
|
|
113
|
+
# want to associate with the Message. When this parameter is provided and
|
|
114
|
+
# the `from` parameter is omitted, Twilio selects the optimal sender from
|
|
115
|
+
# the Messaging Service's Sender Pool. You may also provide a `from`
|
|
116
|
+
# parameter if you want to use a specific Sender from the Sender Pool.
|
|
117
|
+
# @param [String] body Optional parameter: The text content of the outgoing
|
|
118
|
+
# message. Can be up to 1,600 characters in length. SMS only: If the `body`
|
|
119
|
+
# contains more than 160
|
|
120
|
+
# [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encod
|
|
121
|
+
# ing) characters (or 70
|
|
122
|
+
# [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encod
|
|
123
|
+
# ing) characters), the message is segmented and charged accordingly. For
|
|
124
|
+
# long `body` text, consider using the [send_as_mms
|
|
125
|
+
# parameter](https://www.twilio.com/blog/mms-for-long-text-messages).
|
|
126
|
+
# @param [Array[String]] media_url Optional parameter: The URL of media to
|
|
127
|
+
# include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types
|
|
128
|
+
# are fully supported by Twilio and content is formatted for delivery on
|
|
129
|
+
# destination devices. The media size limit is 5 MB for supported file types
|
|
130
|
+
# (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other
|
|
131
|
+
# types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types)
|
|
132
|
+
# of accepted media. To send more than one image in the message, provide
|
|
133
|
+
# multiple `media_url` parameters in the POST request. You can include up to
|
|
134
|
+
# ten `media_url` parameters per message.
|
|
135
|
+
# [International](https://support.twilio.com/hc/en-us/articles/223179808-Sen
|
|
136
|
+
# ding-and-receiving-MMS-messages) and
|
|
137
|
+
# [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-su
|
|
138
|
+
# pported-for-all-carriers-in-US-and-Canada-) limits apply.
|
|
139
|
+
# @param [String] content_sid Optional parameter: For [Content
|
|
140
|
+
# Editor/API](https://www.twilio.com/docs/content) only: The SID of the
|
|
141
|
+
# Content Template to be used with the Message, e.g.,
|
|
142
|
+
# `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a
|
|
143
|
+
# Content Template is not used. Find the SID in the Console on the Content
|
|
144
|
+
# Editor page. For Content API users, the SID is found in Twilio's response
|
|
145
|
+
# when [creating the
|
|
146
|
+
# Template](https://www.twilio.com/docs/content/content-api-resources#create
|
|
147
|
+
# -templates) or by [fetching your
|
|
148
|
+
# Templates](https://www.twilio.com/docs/content/content-api-resources#fetch
|
|
149
|
+
# -all-content-resources).
|
|
150
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
151
|
+
def create_message(account_sid,
|
|
152
|
+
to,
|
|
153
|
+
status_callback: nil,
|
|
154
|
+
application_sid: nil,
|
|
155
|
+
max_price: nil,
|
|
156
|
+
provide_feedback: nil,
|
|
157
|
+
attempt: nil,
|
|
158
|
+
validity_period: nil,
|
|
159
|
+
force_delivery: nil,
|
|
160
|
+
content_retention: nil,
|
|
161
|
+
address_retention: nil,
|
|
162
|
+
smart_encoded: nil,
|
|
163
|
+
persistent_action: nil,
|
|
164
|
+
traffic_type: nil,
|
|
165
|
+
shorten_urls: nil,
|
|
166
|
+
schedule_type: nil,
|
|
167
|
+
send_at: nil,
|
|
168
|
+
send_as_mms: nil,
|
|
169
|
+
content_variables: nil,
|
|
170
|
+
risk_check: nil,
|
|
171
|
+
from: nil,
|
|
172
|
+
messaging_service_sid: nil,
|
|
173
|
+
body: nil,
|
|
174
|
+
media_url: nil,
|
|
175
|
+
content_sid: nil)
|
|
176
|
+
@api_call
|
|
177
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
178
|
+
'/2010-04-01/Accounts/{AccountSid}/Messages.json',
|
|
179
|
+
Server::DEFAULT6)
|
|
180
|
+
.template_param(new_parameter(account_sid, key: 'AccountSid')
|
|
181
|
+
.is_required(true)
|
|
182
|
+
.should_encode(true))
|
|
183
|
+
.form_param(new_parameter(to, key: 'To')
|
|
184
|
+
.is_required(true))
|
|
185
|
+
.form_param(new_parameter(status_callback, key: 'StatusCallback'))
|
|
186
|
+
.form_param(new_parameter(application_sid, key: 'ApplicationSid'))
|
|
187
|
+
.form_param(new_parameter(max_price, key: 'MaxPrice'))
|
|
188
|
+
.form_param(new_parameter(provide_feedback, key: 'ProvideFeedback'))
|
|
189
|
+
.form_param(new_parameter(attempt, key: 'Attempt'))
|
|
190
|
+
.form_param(new_parameter(validity_period, key: 'ValidityPeriod'))
|
|
191
|
+
.form_param(new_parameter(force_delivery, key: 'ForceDelivery'))
|
|
192
|
+
.form_param(new_parameter(content_retention, key: 'ContentRetention'))
|
|
193
|
+
.form_param(new_parameter(address_retention, key: 'AddressRetention'))
|
|
194
|
+
.form_param(new_parameter(smart_encoded, key: 'SmartEncoded'))
|
|
195
|
+
.form_param(new_parameter(persistent_action, key: 'PersistentAction'))
|
|
196
|
+
.form_param(new_parameter(traffic_type, key: 'TrafficType'))
|
|
197
|
+
.form_param(new_parameter(shorten_urls, key: 'ShortenUrls'))
|
|
198
|
+
.form_param(new_parameter(schedule_type, key: 'ScheduleType'))
|
|
199
|
+
.form_param(new_parameter(send_at, key: 'SendAt'))
|
|
200
|
+
.form_param(new_parameter(send_as_mms, key: 'SendAsMms'))
|
|
201
|
+
.form_param(new_parameter(content_variables, key: 'ContentVariables'))
|
|
202
|
+
.form_param(new_parameter(risk_check, key: 'RiskCheck'))
|
|
203
|
+
.form_param(new_parameter(from, key: 'From'))
|
|
204
|
+
.form_param(new_parameter(messaging_service_sid, key: 'MessagingServiceSid'))
|
|
205
|
+
.form_param(new_parameter(body, key: 'Body'))
|
|
206
|
+
.form_param(new_parameter(media_url, key: 'MediaUrl'))
|
|
207
|
+
.form_param(new_parameter(content_sid, key: 'ContentSid'))
|
|
208
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
209
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
210
|
+
.auth(Single.new('accountSid_authToken')))
|
|
211
|
+
.response(new_response_handler
|
|
212
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
213
|
+
.deserialize_into(ApiV2010AccountMessage.method(:from_hash))
|
|
214
|
+
.is_api_response(true))
|
|
215
|
+
.execute
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
end
|
data/lib/twilio_ap_is/client.rb
CHANGED
|
@@ -361,6 +361,12 @@ module TwilioApIs
|
|
|
361
361
|
@verify_v2_verification_check ||= VerifyV2VerificationCheckApi.new @global_configuration
|
|
362
362
|
end
|
|
363
363
|
|
|
364
|
+
# Access to sms controller.
|
|
365
|
+
# @return [SmsApi] Returns the controller instance.
|
|
366
|
+
def sms
|
|
367
|
+
@sms ||= SmsApi.new @global_configuration
|
|
368
|
+
end
|
|
369
|
+
|
|
364
370
|
def initialize(
|
|
365
371
|
connection: nil, adapter: :net_http_persistent, timeout: 30,
|
|
366
372
|
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
|
@@ -26,7 +26,8 @@ module TwilioApIs
|
|
|
26
26
|
DEFAULT2 = 'default2'.freeze,
|
|
27
27
|
DEFAULT3 = 'default3'.freeze,
|
|
28
28
|
DEFAULT4 = 'default4'.freeze,
|
|
29
|
-
DEFAULT5 = 'default5'.freeze
|
|
29
|
+
DEFAULT5 = 'default5'.freeze,
|
|
30
|
+
DEFAULT6 = 'default6'.freeze
|
|
30
31
|
].freeze
|
|
31
32
|
|
|
32
33
|
# Converts a string or symbol into a valid Server constant.
|
|
@@ -41,6 +42,7 @@ module TwilioApIs
|
|
|
41
42
|
when 'default3' then DEFAULT3
|
|
42
43
|
when 'default4' then DEFAULT4
|
|
43
44
|
when 'default5' then DEFAULT5
|
|
45
|
+
when 'default6' then DEFAULT6
|
|
44
46
|
|
|
45
47
|
else
|
|
46
48
|
warn "[Server] Unknown server '#{value}', falling back to #{default_value} "
|
|
@@ -128,7 +130,8 @@ module TwilioApIs
|
|
|
128
130
|
Server::DEFAULT2 => 'https://conversations.twilio.com',
|
|
129
131
|
Server::DEFAULT3 => 'https://notify.twilio.com',
|
|
130
132
|
Server::DEFAULT4 => 'https://taskrouter.twilio.com',
|
|
131
|
-
Server::DEFAULT5 => 'https://verify.twilio.com'
|
|
133
|
+
Server::DEFAULT5 => 'https://verify.twilio.com',
|
|
134
|
+
Server::DEFAULT6 => 'https://api.twilio.com'
|
|
132
135
|
}
|
|
133
136
|
}.freeze
|
|
134
137
|
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# ApiV2010AccountMessage Model.
|
|
8
|
+
class ApiV2010AccountMessage < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The text content of the message
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :body
|
|
15
|
+
|
|
16
|
+
# The number of segments that make up the complete message. SMS message
|
|
17
|
+
# bodies that exceed the [character
|
|
18
|
+
# limit](https://www.twilio.com/docs/glossary/what-sms-character-limit) are
|
|
19
|
+
# segmented and charged as multiple messages. Note: For messages sent via a
|
|
20
|
+
# Messaging Service, `num_segments` is initially `0`, since a sender hasn't
|
|
21
|
+
# yet been assigned.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :num_segments
|
|
24
|
+
|
|
25
|
+
# The direction of the message. Can be: `inbound` for incoming messages,
|
|
26
|
+
# `outbound-api` for messages created by the REST API, `outbound-call` for
|
|
27
|
+
# messages created during a call, or `outbound-reply` for messages created
|
|
28
|
+
# in response to an incoming message.
|
|
29
|
+
# @return [MessageEnumDirection]
|
|
30
|
+
attr_accessor :direction
|
|
31
|
+
|
|
32
|
+
# The sender's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164)
|
|
33
|
+
# format), [alphanumeric sender
|
|
34
|
+
# ID](https://www.twilio.com/docs/sms/quickstart), [Wireless
|
|
35
|
+
# SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-m
|
|
36
|
+
# achine-machine-sms-commands), [short
|
|
37
|
+
# code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or
|
|
38
|
+
# [channel address](https://www.twilio.com/docs/messaging/channels) (e.g.,
|
|
39
|
+
# `whatsapp:+15554449999`). For incoming messages, this is the number or
|
|
40
|
+
# channel address of the sender. For outgoing messages, this value is a
|
|
41
|
+
# Twilio phone number, alphanumeric sender ID, short code, or channel
|
|
42
|
+
# address from which the message is sent.
|
|
43
|
+
# @return [String]
|
|
44
|
+
attr_accessor :from
|
|
45
|
+
|
|
46
|
+
# The recipient's phone number (in
|
|
47
|
+
# [E.164](https://en.wikipedia.org/wiki/E.164) format) or [channel
|
|
48
|
+
# address](https://www.twilio.com/docs/messaging/channels) (e.g.
|
|
49
|
+
# `whatsapp:+15552229999`)
|
|
50
|
+
# @return [String]
|
|
51
|
+
attr_accessor :to
|
|
52
|
+
|
|
53
|
+
# The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3)
|
|
54
|
+
# timestamp (in GMT) of when the Message resource was last updated
|
|
55
|
+
# @return [String]
|
|
56
|
+
attr_accessor :date_updated
|
|
57
|
+
|
|
58
|
+
# The amount billed for the message in the currency specified by
|
|
59
|
+
# `price_unit`. The `price` is populated after the message has been
|
|
60
|
+
# sent/received, and may not be immediately availalble. View the [Pricing
|
|
61
|
+
# page](https://www.twilio.com/en-us/pricing) for more details.
|
|
62
|
+
# @return [String]
|
|
63
|
+
attr_accessor :price
|
|
64
|
+
|
|
65
|
+
# The description of the `error_code` if the Message `status` is `failed` or
|
|
66
|
+
# `undelivered`. If no error was encountered, the value is `null`. The value
|
|
67
|
+
# returned in this field for a specific error cause is subject to change as
|
|
68
|
+
# Twilio improves errors. Users should not use the `error_code` and
|
|
69
|
+
# `error_message` fields programmatically.
|
|
70
|
+
# @return [String]
|
|
71
|
+
attr_accessor :error_message
|
|
72
|
+
|
|
73
|
+
# The URI of the Message resource, relative to `https://api.twilio.com`.
|
|
74
|
+
# @return [String]
|
|
75
|
+
attr_accessor :uri
|
|
76
|
+
|
|
77
|
+
# The SID of the [Account](https://www.twilio.com/docs/iam/api/account)
|
|
78
|
+
# associated with the Message resource
|
|
79
|
+
# @return [String]
|
|
80
|
+
attr_accessor :account_sid
|
|
81
|
+
|
|
82
|
+
# The number of media files associated with the Message resource.
|
|
83
|
+
# @return [String]
|
|
84
|
+
attr_accessor :num_media
|
|
85
|
+
|
|
86
|
+
# The status of the Message. Possible values: `accepted`, `scheduled`,
|
|
87
|
+
# `canceled`, `queued`, `sending`, `sent`, `failed`, `delivered`,
|
|
88
|
+
# `undelivered`, `receiving`, `received`, or `read` (WhatsApp only). For
|
|
89
|
+
# more information, See [detailed
|
|
90
|
+
# descriptions](https://www.twilio.com/docs/sms/api/message-resource#message
|
|
91
|
+
# -status-values).
|
|
92
|
+
# @return [VerificationAttemptEnumMessageStatus]
|
|
93
|
+
attr_accessor :status
|
|
94
|
+
|
|
95
|
+
# The SID of the [Messaging
|
|
96
|
+
# Service](https://www.twilio.com/docs/messaging/api/service-resource)
|
|
97
|
+
# associated with the Message resource. A unique default value is assigned
|
|
98
|
+
# if a Messaging Service is not used.
|
|
99
|
+
# @return [String]
|
|
100
|
+
attr_accessor :messaging_service_sid
|
|
101
|
+
|
|
102
|
+
# The unique, Twilio-provided string that identifies the Message resource.
|
|
103
|
+
# @return [String]
|
|
104
|
+
attr_accessor :sid
|
|
105
|
+
|
|
106
|
+
# The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3)
|
|
107
|
+
# timestamp (in GMT) of when the Message was sent. For an outgoing message,
|
|
108
|
+
# this is when Twilio sent the message. For an incoming message, this is
|
|
109
|
+
# when Twilio sent the HTTP request to your incoming message webhook URL.
|
|
110
|
+
# @return [String]
|
|
111
|
+
attr_accessor :date_sent
|
|
112
|
+
|
|
113
|
+
# The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3)
|
|
114
|
+
# timestamp (in GMT) of when the Message resource was created
|
|
115
|
+
# @return [String]
|
|
116
|
+
attr_accessor :date_created
|
|
117
|
+
|
|
118
|
+
# The [error code](https://www.twilio.com/docs/api/errors) returned if the
|
|
119
|
+
# Message `status` is `failed` or `undelivered`. If no error was
|
|
120
|
+
# encountered, the value is `null`. The value returned in this field for a
|
|
121
|
+
# specific error cause is subject to change as Twilio improves errors. Users
|
|
122
|
+
# should not use the `error_code` and `error_message` fields
|
|
123
|
+
# programmatically.
|
|
124
|
+
# @return [Integer]
|
|
125
|
+
attr_accessor :error_code
|
|
126
|
+
|
|
127
|
+
# The currency in which `price` is measured, in [ISO
|
|
128
|
+
# 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format
|
|
129
|
+
# (e.g. `usd`, `eur`, `jpy`).
|
|
130
|
+
# @return [String]
|
|
131
|
+
attr_accessor :price_unit
|
|
132
|
+
|
|
133
|
+
# The API version used to process the Message
|
|
134
|
+
# @return [String]
|
|
135
|
+
attr_accessor :api_version
|
|
136
|
+
|
|
137
|
+
# A list of related resources identified by their URIs relative to
|
|
138
|
+
# `https://api.twilio.com`
|
|
139
|
+
# @return [Object]
|
|
140
|
+
attr_accessor :subresource_uris
|
|
141
|
+
|
|
142
|
+
# A mapping from model property names to API property names.
|
|
143
|
+
def self.names
|
|
144
|
+
@_hash = {} if @_hash.nil?
|
|
145
|
+
@_hash['body'] = 'body'
|
|
146
|
+
@_hash['num_segments'] = 'num_segments'
|
|
147
|
+
@_hash['direction'] = 'direction'
|
|
148
|
+
@_hash['from'] = 'from'
|
|
149
|
+
@_hash['to'] = 'to'
|
|
150
|
+
@_hash['date_updated'] = 'date_updated'
|
|
151
|
+
@_hash['price'] = 'price'
|
|
152
|
+
@_hash['error_message'] = 'error_message'
|
|
153
|
+
@_hash['uri'] = 'uri'
|
|
154
|
+
@_hash['account_sid'] = 'account_sid'
|
|
155
|
+
@_hash['num_media'] = 'num_media'
|
|
156
|
+
@_hash['status'] = 'status'
|
|
157
|
+
@_hash['messaging_service_sid'] = 'messaging_service_sid'
|
|
158
|
+
@_hash['sid'] = 'sid'
|
|
159
|
+
@_hash['date_sent'] = 'date_sent'
|
|
160
|
+
@_hash['date_created'] = 'date_created'
|
|
161
|
+
@_hash['error_code'] = 'error_code'
|
|
162
|
+
@_hash['price_unit'] = 'price_unit'
|
|
163
|
+
@_hash['api_version'] = 'api_version'
|
|
164
|
+
@_hash['subresource_uris'] = 'subresource_uris'
|
|
165
|
+
@_hash
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# An array for optional fields
|
|
169
|
+
def self.optionals
|
|
170
|
+
%w[
|
|
171
|
+
body
|
|
172
|
+
num_segments
|
|
173
|
+
direction
|
|
174
|
+
from
|
|
175
|
+
to
|
|
176
|
+
date_updated
|
|
177
|
+
price
|
|
178
|
+
error_message
|
|
179
|
+
uri
|
|
180
|
+
account_sid
|
|
181
|
+
num_media
|
|
182
|
+
status
|
|
183
|
+
messaging_service_sid
|
|
184
|
+
sid
|
|
185
|
+
date_sent
|
|
186
|
+
date_created
|
|
187
|
+
error_code
|
|
188
|
+
price_unit
|
|
189
|
+
api_version
|
|
190
|
+
subresource_uris
|
|
191
|
+
]
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# An array for nullable fields
|
|
195
|
+
def self.nullables
|
|
196
|
+
%w[
|
|
197
|
+
body
|
|
198
|
+
num_segments
|
|
199
|
+
from
|
|
200
|
+
to
|
|
201
|
+
date_updated
|
|
202
|
+
price
|
|
203
|
+
error_message
|
|
204
|
+
uri
|
|
205
|
+
account_sid
|
|
206
|
+
num_media
|
|
207
|
+
messaging_service_sid
|
|
208
|
+
sid
|
|
209
|
+
date_sent
|
|
210
|
+
date_created
|
|
211
|
+
error_code
|
|
212
|
+
price_unit
|
|
213
|
+
api_version
|
|
214
|
+
subresource_uris
|
|
215
|
+
]
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
def initialize(body: SKIP, num_segments: SKIP, direction: SKIP, from: SKIP,
|
|
219
|
+
to: SKIP, date_updated: SKIP, price: SKIP,
|
|
220
|
+
error_message: SKIP, uri: SKIP, account_sid: SKIP,
|
|
221
|
+
num_media: SKIP, status: SKIP, messaging_service_sid: SKIP,
|
|
222
|
+
sid: SKIP, date_sent: SKIP, date_created: SKIP,
|
|
223
|
+
error_code: SKIP, price_unit: SKIP, api_version: SKIP,
|
|
224
|
+
subresource_uris: SKIP, additional_properties: nil)
|
|
225
|
+
# Add additional model properties to the instance
|
|
226
|
+
additional_properties = {} if additional_properties.nil?
|
|
227
|
+
|
|
228
|
+
@body = body unless body == SKIP
|
|
229
|
+
@num_segments = num_segments unless num_segments == SKIP
|
|
230
|
+
@direction = direction unless direction == SKIP
|
|
231
|
+
@from = from unless from == SKIP
|
|
232
|
+
@to = to unless to == SKIP
|
|
233
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
234
|
+
@price = price unless price == SKIP
|
|
235
|
+
@error_message = error_message unless error_message == SKIP
|
|
236
|
+
@uri = uri unless uri == SKIP
|
|
237
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
238
|
+
@num_media = num_media unless num_media == SKIP
|
|
239
|
+
@status = status unless status == SKIP
|
|
240
|
+
@messaging_service_sid = messaging_service_sid unless messaging_service_sid == SKIP
|
|
241
|
+
@sid = sid unless sid == SKIP
|
|
242
|
+
@date_sent = date_sent unless date_sent == SKIP
|
|
243
|
+
@date_created = date_created unless date_created == SKIP
|
|
244
|
+
@error_code = error_code unless error_code == SKIP
|
|
245
|
+
@price_unit = price_unit unless price_unit == SKIP
|
|
246
|
+
@api_version = api_version unless api_version == SKIP
|
|
247
|
+
@subresource_uris = subresource_uris unless subresource_uris == SKIP
|
|
248
|
+
@additional_properties = additional_properties
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Creates an instance of the object from a hash.
|
|
252
|
+
def self.from_hash(hash)
|
|
253
|
+
return nil unless hash
|
|
254
|
+
|
|
255
|
+
# Extract variables from the hash.
|
|
256
|
+
body = hash.key?('body') ? hash['body'] : SKIP
|
|
257
|
+
num_segments = hash.key?('num_segments') ? hash['num_segments'] : SKIP
|
|
258
|
+
direction = hash.key?('direction') ? hash['direction'] : SKIP
|
|
259
|
+
from = hash.key?('from') ? hash['from'] : SKIP
|
|
260
|
+
to = hash.key?('to') ? hash['to'] : SKIP
|
|
261
|
+
date_updated = hash.key?('date_updated') ? hash['date_updated'] : SKIP
|
|
262
|
+
price = hash.key?('price') ? hash['price'] : SKIP
|
|
263
|
+
error_message = hash.key?('error_message') ? hash['error_message'] : SKIP
|
|
264
|
+
uri = hash.key?('uri') ? hash['uri'] : SKIP
|
|
265
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
266
|
+
num_media = hash.key?('num_media') ? hash['num_media'] : SKIP
|
|
267
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
268
|
+
messaging_service_sid =
|
|
269
|
+
hash.key?('messaging_service_sid') ? hash['messaging_service_sid'] : SKIP
|
|
270
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
271
|
+
date_sent = hash.key?('date_sent') ? hash['date_sent'] : SKIP
|
|
272
|
+
date_created = hash.key?('date_created') ? hash['date_created'] : SKIP
|
|
273
|
+
error_code = hash.key?('error_code') ? hash['error_code'] : SKIP
|
|
274
|
+
price_unit = hash.key?('price_unit') ? hash['price_unit'] : SKIP
|
|
275
|
+
api_version = hash.key?('api_version') ? hash['api_version'] : SKIP
|
|
276
|
+
subresource_uris =
|
|
277
|
+
hash.key?('subresource_uris') ? hash['subresource_uris'] : SKIP
|
|
278
|
+
|
|
279
|
+
# Create a new hash for additional properties, removing known properties.
|
|
280
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
281
|
+
|
|
282
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
283
|
+
new_hash, proc { |value| value }
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
# Create object from extracted values.
|
|
287
|
+
ApiV2010AccountMessage.new(body: body,
|
|
288
|
+
num_segments: num_segments,
|
|
289
|
+
direction: direction,
|
|
290
|
+
from: from,
|
|
291
|
+
to: to,
|
|
292
|
+
date_updated: date_updated,
|
|
293
|
+
price: price,
|
|
294
|
+
error_message: error_message,
|
|
295
|
+
uri: uri,
|
|
296
|
+
account_sid: account_sid,
|
|
297
|
+
num_media: num_media,
|
|
298
|
+
status: status,
|
|
299
|
+
messaging_service_sid: messaging_service_sid,
|
|
300
|
+
sid: sid,
|
|
301
|
+
date_sent: date_sent,
|
|
302
|
+
date_created: date_created,
|
|
303
|
+
error_code: error_code,
|
|
304
|
+
price_unit: price_unit,
|
|
305
|
+
api_version: api_version,
|
|
306
|
+
subresource_uris: subresource_uris,
|
|
307
|
+
additional_properties: additional_properties)
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Provides a human-readable string representation of the object.
|
|
311
|
+
def to_s
|
|
312
|
+
class_name = self.class.name.split('::').last
|
|
313
|
+
"<#{class_name} body: #{@body}, num_segments: #{@num_segments}, direction: #{@direction},"\
|
|
314
|
+
" from: #{@from}, to: #{@to}, date_updated: #{@date_updated}, price: #{@price},"\
|
|
315
|
+
" error_message: #{@error_message}, uri: #{@uri}, account_sid: #{@account_sid}, num_media:"\
|
|
316
|
+
" #{@num_media}, status: #{@status}, messaging_service_sid: #{@messaging_service_sid}, sid:"\
|
|
317
|
+
" #{@sid}, date_sent: #{@date_sent}, date_created: #{@date_created}, error_code:"\
|
|
318
|
+
" #{@error_code}, price_unit: #{@price_unit}, api_version: #{@api_version},"\
|
|
319
|
+
" subresource_uris: #{@subresource_uris}, additional_properties: #{@additional_properties}>"
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
323
|
+
def inspect
|
|
324
|
+
class_name = self.class.name.split('::').last
|
|
325
|
+
"<#{class_name} body: #{@body.inspect}, num_segments: #{@num_segments.inspect}, direction:"\
|
|
326
|
+
" #{@direction.inspect}, from: #{@from.inspect}, to: #{@to.inspect}, date_updated:"\
|
|
327
|
+
" #{@date_updated.inspect}, price: #{@price.inspect}, error_message:"\
|
|
328
|
+
" #{@error_message.inspect}, uri: #{@uri.inspect}, account_sid: #{@account_sid.inspect},"\
|
|
329
|
+
" num_media: #{@num_media.inspect}, status: #{@status.inspect}, messaging_service_sid:"\
|
|
330
|
+
" #{@messaging_service_sid.inspect}, sid: #{@sid.inspect}, date_sent: #{@date_sent.inspect},"\
|
|
331
|
+
" date_created: #{@date_created.inspect}, error_code: #{@error_code.inspect}, price_unit:"\
|
|
332
|
+
" #{@price_unit.inspect}, api_version: #{@api_version.inspect}, subresource_uris:"\
|
|
333
|
+
" #{@subresource_uris.inspect}, additional_properties: #{@additional_properties}>"
|
|
334
|
+
end
|
|
335
|
+
end
|
|
336
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# Determines if the address can be stored or obfuscated based on privacy
|
|
8
|
+
# settings
|
|
9
|
+
class MessageEnumAddressRetention
|
|
10
|
+
MESSAGE_ENUM_ADDRESS_RETENTION = [
|
|
11
|
+
# TODO: Write general description for RETAIN
|
|
12
|
+
RETAIN = 'retain'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for OBFUSCATE
|
|
15
|
+
OBFUSCATE = 'obfuscate'.freeze
|
|
16
|
+
].freeze
|
|
17
|
+
|
|
18
|
+
def self.validate(value)
|
|
19
|
+
return false if value.nil?
|
|
20
|
+
|
|
21
|
+
MESSAGE_ENUM_ADDRESS_RETENTION.include?(value)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.from_value(value, default_value = RETAIN)
|
|
25
|
+
return default_value if value.nil?
|
|
26
|
+
|
|
27
|
+
str = value.to_s.strip
|
|
28
|
+
|
|
29
|
+
case str.downcase
|
|
30
|
+
when 'retain' then RETAIN
|
|
31
|
+
when 'obfuscate' then OBFUSCATE
|
|
32
|
+
else
|
|
33
|
+
default_value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# Determines if the message content can be stored or redacted based on privacy
|
|
8
|
+
# settings
|
|
9
|
+
class MessageEnumContentRetention
|
|
10
|
+
MESSAGE_ENUM_CONTENT_RETENTION = [
|
|
11
|
+
# TODO: Write general description for RETAIN
|
|
12
|
+
RETAIN = 'retain'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for DISCARD
|
|
15
|
+
DISCARD = 'discard'.freeze
|
|
16
|
+
].freeze
|
|
17
|
+
|
|
18
|
+
def self.validate(value)
|
|
19
|
+
return false if value.nil?
|
|
20
|
+
|
|
21
|
+
MESSAGE_ENUM_CONTENT_RETENTION.include?(value)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.from_value(value, default_value = RETAIN)
|
|
25
|
+
return default_value if value.nil?
|
|
26
|
+
|
|
27
|
+
str = value.to_s.strip
|
|
28
|
+
|
|
29
|
+
case str.downcase
|
|
30
|
+
when 'retain' then RETAIN
|
|
31
|
+
when 'discard' then DISCARD
|
|
32
|
+
else
|
|
33
|
+
default_value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# The direction of the message. Can be: `inbound` for incoming messages,
|
|
8
|
+
# `outbound-api` for messages created by the REST API, `outbound-call` for
|
|
9
|
+
# messages created during a call, or `outbound-reply` for messages created in
|
|
10
|
+
# response to an incoming message.
|
|
11
|
+
class MessageEnumDirection
|
|
12
|
+
MESSAGE_ENUM_DIRECTION = [
|
|
13
|
+
# TODO: Write general description for INBOUND
|
|
14
|
+
INBOUND = 'inbound'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for OUTBOUNDAPI
|
|
17
|
+
OUTBOUNDAPI = 'outbound-api'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for OUTBOUNDCALL
|
|
20
|
+
OUTBOUNDCALL = 'outbound-call'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for OUTBOUNDREPLY
|
|
23
|
+
OUTBOUNDREPLY = 'outbound-reply'.freeze
|
|
24
|
+
].freeze
|
|
25
|
+
|
|
26
|
+
def self.validate(value)
|
|
27
|
+
return false if value.nil?
|
|
28
|
+
|
|
29
|
+
MESSAGE_ENUM_DIRECTION.include?(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.from_value(value, default_value = INBOUND)
|
|
33
|
+
return default_value if value.nil?
|
|
34
|
+
|
|
35
|
+
str = value.to_s.strip
|
|
36
|
+
|
|
37
|
+
case str.downcase
|
|
38
|
+
when 'inbound' then INBOUND
|
|
39
|
+
when 'outboundapi' then OUTBOUNDAPI
|
|
40
|
+
when 'outboundcall' then OUTBOUNDCALL
|
|
41
|
+
when 'outboundreply' then OUTBOUNDREPLY
|
|
42
|
+
else
|
|
43
|
+
default_value
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# For Messaging Services only: Include this parameter with a value of `fixed`
|
|
8
|
+
# in conjuction with the `send_time` parameter in order to [schedule a
|
|
9
|
+
# Message](https://www.twilio.com/docs/messaging/features/message-scheduling).
|
|
10
|
+
class MessageEnumScheduleType
|
|
11
|
+
MESSAGE_ENUM_SCHEDULE_TYPE = [
|
|
12
|
+
# TODO: Write general description for FIXED
|
|
13
|
+
FIXED = 'fixed'.freeze
|
|
14
|
+
].freeze
|
|
15
|
+
|
|
16
|
+
def self.validate(value)
|
|
17
|
+
return false if value.nil?
|
|
18
|
+
|
|
19
|
+
MESSAGE_ENUM_SCHEDULE_TYPE.include?(value)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def self.from_value(value, default_value = FIXED)
|
|
23
|
+
return default_value if value.nil?
|
|
24
|
+
|
|
25
|
+
default_value
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# message_enum_traffic_type.
|
|
8
|
+
class MessageEnumTrafficType
|
|
9
|
+
MESSAGE_ENUM_TRAFFIC_TYPE = [
|
|
10
|
+
# TODO: Write general description for FREE
|
|
11
|
+
FREE = 'free'.freeze
|
|
12
|
+
].freeze
|
|
13
|
+
|
|
14
|
+
def self.validate(value)
|
|
15
|
+
return false if value.nil?
|
|
16
|
+
|
|
17
|
+
MESSAGE_ENUM_TRAFFIC_TYPE.include?(value)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.from_value(value, default_value = FREE)
|
|
21
|
+
return default_value if value.nil?
|
|
22
|
+
|
|
23
|
+
default_value
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
# https://www.apimatic.io ).
|
|
5
5
|
|
|
6
6
|
module TwilioApIs
|
|
7
|
-
#
|
|
7
|
+
# The status of the Message. Possible values: `accepted`, `scheduled`,
|
|
8
|
+
# `canceled`, `queued`, `sending`, `sent`, `failed`, `delivered`,
|
|
9
|
+
# `undelivered`, `receiving`, `received`, or `read` (WhatsApp only). For more
|
|
10
|
+
# information, See [detailed
|
|
11
|
+
# descriptions](https://www.twilio.com/docs/sms/api/message-resource#message-s
|
|
12
|
+
# tatus-values).
|
|
8
13
|
class VerificationAttemptEnumMessageStatus
|
|
9
14
|
VERIFICATION_ATTEMPT_ENUM_MESSAGE_STATUS = [
|
|
10
15
|
# TODO: Write general description for QUEUED
|
|
@@ -7,7 +7,9 @@ module TwilioApIs
|
|
|
7
7
|
# Risk_check overrides Fraud Prevention measures like Fraud Guard, Geo
|
|
8
8
|
# Permissions etc per verification attempt basis, allowing Verify to block
|
|
9
9
|
# traffic considered fraudulent if enabled or bypass active protections if
|
|
10
|
-
# disabled. Can be: `enable`(default) or `disable`. For SMS channel only
|
|
10
|
+
# disabled. Can be: `enable`(default) or `disable`. For SMS channel only.,
|
|
11
|
+
# Include this parameter with a value of `disable` to skip any kind of risk
|
|
12
|
+
# check on the respective message request.
|
|
11
13
|
class VerificationEnumRiskCheck
|
|
12
14
|
VERIFICATION_ENUM_RISK_CHECK = [
|
|
13
15
|
# TODO: Write general description for ENABLE
|
data/lib/twilio_ap_is.rb
CHANGED
|
@@ -163,6 +163,7 @@ require_relative 'twilio_ap_is/models/verification_attempts'
|
|
|
163
163
|
require_relative 'twilio_ap_is/models/verification_check'
|
|
164
164
|
require_relative 'twilio_ap_is/models/verification_template'
|
|
165
165
|
require_relative 'twilio_ap_is/models/webhook'
|
|
166
|
+
require_relative 'twilio_ap_is/models/api_v2010_account_message'
|
|
166
167
|
require_relative 'twilio_ap_is/models/channel_channel_type'
|
|
167
168
|
require_relative 'twilio_ap_is/models/channel_webhook_enabled_type'
|
|
168
169
|
require_relative 'twilio_ap_is/models/configuration_address_type'
|
|
@@ -245,6 +246,11 @@ require_relative 'twilio_ap_is/models/' \
|
|
|
245
246
|
require_relative 'twilio_ap_is/models/verification_check_enum_channel'
|
|
246
247
|
require_relative 'twilio_ap_is/models/webhook_enum_status'
|
|
247
248
|
require_relative 'twilio_ap_is/models/webhook_enum_version'
|
|
249
|
+
require_relative 'twilio_ap_is/models/message_enum_direction'
|
|
250
|
+
require_relative 'twilio_ap_is/models/message_enum_content_retention'
|
|
251
|
+
require_relative 'twilio_ap_is/models/message_enum_address_retention'
|
|
252
|
+
require_relative 'twilio_ap_is/models/message_enum_traffic_type'
|
|
253
|
+
require_relative 'twilio_ap_is/models/message_enum_schedule_type'
|
|
248
254
|
|
|
249
255
|
# Exceptions
|
|
250
256
|
require_relative 'twilio_ap_is/exceptions/api_exception'
|
|
@@ -324,3 +330,4 @@ require_relative 'twilio_ap_is/apis/taskrouter_v1_workspace_statistics_api'
|
|
|
324
330
|
require_relative 'twilio_ap_is/apis/verify_v2_service_api'
|
|
325
331
|
require_relative 'twilio_ap_is/apis/verify_v2_verification_api'
|
|
326
332
|
require_relative 'twilio_ap_is/apis/verify_v2_verification_check_api'
|
|
333
|
+
require_relative 'twilio_ap_is/apis/sms_api'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twilio-api-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Muhammad Rafay
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: apimatic_core_interfaces
|
|
@@ -94,6 +94,7 @@ files:
|
|
|
94
94
|
- lib/twilio_ap_is/apis/notify_v1_credential_api.rb
|
|
95
95
|
- lib/twilio_ap_is/apis/notify_v1_notification_api.rb
|
|
96
96
|
- lib/twilio_ap_is/apis/notify_v1_service_api.rb
|
|
97
|
+
- lib/twilio_ap_is/apis/sms_api.rb
|
|
97
98
|
- lib/twilio_ap_is/apis/taskrouter_v1_activity_api.rb
|
|
98
99
|
- lib/twilio_ap_is/apis/taskrouter_v1_event_api.rb
|
|
99
100
|
- lib/twilio_ap_is/apis/taskrouter_v1_task_api.rb
|
|
@@ -139,6 +140,7 @@ files:
|
|
|
139
140
|
- lib/twilio_ap_is/models/access_token.rb
|
|
140
141
|
- lib/twilio_ap_is/models/access_token_enum_factor_types.rb
|
|
141
142
|
- lib/twilio_ap_is/models/activity.rb
|
|
143
|
+
- lib/twilio_ap_is/models/api_v2010_account_message.rb
|
|
142
144
|
- lib/twilio_ap_is/models/auth_token_promotion.rb
|
|
143
145
|
- lib/twilio_ap_is/models/base_model.rb
|
|
144
146
|
- lib/twilio_ap_is/models/binding.rb
|
|
@@ -225,6 +227,11 @@ files:
|
|
|
225
227
|
- lib/twilio_ap_is/models/list_worker_response.rb
|
|
226
228
|
- lib/twilio_ap_is/models/list_workflow_response.rb
|
|
227
229
|
- lib/twilio_ap_is/models/list_workspace_response.rb
|
|
230
|
+
- lib/twilio_ap_is/models/message_enum_address_retention.rb
|
|
231
|
+
- lib/twilio_ap_is/models/message_enum_content_retention.rb
|
|
232
|
+
- lib/twilio_ap_is/models/message_enum_direction.rb
|
|
233
|
+
- lib/twilio_ap_is/models/message_enum_schedule_type.rb
|
|
234
|
+
- lib/twilio_ap_is/models/message_enum_traffic_type.rb
|
|
228
235
|
- lib/twilio_ap_is/models/messaging_configuration.rb
|
|
229
236
|
- lib/twilio_ap_is/models/meta.rb
|
|
230
237
|
- lib/twilio_ap_is/models/msg_geopermissions.rb
|