sms_works_sdk 1.0.0
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 +7 -0
- data/Gemfile +7 -0
- data/README.md +120 -0
- data/Rakefile +8 -0
- data/docs/ApiKeyResponse.md +9 -0
- data/docs/AuthApi.md +102 -0
- data/docs/BatchMessage.md +11 -0
- data/docs/BatchMessageResponse.md +9 -0
- data/docs/BatchMessagesApi.md +224 -0
- data/docs/CancelledMessageResponse.md +9 -0
- data/docs/ErrorModel.md +9 -0
- data/docs/ExtendedErrorModel.md +10 -0
- data/docs/HelloWorldResponse.md +8 -0
- data/docs/Login.md +10 -0
- data/docs/Message.md +12 -0
- data/docs/MessageResponse.md +19 -0
- data/docs/MessagesApi.md +278 -0
- data/docs/MessagesResponse.md +8 -0
- data/docs/MessagesResponseMessages.md +8 -0
- data/docs/Query.md +13 -0
- data/docs/ScheduledBatchResponse.md +9 -0
- data/docs/ScheduledMessageResponse.md +9 -0
- data/docs/SendMessageResponse.md +10 -0
- data/docs/TokenResponse.md +8 -0
- data/docs/UtilsApi.md +56 -0
- data/git_push.sh +55 -0
- data/lib/swagger_client.rb +60 -0
- data/lib/swagger_client/api/auth_api.rb +134 -0
- data/lib/swagger_client/api/batch_messages_api.rb +243 -0
- data/lib/swagger_client/api/messages_api.rb +298 -0
- data/lib/swagger_client/api/utils_api.rb +75 -0
- data/lib/swagger_client/api_client.rb +389 -0
- data/lib/swagger_client/api_error.rb +38 -0
- data/lib/swagger_client/configuration.rb +209 -0
- data/lib/swagger_client/models/api_key_response.rb +207 -0
- data/lib/swagger_client/models/batch_message.rb +241 -0
- data/lib/swagger_client/models/batch_message_response.rb +207 -0
- data/lib/swagger_client/models/cancelled_message_response.rb +207 -0
- data/lib/swagger_client/models/error_model.rb +235 -0
- data/lib/swagger_client/models/extended_error_model.rb +249 -0
- data/lib/swagger_client/models/hello_world_response.rb +193 -0
- data/lib/swagger_client/models/login.rb +209 -0
- data/lib/swagger_client/models/message.rb +249 -0
- data/lib/swagger_client/models/message_response.rb +347 -0
- data/lib/swagger_client/models/messages_response.rb +188 -0
- data/lib/swagger_client/models/messages_response_messages.rb +188 -0
- data/lib/swagger_client/models/query.rb +239 -0
- data/lib/swagger_client/models/scheduled_batch_response.rb +207 -0
- data/lib/swagger_client/models/scheduled_message_response.rb +207 -0
- data/lib/swagger_client/models/send_message_response.rb +221 -0
- data/lib/swagger_client/models/token_response.rb +193 -0
- data/lib/swagger_client/version.rb +15 -0
- data/spec/api/auth_api_spec.rb +59 -0
- data/spec/api/batch_messages_api_spec.rb +83 -0
- data/spec/api/messages_api_spec.rb +95 -0
- data/spec/api/utils_api_spec.rb +47 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/api_key_response_spec.rb +48 -0
- data/spec/models/batch_message_response_spec.rb +48 -0
- data/spec/models/batch_message_spec.rb +60 -0
- data/spec/models/cancelled_message_response_spec.rb +48 -0
- data/spec/models/error_model_spec.rb +48 -0
- data/spec/models/extended_error_model_spec.rb +54 -0
- data/spec/models/hello_world_response_spec.rb +42 -0
- data/spec/models/login_spec.rb +54 -0
- data/spec/models/message_response_spec.rb +108 -0
- data/spec/models/message_spec.rb +66 -0
- data/spec/models/messages_response_messages_spec.rb +42 -0
- data/spec/models/messages_response_spec.rb +42 -0
- data/spec/models/query_spec.rb +72 -0
- data/spec/models/scheduled_batch_response_spec.rb +48 -0
- data/spec/models/scheduled_message_response_spec.rb +48 -0
- data/spec/models/send_message_response_spec.rb +54 -0
- data/spec/models/token_response_spec.rb +42 -0
- data/spec/spec_helper.rb +111 -0
- data/swagger_client.gemspec +46 -0
- metadata +323 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a6a078a55fc73ea7a84275468e9cb2e5502f25f1
|
4
|
+
data.tar.gz: 431f36c6d46f3ef207ff4b245a970c208ac4feb0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: dbe32eb8976deaf33e8cbb875acffc5fbb7f73db190db401a1705f3f1b80049b9626e2e314f8180e99d149738998710aee29b4e2fc3cf6af8abaccd2f61bf770
|
7
|
+
data.tar.gz: 088c81dbd94561679dd00f2a4a62fc016cccc3e9041e090123d00432097311ececfd1a87553942bb21910680f99b13d2354477e0195a310a61b06fb228f4abcb
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
# swagger_client
|
2
|
+
|
3
|
+
SwaggerClient - the Ruby gem for the The SMS Works API
|
4
|
+
|
5
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
|
+
|
9
|
+
- API version: 1.0.0
|
10
|
+
- Package version: 1.0.0
|
11
|
+
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
### Build a gem
|
16
|
+
|
17
|
+
To build the Ruby code into a gem:
|
18
|
+
|
19
|
+
```shell
|
20
|
+
gem build swagger_client.gemspec
|
21
|
+
```
|
22
|
+
|
23
|
+
Then either install the gem locally:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
gem install ./swagger_client-1.0.0.gem
|
27
|
+
```
|
28
|
+
(for development, run `gem install --dev ./swagger_client-1.0.0.gem` to install the development dependencies)
|
29
|
+
|
30
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
|
+
|
32
|
+
Finally add this to the Gemfile:
|
33
|
+
|
34
|
+
gem 'swagger_client', '~> 1.0.0'
|
35
|
+
|
36
|
+
### Install from Git
|
37
|
+
|
38
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
39
|
+
|
40
|
+
gem 'swagger_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
41
|
+
|
42
|
+
### Include the Ruby code directly
|
43
|
+
|
44
|
+
Include the Ruby code directly using `-I` as follows:
|
45
|
+
|
46
|
+
```shell
|
47
|
+
ruby -Ilib script.rb
|
48
|
+
```
|
49
|
+
|
50
|
+
## Getting Started
|
51
|
+
|
52
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
53
|
+
```ruby
|
54
|
+
# Load the gem
|
55
|
+
require 'swagger_client'
|
56
|
+
|
57
|
+
api_instance = SwaggerClient::AuthApi.new
|
58
|
+
|
59
|
+
customerid = "customerid_example" # String | The Customer ID
|
60
|
+
|
61
|
+
|
62
|
+
begin
|
63
|
+
result = api_instance.key_secret(customerid)
|
64
|
+
p result
|
65
|
+
rescue SwaggerClient::ApiError => e
|
66
|
+
puts "Exception when calling AuthApi->key_secret: #{e}"
|
67
|
+
end
|
68
|
+
|
69
|
+
```
|
70
|
+
|
71
|
+
## Documentation for API Endpoints
|
72
|
+
|
73
|
+
All URIs are relative to *https://api.thesmsworks.co.uk/v1*
|
74
|
+
|
75
|
+
Class | Method | HTTP request | Description
|
76
|
+
------------ | ------------- | ------------- | -------------
|
77
|
+
*SwaggerClient::AuthApi* | [**key_secret**](docs/AuthApi.md#key_secret) | **GET** /auth/getApiKey |
|
78
|
+
*SwaggerClient::AuthApi* | [**login**](docs/AuthApi.md#login) | **POST** /auth/token |
|
79
|
+
*SwaggerClient::BatchMessagesApi* | [**cancel_scheduled_batch_job**](docs/BatchMessagesApi.md#cancel_scheduled_batch_job) | **DELETE** /batches/schedule/{batchid} |
|
80
|
+
*SwaggerClient::BatchMessagesApi* | [**get_batch_by_id**](docs/BatchMessagesApi.md#get_batch_by_id) | **GET** /batch/{batchid} |
|
81
|
+
*SwaggerClient::BatchMessagesApi* | [**schedule_batch**](docs/BatchMessagesApi.md#schedule_batch) | **POST** /batch/schedule |
|
82
|
+
*SwaggerClient::BatchMessagesApi* | [**send_batch**](docs/BatchMessagesApi.md#send_batch) | **POST** /batch/send |
|
83
|
+
*SwaggerClient::MessagesApi* | [**cancel_scheduled_job**](docs/MessagesApi.md#cancel_scheduled_job) | **DELETE** /messages/schedule/{messageid} |
|
84
|
+
*SwaggerClient::MessagesApi* | [**get_message_by_id**](docs/MessagesApi.md#get_message_by_id) | **GET** /messages/{messageid} |
|
85
|
+
*SwaggerClient::MessagesApi* | [**get_messages**](docs/MessagesApi.md#get_messages) | **POST** /messages |
|
86
|
+
*SwaggerClient::MessagesApi* | [**schedule_message**](docs/MessagesApi.md#schedule_message) | **POST** /message/schedule |
|
87
|
+
*SwaggerClient::MessagesApi* | [**send_message**](docs/MessagesApi.md#send_message) | **POST** /message/send |
|
88
|
+
*SwaggerClient::UtilsApi* | [**hello**](docs/UtilsApi.md#hello) | **GET** /utils/hello |
|
89
|
+
|
90
|
+
|
91
|
+
## Documentation for Models
|
92
|
+
|
93
|
+
- [SwaggerClient::ApiKeyResponse](docs/ApiKeyResponse.md)
|
94
|
+
- [SwaggerClient::BatchMessage](docs/BatchMessage.md)
|
95
|
+
- [SwaggerClient::BatchMessageResponse](docs/BatchMessageResponse.md)
|
96
|
+
- [SwaggerClient::CancelledMessageResponse](docs/CancelledMessageResponse.md)
|
97
|
+
- [SwaggerClient::ErrorModel](docs/ErrorModel.md)
|
98
|
+
- [SwaggerClient::HelloWorldResponse](docs/HelloWorldResponse.md)
|
99
|
+
- [SwaggerClient::Login](docs/Login.md)
|
100
|
+
- [SwaggerClient::Message](docs/Message.md)
|
101
|
+
- [SwaggerClient::MessageResponse](docs/MessageResponse.md)
|
102
|
+
- [SwaggerClient::MessagesResponse](docs/MessagesResponse.md)
|
103
|
+
- [SwaggerClient::MessagesResponseMessages](docs/MessagesResponseMessages.md)
|
104
|
+
- [SwaggerClient::Query](docs/Query.md)
|
105
|
+
- [SwaggerClient::ScheduledBatchResponse](docs/ScheduledBatchResponse.md)
|
106
|
+
- [SwaggerClient::ScheduledMessageResponse](docs/ScheduledMessageResponse.md)
|
107
|
+
- [SwaggerClient::SendMessageResponse](docs/SendMessageResponse.md)
|
108
|
+
- [SwaggerClient::TokenResponse](docs/TokenResponse.md)
|
109
|
+
- [SwaggerClient::ExtendedErrorModel](docs/ExtendedErrorModel.md)
|
110
|
+
|
111
|
+
|
112
|
+
## Documentation for Authorization
|
113
|
+
|
114
|
+
|
115
|
+
### JWT
|
116
|
+
|
117
|
+
- **Type**: API key
|
118
|
+
- **API key parameter name**: Authorization
|
119
|
+
- **Location**: HTTP header
|
120
|
+
|
data/Rakefile
ADDED
data/docs/AuthApi.md
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
# SwaggerClient::AuthApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.thesmsworks.co.uk/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**key_secret**](AuthApi.md#key_secret) | **GET** /auth/getApiKey |
|
8
|
+
[**login**](AuthApi.md#login) | **POST** /auth/token |
|
9
|
+
|
10
|
+
|
11
|
+
# **key_secret**
|
12
|
+
> ApiKeyResponse key_secret(customerid)
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
Generates an API Key/Secret pair
|
17
|
+
|
18
|
+
### Example
|
19
|
+
```ruby
|
20
|
+
# load the gem
|
21
|
+
require 'swagger_client'
|
22
|
+
|
23
|
+
api_instance = SwaggerClient::AuthApi.new
|
24
|
+
|
25
|
+
customerid = "customerid_example" # String | The Customer ID
|
26
|
+
|
27
|
+
|
28
|
+
begin
|
29
|
+
result = api_instance.key_secret(customerid)
|
30
|
+
p result
|
31
|
+
rescue SwaggerClient::ApiError => e
|
32
|
+
puts "Exception when calling AuthApi->key_secret: #{e}"
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
### Parameters
|
37
|
+
|
38
|
+
Name | Type | Description | Notes
|
39
|
+
------------- | ------------- | ------------- | -------------
|
40
|
+
**customerid** | **String**| The Customer ID |
|
41
|
+
|
42
|
+
### Return type
|
43
|
+
|
44
|
+
[**ApiKeyResponse**](ApiKeyResponse.md)
|
45
|
+
|
46
|
+
### Authorization
|
47
|
+
|
48
|
+
No authorization required
|
49
|
+
|
50
|
+
### HTTP request headers
|
51
|
+
|
52
|
+
- **Content-Type**: application/json
|
53
|
+
- **Accept**: application/json;charset=UTF-8
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
# **login**
|
58
|
+
> TokenResponse login(credentials)
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
Generates a Json Web Token
|
63
|
+
|
64
|
+
### Example
|
65
|
+
```ruby
|
66
|
+
# load the gem
|
67
|
+
require 'swagger_client'
|
68
|
+
|
69
|
+
api_instance = SwaggerClient::AuthApi.new
|
70
|
+
|
71
|
+
credentials = SwaggerClient::Login.new # Login | API Key & Secret
|
72
|
+
|
73
|
+
|
74
|
+
begin
|
75
|
+
result = api_instance.login(credentials)
|
76
|
+
p result
|
77
|
+
rescue SwaggerClient::ApiError => e
|
78
|
+
puts "Exception when calling AuthApi->login: #{e}"
|
79
|
+
end
|
80
|
+
```
|
81
|
+
|
82
|
+
### Parameters
|
83
|
+
|
84
|
+
Name | Type | Description | Notes
|
85
|
+
------------- | ------------- | ------------- | -------------
|
86
|
+
**credentials** | [**Login**](Login.md)| API Key & Secret |
|
87
|
+
|
88
|
+
### Return type
|
89
|
+
|
90
|
+
[**TokenResponse**](TokenResponse.md)
|
91
|
+
|
92
|
+
### Authorization
|
93
|
+
|
94
|
+
No authorization required
|
95
|
+
|
96
|
+
### HTTP request headers
|
97
|
+
|
98
|
+
- **Content-Type**: application/json
|
99
|
+
- **Accept**: application/json;charset=UTF-8
|
100
|
+
|
101
|
+
|
102
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# SwaggerClient::BatchMessage
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**sender** | **String** | The sender of the message. Should be no longer than 11 characters for alphanumeric or 15 characters for numeric sender ID's. No spaces or special characters. |
|
7
|
+
**destinations** | **Array<String>** | Telephone numbers of each of the recipients |
|
8
|
+
**content** | **String** | Message to send to the recipient |
|
9
|
+
**schedule** | **String** | Date-time at which to send the batch. This is only used by the batch/schedule service. |
|
10
|
+
|
11
|
+
|
@@ -0,0 +1,224 @@
|
|
1
|
+
# SwaggerClient::BatchMessagesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.thesmsworks.co.uk/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**cancel_scheduled_batch_job**](BatchMessagesApi.md#cancel_scheduled_batch_job) | **DELETE** /batches/schedule/{batchid} |
|
8
|
+
[**get_batch_by_id**](BatchMessagesApi.md#get_batch_by_id) | **GET** /batch/{batchid} |
|
9
|
+
[**schedule_batch**](BatchMessagesApi.md#schedule_batch) | **POST** /batch/schedule |
|
10
|
+
[**send_batch**](BatchMessagesApi.md#send_batch) | **POST** /batch/send |
|
11
|
+
|
12
|
+
|
13
|
+
# **cancel_scheduled_batch_job**
|
14
|
+
> CancelledMessageResponse cancel_scheduled_batch_job(batchid)
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
Cancels a scheduled SMS message
|
19
|
+
|
20
|
+
### Example
|
21
|
+
```ruby
|
22
|
+
# load the gem
|
23
|
+
require 'swagger_client'
|
24
|
+
# setup authorization
|
25
|
+
SwaggerClient.configure do |config|
|
26
|
+
# Configure API key authorization: JWT
|
27
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
28
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
29
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
30
|
+
end
|
31
|
+
|
32
|
+
api_instance = SwaggerClient::BatchMessagesApi.new
|
33
|
+
|
34
|
+
batchid = "batchid_example" # String | The ID of the batch you would like returned
|
35
|
+
|
36
|
+
|
37
|
+
begin
|
38
|
+
result = api_instance.cancel_scheduled_batch_job(batchid)
|
39
|
+
p result
|
40
|
+
rescue SwaggerClient::ApiError => e
|
41
|
+
puts "Exception when calling BatchMessagesApi->cancel_scheduled_batch_job: #{e}"
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
### Parameters
|
46
|
+
|
47
|
+
Name | Type | Description | Notes
|
48
|
+
------------- | ------------- | ------------- | -------------
|
49
|
+
**batchid** | **String**| The ID of the batch you would like returned |
|
50
|
+
|
51
|
+
### Return type
|
52
|
+
|
53
|
+
[**CancelledMessageResponse**](CancelledMessageResponse.md)
|
54
|
+
|
55
|
+
### Authorization
|
56
|
+
|
57
|
+
[JWT](../README.md#JWT)
|
58
|
+
|
59
|
+
### HTTP request headers
|
60
|
+
|
61
|
+
- **Content-Type**: application/json
|
62
|
+
- **Accept**: application/json;charset=UTF-8
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
# **get_batch_by_id**
|
67
|
+
> MessagesResponse get_batch_by_id(batchid)
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
Retrieve all messages in a batch with the given batch ID
|
72
|
+
|
73
|
+
### Example
|
74
|
+
```ruby
|
75
|
+
# load the gem
|
76
|
+
require 'swagger_client'
|
77
|
+
# setup authorization
|
78
|
+
SwaggerClient.configure do |config|
|
79
|
+
# Configure API key authorization: JWT
|
80
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
81
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
82
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
83
|
+
end
|
84
|
+
|
85
|
+
api_instance = SwaggerClient::BatchMessagesApi.new
|
86
|
+
|
87
|
+
batchid = "batchid_example" # String | The ID of the batch you would like returned
|
88
|
+
|
89
|
+
|
90
|
+
begin
|
91
|
+
result = api_instance.get_batch_by_id(batchid)
|
92
|
+
p result
|
93
|
+
rescue SwaggerClient::ApiError => e
|
94
|
+
puts "Exception when calling BatchMessagesApi->get_batch_by_id: #{e}"
|
95
|
+
end
|
96
|
+
```
|
97
|
+
|
98
|
+
### Parameters
|
99
|
+
|
100
|
+
Name | Type | Description | Notes
|
101
|
+
------------- | ------------- | ------------- | -------------
|
102
|
+
**batchid** | **String**| The ID of the batch you would like returned |
|
103
|
+
|
104
|
+
### Return type
|
105
|
+
|
106
|
+
[**MessagesResponse**](MessagesResponse.md)
|
107
|
+
|
108
|
+
### Authorization
|
109
|
+
|
110
|
+
[JWT](../README.md#JWT)
|
111
|
+
|
112
|
+
### HTTP request headers
|
113
|
+
|
114
|
+
- **Content-Type**: application/json
|
115
|
+
- **Accept**: application/json;charset=UTF-8
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
# **schedule_batch**
|
120
|
+
> ScheduledBatchResponse schedule_batch(sms_message)
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
Schedules a batch of SMS messages to be sent at the date-time you specify
|
125
|
+
|
126
|
+
### Example
|
127
|
+
```ruby
|
128
|
+
# load the gem
|
129
|
+
require 'swagger_client'
|
130
|
+
# setup authorization
|
131
|
+
SwaggerClient.configure do |config|
|
132
|
+
# Configure API key authorization: JWT
|
133
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
134
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
135
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
136
|
+
end
|
137
|
+
|
138
|
+
api_instance = SwaggerClient::BatchMessagesApi.new
|
139
|
+
|
140
|
+
sms_message = SwaggerClient::BatchMessage.new # BatchMessage | Message properties
|
141
|
+
|
142
|
+
|
143
|
+
begin
|
144
|
+
result = api_instance.schedule_batch(sms_message)
|
145
|
+
p result
|
146
|
+
rescue SwaggerClient::ApiError => e
|
147
|
+
puts "Exception when calling BatchMessagesApi->schedule_batch: #{e}"
|
148
|
+
end
|
149
|
+
```
|
150
|
+
|
151
|
+
### Parameters
|
152
|
+
|
153
|
+
Name | Type | Description | Notes
|
154
|
+
------------- | ------------- | ------------- | -------------
|
155
|
+
**sms_message** | [**BatchMessage**](BatchMessage.md)| Message properties |
|
156
|
+
|
157
|
+
### Return type
|
158
|
+
|
159
|
+
[**ScheduledBatchResponse**](ScheduledBatchResponse.md)
|
160
|
+
|
161
|
+
### Authorization
|
162
|
+
|
163
|
+
[JWT](../README.md#JWT)
|
164
|
+
|
165
|
+
### HTTP request headers
|
166
|
+
|
167
|
+
- **Content-Type**: application/json
|
168
|
+
- **Accept**: application/json;charset=UTF-8
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
# **send_batch**
|
173
|
+
> BatchMessageResponse send_batch(sms_message)
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
Send a single SMS message to multiple recipients
|
178
|
+
|
179
|
+
### Example
|
180
|
+
```ruby
|
181
|
+
# load the gem
|
182
|
+
require 'swagger_client'
|
183
|
+
# setup authorization
|
184
|
+
SwaggerClient.configure do |config|
|
185
|
+
# Configure API key authorization: JWT
|
186
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
187
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
188
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
189
|
+
end
|
190
|
+
|
191
|
+
api_instance = SwaggerClient::BatchMessagesApi.new
|
192
|
+
|
193
|
+
sms_message = SwaggerClient::BatchMessage.new # BatchMessage | Message properties
|
194
|
+
|
195
|
+
|
196
|
+
begin
|
197
|
+
result = api_instance.send_batch(sms_message)
|
198
|
+
p result
|
199
|
+
rescue SwaggerClient::ApiError => e
|
200
|
+
puts "Exception when calling BatchMessagesApi->send_batch: #{e}"
|
201
|
+
end
|
202
|
+
```
|
203
|
+
|
204
|
+
### Parameters
|
205
|
+
|
206
|
+
Name | Type | Description | Notes
|
207
|
+
------------- | ------------- | ------------- | -------------
|
208
|
+
**sms_message** | [**BatchMessage**](BatchMessage.md)| Message properties |
|
209
|
+
|
210
|
+
### Return type
|
211
|
+
|
212
|
+
[**BatchMessageResponse**](BatchMessageResponse.md)
|
213
|
+
|
214
|
+
### Authorization
|
215
|
+
|
216
|
+
[JWT](../README.md#JWT)
|
217
|
+
|
218
|
+
### HTTP request headers
|
219
|
+
|
220
|
+
- **Content-Type**: application/json
|
221
|
+
- **Accept**: application/json;charset=UTF-8
|
222
|
+
|
223
|
+
|
224
|
+
|