clicksend_client 1.0.2 → 5.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.
Files changed (194) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +9 -3
  4. data/clicksend_client.gemspec +4 -3
  5. data/docs/ContactApi.md +63 -1
  6. data/docs/CountryListIds.md +8 -0
  7. data/docs/FaxMessage.md +1 -1
  8. data/docs/GlobalSendingApi.md +206 -0
  9. data/docs/InboundSMSRule.md +1 -0
  10. data/docs/MMSApi.md +117 -0
  11. data/docs/MmsCampaign.md +1 -1
  12. data/docs/MmsMessage.md +1 -1
  13. data/docs/SMSApi.md +1 -1
  14. data/docs/SmsCampaign.md +2 -1
  15. data/docs/SmsMessage.md +3 -3
  16. data/docs/VoiceMessage.md +2 -2
  17. data/lib/clicksend_client/api/account_api.rb +1 -1
  18. data/lib/clicksend_client/api/account_recharge_api.rb +1 -1
  19. data/lib/clicksend_client/api/contact_api.rb +74 -1
  20. data/lib/clicksend_client/api/contact_list_api.rb +1 -1
  21. data/lib/clicksend_client/api/countries_api.rb +1 -1
  22. data/lib/clicksend_client/api/delivery_issues_api.rb +1 -1
  23. data/lib/clicksend_client/api/detect_address_api.rb +1 -1
  24. data/lib/clicksend_client/api/email_delivery_receipt_rules_api.rb +1 -1
  25. data/lib/clicksend_client/api/email_marketing_api.rb +1 -1
  26. data/lib/clicksend_client/api/email_to_sms_api.rb +1 -1
  27. data/lib/clicksend_client/api/fax_api.rb +1 -1
  28. data/lib/clicksend_client/api/fax_delivery_receipt_rules_api.rb +1 -1
  29. data/lib/clicksend_client/api/global_sending_api.rb +221 -0
  30. data/lib/clicksend_client/api/inbound_fax_rules_api.rb +1 -1
  31. data/lib/clicksend_client/api/inbound_sms_rules_api.rb +1 -1
  32. data/lib/clicksend_client/api/master_email_templates_api.rb +1 -1
  33. data/lib/clicksend_client/api/mms_api.rb +127 -1
  34. data/lib/clicksend_client/api/mms_campaign_api.rb +1 -1
  35. data/lib/clicksend_client/api/number_api.rb +1 -1
  36. data/lib/clicksend_client/api/post_letter_api.rb +1 -1
  37. data/lib/clicksend_client/api/post_postcard_api.rb +1 -1
  38. data/lib/clicksend_client/api/post_return_address_api.rb +1 -1
  39. data/lib/clicksend_client/api/referral_account_api.rb +1 -1
  40. data/lib/clicksend_client/api/reseller_account_api.rb +1 -1
  41. data/lib/clicksend_client/api/search_api.rb +1 -1
  42. data/lib/clicksend_client/api/sms_api.rb +3 -3
  43. data/lib/clicksend_client/api/sms_campaign_api.rb +1 -1
  44. data/lib/clicksend_client/api/sms_delivery_receipt_rules_api.rb +1 -1
  45. data/lib/clicksend_client/api/statistics_api.rb +1 -1
  46. data/lib/clicksend_client/api/subaccount_api.rb +1 -1
  47. data/lib/clicksend_client/api/timezones_api.rb +1 -1
  48. data/lib/clicksend_client/api/transactional_email_api.rb +1 -1
  49. data/lib/clicksend_client/api/transfer_credit_api.rb +1 -1
  50. data/lib/clicksend_client/api/upload_api.rb +1 -1
  51. data/lib/clicksend_client/api/user_email_templates_api.rb +1 -1
  52. data/lib/clicksend_client/api/voice_api.rb +1 -1
  53. data/lib/clicksend_client/api/voice_delivery_receipt_rules_api.rb +1 -1
  54. data/lib/clicksend_client/api_client.rb +6 -4
  55. data/lib/clicksend_client/api_error.rb +1 -1
  56. data/lib/clicksend_client/configuration.rb +3 -3
  57. data/lib/clicksend_client/models/account.rb +3 -2
  58. data/lib/clicksend_client/models/account_forgot_password_verify.rb +3 -2
  59. data/lib/clicksend_client/models/account_verify.rb +3 -2
  60. data/lib/clicksend_client/models/address.rb +3 -2
  61. data/lib/clicksend_client/models/attachment.rb +3 -2
  62. data/lib/clicksend_client/models/contact.rb +3 -2
  63. data/lib/clicksend_client/models/contact_list.rb +3 -2
  64. data/lib/clicksend_client/models/contact_list_import.rb +3 -2
  65. data/lib/clicksend_client/models/country_list_ids.rb +192 -0
  66. data/lib/clicksend_client/models/credit_card.rb +3 -2
  67. data/lib/clicksend_client/models/date_before.rb +4 -3
  68. data/lib/clicksend_client/models/delivery_issue.rb +3 -2
  69. data/lib/clicksend_client/models/delivery_receipt_rule.rb +3 -2
  70. data/lib/clicksend_client/models/email.rb +3 -2
  71. data/lib/clicksend_client/models/email_address.rb +3 -2
  72. data/lib/clicksend_client/models/email_campaign.rb +3 -2
  73. data/lib/clicksend_client/models/email_from.rb +3 -2
  74. data/lib/clicksend_client/models/email_recipient.rb +3 -2
  75. data/lib/clicksend_client/models/email_sms_address.rb +3 -2
  76. data/lib/clicksend_client/models/email_template_new.rb +3 -2
  77. data/lib/clicksend_client/models/email_template_update.rb +3 -2
  78. data/lib/clicksend_client/models/fax_message.rb +4 -3
  79. data/lib/clicksend_client/models/fax_message_collection.rb +3 -2
  80. data/lib/clicksend_client/models/fields.rb +3 -2
  81. data/lib/clicksend_client/models/fields_fields.rb +3 -2
  82. data/lib/clicksend_client/models/forgot_password.rb +3 -2
  83. data/lib/clicksend_client/models/forgot_username.rb +3 -2
  84. data/lib/clicksend_client/models/inbound_fax_rule.rb +3 -2
  85. data/lib/clicksend_client/models/inbound_sms_rule.rb +17 -6
  86. data/lib/clicksend_client/models/mms_campaign.rb +4 -3
  87. data/lib/clicksend_client/models/mms_message.rb +3 -7
  88. data/lib/clicksend_client/models/mms_message_collection.rb +3 -2
  89. data/lib/clicksend_client/models/post_letter.rb +3 -2
  90. data/lib/clicksend_client/models/post_postcard.rb +3 -2
  91. data/lib/clicksend_client/models/post_recipient.rb +3 -2
  92. data/lib/clicksend_client/models/reseller_account.rb +3 -2
  93. data/lib/clicksend_client/models/reseller_account_transfer_credit.rb +3 -2
  94. data/lib/clicksend_client/models/sms_campaign.rb +18 -7
  95. data/lib/clicksend_client/models/sms_message.rb +5 -9
  96. data/lib/clicksend_client/models/sms_message_collection.rb +3 -2
  97. data/lib/clicksend_client/models/sms_template.rb +3 -2
  98. data/lib/clicksend_client/models/stripped_string.rb +3 -2
  99. data/lib/clicksend_client/models/subaccount.rb +3 -2
  100. data/lib/clicksend_client/models/upload_file.rb +3 -2
  101. data/lib/clicksend_client/models/url.rb +3 -2
  102. data/lib/clicksend_client/models/voice_message.rb +4 -8
  103. data/lib/clicksend_client/models/voice_message_collection.rb +3 -2
  104. data/lib/clicksend_client/version.rb +2 -2
  105. data/lib/clicksend_client.rb +3 -1
  106. data/spec/api/account_api_spec.rb +1 -1
  107. data/spec/api/account_recharge_api_spec.rb +1 -1
  108. data/spec/api/contact_api_spec.rb +16 -1
  109. data/spec/api/contact_list_api_spec.rb +1 -1
  110. data/spec/api/countries_api_spec.rb +1 -1
  111. data/spec/api/delivery_issues_api_spec.rb +1 -1
  112. data/spec/api/detect_address_api_spec.rb +1 -1
  113. data/spec/api/email_delivery_receipt_rules_api_spec.rb +1 -1
  114. data/spec/api/email_marketing_api_spec.rb +1 -1
  115. data/spec/api/email_to_sms_api_spec.rb +1 -1
  116. data/spec/api/fax_api_spec.rb +1 -1
  117. data/spec/api/fax_delivery_receipt_rules_api_spec.rb +1 -1
  118. data/spec/api/global_sending_api_spec.rb +80 -0
  119. data/spec/api/inbound_fax_rules_api_spec.rb +1 -1
  120. data/spec/api/inbound_sms_rules_api_spec.rb +1 -1
  121. data/spec/api/master_email_templates_api_spec.rb +1 -1
  122. data/spec/api/mms_api_spec.rb +29 -1
  123. data/spec/api/mms_campaign_api_spec.rb +1 -1
  124. data/spec/api/number_api_spec.rb +1 -1
  125. data/spec/api/post_letter_api_spec.rb +1 -1
  126. data/spec/api/post_postcard_api_spec.rb +1 -1
  127. data/spec/api/post_return_address_api_spec.rb +1 -1
  128. data/spec/api/referral_account_api_spec.rb +1 -1
  129. data/spec/api/reseller_account_api_spec.rb +1 -1
  130. data/spec/api/search_api_spec.rb +1 -1
  131. data/spec/api/sms_api_spec.rb +2 -2
  132. data/spec/api/sms_campaign_api_spec.rb +1 -1
  133. data/spec/api/sms_delivery_receipt_rules_api_spec.rb +1 -1
  134. data/spec/api/statistics_api_spec.rb +1 -1
  135. data/spec/api/subaccount_api_spec.rb +1 -1
  136. data/spec/api/timezones_api_spec.rb +1 -1
  137. data/spec/api/transactional_email_api_spec.rb +1 -1
  138. data/spec/api/transfer_credit_api_spec.rb +1 -1
  139. data/spec/api/upload_api_spec.rb +1 -1
  140. data/spec/api/user_email_templates_api_spec.rb +1 -1
  141. data/spec/api/voice_api_spec.rb +1 -1
  142. data/spec/api/voice_delivery_receipt_rules_api_spec.rb +1 -1
  143. data/spec/api_client_spec.rb +18 -1
  144. data/spec/configuration_spec.rb +1 -1
  145. data/spec/models/account_forgot_password_verify_spec.rb +1 -1
  146. data/spec/models/account_spec.rb +1 -1
  147. data/spec/models/account_verify_spec.rb +1 -1
  148. data/spec/models/address_spec.rb +1 -1
  149. data/spec/models/attachment_spec.rb +1 -1
  150. data/spec/models/contact_list_import_spec.rb +1 -1
  151. data/spec/models/contact_list_spec.rb +1 -1
  152. data/spec/models/contact_spec.rb +1 -1
  153. data/spec/models/country_list_ids_spec.rb +41 -0
  154. data/spec/models/credit_card_spec.rb +1 -1
  155. data/spec/models/date_before_spec.rb +1 -1
  156. data/spec/models/delivery_issue_spec.rb +1 -1
  157. data/spec/models/delivery_receipt_rule_spec.rb +1 -1
  158. data/spec/models/email_address_spec.rb +1 -1
  159. data/spec/models/email_campaign_spec.rb +1 -1
  160. data/spec/models/email_from_spec.rb +1 -1
  161. data/spec/models/email_recipient_spec.rb +1 -1
  162. data/spec/models/email_sms_address_spec.rb +1 -1
  163. data/spec/models/email_spec.rb +1 -1
  164. data/spec/models/email_template_new_spec.rb +1 -1
  165. data/spec/models/email_template_update_spec.rb +1 -1
  166. data/spec/models/fax_message_collection_spec.rb +1 -1
  167. data/spec/models/fax_message_spec.rb +1 -1
  168. data/spec/models/fields_fields_spec.rb +1 -1
  169. data/spec/models/fields_spec.rb +1 -1
  170. data/spec/models/forgot_password_spec.rb +1 -1
  171. data/spec/models/forgot_username_spec.rb +1 -1
  172. data/spec/models/inbound_fax_rule_spec.rb +1 -1
  173. data/spec/models/inbound_sms_rule_spec.rb +7 -1
  174. data/spec/models/mms_campaign_spec.rb +1 -1
  175. data/spec/models/mms_message_collection_spec.rb +1 -1
  176. data/spec/models/mms_message_spec.rb +1 -1
  177. data/spec/models/post_letter_spec.rb +1 -1
  178. data/spec/models/post_postcard_spec.rb +1 -1
  179. data/spec/models/post_recipient_spec.rb +1 -1
  180. data/spec/models/reseller_account_spec.rb +1 -1
  181. data/spec/models/reseller_account_transfer_credit_spec.rb +1 -1
  182. data/spec/models/sms_campaign_spec.rb +7 -1
  183. data/spec/models/sms_message_collection_spec.rb +1 -1
  184. data/spec/models/sms_message_spec.rb +1 -1
  185. data/spec/models/sms_template_spec.rb +1 -1
  186. data/spec/models/stripped_string_spec.rb +1 -1
  187. data/spec/models/subaccount_spec.rb +1 -1
  188. data/spec/models/upload_file_spec.rb +1 -1
  189. data/spec/models/url_spec.rb +1 -1
  190. data/spec/models/voice_message_collection_spec.rb +1 -1
  191. data/spec/models/voice_message_spec.rb +1 -1
  192. data/spec/spec_helper.rb +1 -1
  193. metadata +109 -84
  194. data/clicksend_client-1.0.1.gem +0 -0
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -211,6 +211,7 @@ module ClickSendClient
211
211
  # @param [Hash] opts the optional parameters
