swagger_client_go_park 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 +123 -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/smsw-ruby-sdk.iml +9 -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-1.0.0.gem +0 -0
- data/swagger_client.gemspec +46 -0
- metadata +325 -0
data/docs/ErrorModel.md
ADDED
data/docs/Login.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# SwaggerClient::Login
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**customerid** | **String** | Your customer ID, available from your account area at https://thesmsworks.co.uk/user/login | [optional]
|
7
|
+
**key** | **String** | API Key | [optional]
|
8
|
+
**secret** | **String** | API Secret | [optional]
|
9
|
+
|
10
|
+
|
data/docs/Message.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# SwaggerClient::Message
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**sender** | **String** | The name of the sender of the message (e.g. \"AcmePizza\") |
|
7
|
+
**destination** | **String** | Telephone number of the recipient |
|
8
|
+
**content** | **String** | Message to send to the recipient. Content can be up to 640 characters in length. You will be charged 1 credit for each 160 characters, up to a maximum of 4 credits. Messages sent to numbers registered outside the UK will be charged double credits (i.e. 2 credits per 160 characters, up to maximum of 8 credits). |
|
9
|
+
**schedule** | **String** | Date-time at which to send the message. This is only used by the message/schedule service. |
|
10
|
+
**tag** | **String** | An identifying label for the message, which you can use to filter and report on messages you've sent later. Ideal for campaigns. | [optional]
|
11
|
+
|
12
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# SwaggerClient::MessageResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**batchid** | **String** | |
|
7
|
+
**content** | **String** | |
|
8
|
+
**created** | **String** | |
|
9
|
+
**customerid** | **String** | |
|
10
|
+
**destination** | **Float** | |
|
11
|
+
**keyword** | **String** | |
|
12
|
+
**messageid** | **String** | |
|
13
|
+
**modified** | **String** | |
|
14
|
+
**schedule** | **String** | |
|
15
|
+
**status** | **String** | |
|
16
|
+
**sender** | **String** | |
|
17
|
+
**tag** | **String** | |
|
18
|
+
|
19
|
+
|
data/docs/MessagesApi.md
ADDED
@@ -0,0 +1,278 @@
|
|
1
|
+
# SwaggerClient::MessagesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.thesmsworks.co.uk:8080/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**cancel_scheduled_job**](MessagesApi.md#cancel_scheduled_job) | **DELETE** /messages/schedule/{messageid} |
|
8
|
+
[**get_message_by_id**](MessagesApi.md#get_message_by_id) | **GET** /messages/{messageid} |
|
9
|
+
[**get_messages**](MessagesApi.md#get_messages) | **POST** /messages |
|
10
|
+
[**schedule_message**](MessagesApi.md#schedule_message) | **POST** /message/schedule |
|
11
|
+
[**send_message**](MessagesApi.md#send_message) | **POST** /message/send |
|
12
|
+
|
13
|
+
|
14
|
+
# **cancel_scheduled_job**
|
15
|
+
> CancelledMessageResponse cancel_scheduled_job(messageid)
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
Cancels a scheduled SMS message
|
20
|
+
|
21
|
+
### Example
|
22
|
+
```ruby
|
23
|
+
# load the gem
|
24
|
+
require 'swagger_client'
|
25
|
+
# setup authorization
|
26
|
+
SwaggerClient.configure do |config|
|
27
|
+
# Configure API key authorization: JWT
|
28
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
29
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
30
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
31
|
+
end
|
32
|
+
|
33
|
+
api_instance = SwaggerClient::MessagesApi.new
|
34
|
+
|
35
|
+
messageid = "messageid_example" # String | The ID of the message you would like returned
|
36
|
+
|
37
|
+
|
38
|
+
begin
|
39
|
+
result = api_instance.cancel_scheduled_job(messageid)
|
40
|
+
p result
|
41
|
+
rescue SwaggerClient::ApiError => e
|
42
|
+
puts "Exception when calling MessagesApi->cancel_scheduled_job: #{e}"
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
46
|
+
### Parameters
|
47
|
+
|
48
|
+
Name | Type | Description | Notes
|
49
|
+
------------- | ------------- | ------------- | -------------
|
50
|
+
**messageid** | **String**| The ID of the message you would like returned |
|
51
|
+
|
52
|
+
### Return type
|
53
|
+
|
54
|
+
[**CancelledMessageResponse**](CancelledMessageResponse.md)
|
55
|
+
|
56
|
+
### Authorization
|
57
|
+
|
58
|
+
[JWT](../README.md#JWT)
|
59
|
+
|
60
|
+
### HTTP request headers
|
61
|
+
|
62
|
+
- **Content-Type**: application/json
|
63
|
+
- **Accept**: application/json;charset=UTF-8
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
# **get_message_by_id**
|
68
|
+
> MessageResponse get_message_by_id(messageid)
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
Retrieve a logged message by the message ID
|
73
|
+
|
74
|
+
### Example
|
75
|
+
```ruby
|
76
|
+
# load the gem
|
77
|
+
require 'swagger_client'
|
78
|
+
# setup authorization
|
79
|
+
SwaggerClient.configure do |config|
|
80
|
+
# Configure API key authorization: JWT
|
81
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
82
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
83
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
84
|
+
end
|
85
|
+
|
86
|
+
api_instance = SwaggerClient::MessagesApi.new
|
87
|
+
|
88
|
+
messageid = "messageid_example" # String | The ID of the message you would like returned
|
89
|
+
|
90
|
+
|
91
|
+
begin
|
92
|
+
result = api_instance.get_message_by_id(messageid)
|
93
|
+
p result
|
94
|
+
rescue SwaggerClient::ApiError => e
|
95
|
+
puts "Exception when calling MessagesApi->get_message_by_id: #{e}"
|
96
|
+
end
|
97
|
+
```
|
98
|
+
|
99
|
+
### Parameters
|
100
|
+
|
101
|
+
Name | Type | Description | Notes
|
102
|
+
------------- | ------------- | ------------- | -------------
|
103
|
+
**messageid** | **String**| The ID of the message you would like returned |
|
104
|
+
|
105
|
+
### Return type
|
106
|
+
|
107
|
+
[**MessageResponse**](MessageResponse.md)
|
108
|
+
|
109
|
+
### Authorization
|
110
|
+
|
111
|
+
[JWT](../README.md#JWT)
|
112
|
+
|
113
|
+
### HTTP request headers
|
114
|
+
|
115
|
+
- **Content-Type**: application/json
|
116
|
+
- **Accept**: application/json;charset=UTF-8
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
# **get_messages**
|
121
|
+
> MessagesResponse get_messages(query)
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
Get messages matching your search criteria
|
126
|
+
|
127
|
+
### Example
|
128
|
+
```ruby
|
129
|
+
# load the gem
|
130
|
+
require 'swagger_client'
|
131
|
+
# setup authorization
|
132
|
+
SwaggerClient.configure do |config|
|
133
|
+
# Configure API key authorization: JWT
|
134
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
135
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
136
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
137
|
+
end
|
138
|
+
|
139
|
+
api_instance = SwaggerClient::MessagesApi.new
|
140
|
+
|
141
|
+
query = SwaggerClient::Query.new # Query |
|
142
|
+
|
143
|
+
|
144
|
+
begin
|
145
|
+
result = api_instance.get_messages(query)
|
146
|
+
p result
|
147
|
+
rescue SwaggerClient::ApiError => e
|
148
|
+
puts "Exception when calling MessagesApi->get_messages: #{e}"
|
149
|
+
end
|
150
|
+
```
|
151
|
+
|
152
|
+
### Parameters
|
153
|
+
|
154
|
+
Name | Type | Description | Notes
|
155
|
+
------------- | ------------- | ------------- | -------------
|
156
|
+
**query** | [**Query**](Query.md)| |
|
157
|
+
|
158
|
+
### Return type
|
159
|
+
|
160
|
+
[**MessagesResponse**](MessagesResponse.md)
|
161
|
+
|
162
|
+
### Authorization
|
163
|
+
|
164
|
+
[JWT](../README.md#JWT)
|
165
|
+
|
166
|
+
### HTTP request headers
|
167
|
+
|
168
|
+
- **Content-Type**: application/json
|
169
|
+
- **Accept**: application/json;charset=UTF-8
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
# **schedule_message**
|
174
|
+
> ScheduledMessageResponse schedule_message(sms_message)
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
Schedules an SMS message to be sent at the date-time you specify
|
179
|
+
|
180
|
+
### Example
|
181
|
+
```ruby
|
182
|
+
# load the gem
|
183
|
+
require 'swagger_client'
|
184
|
+
# setup authorization
|
185
|
+
SwaggerClient.configure do |config|
|
186
|
+
# Configure API key authorization: JWT
|
187
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
188
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
189
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
190
|
+
end
|
191
|
+
|
192
|
+
api_instance = SwaggerClient::MessagesApi.new
|
193
|
+
|
194
|
+
sms_message = SwaggerClient::Message.new # Message | Message properties
|
195
|
+
|
196
|
+
|
197
|
+
begin
|
198
|
+
result = api_instance.schedule_message(sms_message)
|
199
|
+
p result
|
200
|
+
rescue SwaggerClient::ApiError => e
|
201
|
+
puts "Exception when calling MessagesApi->schedule_message: #{e}"
|
202
|
+
end
|
203
|
+
```
|
204
|
+
|
205
|
+
### Parameters
|
206
|
+
|
207
|
+
Name | Type | Description | Notes
|
208
|
+
------------- | ------------- | ------------- | -------------
|
209
|
+
**sms_message** | [**Message**](Message.md)| Message properties |
|
210
|
+
|
211
|
+
### Return type
|
212
|
+
|
213
|
+
[**ScheduledMessageResponse**](ScheduledMessageResponse.md)
|
214
|
+
|
215
|
+
### Authorization
|
216
|
+
|
217
|
+
[JWT](../README.md#JWT)
|
218
|
+
|
219
|
+
### HTTP request headers
|
220
|
+
|
221
|
+
- **Content-Type**: application/json
|
222
|
+
- **Accept**: application/json;charset=UTF-8
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
# **send_message**
|
227
|
+
> SendMessageResponse send_message(sms_message)
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
Sends an SMS message
|
232
|
+
|
233
|
+
### Example
|
234
|
+
```ruby
|
235
|
+
# load the gem
|
236
|
+
require 'swagger_client'
|
237
|
+
# setup authorization
|
238
|
+
SwaggerClient.configure do |config|
|
239
|
+
# Configure API key authorization: JWT
|
240
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
241
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
242
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
243
|
+
end
|
244
|
+
|
245
|
+
api_instance = SwaggerClient::MessagesApi.new
|
246
|
+
|
247
|
+
sms_message = SwaggerClient::Message.new # Message | Message properties
|
248
|
+
|
249
|
+
|
250
|
+
begin
|
251
|
+
result = api_instance.send_message(sms_message)
|
252
|
+
p result
|
253
|
+
rescue SwaggerClient::ApiError => e
|
254
|
+
puts "Exception when calling MessagesApi->send_message: #{e}"
|
255
|
+
end
|
256
|
+
```
|
257
|
+
|
258
|
+
### Parameters
|
259
|
+
|
260
|
+
Name | Type | Description | Notes
|
261
|
+
------------- | ------------- | ------------- | -------------
|
262
|
+
**sms_message** | [**Message**](Message.md)| Message properties |
|
263
|
+
|
264
|
+
### Return type
|
265
|
+
|
266
|
+
[**SendMessageResponse**](SendMessageResponse.md)
|
267
|
+
|
268
|
+
### Authorization
|
269
|
+
|
270
|
+
[JWT](../README.md#JWT)
|
271
|
+
|
272
|
+
### HTTP request headers
|
273
|
+
|
274
|
+
- **Content-Type**: application/json
|
275
|
+
- **Accept**: application/json;charset=UTF-8
|
276
|
+
|
277
|
+
|
278
|
+
|
data/docs/Query.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# SwaggerClient::Query
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**status** | **String** | The status of the messages you would like returned (either 'SENT', 'DELIVERED', 'EXPIRED', 'DELETED', 'UNDELIVERABLE', 'ACCEPTED', 'UNKNOWN', 'REJECTED') | [optional]
|
7
|
+
**destination** | **String** | The phone number of the recipient | [optional]
|
8
|
+
**sender** | **String** | The sender of the message (this can be the configured sender name for an outbound message or the senders phone numner for an inbound message). | [optional]
|
9
|
+
**keyword** | **String** | The keyword used in the inbound message | [optional]
|
10
|
+
**from** | **String** | The date-time from which you would like matching messages | [optional]
|
11
|
+
**to** | **String** | The date-time to which you would like matching messages | [optional]
|
12
|
+
|
13
|
+
|
data/docs/UtilsApi.md
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
# SwaggerClient::UtilsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.thesmsworks.co.uk:8080/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**hello**](UtilsApi.md#hello) | **GET** /utils/hello |
|
8
|
+
|
9
|
+
|
10
|
+
# **hello**
|
11
|
+
> HelloWorldResponse hello(opts)
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
Returns 'Hello' to the caller
|
16
|
+
|
17
|
+
### Example
|
18
|
+
```ruby
|
19
|
+
# load the gem
|
20
|
+
require 'swagger_client'
|
21
|
+
|
22
|
+
api_instance = SwaggerClient::UtilsApi.new
|
23
|
+
|
24
|
+
opts = {
|
25
|
+
name: "name_example" # String | The name of the person to whom to say hello
|
26
|
+
}
|
27
|
+
|
28
|
+
begin
|
29
|
+
result = api_instance.hello(opts)
|
30
|
+
p result
|
31
|
+
rescue SwaggerClient::ApiError => e
|
32
|
+
puts "Exception when calling UtilsApi->hello: #{e}"
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
### Parameters
|
37
|
+
|
38
|
+
Name | Type | Description | Notes
|
39
|
+
------------- | ------------- | ------------- | -------------
|
40
|
+
**name** | **String**| The name of the person to whom to say hello | [optional]
|
41
|
+
|
42
|
+
### Return type
|
43
|
+
|
44
|
+
[**HelloWorldResponse**](HelloWorldResponse.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
|
+
|