smspool 0.1.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 +7 -0
- data/LICENSE +21 -0
- data/README.md +61 -0
- data/lib/smspool/api/business_api.rb +300 -0
- data/lib/smspool/api/carrier_api.rb +91 -0
- data/lib/smspool/api/esims_api.rb +637 -0
- data/lib/smspool/api/information_api.rb +479 -0
- data/lib/smspool/api/preorders_api.rb +385 -0
- data/lib/smspool/api/pricing_api.rb +174 -0
- data/lib/smspool/api/rental_api.rb +1115 -0
- data/lib/smspool/api/sms_api.rb +1214 -0
- data/lib/smspool/api/voucher_api.rb +285 -0
- data/lib/smspool/api_client.rb +397 -0
- data/lib/smspool/api_error.rb +58 -0
- data/lib/smspool/api_model_base.rb +88 -0
- data/lib/smspool/configuration.rb +308 -0
- data/lib/smspool/version.rb +15 -0
- data/lib/smspool.rb +49 -0
- metadata +100 -0
|
@@ -0,0 +1,1214 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SMSPool API
|
|
3
|
+
|
|
4
|
+
#Every endpoint accepts its parameters as form fields (POST) or query parameters (GET). Authenticate with your API key from https://www.smspool.net/my/settings, either as a bearer token (`Authorization: Bearer <key>`) or as a `key` parameter.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module SMSPool
|
|
16
|
+
class SMSApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Order SMS
|
|
23
|
+
# @param service [String] The service or number retrieved from the `Service List` endpoint
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :country The country in ISO format or number retrieved from the `Country List` endpoint
|
|
26
|
+
# @option opts [String] :pool The pool or number retrieved from the `Pool List` endpoint (optional)
|
|
27
|
+
# @option opts [Float] :max_price The max price you are willing to pay per number
|
|
28
|
+
# @option opts [Integer] :pricing_option Set to 0 if you'd like the cheapest numbers, set to 1 for highest success rate
|
|
29
|
+
# @option opts [Integer] :quantity Quantity of numbers ordered
|
|
30
|
+
# @option opts [String] :areacode Areacodes you would like to include or exclude in JSON format
|
|
31
|
+
# @option opts [Integer] :exclude Set exclude to 1 if you would like to exclude all listed area codes.
|
|
32
|
+
# @option opts [Integer] :create_token Optional param; set to 1 if you'd like to create a token link that anyone can access.
|
|
33
|
+
# @option opts [String] :activation_type Options: SMS, VOICE, FLASH. SMS will receive regular SMS, VOICE will receive phone calls that mentions the SMS and FLASH is for FLASH calls for verification.
|
|
34
|
+
# @option opts [Integer] :carrier Options: 1 or 2. Pick a carrier (only works for pool Foxtrot US)
|
|
35
|
+
# @option opts [Integer] :phonenumber In case you want to select a specific phone number to order
|
|
36
|
+
# @option opts [Integer] :software
|
|
37
|
+
# @return [Object]
|
|
38
|
+
def purchase_sms(service, opts = {})
|
|
39
|
+
data, _status_code, _headers = purchase_sms_with_http_info(service, opts)
|
|
40
|
+
data
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Order SMS
|
|
44
|
+
# @param service [String] The service or number retrieved from the `Service List` endpoint
|
|
45
|
+
# @param [Hash] opts the optional parameters
|
|
46
|
+
# @option opts [String] :country The country in ISO format or number retrieved from the `Country List` endpoint
|
|
47
|
+
# @option opts [String] :pool The pool or number retrieved from the `Pool List` endpoint (optional)
|
|
48
|
+
# @option opts [Float] :max_price The max price you are willing to pay per number
|
|
49
|
+
# @option opts [Integer] :pricing_option Set to 0 if you'd like the cheapest numbers, set to 1 for highest success rate
|
|
50
|
+
# @option opts [Integer] :quantity Quantity of numbers ordered
|
|
51
|
+
# @option opts [String] :areacode Areacodes you would like to include or exclude in JSON format
|
|
52
|
+
# @option opts [Integer] :exclude Set exclude to 1 if you would like to exclude all listed area codes.
|
|
53
|
+
# @option opts [Integer] :create_token Optional param; set to 1 if you'd like to create a token link that anyone can access.
|
|
54
|
+
# @option opts [String] :activation_type Options: SMS, VOICE, FLASH. SMS will receive regular SMS, VOICE will receive phone calls that mentions the SMS and FLASH is for FLASH calls for verification.
|
|
55
|
+
# @option opts [Integer] :carrier Options: 1 or 2. Pick a carrier (only works for pool Foxtrot US)
|
|
56
|
+
# @option opts [Integer] :phonenumber In case you want to select a specific phone number to order
|
|
57
|
+
# @option opts [Integer] :software
|
|
58
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
59
|
+
def purchase_sms_with_http_info(service, opts = {})
|
|
60
|
+
if @api_client.config.debugging
|
|
61
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.purchase_sms ...'
|
|
62
|
+
end
|
|
63
|
+
# verify the required parameter 'service' is set
|
|
64
|
+
if @api_client.config.client_side_validation && service.nil?
|
|
65
|
+
fail ArgumentError, "Missing the required parameter 'service' when calling SMSApi.purchase_sms"
|
|
66
|
+
end
|
|
67
|
+
# resource path
|
|
68
|
+
local_var_path = '/purchase/sms'
|
|
69
|
+
|
|
70
|
+
# query parameters
|
|
71
|
+
query_params = opts[:query_params] || {}
|
|
72
|
+
|
|
73
|
+
# header parameters
|
|
74
|
+
header_params = opts[:header_params] || {}
|
|
75
|
+
# HTTP header 'Accept' (if needed)
|
|
76
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
77
|
+
# HTTP header 'Content-Type'
|
|
78
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
79
|
+
if !content_type.nil?
|
|
80
|
+
header_params['Content-Type'] = content_type
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# form parameters
|
|
84
|
+
form_params = opts[:form_params] || {}
|
|
85
|
+
form_params['service'] = service
|
|
86
|
+
form_params['country'] = opts[:'country'] if !opts[:'country'].nil?
|
|
87
|
+
form_params['pool'] = opts[:'pool'] if !opts[:'pool'].nil?
|
|
88
|
+
form_params['max_price'] = opts[:'max_price'] if !opts[:'max_price'].nil?
|
|
89
|
+
form_params['pricing_option'] = opts[:'pricing_option'] if !opts[:'pricing_option'].nil?
|
|
90
|
+
form_params['quantity'] = opts[:'quantity'] if !opts[:'quantity'].nil?
|
|
91
|
+
form_params['areacode'] = opts[:'areacode'] if !opts[:'areacode'].nil?
|
|
92
|
+
form_params['exclude'] = opts[:'exclude'] if !opts[:'exclude'].nil?
|
|
93
|
+
form_params['create_token'] = opts[:'create_token'] if !opts[:'create_token'].nil?
|
|
94
|
+
form_params['activation_type'] = opts[:'activation_type'] if !opts[:'activation_type'].nil?
|
|
95
|
+
form_params['carrier'] = opts[:'carrier'] if !opts[:'carrier'].nil?
|
|
96
|
+
form_params['phonenumber'] = opts[:'phonenumber'] if !opts[:'phonenumber'].nil?
|
|
97
|
+
form_params['software'] = opts[:'software'] if !opts[:'software'].nil?
|
|
98
|
+
|
|
99
|
+
# http body (model)
|
|
100
|
+
post_body = opts[:debug_body]
|
|
101
|
+
|
|
102
|
+
# return_type
|
|
103
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
104
|
+
|
|
105
|
+
# auth_names
|
|
106
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
107
|
+
|
|
108
|
+
new_options = opts.merge(
|
|
109
|
+
:operation => :"SMSApi.purchase_sms",
|
|
110
|
+
:header_params => header_params,
|
|
111
|
+
:query_params => query_params,
|
|
112
|
+
:form_params => form_params,
|
|
113
|
+
:body => post_body,
|
|
114
|
+
:auth_names => auth_names,
|
|
115
|
+
:return_type => return_type
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
119
|
+
if @api_client.config.debugging
|
|
120
|
+
@api_client.config.logger.debug "API called: SMSApi#purchase_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
121
|
+
end
|
|
122
|
+
return data, status_code, headers
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Active orders
|
|
126
|
+
# The recommended endpoint to retrieve your current active orders, this will display all your orders at the same time. We recommend using this endpoint to iterate through your active orders to retrieve your SMS messages.
|
|
127
|
+
# @param [Hash] opts the optional parameters
|
|
128
|
+
# @return [Object]
|
|
129
|
+
def request_active(opts = {})
|
|
130
|
+
data, _status_code, _headers = request_active_with_http_info(opts)
|
|
131
|
+
data
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Active orders
|
|
135
|
+
# The recommended endpoint to retrieve your current active orders, this will display all your orders at the same time. We recommend using this endpoint to iterate through your active orders to retrieve your SMS messages.
|
|
136
|
+
# @param [Hash] opts the optional parameters
|
|
137
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
138
|
+
def request_active_with_http_info(opts = {})
|
|
139
|
+
if @api_client.config.debugging
|
|
140
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.request_active ...'
|
|
141
|
+
end
|
|
142
|
+
# resource path
|
|
143
|
+
local_var_path = '/request/active'
|
|
144
|
+
|
|
145
|
+
# query parameters
|
|
146
|
+
query_params = opts[:query_params] || {}
|
|
147
|
+
|
|
148
|
+
# header parameters
|
|
149
|
+
header_params = opts[:header_params] || {}
|
|
150
|
+
# HTTP header 'Accept' (if needed)
|
|
151
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
152
|
+
|
|
153
|
+
# form parameters
|
|
154
|
+
form_params = opts[:form_params] || {}
|
|
155
|
+
|
|
156
|
+
# http body (model)
|
|
157
|
+
post_body = opts[:debug_body]
|
|
158
|
+
|
|
159
|
+
# return_type
|
|
160
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
161
|
+
|
|
162
|
+
# auth_names
|
|
163
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
164
|
+
|
|
165
|
+
new_options = opts.merge(
|
|
166
|
+
:operation => :"SMSApi.request_active",
|
|
167
|
+
:header_params => header_params,
|
|
168
|
+
:query_params => query_params,
|
|
169
|
+
:form_params => form_params,
|
|
170
|
+
:body => post_body,
|
|
171
|
+
:auth_names => auth_names,
|
|
172
|
+
:return_type => return_type
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
176
|
+
if @api_client.config.debugging
|
|
177
|
+
@api_client.config.logger.debug "API called: SMSApi#request_active\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
178
|
+
end
|
|
179
|
+
return data, status_code, headers
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Archive all orders
|
|
183
|
+
# This API endpoint is used to archive a request in the SMS Pool system. The HTTP POST request should be sent to `https://api.smspool.net/request/archive`. ### Request Parameters The \\`key\\` parameter is required for this endpoint, this is your API key. ### Response The response for this API endpoint will have a status code of 200, indicating a successful request. The response body will be in JSON format and will contain the following properties: - `success` (integer): A flag indicating the success of the request. A value of 0 indicates failure. - `message` (string): An optional message providing additional information about the request. In this case, the message is empty. Please note that the response may contain additional properties not mentioned here, but they can be ignored for the purpose of this documentation.
|
|
184
|
+
# @param [Hash] opts the optional parameters
|
|
185
|
+
# @return [Object]
|
|
186
|
+
def request_archive(opts = {})
|
|
187
|
+
data, _status_code, _headers = request_archive_with_http_info(opts)
|
|
188
|
+
data
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Archive all orders
|
|
192
|
+
# This API endpoint is used to archive a request in the SMS Pool system. The HTTP POST request should be sent to `https://api.smspool.net/request/archive`. ### Request Parameters The \\`key\\` parameter is required for this endpoint, this is your API key. ### Response The response for this API endpoint will have a status code of 200, indicating a successful request. The response body will be in JSON format and will contain the following properties: - `success` (integer): A flag indicating the success of the request. A value of 0 indicates failure. - `message` (string): An optional message providing additional information about the request. In this case, the message is empty. Please note that the response may contain additional properties not mentioned here, but they can be ignored for the purpose of this documentation.
|
|
193
|
+
# @param [Hash] opts the optional parameters
|
|
194
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
195
|
+
def request_archive_with_http_info(opts = {})
|
|
196
|
+
if @api_client.config.debugging
|
|
197
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.request_archive ...'
|
|
198
|
+
end
|
|
199
|
+
# resource path
|
|
200
|
+
local_var_path = '/request/archive'
|
|
201
|
+
|
|
202
|
+
# query parameters
|
|
203
|
+
query_params = opts[:query_params] || {}
|
|
204
|
+
|
|
205
|
+
# header parameters
|
|
206
|
+
header_params = opts[:header_params] || {}
|
|
207
|
+
# HTTP header 'Accept' (if needed)
|
|
208
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
209
|
+
|
|
210
|
+
# form parameters
|
|
211
|
+
form_params = opts[:form_params] || {}
|
|
212
|
+
|
|
213
|
+
# http body (model)
|
|
214
|
+
post_body = opts[:debug_body]
|
|
215
|
+
|
|
216
|
+
# return_type
|
|
217
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
218
|
+
|
|
219
|
+
# auth_names
|
|
220
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
221
|
+
|
|
222
|
+
new_options = opts.merge(
|
|
223
|
+
:operation => :"SMSApi.request_archive",
|
|
224
|
+
:header_params => header_params,
|
|
225
|
+
:query_params => query_params,
|
|
226
|
+
:form_params => form_params,
|
|
227
|
+
:body => post_body,
|
|
228
|
+
:auth_names => auth_names,
|
|
229
|
+
:return_type => return_type
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
233
|
+
if @api_client.config.debugging
|
|
234
|
+
@api_client.config.logger.debug "API called: SMSApi#request_archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
235
|
+
end
|
|
236
|
+
return data, status_code, headers
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Request available areacodes
|
|
240
|
+
# @param service [String] The service or number retrieved from the `Service List` endpoint
|
|
241
|
+
# @param country [String] The country in ISO format or number retrieved from the `Country List` endpoint
|
|
242
|
+
# @param pool [String] The pool or number retrieved from the `Pool List` endpoint (optional)
|
|
243
|
+
# @param [Hash] opts the optional parameters
|
|
244
|
+
# @return [Object]
|
|
245
|
+
def request_areacodes(service, country, pool, opts = {})
|
|
246
|
+
data, _status_code, _headers = request_areacodes_with_http_info(service, country, pool, opts)
|
|
247
|
+
data
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Request available areacodes
|
|
251
|
+
# @param service [String] The service or number retrieved from the `Service List` endpoint
|
|
252
|
+
# @param country [String] The country in ISO format or number retrieved from the `Country List` endpoint
|
|
253
|
+
# @param pool [String] The pool or number retrieved from the `Pool List` endpoint (optional)
|
|
254
|
+
# @param [Hash] opts the optional parameters
|
|
255
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
256
|
+
def request_areacodes_with_http_info(service, country, pool, opts = {})
|
|
257
|
+
if @api_client.config.debugging
|
|
258
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.request_areacodes ...'
|
|
259
|
+
end
|
|
260
|
+
# verify the required parameter 'service' is set
|
|
261
|
+
if @api_client.config.client_side_validation && service.nil?
|
|
262
|
+
fail ArgumentError, "Missing the required parameter 'service' when calling SMSApi.request_areacodes"
|
|
263
|
+
end
|
|
264
|
+
# verify the required parameter 'country' is set
|
|
265
|
+
if @api_client.config.client_side_validation && country.nil?
|
|
266
|
+
fail ArgumentError, "Missing the required parameter 'country' when calling SMSApi.request_areacodes"
|
|
267
|
+
end
|
|
268
|
+
# verify the required parameter 'pool' is set
|
|
269
|
+
if @api_client.config.client_side_validation && pool.nil?
|
|
270
|
+
fail ArgumentError, "Missing the required parameter 'pool' when calling SMSApi.request_areacodes"
|
|
271
|
+
end
|
|
272
|
+
# resource path
|
|
273
|
+
local_var_path = '/request/areacodes'
|
|
274
|
+
|
|
275
|
+
# query parameters
|
|
276
|
+
query_params = opts[:query_params] || {}
|
|
277
|
+
|
|
278
|
+
# header parameters
|
|
279
|
+
header_params = opts[:header_params] || {}
|
|
280
|
+
# HTTP header 'Accept' (if needed)
|
|
281
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
282
|
+
# HTTP header 'Content-Type'
|
|
283
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
284
|
+
if !content_type.nil?
|
|
285
|
+
header_params['Content-Type'] = content_type
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# form parameters
|
|
289
|
+
form_params = opts[:form_params] || {}
|
|
290
|
+
form_params['service'] = service
|
|
291
|
+
form_params['country'] = country
|
|
292
|
+
form_params['pool'] = pool
|
|
293
|
+
|
|
294
|
+
# http body (model)
|
|
295
|
+
post_body = opts[:debug_body]
|
|
296
|
+
|
|
297
|
+
# return_type
|
|
298
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
299
|
+
|
|
300
|
+
# auth_names
|
|
301
|
+
auth_names = opts[:debug_auth_names] || []
|
|
302
|
+
|
|
303
|
+
new_options = opts.merge(
|
|
304
|
+
:operation => :"SMSApi.request_areacodes",
|
|
305
|
+
:header_params => header_params,
|
|
306
|
+
:query_params => query_params,
|
|
307
|
+
:form_params => form_params,
|
|
308
|
+
:body => post_body,
|
|
309
|
+
:auth_names => auth_names,
|
|
310
|
+
:return_type => return_type
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
314
|
+
if @api_client.config.debugging
|
|
315
|
+
@api_client.config.logger.debug "API called: SMSApi#request_areacodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
316
|
+
end
|
|
317
|
+
return data, status_code, headers
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
# Order History
|
|
321
|
+
# This API endpoint is used to retrieve the history of SMS requests. It is an HTTP POST request that should be made to the following URL: `https://api.smspool.net/request/history`. The request requires the \\`key\\` parameter which is your API key. The response returned by the API is a JSON array. Each element in the array represents a historical SMS request and contains the following properties: - `cost`: The cost of the SMS request. - `order_code`: The order code associated with the SMS request. - `phonenumber`: The phone number to which the SMS was sent. - `code`: The code associated with the SMS request. - `full_code`: The full code associated with the SMS request. - `short_name`: The short name associated with the SMS request. - `service`: The service associated with the SMS request. - `status`: The status of the SMS request. - `pool`: The pool associated with the SMS request. - `timestamp`: The timestamp of the SMS request. - `completed_on`: The completion date of the SMS request. - `expiry`: The expiry time of the SMS request. - `time_left`: The time left for the SMS request to expire. Please note that the values for the properties are not provided in the response example, so they may be empty or null. The last execution of this API request returned a response with a status code of 200, indicating a successful execution. The response body contained an array of SMS request history objects. Please refer to the API documentation for more details on how to use this endpoint and interpret the response.
|
|
322
|
+
# @param [Hash] opts the optional parameters
|
|
323
|
+
# @option opts [Integer] :start Which row you'd like to start from
|
|
324
|
+
# @option opts [Integer] :length Max length of all rows
|
|
325
|
+
# @option opts [String] :search Search query for phone number, order_code, service or country
|
|
326
|
+
# @return [Object]
|
|
327
|
+
def request_history(opts = {})
|
|
328
|
+
data, _status_code, _headers = request_history_with_http_info(opts)
|
|
329
|
+
data
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
# Order History
|
|
333
|
+
# This API endpoint is used to retrieve the history of SMS requests. It is an HTTP POST request that should be made to the following URL: `https://api.smspool.net/request/history`. The request requires the \\`key\\` parameter which is your API key. The response returned by the API is a JSON array. Each element in the array represents a historical SMS request and contains the following properties: - `cost`: The cost of the SMS request. - `order_code`: The order code associated with the SMS request. - `phonenumber`: The phone number to which the SMS was sent. - `code`: The code associated with the SMS request. - `full_code`: The full code associated with the SMS request. - `short_name`: The short name associated with the SMS request. - `service`: The service associated with the SMS request. - `status`: The status of the SMS request. - `pool`: The pool associated with the SMS request. - `timestamp`: The timestamp of the SMS request. - `completed_on`: The completion date of the SMS request. - `expiry`: The expiry time of the SMS request. - `time_left`: The time left for the SMS request to expire. Please note that the values for the properties are not provided in the response example, so they may be empty or null. The last execution of this API request returned a response with a status code of 200, indicating a successful execution. The response body contained an array of SMS request history objects. Please refer to the API documentation for more details on how to use this endpoint and interpret the response.
|
|
334
|
+
# @param [Hash] opts the optional parameters
|
|
335
|
+
# @option opts [Integer] :start Which row you'd like to start from
|
|
336
|
+
# @option opts [Integer] :length Max length of all rows
|
|
337
|
+
# @option opts [String] :search Search query for phone number, order_code, service or country
|
|
338
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
339
|
+
def request_history_with_http_info(opts = {})
|
|
340
|
+
if @api_client.config.debugging
|
|
341
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.request_history ...'
|
|
342
|
+
end
|
|
343
|
+
# resource path
|
|
344
|
+
local_var_path = '/request/history'
|
|
345
|
+
|
|
346
|
+
# query parameters
|
|
347
|
+
query_params = opts[:query_params] || {}
|
|
348
|
+
|
|
349
|
+
# header parameters
|
|
350
|
+
header_params = opts[:header_params] || {}
|
|
351
|
+
# HTTP header 'Accept' (if needed)
|
|
352
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
353
|
+
# HTTP header 'Content-Type'
|
|
354
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
355
|
+
if !content_type.nil?
|
|
356
|
+
header_params['Content-Type'] = content_type
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
# form parameters
|
|
360
|
+
form_params = opts[:form_params] || {}
|
|
361
|
+
form_params['start'] = opts[:'start'] if !opts[:'start'].nil?
|
|
362
|
+
form_params['length'] = opts[:'length'] if !opts[:'length'].nil?
|
|
363
|
+
form_params['search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
364
|
+
|
|
365
|
+
# http body (model)
|
|
366
|
+
post_body = opts[:debug_body]
|
|
367
|
+
|
|
368
|
+
# return_type
|
|
369
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
370
|
+
|
|
371
|
+
# auth_names
|
|
372
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
373
|
+
|
|
374
|
+
new_options = opts.merge(
|
|
375
|
+
:operation => :"SMSApi.request_history",
|
|
376
|
+
:header_params => header_params,
|
|
377
|
+
:query_params => query_params,
|
|
378
|
+
:form_params => form_params,
|
|
379
|
+
:body => post_body,
|
|
380
|
+
:auth_names => auth_names,
|
|
381
|
+
:return_type => return_type
|
|
382
|
+
)
|
|
383
|
+
|
|
384
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
385
|
+
if @api_client.config.debugging
|
|
386
|
+
@api_client.config.logger.debug "API called: SMSApi#request_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
387
|
+
end
|
|
388
|
+
return data, status_code, headers
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
# Activate SMS
|
|
392
|
+
# This endpoint will forcefully activate an SMS to set it available for future resends, please keep in mind that these orders are NOT eligible for a refund after activating them.
|
|
393
|
+
# @param orderid [String]
|
|
394
|
+
# @param [Hash] opts the optional parameters
|
|
395
|
+
# @return [Object]
|
|
396
|
+
def sms_activate(orderid, opts = {})
|
|
397
|
+
data, _status_code, _headers = sms_activate_with_http_info(orderid, opts)
|
|
398
|
+
data
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# Activate SMS
|
|
402
|
+
# This endpoint will forcefully activate an SMS to set it available for future resends, please keep in mind that these orders are NOT eligible for a refund after activating them.
|
|
403
|
+
# @param orderid [String]
|
|
404
|
+
# @param [Hash] opts the optional parameters
|
|
405
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
406
|
+
def sms_activate_with_http_info(orderid, opts = {})
|
|
407
|
+
if @api_client.config.debugging
|
|
408
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.sms_activate ...'
|
|
409
|
+
end
|
|
410
|
+
# verify the required parameter 'orderid' is set
|
|
411
|
+
if @api_client.config.client_side_validation && orderid.nil?
|
|
412
|
+
fail ArgumentError, "Missing the required parameter 'orderid' when calling SMSApi.sms_activate"
|
|
413
|
+
end
|
|
414
|
+
# resource path
|
|
415
|
+
local_var_path = '/sms/activate'
|
|
416
|
+
|
|
417
|
+
# query parameters
|
|
418
|
+
query_params = opts[:query_params] || {}
|
|
419
|
+
|
|
420
|
+
# header parameters
|
|
421
|
+
header_params = opts[:header_params] || {}
|
|
422
|
+
# HTTP header 'Accept' (if needed)
|
|
423
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
424
|
+
# HTTP header 'Content-Type'
|
|
425
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
426
|
+
if !content_type.nil?
|
|
427
|
+
header_params['Content-Type'] = content_type
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
# form parameters
|
|
431
|
+
form_params = opts[:form_params] || {}
|
|
432
|
+
form_params['orderid'] = orderid
|
|
433
|
+
|
|
434
|
+
# http body (model)
|
|
435
|
+
post_body = opts[:debug_body]
|
|
436
|
+
|
|
437
|
+
# return_type
|
|
438
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
439
|
+
|
|
440
|
+
# auth_names
|
|
441
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
442
|
+
|
|
443
|
+
new_options = opts.merge(
|
|
444
|
+
:operation => :"SMSApi.sms_activate",
|
|
445
|
+
:header_params => header_params,
|
|
446
|
+
:query_params => query_params,
|
|
447
|
+
:form_params => form_params,
|
|
448
|
+
:body => post_body,
|
|
449
|
+
:auth_names => auth_names,
|
|
450
|
+
:return_type => return_type
|
|
451
|
+
)
|
|
452
|
+
|
|
453
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
454
|
+
if @api_client.config.debugging
|
|
455
|
+
@api_client.config.logger.debug "API called: SMSApi#sms_activate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
456
|
+
end
|
|
457
|
+
return data, status_code, headers
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
# One-time stock for all services
|
|
461
|
+
# This API endpoint is used to retrieve one-time SMS stock in the SMSPool system. The HTTP POST request should be sent to `https://api.smspool.net/sms/stock`. ### Request Parameters The \\`key\\` parameter is required for this endpoint, this is your API key. ### Response The response for this API endpoint will have a status code of 200, indicating a successful request. The response body will be in JSON format and will contain the following properties: - `success` (integer): A flag indicating the success of the request. A value of 0 indicates failure. - `message` (string): An optional message providing additional information about the request. In this case, the message is empty. Please note that the response may contain additional properties not mentioned here, but they can be ignored for the purpose of this documentation.
|
|
462
|
+
# @param [Hash] opts the optional parameters
|
|
463
|
+
# @option opts [String] :country Country retrieved from ''Country list\\\" endpoint (optional)
|
|
464
|
+
# @option opts [String] :service Service retrieved from ''Service list\\\" endpoint (optional)
|
|
465
|
+
# @option opts [String] :pool Pool retrieved from ''Pool list\\\" endpoint (optional)
|
|
466
|
+
# @return [Object]
|
|
467
|
+
def sms_all_stock(opts = {})
|
|
468
|
+
data, _status_code, _headers = sms_all_stock_with_http_info(opts)
|
|
469
|
+
data
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
# One-time stock for all services
|
|
473
|
+
# This API endpoint is used to retrieve one-time SMS stock in the SMSPool system. The HTTP POST request should be sent to `https://api.smspool.net/sms/stock`. ### Request Parameters The \\`key\\` parameter is required for this endpoint, this is your API key. ### Response The response for this API endpoint will have a status code of 200, indicating a successful request. The response body will be in JSON format and will contain the following properties: - `success` (integer): A flag indicating the success of the request. A value of 0 indicates failure. - `message` (string): An optional message providing additional information about the request. In this case, the message is empty. Please note that the response may contain additional properties not mentioned here, but they can be ignored for the purpose of this documentation.
|
|
474
|
+
# @param [Hash] opts the optional parameters
|
|
475
|
+
# @option opts [String] :country Country retrieved from ''Country list\\\" endpoint (optional)
|
|
476
|
+
# @option opts [String] :service Service retrieved from ''Service list\\\" endpoint (optional)
|
|
477
|
+
# @option opts [String] :pool Pool retrieved from ''Pool list\\\" endpoint (optional)
|
|
478
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
479
|
+
def sms_all_stock_with_http_info(opts = {})
|
|
480
|
+
if @api_client.config.debugging
|
|
481
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.sms_all_stock ...'
|
|
482
|
+
end
|
|
483
|
+
# resource path
|
|
484
|
+
local_var_path = '/sms/all_stock'
|
|
485
|
+
|
|
486
|
+
# query parameters
|
|
487
|
+
query_params = opts[:query_params] || {}
|
|
488
|
+
|
|
489
|
+
# header parameters
|
|
490
|
+
header_params = opts[:header_params] || {}
|
|
491
|
+
# HTTP header 'Accept' (if needed)
|
|
492
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
493
|
+
# HTTP header 'Content-Type'
|
|
494
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
495
|
+
if !content_type.nil?
|
|
496
|
+
header_params['Content-Type'] = content_type
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
# form parameters
|
|
500
|
+
form_params = opts[:form_params] || {}
|
|
501
|
+
form_params['country'] = opts[:'country'] if !opts[:'country'].nil?
|
|
502
|
+
form_params['service'] = opts[:'service'] if !opts[:'service'].nil?
|
|
503
|
+
form_params['pool'] = opts[:'pool'] if !opts[:'pool'].nil?
|
|
504
|
+
|
|
505
|
+
# http body (model)
|
|
506
|
+
post_body = opts[:debug_body]
|
|
507
|
+
|
|
508
|
+
# return_type
|
|
509
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
510
|
+
|
|
511
|
+
# auth_names
|
|
512
|
+
auth_names = opts[:debug_auth_names] || []
|
|
513
|
+
|
|
514
|
+
new_options = opts.merge(
|
|
515
|
+
:operation => :"SMSApi.sms_all_stock",
|
|
516
|
+
:header_params => header_params,
|
|
517
|
+
:query_params => query_params,
|
|
518
|
+
:form_params => form_params,
|
|
519
|
+
:body => post_body,
|
|
520
|
+
:auth_names => auth_names,
|
|
521
|
+
:return_type => return_type
|
|
522
|
+
)
|
|
523
|
+
|
|
524
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
525
|
+
if @api_client.config.debugging
|
|
526
|
+
@api_client.config.logger.debug "API called: SMSApi#sms_all_stock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
527
|
+
end
|
|
528
|
+
return data, status_code, headers
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
# Cancel SMS
|
|
532
|
+
# # Cancel your SMS order ## Responses | **Success** | {\"success\":1} | | **Fail** | {\"success\":0} |
|
|
533
|
+
# @param [Hash] opts the optional parameters
|
|
534
|
+
# @option opts [String] :orderid
|
|
535
|
+
# @option opts [String] :orderids
|
|
536
|
+
# @option opts [Integer] :expiry
|
|
537
|
+
# @option opts [Integer] :ban
|
|
538
|
+
# @return [Object]
|
|
539
|
+
def sms_cancel(opts = {})
|
|
540
|
+
data, _status_code, _headers = sms_cancel_with_http_info(opts)
|
|
541
|
+
data
|
|
542
|
+
end
|
|
543
|
+
|
|
544
|
+
# Cancel SMS
|
|
545
|
+
# # Cancel your SMS order ## Responses | **Success** | {\"success\":1} | | **Fail** | {\"success\":0} |
|
|
546
|
+
# @param [Hash] opts the optional parameters
|
|
547
|
+
# @option opts [String] :orderid
|
|
548
|
+
# @option opts [String] :orderids
|
|
549
|
+
# @option opts [Integer] :expiry
|
|
550
|
+
# @option opts [Integer] :ban
|
|
551
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
552
|
+
def sms_cancel_with_http_info(opts = {})
|
|
553
|
+
if @api_client.config.debugging
|
|
554
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.sms_cancel ...'
|
|
555
|
+
end
|
|
556
|
+
# resource path
|
|
557
|
+
local_var_path = '/sms/cancel'
|
|
558
|
+
|
|
559
|
+
# query parameters
|
|
560
|
+
query_params = opts[:query_params] || {}
|
|
561
|
+
|
|
562
|
+
# header parameters
|
|
563
|
+
header_params = opts[:header_params] || {}
|
|
564
|
+
# HTTP header 'Accept' (if needed)
|
|
565
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
566
|
+
# HTTP header 'Content-Type'
|
|
567
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
568
|
+
if !content_type.nil?
|
|
569
|
+
header_params['Content-Type'] = content_type
|
|
570
|
+
end
|
|
571
|
+
|
|
572
|
+
# form parameters
|
|
573
|
+
form_params = opts[:form_params] || {}
|
|
574
|
+
form_params['orderid'] = opts[:'orderid'] if !opts[:'orderid'].nil?
|
|
575
|
+
form_params['orderids'] = opts[:'orderids'] if !opts[:'orderids'].nil?
|
|
576
|
+
form_params['expiry'] = opts[:'expiry'] if !opts[:'expiry'].nil?
|
|
577
|
+
form_params['ban'] = opts[:'ban'] if !opts[:'ban'].nil?
|
|
578
|
+
|
|
579
|
+
# http body (model)
|
|
580
|
+
post_body = opts[:debug_body]
|
|
581
|
+
|
|
582
|
+
# return_type
|
|
583
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
584
|
+
|
|
585
|
+
# auth_names
|
|
586
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
587
|
+
|
|
588
|
+
new_options = opts.merge(
|
|
589
|
+
:operation => :"SMSApi.sms_cancel",
|
|
590
|
+
:header_params => header_params,
|
|
591
|
+
:query_params => query_params,
|
|
592
|
+
:form_params => form_params,
|
|
593
|
+
:body => post_body,
|
|
594
|
+
:auth_names => auth_names,
|
|
595
|
+
:return_type => return_type
|
|
596
|
+
)
|
|
597
|
+
|
|
598
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
599
|
+
if @api_client.config.debugging
|
|
600
|
+
@api_client.config.logger.debug "API called: SMSApi#sms_cancel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
601
|
+
end
|
|
602
|
+
return data, status_code, headers
|
|
603
|
+
end
|
|
604
|
+
|
|
605
|
+
# Cancel All SMS
|
|
606
|
+
# # Cancel your SMS order ## Responses | **Success** | {\"success\":1} | | **Fail** | {\"success\":0} |
|
|
607
|
+
# @param [Hash] opts the optional parameters
|
|
608
|
+
# @return [Object]
|
|
609
|
+
def sms_cancel_all(opts = {})
|
|
610
|
+
data, _status_code, _headers = sms_cancel_all_with_http_info(opts)
|
|
611
|
+
data
|
|
612
|
+
end
|
|
613
|
+
|
|
614
|
+
# Cancel All SMS
|
|
615
|
+
# # Cancel your SMS order ## Responses | **Success** | {\"success\":1} | | **Fail** | {\"success\":0} |
|
|
616
|
+
# @param [Hash] opts the optional parameters
|
|
617
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
618
|
+
def sms_cancel_all_with_http_info(opts = {})
|
|
619
|
+
if @api_client.config.debugging
|
|
620
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.sms_cancel_all ...'
|
|
621
|
+
end
|
|
622
|
+
# resource path
|
|
623
|
+
local_var_path = '/sms/cancel_all'
|
|
624
|
+
|
|
625
|
+
# query parameters
|
|
626
|
+
query_params = opts[:query_params] || {}
|
|
627
|
+
|
|
628
|
+
# header parameters
|
|
629
|
+
header_params = opts[:header_params] || {}
|
|
630
|
+
# HTTP header 'Accept' (if needed)
|
|
631
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
632
|
+
|
|
633
|
+
# form parameters
|
|
634
|
+
form_params = opts[:form_params] || {}
|
|
635
|
+
|
|
636
|
+
# http body (model)
|
|
637
|
+
post_body = opts[:debug_body]
|
|
638
|
+
|
|
639
|
+
# return_type
|
|
640
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
641
|
+
|
|
642
|
+
# auth_names
|
|
643
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
644
|
+
|
|
645
|
+
new_options = opts.merge(
|
|
646
|
+
:operation => :"SMSApi.sms_cancel_all",
|
|
647
|
+
:header_params => header_params,
|
|
648
|
+
:query_params => query_params,
|
|
649
|
+
:form_params => form_params,
|
|
650
|
+
:body => post_body,
|
|
651
|
+
:auth_names => auth_names,
|
|
652
|
+
:return_type => return_type
|
|
653
|
+
)
|
|
654
|
+
|
|
655
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
656
|
+
if @api_client.config.debugging
|
|
657
|
+
@api_client.config.logger.debug "API called: SMSApi#sms_cancel_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
658
|
+
end
|
|
659
|
+
return data, status_code, headers
|
|
660
|
+
end
|
|
661
|
+
|
|
662
|
+
# Check SMS
|
|
663
|
+
# You may run into ratelimits while using this endpoint for high rate requests, we recommend using /request/active instead as it will list all your orders at the same time.
|
|
664
|
+
# @param orderid [String]
|
|
665
|
+
# @param [Hash] opts the optional parameters
|
|
666
|
+
# @return [Object]
|
|
667
|
+
def sms_check(orderid, opts = {})
|
|
668
|
+
data, _status_code, _headers = sms_check_with_http_info(orderid, opts)
|
|
669
|
+
data
|
|
670
|
+
end
|
|
671
|
+
|
|
672
|
+
# Check SMS
|
|
673
|
+
# You may run into ratelimits while using this endpoint for high rate requests, we recommend using /request/active instead as it will list all your orders at the same time.
|
|
674
|
+
# @param orderid [String]
|
|
675
|
+
# @param [Hash] opts the optional parameters
|
|
676
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
677
|
+
def sms_check_with_http_info(orderid, opts = {})
|
|
678
|
+
if @api_client.config.debugging
|
|
679
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.sms_check ...'
|
|
680
|
+
end
|
|
681
|
+
# verify the required parameter 'orderid' is set
|
|
682
|
+
if @api_client.config.client_side_validation && orderid.nil?
|
|
683
|
+
fail ArgumentError, "Missing the required parameter 'orderid' when calling SMSApi.sms_check"
|
|
684
|
+
end
|
|
685
|
+
# resource path
|
|
686
|
+
local_var_path = '/sms/check'
|
|
687
|
+
|
|
688
|
+
# query parameters
|
|
689
|
+
query_params = opts[:query_params] || {}
|
|
690
|
+
|
|
691
|
+
# header parameters
|
|
692
|
+
header_params = opts[:header_params] || {}
|
|
693
|
+
# HTTP header 'Accept' (if needed)
|
|
694
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
695
|
+
# HTTP header 'Content-Type'
|
|
696
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
697
|
+
if !content_type.nil?
|
|
698
|
+
header_params['Content-Type'] = content_type
|
|
699
|
+
end
|
|
700
|
+
|
|
701
|
+
# form parameters
|
|
702
|
+
form_params = opts[:form_params] || {}
|
|
703
|
+
form_params['orderid'] = orderid
|
|
704
|
+
|
|
705
|
+
# http body (model)
|
|
706
|
+
post_body = opts[:debug_body]
|
|
707
|
+
|
|
708
|
+
# return_type
|
|
709
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
710
|
+
|
|
711
|
+
# auth_names
|
|
712
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
713
|
+
|
|
714
|
+
new_options = opts.merge(
|
|
715
|
+
:operation => :"SMSApi.sms_check",
|
|
716
|
+
:header_params => header_params,
|
|
717
|
+
:query_params => query_params,
|
|
718
|
+
:form_params => form_params,
|
|
719
|
+
:body => post_body,
|
|
720
|
+
:auth_names => auth_names,
|
|
721
|
+
:return_type => return_type
|
|
722
|
+
)
|
|
723
|
+
|
|
724
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
725
|
+
if @api_client.config.debugging
|
|
726
|
+
@api_client.config.logger.debug "API called: SMSApi#sms_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
727
|
+
end
|
|
728
|
+
return data, status_code, headers
|
|
729
|
+
end
|
|
730
|
+
|
|
731
|
+
# Check Resend
|
|
732
|
+
# Check if the order can be resent or not.
|
|
733
|
+
# @param orderid [String]
|
|
734
|
+
# @param [Hash] opts the optional parameters
|
|
735
|
+
# @return [Object]
|
|
736
|
+
def sms_check_resend(orderid, opts = {})
|
|
737
|
+
data, _status_code, _headers = sms_check_resend_with_http_info(orderid, opts)
|
|
738
|
+
data
|
|
739
|
+
end
|
|
740
|
+
|
|
741
|
+
# Check Resend
|
|
742
|
+
# Check if the order can be resent or not.
|
|
743
|
+
# @param orderid [String]
|
|
744
|
+
# @param [Hash] opts the optional parameters
|
|
745
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
746
|
+
def sms_check_resend_with_http_info(orderid, opts = {})
|
|
747
|
+
if @api_client.config.debugging
|
|
748
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.sms_check_resend ...'
|
|
749
|
+
end
|
|
750
|
+
# verify the required parameter 'orderid' is set
|
|
751
|
+
if @api_client.config.client_side_validation && orderid.nil?
|
|
752
|
+
fail ArgumentError, "Missing the required parameter 'orderid' when calling SMSApi.sms_check_resend"
|
|
753
|
+
end
|
|
754
|
+
# resource path
|
|
755
|
+
local_var_path = '/sms/check_resend'
|
|
756
|
+
|
|
757
|
+
# query parameters
|
|
758
|
+
query_params = opts[:query_params] || {}
|
|
759
|
+
|
|
760
|
+
# header parameters
|
|
761
|
+
header_params = opts[:header_params] || {}
|
|
762
|
+
# HTTP header 'Accept' (if needed)
|
|
763
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
764
|
+
# HTTP header 'Content-Type'
|
|
765
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
766
|
+
if !content_type.nil?
|
|
767
|
+
header_params['Content-Type'] = content_type
|
|
768
|
+
end
|
|
769
|
+
|
|
770
|
+
# form parameters
|
|
771
|
+
form_params = opts[:form_params] || {}
|
|
772
|
+
form_params['orderid'] = orderid
|
|
773
|
+
|
|
774
|
+
# http body (model)
|
|
775
|
+
post_body = opts[:debug_body]
|
|
776
|
+
|
|
777
|
+
# return_type
|
|
778
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
779
|
+
|
|
780
|
+
# auth_names
|
|
781
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
782
|
+
|
|
783
|
+
new_options = opts.merge(
|
|
784
|
+
:operation => :"SMSApi.sms_check_resend",
|
|
785
|
+
:header_params => header_params,
|
|
786
|
+
:query_params => query_params,
|
|
787
|
+
:form_params => form_params,
|
|
788
|
+
:body => post_body,
|
|
789
|
+
:auth_names => auth_names,
|
|
790
|
+
:return_type => return_type
|
|
791
|
+
)
|
|
792
|
+
|
|
793
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
794
|
+
if @api_client.config.debugging
|
|
795
|
+
@api_client.config.logger.debug "API called: SMSApi#sms_check_resend\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
796
|
+
end
|
|
797
|
+
return data, status_code, headers
|
|
798
|
+
end
|
|
799
|
+
|
|
800
|
+
# Clear SMS Cache
|
|
801
|
+
# # Clear your previous SMS cache to allocate previous numbers again ## Responses | **Success** | {\"success\":1} | | **Fail** | {\"success\":0} |
|
|
802
|
+
# @param [Hash] opts the optional parameters
|
|
803
|
+
# @return [Object]
|
|
804
|
+
def sms_clear_cache(opts = {})
|
|
805
|
+
data, _status_code, _headers = sms_clear_cache_with_http_info(opts)
|
|
806
|
+
data
|
|
807
|
+
end
|
|
808
|
+
|
|
809
|
+
# Clear SMS Cache
|
|
810
|
+
# # Clear your previous SMS cache to allocate previous numbers again ## Responses | **Success** | {\"success\":1} | | **Fail** | {\"success\":0} |
|
|
811
|
+
# @param [Hash] opts the optional parameters
|
|
812
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
813
|
+
def sms_clear_cache_with_http_info(opts = {})
|
|
814
|
+
if @api_client.config.debugging
|
|
815
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.sms_clear_cache ...'
|
|
816
|
+
end
|
|
817
|
+
# resource path
|
|
818
|
+
local_var_path = '/sms/clear_cache'
|
|
819
|
+
|
|
820
|
+
# query parameters
|
|
821
|
+
query_params = opts[:query_params] || {}
|
|
822
|
+
|
|
823
|
+
# header parameters
|
|
824
|
+
header_params = opts[:header_params] || {}
|
|
825
|
+
# HTTP header 'Accept' (if needed)
|
|
826
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
827
|
+
|
|
828
|
+
# form parameters
|
|
829
|
+
form_params = opts[:form_params] || {}
|
|
830
|
+
|
|
831
|
+
# http body (model)
|
|
832
|
+
post_body = opts[:debug_body]
|
|
833
|
+
|
|
834
|
+
# return_type
|
|
835
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
836
|
+
|
|
837
|
+
# auth_names
|
|
838
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
839
|
+
|
|
840
|
+
new_options = opts.merge(
|
|
841
|
+
:operation => :"SMSApi.sms_clear_cache",
|
|
842
|
+
:header_params => header_params,
|
|
843
|
+
:query_params => query_params,
|
|
844
|
+
:form_params => form_params,
|
|
845
|
+
:body => post_body,
|
|
846
|
+
:auth_names => auth_names,
|
|
847
|
+
:return_type => return_type
|
|
848
|
+
)
|
|
849
|
+
|
|
850
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
851
|
+
if @api_client.config.debugging
|
|
852
|
+
@api_client.config.logger.debug "API called: SMSApi#sms_clear_cache\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
853
|
+
end
|
|
854
|
+
return data, status_code, headers
|
|
855
|
+
end
|
|
856
|
+
|
|
857
|
+
# Missed SMS
|
|
858
|
+
# Some messages arrive on a number from your one-time orders but cannot finish the order, such as Ticketmaster and Seated codes or Hark reward payouts. This returns those messages, the same ones the Missed SMS tool on the website shows. Only numbers from pool Foxtrot are covered. The newest messages come first. `url`, `code` and `email` hold the first link, code and email address found in the message, or an empty string.
|
|
859
|
+
# @param [Hash] opts the optional parameters
|
|
860
|
+
# @option opts [Integer] :phonenumber Only return messages for this number, including the country code. Leave it out for all your numbers.
|
|
861
|
+
# @option opts [Integer] :limit Maximum number of messages. Defaults to 100, at most 500.
|
|
862
|
+
# @return [Object]
|
|
863
|
+
def sms_missed(opts = {})
|
|
864
|
+
data, _status_code, _headers = sms_missed_with_http_info(opts)
|
|
865
|
+
data
|
|
866
|
+
end
|
|
867
|
+
|
|
868
|
+
# Missed SMS
|
|
869
|
+
# Some messages arrive on a number from your one-time orders but cannot finish the order, such as Ticketmaster and Seated codes or Hark reward payouts. This returns those messages, the same ones the Missed SMS tool on the website shows. Only numbers from pool Foxtrot are covered. The newest messages come first. `url`, `code` and `email` hold the first link, code and email address found in the message, or an empty string.
|
|
870
|
+
# @param [Hash] opts the optional parameters
|
|
871
|
+
# @option opts [Integer] :phonenumber Only return messages for this number, including the country code. Leave it out for all your numbers.
|
|
872
|
+
# @option opts [Integer] :limit Maximum number of messages. Defaults to 100, at most 500.
|
|
873
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
874
|
+
def sms_missed_with_http_info(opts = {})
|
|
875
|
+
if @api_client.config.debugging
|
|
876
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.sms_missed ...'
|
|
877
|
+
end
|
|
878
|
+
# resource path
|
|
879
|
+
local_var_path = '/sms/missed'
|
|
880
|
+
|
|
881
|
+
# query parameters
|
|
882
|
+
query_params = opts[:query_params] || {}
|
|
883
|
+
|
|
884
|
+
# header parameters
|
|
885
|
+
header_params = opts[:header_params] || {}
|
|
886
|
+
# HTTP header 'Accept' (if needed)
|
|
887
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
888
|
+
# HTTP header 'Content-Type'
|
|
889
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
890
|
+
if !content_type.nil?
|
|
891
|
+
header_params['Content-Type'] = content_type
|
|
892
|
+
end
|
|
893
|
+
|
|
894
|
+
# form parameters
|
|
895
|
+
form_params = opts[:form_params] || {}
|
|
896
|
+
form_params['phonenumber'] = opts[:'phonenumber'] if !opts[:'phonenumber'].nil?
|
|
897
|
+
form_params['limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
898
|
+
|
|
899
|
+
# http body (model)
|
|
900
|
+
post_body = opts[:debug_body]
|
|
901
|
+
|
|
902
|
+
# return_type
|
|
903
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
904
|
+
|
|
905
|
+
# auth_names
|
|
906
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
907
|
+
|
|
908
|
+
new_options = opts.merge(
|
|
909
|
+
:operation => :"SMSApi.sms_missed",
|
|
910
|
+
:header_params => header_params,
|
|
911
|
+
:query_params => query_params,
|
|
912
|
+
:form_params => form_params,
|
|
913
|
+
:body => post_body,
|
|
914
|
+
:auth_names => auth_names,
|
|
915
|
+
:return_type => return_type
|
|
916
|
+
)
|
|
917
|
+
|
|
918
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
919
|
+
if @api_client.config.debugging
|
|
920
|
+
@api_client.config.logger.debug "API called: SMSApi#sms_missed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
921
|
+
end
|
|
922
|
+
return data, status_code, headers
|
|
923
|
+
end
|
|
924
|
+
|
|
925
|
+
# Reactivate SMS
|
|
926
|
+
# This endpoint will reactivate an order, please keep in mind that these orders are NOT eligible for a refund after activating them.
|
|
927
|
+
# @param orderid [String]
|
|
928
|
+
# @param [Hash] opts the optional parameters
|
|
929
|
+
# @return [Object]
|
|
930
|
+
def sms_reactivate(orderid, opts = {})
|
|
931
|
+
data, _status_code, _headers = sms_reactivate_with_http_info(orderid, opts)
|
|
932
|
+
data
|
|
933
|
+
end
|
|
934
|
+
|
|
935
|
+
# Reactivate SMS
|
|
936
|
+
# This endpoint will reactivate an order, please keep in mind that these orders are NOT eligible for a refund after activating them.
|
|
937
|
+
# @param orderid [String]
|
|
938
|
+
# @param [Hash] opts the optional parameters
|
|
939
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
940
|
+
def sms_reactivate_with_http_info(orderid, opts = {})
|
|
941
|
+
if @api_client.config.debugging
|
|
942
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.sms_reactivate ...'
|
|
943
|
+
end
|
|
944
|
+
# verify the required parameter 'orderid' is set
|
|
945
|
+
if @api_client.config.client_side_validation && orderid.nil?
|
|
946
|
+
fail ArgumentError, "Missing the required parameter 'orderid' when calling SMSApi.sms_reactivate"
|
|
947
|
+
end
|
|
948
|
+
# resource path
|
|
949
|
+
local_var_path = '/sms/reactivate'
|
|
950
|
+
|
|
951
|
+
# query parameters
|
|
952
|
+
query_params = opts[:query_params] || {}
|
|
953
|
+
|
|
954
|
+
# header parameters
|
|
955
|
+
header_params = opts[:header_params] || {}
|
|
956
|
+
# HTTP header 'Accept' (if needed)
|
|
957
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
958
|
+
# HTTP header 'Content-Type'
|
|
959
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
960
|
+
if !content_type.nil?
|
|
961
|
+
header_params['Content-Type'] = content_type
|
|
962
|
+
end
|
|
963
|
+
|
|
964
|
+
# form parameters
|
|
965
|
+
form_params = opts[:form_params] || {}
|
|
966
|
+
form_params['orderid'] = orderid
|
|
967
|
+
|
|
968
|
+
# http body (model)
|
|
969
|
+
post_body = opts[:debug_body]
|
|
970
|
+
|
|
971
|
+
# return_type
|
|
972
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
973
|
+
|
|
974
|
+
# auth_names
|
|
975
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
976
|
+
|
|
977
|
+
new_options = opts.merge(
|
|
978
|
+
:operation => :"SMSApi.sms_reactivate",
|
|
979
|
+
:header_params => header_params,
|
|
980
|
+
:query_params => query_params,
|
|
981
|
+
:form_params => form_params,
|
|
982
|
+
:body => post_body,
|
|
983
|
+
:auth_names => auth_names,
|
|
984
|
+
:return_type => return_type
|
|
985
|
+
)
|
|
986
|
+
|
|
987
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
988
|
+
if @api_client.config.debugging
|
|
989
|
+
@api_client.config.logger.debug "API called: SMSApi#sms_reactivate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
990
|
+
end
|
|
991
|
+
return data, status_code, headers
|
|
992
|
+
end
|
|
993
|
+
|
|
994
|
+
# Resend
|
|
995
|
+
# # Resend Resend the order. Keep in mind that some pools will have a charge per resend. You can see whether the resend will have a charge using the \"Check Resend\" endpoint ## Responses | **Success** | {\"success\":1,\"message\":\"Number has been requested again\",\"resend\":0} | | **Fail** | {\"success\":0,\"message\":\"Phonenumber could not be requested again, try later again.\",\"resend\":0} |
|
|
996
|
+
# @param orderid [String]
|
|
997
|
+
# @param [Hash] opts the optional parameters
|
|
998
|
+
# @return [Object]
|
|
999
|
+
def sms_resend(orderid, opts = {})
|
|
1000
|
+
data, _status_code, _headers = sms_resend_with_http_info(orderid, opts)
|
|
1001
|
+
data
|
|
1002
|
+
end
|
|
1003
|
+
|
|
1004
|
+
# Resend
|
|
1005
|
+
# # Resend Resend the order. Keep in mind that some pools will have a charge per resend. You can see whether the resend will have a charge using the \"Check Resend\" endpoint ## Responses | **Success** | {\"success\":1,\"message\":\"Number has been requested again\",\"resend\":0} | | **Fail** | {\"success\":0,\"message\":\"Phonenumber could not be requested again, try later again.\",\"resend\":0} |
|
|
1006
|
+
# @param orderid [String]
|
|
1007
|
+
# @param [Hash] opts the optional parameters
|
|
1008
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1009
|
+
def sms_resend_with_http_info(orderid, opts = {})
|
|
1010
|
+
if @api_client.config.debugging
|
|
1011
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.sms_resend ...'
|
|
1012
|
+
end
|
|
1013
|
+
# verify the required parameter 'orderid' is set
|
|
1014
|
+
if @api_client.config.client_side_validation && orderid.nil?
|
|
1015
|
+
fail ArgumentError, "Missing the required parameter 'orderid' when calling SMSApi.sms_resend"
|
|
1016
|
+
end
|
|
1017
|
+
# resource path
|
|
1018
|
+
local_var_path = '/sms/resend'
|
|
1019
|
+
|
|
1020
|
+
# query parameters
|
|
1021
|
+
query_params = opts[:query_params] || {}
|
|
1022
|
+
|
|
1023
|
+
# header parameters
|
|
1024
|
+
header_params = opts[:header_params] || {}
|
|
1025
|
+
# HTTP header 'Accept' (if needed)
|
|
1026
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1027
|
+
# HTTP header 'Content-Type'
|
|
1028
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
1029
|
+
if !content_type.nil?
|
|
1030
|
+
header_params['Content-Type'] = content_type
|
|
1031
|
+
end
|
|
1032
|
+
|
|
1033
|
+
# form parameters
|
|
1034
|
+
form_params = opts[:form_params] || {}
|
|
1035
|
+
form_params['orderid'] = orderid
|
|
1036
|
+
|
|
1037
|
+
# http body (model)
|
|
1038
|
+
post_body = opts[:debug_body]
|
|
1039
|
+
|
|
1040
|
+
# return_type
|
|
1041
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1042
|
+
|
|
1043
|
+
# auth_names
|
|
1044
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1045
|
+
|
|
1046
|
+
new_options = opts.merge(
|
|
1047
|
+
:operation => :"SMSApi.sms_resend",
|
|
1048
|
+
:header_params => header_params,
|
|
1049
|
+
:query_params => query_params,
|
|
1050
|
+
:form_params => form_params,
|
|
1051
|
+
:body => post_body,
|
|
1052
|
+
:auth_names => auth_names,
|
|
1053
|
+
:return_type => return_type
|
|
1054
|
+
)
|
|
1055
|
+
|
|
1056
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1057
|
+
if @api_client.config.debugging
|
|
1058
|
+
@api_client.config.logger.debug "API called: SMSApi#sms_resend\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1059
|
+
end
|
|
1060
|
+
return data, status_code, headers
|
|
1061
|
+
end
|
|
1062
|
+
|
|
1063
|
+
# One-time SMS stock
|
|
1064
|
+
# This API endpoint is used to retrieve one-time SMS stock in the SMSPool system. The HTTP POST request should be sent to `https://api.smspool.net/sms/stock`. ### Request Parameters The \\`key\\` parameter is required for this endpoint, this is your API key. ### Response The response for this API endpoint will have a status code of 200, indicating a successful request. The response body will be in JSON format and will contain the following properties: - `success` (integer): A flag indicating the success of the request. A value of 0 indicates failure. - `message` (string): An optional message providing additional information about the request. In this case, the message is empty. Please note that the response may contain additional properties not mentioned here, but they can be ignored for the purpose of this documentation.
|
|
1065
|
+
# @param country [String] Country retrieved from ''Country list\\\" endpoint
|
|
1066
|
+
# @param service [String] Service retrieved from ''Service list\\\" endpoint
|
|
1067
|
+
# @param [Hash] opts the optional parameters
|
|
1068
|
+
# @option opts [String] :pool Pool retrieved from ''Pool list\\\" endpoint
|
|
1069
|
+
# @option opts [Integer] :include_price
|
|
1070
|
+
# @return [Object]
|
|
1071
|
+
def sms_stock(country, service, opts = {})
|
|
1072
|
+
data, _status_code, _headers = sms_stock_with_http_info(country, service, opts)
|
|
1073
|
+
data
|
|
1074
|
+
end
|
|
1075
|
+
|
|
1076
|
+
# One-time SMS stock
|
|
1077
|
+
# This API endpoint is used to retrieve one-time SMS stock in the SMSPool system. The HTTP POST request should be sent to `https://api.smspool.net/sms/stock`. ### Request Parameters The \\`key\\` parameter is required for this endpoint, this is your API key. ### Response The response for this API endpoint will have a status code of 200, indicating a successful request. The response body will be in JSON format and will contain the following properties: - `success` (integer): A flag indicating the success of the request. A value of 0 indicates failure. - `message` (string): An optional message providing additional information about the request. In this case, the message is empty. Please note that the response may contain additional properties not mentioned here, but they can be ignored for the purpose of this documentation.
|
|
1078
|
+
# @param country [String] Country retrieved from ''Country list\\\" endpoint
|
|
1079
|
+
# @param service [String] Service retrieved from ''Service list\\\" endpoint
|
|
1080
|
+
# @param [Hash] opts the optional parameters
|
|
1081
|
+
# @option opts [String] :pool Pool retrieved from ''Pool list\\\" endpoint
|
|
1082
|
+
# @option opts [Integer] :include_price
|
|
1083
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1084
|
+
def sms_stock_with_http_info(country, service, opts = {})
|
|
1085
|
+
if @api_client.config.debugging
|
|
1086
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.sms_stock ...'
|
|
1087
|
+
end
|
|
1088
|
+
# verify the required parameter 'country' is set
|
|
1089
|
+
if @api_client.config.client_side_validation && country.nil?
|
|
1090
|
+
fail ArgumentError, "Missing the required parameter 'country' when calling SMSApi.sms_stock"
|
|
1091
|
+
end
|
|
1092
|
+
# verify the required parameter 'service' is set
|
|
1093
|
+
if @api_client.config.client_side_validation && service.nil?
|
|
1094
|
+
fail ArgumentError, "Missing the required parameter 'service' when calling SMSApi.sms_stock"
|
|
1095
|
+
end
|
|
1096
|
+
# resource path
|
|
1097
|
+
local_var_path = '/sms/stock'
|
|
1098
|
+
|
|
1099
|
+
# query parameters
|
|
1100
|
+
query_params = opts[:query_params] || {}
|
|
1101
|
+
|
|
1102
|
+
# header parameters
|
|
1103
|
+
header_params = opts[:header_params] || {}
|
|
1104
|
+
# HTTP header 'Accept' (if needed)
|
|
1105
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1106
|
+
# HTTP header 'Content-Type'
|
|
1107
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
1108
|
+
if !content_type.nil?
|
|
1109
|
+
header_params['Content-Type'] = content_type
|
|
1110
|
+
end
|
|
1111
|
+
|
|
1112
|
+
# form parameters
|
|
1113
|
+
form_params = opts[:form_params] || {}
|
|
1114
|
+
form_params['country'] = country
|
|
1115
|
+
form_params['service'] = service
|
|
1116
|
+
form_params['pool'] = opts[:'pool'] if !opts[:'pool'].nil?
|
|
1117
|
+
form_params['include_price'] = opts[:'include_price'] if !opts[:'include_price'].nil?
|
|
1118
|
+
|
|
1119
|
+
# http body (model)
|
|
1120
|
+
post_body = opts[:debug_body]
|
|
1121
|
+
|
|
1122
|
+
# return_type
|
|
1123
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1124
|
+
|
|
1125
|
+
# auth_names
|
|
1126
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1127
|
+
|
|
1128
|
+
new_options = opts.merge(
|
|
1129
|
+
:operation => :"SMSApi.sms_stock",
|
|
1130
|
+
:header_params => header_params,
|
|
1131
|
+
:query_params => query_params,
|
|
1132
|
+
:form_params => form_params,
|
|
1133
|
+
:body => post_body,
|
|
1134
|
+
:auth_names => auth_names,
|
|
1135
|
+
:return_type => return_type
|
|
1136
|
+
)
|
|
1137
|
+
|
|
1138
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1139
|
+
if @api_client.config.debugging
|
|
1140
|
+
@api_client.config.logger.debug "API called: SMSApi#sms_stock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1141
|
+
end
|
|
1142
|
+
return data, status_code, headers
|
|
1143
|
+
end
|
|
1144
|
+
|
|
1145
|
+
# Unarchive order
|
|
1146
|
+
# Move an archived order back to your active orders, so it shows up in **Active orders** and on your dashboard again. Use **Archive all orders** to archive them.
|
|
1147
|
+
# @param orderid [String] The order ID retrieved from /purchase/sms
|
|
1148
|
+
# @param [Hash] opts the optional parameters
|
|
1149
|
+
# @return [Object]
|
|
1150
|
+
def sms_unarchive(orderid, opts = {})
|
|
1151
|
+
data, _status_code, _headers = sms_unarchive_with_http_info(orderid, opts)
|
|
1152
|
+
data
|
|
1153
|
+
end
|
|
1154
|
+
|
|
1155
|
+
# Unarchive order
|
|
1156
|
+
# Move an archived order back to your active orders, so it shows up in **Active orders** and on your dashboard again. Use **Archive all orders** to archive them.
|
|
1157
|
+
# @param orderid [String] The order ID retrieved from /purchase/sms
|
|
1158
|
+
# @param [Hash] opts the optional parameters
|
|
1159
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1160
|
+
def sms_unarchive_with_http_info(orderid, opts = {})
|
|
1161
|
+
if @api_client.config.debugging
|
|
1162
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.sms_unarchive ...'
|
|
1163
|
+
end
|
|
1164
|
+
# verify the required parameter 'orderid' is set
|
|
1165
|
+
if @api_client.config.client_side_validation && orderid.nil?
|
|
1166
|
+
fail ArgumentError, "Missing the required parameter 'orderid' when calling SMSApi.sms_unarchive"
|
|
1167
|
+
end
|
|
1168
|
+
# resource path
|
|
1169
|
+
local_var_path = '/sms/unarchive'
|
|
1170
|
+
|
|
1171
|
+
# query parameters
|
|
1172
|
+
query_params = opts[:query_params] || {}
|
|
1173
|
+
|
|
1174
|
+
# header parameters
|
|
1175
|
+
header_params = opts[:header_params] || {}
|
|
1176
|
+
# HTTP header 'Accept' (if needed)
|
|
1177
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1178
|
+
# HTTP header 'Content-Type'
|
|
1179
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
1180
|
+
if !content_type.nil?
|
|
1181
|
+
header_params['Content-Type'] = content_type
|
|
1182
|
+
end
|
|
1183
|
+
|
|
1184
|
+
# form parameters
|
|
1185
|
+
form_params = opts[:form_params] || {}
|
|
1186
|
+
form_params['orderid'] = orderid
|
|
1187
|
+
|
|
1188
|
+
# http body (model)
|
|
1189
|
+
post_body = opts[:debug_body]
|
|
1190
|
+
|
|
1191
|
+
# return_type
|
|
1192
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1193
|
+
|
|
1194
|
+
# auth_names
|
|
1195
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1196
|
+
|
|
1197
|
+
new_options = opts.merge(
|
|
1198
|
+
:operation => :"SMSApi.sms_unarchive",
|
|
1199
|
+
:header_params => header_params,
|
|
1200
|
+
:query_params => query_params,
|
|
1201
|
+
:form_params => form_params,
|
|
1202
|
+
:body => post_body,
|
|
1203
|
+
:auth_names => auth_names,
|
|
1204
|
+
:return_type => return_type
|
|
1205
|
+
)
|
|
1206
|
+
|
|
1207
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1208
|
+
if @api_client.config.debugging
|
|
1209
|
+
@api_client.config.logger.debug "API called: SMSApi#sms_unarchive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1210
|
+
end
|
|
1211
|
+
return data, status_code, headers
|
|
1212
|
+
end
|
|
1213
|
+
end
|
|
1214
|
+
end
|