212
212
  # @option opts [Integer] :page Page number (default to 1)
213
213
  # @option opts [Integer] :limit Number of records per page (default to 10)
214
+ # @option opts [Integer] :updated_after Get all contacts updated after a given timestamp. (default to 10)
214
215
  # @return [String]
215
216
  def lists_contacts_by_list_id_get(list_id, opts = {})
216
217
  data, _status_code, _headers = lists_contacts_by_list_id_get_with_http_info(list_id, opts)
@@ -223,6 +224,7 @@ module ClickSendClient
223
224
  # @param [Hash] opts the optional parameters
224
225
  # @option opts [Integer] :page Page number
225
226
  # @option opts [Integer] :limit Number of records per page
227
+ # @option opts [Integer] :updated_after Get all contacts updated after a given timestamp.
226
228
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
227
229
  def lists_contacts_by_list_id_get_with_http_info(list_id, opts = {})
228
230
  if @api_client.config.debugging
@@ -240,6 +242,10 @@ module ClickSendClient
240
242
  fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactApi.lists_contacts_by_list_id_get, must be greater than or equal to 1.'
241
243
  end
242
244
 
245
+ if @api_client.config.client_side_validation && !opts[:'updated_after'].nil? && opts[:'updated_after'] < 1
246
+ fail ArgumentError, 'invalid value for "opts[:"updated_after"]" when calling ContactApi.lists_contacts_by_list_id_get, must be greater than or equal to 1.'
247
+ end
248
+
243
249
  # resource path
