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.
Files changed (78) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +120 -0
  4. data/Rakefile +8 -0
  5. data/docs/ApiKeyResponse.md +9 -0
  6. data/docs/AuthApi.md +102 -0
  7. data/docs/BatchMessage.md +11 -0
  8. data/docs/BatchMessageResponse.md +9 -0
  9. data/docs/BatchMessagesApi.md +224 -0
  10. data/docs/CancelledMessageResponse.md +9 -0
  11. data/docs/ErrorModel.md +9 -0
  12. data/docs/ExtendedErrorModel.md +10 -0
  13. data/docs/HelloWorldResponse.md +8 -0
  14. data/docs/Login.md +10 -0
  15. data/docs/Message.md +12 -0
  16. data/docs/MessageResponse.md +19 -0
  17. data/docs/MessagesApi.md +278 -0
  18. data/docs/MessagesResponse.md +8 -0
  19. data/docs/MessagesResponseMessages.md +8 -0
  20. data/docs/Query.md +13 -0
  21. data/docs/ScheduledBatchResponse.md +9 -0
  22. data/docs/ScheduledMessageResponse.md +9 -0
  23. data/docs/SendMessageResponse.md +10 -0
  24. data/docs/TokenResponse.md +8 -0
  25. data/docs/UtilsApi.md +56 -0
  26. data/git_push.sh +55 -0
  27. data/lib/swagger_client.rb +60 -0
  28. data/lib/swagger_client/api/auth_api.rb +134 -0
  29. data/lib/swagger_client/api/batch_messages_api.rb +243 -0
  30. data/lib/swagger_client/api/messages_api.rb +298 -0
  31. data/lib/swagger_client/api/utils_api.rb +75 -0
  32. data/lib/swagger_client/api_client.rb +389 -0
  33. data/lib/swagger_client/api_error.rb +38 -0
  34. data/lib/swagger_client/configuration.rb +209 -0
  35. data/lib/swagger_client/models/api_key_response.rb +207 -0
  36. data/lib/swagger_client/models/batch_message.rb +241 -0
  37. data/lib/swagger_client/models/batch_message_response.rb +207 -0
  38. data/lib/swagger_client/models/cancelled_message_response.rb +207 -0
  39. data/lib/swagger_client/models/error_model.rb +235 -0
  40. data/lib/swagger_client/models/extended_error_model.rb +249 -0
  41. data/lib/swagger_client/models/hello_world_response.rb +193 -0
  42. data/lib/swagger_client/models/login.rb +209 -0
  43. data/lib/swagger_client/models/message.rb +249 -0
  44. data/lib/swagger_client/models/message_response.rb +347 -0
  45. data/lib/swagger_client/models/messages_response.rb +188 -0
  46. data/lib/swagger_client/models/messages_response_messages.rb +188 -0
  47. data/lib/swagger_client/models/query.rb +239 -0
  48. data/lib/swagger_client/models/scheduled_batch_response.rb +207 -0
  49. data/lib/swagger_client/models/scheduled_message_response.rb +207 -0
  50. data/lib/swagger_client/models/send_message_response.rb +221 -0
  51. data/lib/swagger_client/models/token_response.rb +193 -0
  52. data/lib/swagger_client/version.rb +15 -0
  53. data/spec/api/auth_api_spec.rb +59 -0
  54. data/spec/api/batch_messages_api_spec.rb +83 -0
  55. data/spec/api/messages_api_spec.rb +95 -0
  56. data/spec/api/utils_api_spec.rb +47 -0
  57. data/spec/api_client_spec.rb +226 -0
  58. data/spec/configuration_spec.rb +42 -0
  59. data/spec/models/api_key_response_spec.rb +48 -0
  60. data/spec/models/batch_message_response_spec.rb +48 -0
  61. data/spec/models/batch_message_spec.rb +60 -0
  62. data/spec/models/cancelled_message_response_spec.rb +48 -0
  63. data/spec/models/error_model_spec.rb +48 -0
  64. data/spec/models/extended_error_model_spec.rb +54 -0
  65. data/spec/models/hello_world_response_spec.rb +42 -0
  66. data/spec/models/login_spec.rb +54 -0
  67. data/spec/models/message_response_spec.rb +108 -0
  68. data/spec/models/message_spec.rb +66 -0
  69. data/spec/models/messages_response_messages_spec.rb +42 -0
  70. data/spec/models/messages_response_spec.rb +42 -0
  71. data/spec/models/query_spec.rb +72 -0
  72. data/spec/models/scheduled_batch_response_spec.rb +48 -0
  73. data/spec/models/scheduled_message_response_spec.rb +48 -0
  74. data/spec/models/send_message_response_spec.rb +54 -0
  75. data/spec/models/token_response_spec.rb +42 -0
  76. data/spec/spec_helper.rb +111 -0
  77. data/swagger_client.gemspec +46 -0
  78. metadata +323 -0
@@ -0,0 +1,9 @@
1
+ # SwaggerClient::CancelledMessageResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **messageid** | **String** | |
7
+ **status** | **String** | |
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # SwaggerClient::ErrorModel
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **message** | **String** | |
7
+ **code** | **Integer** | |
8
+
9
+
@@ -0,0 +1,10 @@
1
+ # SwaggerClient::ExtendedErrorModel
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **message** | **String** | |
7
+ **code** | **Integer** | |
8
+ **error_code** | **Float** | |
9
+
10
+
@@ -0,0 +1,8 @@
1
+ # SwaggerClient::HelloWorldResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **message** | **String** | |
7
+
8
+
@@ -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
+
@@ -0,0 +1,12 @@
1
+ # SwaggerClient::Message
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
+ **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 at which to send the message. This is only used by the message/schedule service and can be left empty for other services. |
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
+
@@ -0,0 +1,278 @@
1
+ # SwaggerClient::MessagesApi
2
+
3
+ All URIs are relative to *https://api.thesmsworks.co.uk/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
+
@@ -0,0 +1,8 @@
1
+ # SwaggerClient::MessagesResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **messages** | [**MessagesResponseMessages**](MessagesResponseMessages.md) | | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # SwaggerClient::MessagesResponseMessages
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **schema** | [**MessageResponse**](MessageResponse.md) | | [optional]
7
+
8
+
@@ -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 number 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
+
@@ -0,0 +1,9 @@
1
+ # SwaggerClient::ScheduledBatchResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **batchid** | **String** | |
7
+ **status** | **String** | |
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # SwaggerClient::ScheduledMessageResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **messageid** | **String** | |
7
+ **status** | **String** | |
8
+
9
+
@@ -0,0 +1,10 @@
1
+ # SwaggerClient::SendMessageResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **messageid** | **String** | |
7
+ **status** | **String** | |
8
+ **credits** | **Integer** | |
9
+
10
+
@@ -0,0 +1,8 @@
1
+ # SwaggerClient::TokenResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **token** | **String** | |
7
+
8
+
@@ -0,0 +1,56 @@
1
+ # SwaggerClient::UtilsApi
2
+
3
+ All URIs are relative to *https://api.thesmsworks.co.uk/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
+