244
250
  local_var_path = '/lists/{list_id}/contacts'.sub('{' + 'list_id' + '}', list_id.to_s)
245
251
 
@@ -247,6 +253,7 @@ module ClickSendClient
247
253
  query_params = {}
248
254
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
249
255
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
256
+ query_params[:'updated_after'] = opts[:'updated_after'] if !opts[:'updated_after'].nil?
250
257
 
251
258
  # header parameters
252
259
  header_params = {}
@@ -333,6 +340,72 @@ module ClickSendClient
333
340
  end
334
341
  return data, status_code, headers
335
342
  end
343
+ # Copy contact to another list
344
+ # Copy contact to another list
345
+ # @param from_list_id List ID for list that contains contact.
346
+ # @param contact_id Contact ID
347
+ # @param to_list_id List ID for list you want to copy the contact to.
348
+ # @param [Hash] opts the optional parameters
349
+ # @return [String]
350
+ def lists_copy_contact_put(from_list_id, contact_id, to_list_id, opts = {})
351
+ data, _status_code, _headers = lists_copy_contact_put_with_http_info(from_list_id, contact_id, to_list_id, opts)
352
+ data
353
+ end
354
+
355
+ # Copy contact to another list
356
+ # Copy contact to another list
357
+ # @param from_list_id List ID for list that contains contact.
358
+ # @param contact_id Contact ID
359
+ # @param to_list_id List ID for list you want to copy the contact to.
360
+ # @param [Hash] opts the optional parameters
361
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
362
+ def lists_copy_contact_put_with_http_info(from_list_id, contact_id, to_list_id, opts = {})
363
+ if @api_client.config.debugging
364
+ @api_client.config.logger.debug 'Calling API: ContactApi.lists_copy_contact_put ...'
365
+ end
366
+ # verify the required parameter 'from_list_id' is set
367
+ if @api_client.config.client_side_validation && from_list_id.nil?
368
+ fail ArgumentError, "Missing the required parameter 'from_list_id' when calling ContactApi.lists_copy_contact_put"
369
+ end
370
+ # verify the required parameter 'contact_id' is set
371
+ if @api_client.config.client_side_validation && contact_id.nil?
372
+ fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactApi.lists_copy_contact_put"
373
+ end
374
+ # verify the required parameter 'to_list_id' is set
375
+ if @api_client.config.client_side_validation && to_list_id.nil?
376
+ fail ArgumentError, "Missing the required parameter 'to_list_id' when calling ContactApi.lists_copy_contact_put"
377
+ end
378
+ # resource path
379
+ local_var_path = '/lists/{from_list_id}/contacts/{contact_id}/copy/{to_list_id}'.sub('{' + 'from_list_id' + '}', from_list_id.to_s).sub('{' + 'contact_id' + '}', contact_id.to_s).sub('{' + 'to_list_id' + '}', to_list_id.to_s)
380
+
381
+ # query parameters
382
+ query_params = {}
383
+
384
+ # header parameters
385
+ header_params = {}
386
+ # HTTP header 'Accept' (if needed)
387
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
388
+ # HTTP header 'Content-Type'
389
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
390
+
391
+ # form parameters
392
+ form_params = {}
393
+
394
+ # http body (model)
395
+ post_body = nil
396
+ auth_names = ['BasicAuth']
397
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
398
+ :header_params => header_params,
399
+ :query_params => query_params,
400
+ :form_params => form_params,
401
+ :body => post_body,
402
+ :auth_names => auth_names,
403
+ :return_type => 'String')
404
+ if @api_client.config.debugging
405
+ @api_client.config.logger.debug "API called: ContactApi#lists_copy_contact_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
406
+ end
407
+ return data, status_code, headers
408
+ end
336
409
  # Remove all opted out contacts
337
410
  # Remove all opted out contacts
338
411
  # @param list_id Your list id
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -0,0 +1,221 @@
1
+ =begin
2
+ #ClickSend v3 API
3
+
4
+ # This is an official SDK for [ClickSend](https://clicksend.com) Below you will find a current list of the available methods for clicksend. *NOTE: You will need to create a free account to use the API. You can register [here](https://dashboard.clicksend.com/#/signup/step1/)..*
5
+
6
+ OpenAPI spec version: 3.1
7
+ Contact: support@clicksend.com
8
+ Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module ClickSendClient
16
+ class GlobalSendingApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List of countries
23
+ # List of countries with IDs that can be used in selecting countries for Global sending.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [String]
26
+ def list_countries_get(opts = {})
27
+ data, _status_code, _headers = list_countries_get_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # List of countries
32
+ # List of countries with IDs that can be used in selecting countries for Global sending.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
35
+ def list_countries_get_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: GlobalSendingApi.list_countries_get ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/country-list'
41
+
42
+ # query parameters
43
+ query_params = {}
44
+
45
+ # header parameters
46
+ header_params = {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+ # HTTP header 'Content-Type'
50
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
51
+
52
+ # form parameters
53
+ form_params = {}
54
+
55
+ # http body (model)
56
+ post_body = nil
57
+ auth_names = ['BasicAuth']
58
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
59
+ :header_params => header_params,
60
+ :query_params => query_params,
61
+ :form_params => form_params,
62
+ :body => post_body,
63
+ :auth_names => auth_names,
64
+ :return_type => 'String')
65
+ if @api_client.config.debugging
66
+ @api_client.config.logger.debug "API called: GlobalSendingApi#list_countries_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
67
+ end
68
+ return data, status_code, headers
69
+ end
70
+ # Agree to rules and regulation
71
+ # To agree on rules and regulations of selected countries and confirm selection.
72
+ # @param [Hash] opts the optional parameters
73
+ # @return [String]
74
+ def user_countries_agree_post(opts = {})
75
+ data, _status_code, _headers = user_countries_agree_post_with_http_info(opts)
76
+ data
77
+ end
78
+
79
+ # Agree to rules and regulation
80
+ # To agree on rules and regulations of selected countries and confirm selection.
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
83
+ def user_countries_agree_post_with_http_info(opts = {})
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug 'Calling API: GlobalSendingApi.user_countries_agree_post ...'
86
+ end
87
+ # resource path
88
+ local_var_path = '/user-countries/agree'
89
+
90
+ # query parameters
91
+ query_params = {}
92
+
93
+ # header parameters
94
+ header_params = {}
95
+ # HTTP header 'Accept' (if needed)
96
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
97
+ # HTTP header 'Content-Type'
98
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
99
+
100
+ # form parameters
101
+ form_params = {}
102
+
103
+ # http body (model)
104
+ post_body = nil
105
+ auth_names = ['BasicAuth']
106
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
107
+ :header_params => header_params,
108
+ :query_params => query_params,
109
+ :form_params => form_params,
110
+ :body => post_body,
111
+ :auth_names => auth_names,
112
+ :return_type => 'String')
113
+ if @api_client.config.debugging
114
+ @api_client.config.logger.debug "API called: GlobalSendingApi#user_countries_agree_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
115
+ end
116
+ return data, status_code, headers
117
+ end
118
+ # Get Countries for Global Sending
119
+ # Get the list of selected countries.
120
+ # @param [Hash] opts the optional parameters
121
+ # @return [String]
122
+ def user_countries_get(opts = {})
123
+ data, _status_code, _headers = user_countries_get_with_http_info(opts)
124
+ data
125
+ end
126
+
127
+ # Get Countries for Global Sending
128
+ # Get the list of selected countries.
129
+ # @param [Hash] opts the optional parameters
130
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
131
+ def user_countries_get_with_http_info(opts = {})
132
+ if @api_client.config.debugging
133
+ @api_client.config.logger.debug 'Calling API: GlobalSendingApi.user_countries_get ...'
134
+ end
135
+ # resource path
136
+ local_var_path = '/user-countries'
137
+
138
+ # query parameters
139
+ query_params = {}
140
+
141
+ # header parameters
142
+ header_params = {}
143
+ # HTTP header 'Accept' (if needed)
144
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
145
+ # HTTP header 'Content-Type'
146
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
147
+
148
+ # form parameters
149
+ form_params = {}
150
+
151
+ # http body (model)
152
+ post_body = nil
153
+ auth_names = ['BasicAuth']
154
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
155
+ :header_params => header_params,
156
+ :query_params => query_params,
157
+ :form_params => form_params,
158
+ :body => post_body,
159
+ :auth_names => auth_names,
160
+ :return_type => 'String')
161
+ if @api_client.config.debugging
162
+ @api_client.config.logger.debug "API called: GlobalSendingApi#user_countries_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
163
+ end
164
+ return data, status_code, headers
165
+ end
166
+ # Select Countries for Global Sending
167
+ # Use this endpoint to select countries that you intend to send sms / mms to. To remove / unselect a country, just remove the country id from the array in the payload.
168
+ # @param country_list_ids Id of countr(ies) you want to select, you can get them from GET /country-list response
169
+ # @param [Hash] opts the optional parameters
170
+ # @return [String]
171
+ def user_countries_post(country_list_ids, opts = {})
172
+ data, _status_code, _headers = user_countries_post_with_http_info(country_list_ids, opts)
173
+ data
174
+ end
175
+
176
+ # Select Countries for Global Sending
177
+ # Use this endpoint to select countries that you intend to send sms / mms to. To remove / unselect a country, just remove the country id from the array in the payload.
178
+ # @param country_list_ids Id of countr(ies) you want to select, you can get them from GET /country-list response
179
+ # @param [Hash] opts the optional parameters
180
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
181
+ def user_countries_post_with_http_info(country_list_ids, opts = {})
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug 'Calling API: GlobalSendingApi.user_countries_post ...'
184
+ end
185
+ # verify the required parameter 'country_list_ids' is set
186
+ if @api_client.config.client_side_validation && country_list_ids.nil?
187
+ fail ArgumentError, "Missing the required parameter 'country_list_ids' when calling GlobalSendingApi.user_countries_post"
188
+ end
189
+ # resource path
190
+ local_var_path = '/user-countries'
191
+
192
+ # query parameters
193
+ query_params = {}
194
+
195
+ # header parameters
196
+ header_params = {}
197
+ # HTTP header 'Accept' (if needed)
198
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
199
+ # HTTP header 'Content-Type'
200
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
201
+
202
+ # form parameters
203
+ form_params = {}
204
+
205
+ # http body (model)
206
+ post_body = @api_client.object_to_http_body(country_list_ids)
207
+ auth_names = ['BasicAuth']
208
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
209
+ :header_params => header_params,
210
+ :query_params => query_params,
211
+ :form_params => form_params,
212
+ :body => post_body,
213
+ :auth_names => auth_names,
214
+ :return_type => 'String')
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug "API called: GlobalSendingApi#user_countries_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
217
+ end
218
+ return data, status_code, headers
219
+ end
220
+ end
221
+ end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -19,6 +19,132 @@ module ClickSendClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Export all mms history
23
+ # Export all mms history
24
+ # @param filename Filename to download history as
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [String]
27
+ def mms_history_export_get(filename, opts = {})
28
+ data, _status_code, _headers = mms_history_export_get_with_http_info(filename, opts)
29
+ data
30
+ end
31
+
32
+ # Export all mms history
33
+ # Export all mms history
34
+ # @param filename Filename to download history as
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
37
+ def mms_history_export_get_with_http_info(filename, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: MMSApi.mms_history_export_get ...'
40
+ end
41
+ # verify the required parameter 'filename' is set
42
+ if @api_client.config.client_side_validation && filename.nil?
43
+ fail ArgumentError, "Missing the required parameter 'filename' when calling MMSApi.mms_history_export_get"
44
+ end
45
+ # resource path
46
+ local_var_path = '/mms/history/export'
47
+
48
+ # query parameters
49
+ query_params = {}
50
+ query_params[:'filename'] = filename
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
58
+
59
+ # form parameters
60
+ form_params = {}
61
+
62
+ # http body (model)
63
+ post_body = nil
64
+ auth_names = ['BasicAuth']
65
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => 'String')
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: MMSApi#mms_history_export_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+ # Get all mms history
78
+ # Get all mms history
79
+ # @param [Hash] opts the optional parameters
80
+ # @option opts [String] :q Custom query Example: from:{number},status_code:201.
81
+ # @option opts [Integer] :date_from Start date
82
+ # @option opts [Integer] :date_to End date
83
+ # @option opts [Integer] :page Page number (default to 1)
84
+ # @option opts [Integer] :limit Number of records per page (default to 10)
85
+ # @return [String]
86
+ def mms_history_get(opts = {})
87
+ data, _status_code, _headers = mms_history_get_with_http_info(opts)
88
+ data
89
+ end
90
+
91
+ # Get all mms history
92
+ # Get all mms history
93
+ # @param [Hash] opts the optional parameters
94
+ # @option opts [String] :q Custom query Example: from:{number},status_code:201.
95
+ # @option opts [Integer] :date_from Start date
96
+ # @option opts [Integer] :date_to End date
97
+ # @option opts [Integer] :page Page number
98
+ # @option opts [Integer] :limit Number of records per page
99
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
100
+ def mms_history_get_with_http_info(opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug 'Calling API: MMSApi.mms_history_get ...'
103
+ end
104
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
105
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling MMSApi.mms_history_get, must be greater than or equal to 1.'
106
+ end
107
+
108
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
109
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MMSApi.mms_history_get, must be greater than or equal to 1.'
110
+ end
111
+
112
+ # resource path
113
+ local_var_path = '/mms/history'
114
+
115
+ # query parameters
116
+ query_params = {}
117
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
118
+ query_params[:'date_from'] = opts[:'date_from'] if !opts[:'date_from'].nil?
119
+ query_params[:'date_to'] = opts[:'date_to'] if !opts[:'date_to'].nil?
120
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
121
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
122
+
123
+ # header parameters
124
+ header_params = {}
125
+ # HTTP header 'Accept' (if needed)
126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
127
+ # HTTP header 'Content-Type'
128
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
129
+
130
+ # form parameters
131
+ form_params = {}
132
+
133
+ # http body (model)
134
+ post_body = nil
135
+ auth_names = ['BasicAuth']
136
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
137
+ :header_params => header_params,
138
+ :query_params => query_params,
139
+ :form_params => form_params,
140
+ :body => post_body,
141
+ :auth_names => auth_names,
142
+ :return_type => 'String')
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: MMSApi#mms_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
22
148
  # Get Price for MMS sent
23
149
  # Get Price for MMS sent
24
150
  # @param mms_messages MmsMessageCollection model
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 3.1
7
7
  Contact: support@clicksend.com
8
8
  Generated by: https://github.com/clicksend-api/clicksend-codegen.git
9
- ClickSend Codegen version: 2.4.1-SNAPSHOT
9
+ ClickSend Codegen version: 2.4.53-SNAPSHOT
10
10
 
11
11
  =end
12
12