clicksend_client 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +78 -0
  4. data/Rakefile +8 -0
  5. data/clicksend_client-1.0.1.gem +0 -0
  6. data/clicksend_client.gemspec +45 -0
  7. data/docs/Account.md +15 -0
  8. data/docs/AccountApi.md +433 -0
  9. data/docs/AccountForgotPasswordVerify.md +10 -0
  10. data/docs/AccountRechargeApi.md +330 -0
  11. data/docs/AccountVerify.md +10 -0
  12. data/docs/Address.md +14 -0
  13. data/docs/Attachment.md +12 -0
  14. data/docs/Contact.md +23 -0
  15. data/docs/ContactApi.md +416 -0
  16. data/docs/ContactList.md +8 -0
  17. data/docs/ContactListApi.md +398 -0
  18. data/docs/ContactListImport.md +9 -0
  19. data/docs/CountriesApi.md +50 -0
  20. data/docs/CreditCard.md +13 -0
  21. data/docs/DateBefore.md +8 -0
  22. data/docs/DeliveryIssue.md +12 -0
  23. data/docs/DeliveryIssuesApi.md +119 -0
  24. data/docs/DeliveryReceiptRule.md +12 -0
  25. data/docs/DetectAddressApi.md +62 -0
  26. data/docs/Email.md +15 -0
  27. data/docs/EmailAddress.md +8 -0
  28. data/docs/EmailCampaign.md +15 -0
  29. data/docs/EmailDeliveryReceiptRulesApi.md +286 -0
  30. data/docs/EmailFrom.md +9 -0
  31. data/docs/EmailMarketingApi.md +793 -0
  32. data/docs/EmailRecipient.md +9 -0
  33. data/docs/EmailSMSAddress.md +10 -0
  34. data/docs/EmailTemplateNew.md +9 -0
  35. data/docs/EmailTemplateUpdate.md +9 -0
  36. data/docs/EmailToSmsApi.md +395 -0
  37. data/docs/FAXApi.md +401 -0
  38. data/docs/FAXDeliveryReceiptRulesApi.md +286 -0
  39. data/docs/FaxMessage.md +15 -0
  40. data/docs/FaxMessageCollection.md +9 -0
  41. data/docs/Fields.md +8 -0
  42. data/docs/FieldsFields.md +23 -0
  43. data/docs/ForgotPassword.md +8 -0
  44. data/docs/ForgotUsername.md +9 -0
  45. data/docs/InboundFAXRulesApi.md +286 -0
  46. data/docs/InboundFaxRule.md +12 -0
  47. data/docs/InboundSMSRule.md +14 -0
  48. data/docs/InboundSMSRulesApi.md +286 -0
  49. data/docs/MMSApi.md +228 -0
  50. data/docs/MasterEmailTemplatesApi.md +290 -0
  51. data/docs/MmsCampaign.md +14 -0
  52. data/docs/MmsCampaignApi.md +338 -0
  53. data/docs/MmsMessage.md +17 -0
  54. data/docs/MmsMessageCollection.md +9 -0
  55. data/docs/NumberApi.md +183 -0
  56. data/docs/PostLetter.md +14 -0
  57. data/docs/PostLetterApi.md +227 -0
  58. data/docs/PostPostcard.md +9 -0
  59. data/docs/PostPostcardApi.md +227 -0
  60. data/docs/PostRecipient.md +16 -0
  61. data/docs/PostReturnAddressApi.md +284 -0
  62. data/docs/ReferralAccountApi.md +65 -0
  63. data/docs/ResellerAccount.md +15 -0
  64. data/docs/ResellerAccountApi.md +230 -0
  65. data/docs/ResellerAccountTransferCredit.md +10 -0
  66. data/docs/SMSApi.md +999 -0
  67. data/docs/SMSDeliveryReceiptRulesApi.md +286 -0
  68. data/docs/SearchApi.md +68 -0
  69. data/docs/SmsCampaign.md +12 -0
  70. data/docs/SmsCampaignApi.md +338 -0
  71. data/docs/SmsMessage.md +16 -0
  72. data/docs/SmsMessageCollection.md +8 -0
  73. data/docs/SmsTemplate.md +9 -0
  74. data/docs/StatisticsApi.md +104 -0
  75. data/docs/StrippedString.md +8 -0
  76. data/docs/Subaccount.md +18 -0
  77. data/docs/SubaccountApi.md +338 -0
  78. data/docs/TimezonesApi.md +65 -0
  79. data/docs/TransactionalEmailApi.md +237 -0
  80. data/docs/TransferCreditApi.md +62 -0
  81. data/docs/UploadApi.md +65 -0
  82. data/docs/UploadFile.md +8 -0
  83. data/docs/Url.md +8 -0
  84. data/docs/UserEmailTemplatesApi.md +284 -0
  85. data/docs/VoiceApi.md +547 -0
  86. data/docs/VoiceDeliveryReceiptRulesApi.md +286 -0
  87. data/docs/VoiceMessage.md +18 -0
  88. data/docs/VoiceMessageCollection.md +8 -0
  89. data/lib/clicksend_client.rb +121 -0
  90. data/lib/clicksend_client/api/account_api.rb +447 -0
  91. data/lib/clicksend_client/api/account_recharge_api.rb +346 -0
  92. data/lib/clicksend_client/api/contact_api.rb +463 -0
  93. data/lib/clicksend_client/api/contact_list_api.rb +427 -0
  94. data/lib/clicksend_client/api/countries_api.rb +71 -0
  95. data/lib/clicksend_client/api/delivery_issues_api.rb +139 -0
  96. data/lib/clicksend_client/api/detect_address_api.rb +77 -0
  97. data/lib/clicksend_client/api/email_delivery_receipt_rules_api.rb +310 -0
  98. data/lib/clicksend_client/api/email_marketing_api.rb +829 -0
  99. data/lib/clicksend_client/api/email_to_sms_api.rb +423 -0
  100. data/lib/clicksend_client/api/fax_api.rb +425 -0
  101. data/lib/clicksend_client/api/fax_delivery_receipt_rules_api.rb +310 -0
  102. data/lib/clicksend_client/api/inbound_fax_rules_api.rb +310 -0
  103. data/lib/clicksend_client/api/inbound_sms_rules_api.rb +310 -0
  104. data/lib/clicksend_client/api/master_email_templates_api.rb +323 -0
  105. data/lib/clicksend_client/api/mms_api.rb +243 -0
  106. data/lib/clicksend_client/api/mms_campaign_api.rb +361 -0
  107. data/lib/clicksend_client/api/number_api.rb +213 -0
  108. data/lib/clicksend_client/api/post_letter_api.rb +248 -0
  109. data/lib/clicksend_client/api/post_postcard_api.rb +248 -0
  110. data/lib/clicksend_client/api/post_return_address_api.rb +307 -0
  111. data/lib/clicksend_client/api/referral_account_api.rb +85 -0
  112. data/lib/clicksend_client/api/reseller_account_api.rb +253 -0
  113. data/lib/clicksend_client/api/search_api.rb +92 -0
  114. data/lib/clicksend_client/api/sms_api.rb +1032 -0
  115. data/lib/clicksend_client/api/sms_campaign_api.rb +361 -0
  116. data/lib/clicksend_client/api/sms_delivery_receipt_rules_api.rb +310 -0
  117. data/lib/clicksend_client/api/statistics_api.rb +119 -0
  118. data/lib/clicksend_client/api/subaccount_api.rb +361 -0
  119. data/lib/clicksend_client/api/timezones_api.rb +85 -0
  120. data/lib/clicksend_client/api/transactional_email_api.rb +260 -0
  121. data/lib/clicksend_client/api/transfer_credit_api.rb +77 -0
  122. data/lib/clicksend_client/api/upload_api.rb +84 -0
  123. data/lib/clicksend_client/api/user_email_templates_api.rb +307 -0
  124. data/lib/clicksend_client/api/voice_api.rb +570 -0
  125. data/lib/clicksend_client/api/voice_delivery_receipt_rules_api.rb +310 -0
  126. data/lib/clicksend_client/api_client.rb +389 -0
  127. data/lib/clicksend_client/api_error.rb +38 -0
  128. data/lib/clicksend_client/configuration.rb +209 -0
  129. data/lib/clicksend_client/models/account.rb +295 -0
  130. data/lib/clicksend_client/models/account_forgot_password_verify.rb +219 -0
  131. data/lib/clicksend_client/models/account_verify.rb +220 -0
  132. data/lib/clicksend_client/models/address.rb +270 -0
  133. data/lib/clicksend_client/models/attachment.rb +250 -0
  134. data/lib/clicksend_client/models/contact.rb +345 -0
  135. data/lib/clicksend_client/models/contact_list.rb +190 -0
  136. data/lib/clicksend_client/models/contact_list_import.rb +207 -0
  137. data/lib/clicksend_client/models/credit_card.rb +265 -0
  138. data/lib/clicksend_client/models/date_before.rb +185 -0
  139. data/lib/clicksend_client/models/delivery_issue.rb +240 -0
  140. data/lib/clicksend_client/models/delivery_receipt_rule.rb +250 -0
  141. data/lib/clicksend_client/models/email.rb +277 -0
  142. data/lib/clicksend_client/models/email_address.rb +189 -0
  143. data/lib/clicksend_client/models/email_campaign.rb +287 -0
  144. data/lib/clicksend_client/models/email_from.rb +200 -0
  145. data/lib/clicksend_client/models/email_recipient.rb +200 -0
  146. data/lib/clicksend_client/models/email_sms_address.rb +215 -0
  147. data/lib/clicksend_client/models/email_template_new.rb +205 -0
  148. data/lib/clicksend_client/models/email_template_update.rb +200 -0
  149. data/lib/clicksend_client/models/fax_message.rb +262 -0
  150. data/lib/clicksend_client/models/fax_message_collection.rb +207 -0
  151. data/lib/clicksend_client/models/fields.rb +184 -0
  152. data/lib/clicksend_client/models/fields_fields.rb +335 -0
  153. data/lib/clicksend_client/models/forgot_password.rb +189 -0
  154. data/lib/clicksend_client/models/forgot_username.rb +194 -0
  155. data/lib/clicksend_client/models/inbound_fax_rule.rb +250 -0
  156. data/lib/clicksend_client/models/inbound_sms_rule.rb +280 -0
  157. data/lib/clicksend_client/models/mms_campaign.rb +272 -0
  158. data/lib/clicksend_client/models/mms_message.rb +294 -0
  159. data/lib/clicksend_client/models/mms_message_collection.rb +207 -0
  160. data/lib/clicksend_client/models/post_letter.rb +267 -0
  161. data/lib/clicksend_client/models/post_postcard.rb +209 -0
  162. data/lib/clicksend_client/models/post_recipient.rb +302 -0
  163. data/lib/clicksend_client/models/reseller_account.rb +295 -0
  164. data/lib/clicksend_client/models/reseller_account_transfer_credit.rb +220 -0
  165. data/lib/clicksend_client/models/sms_campaign.rb +242 -0
  166. data/lib/clicksend_client/models/sms_message.rb +279 -0
  167. data/lib/clicksend_client/models/sms_message_collection.rb +192 -0
  168. data/lib/clicksend_client/models/sms_template.rb +205 -0
  169. data/lib/clicksend_client/models/stripped_string.rb +190 -0
  170. data/lib/clicksend_client/models/subaccount.rb +325 -0
  171. data/lib/clicksend_client/models/upload_file.rb +190 -0
  172. data/lib/clicksend_client/models/url.rb +190 -0
  173. data/lib/clicksend_client/models/voice_message.rb +316 -0
  174. data/lib/clicksend_client/models/voice_message_collection.rb +192 -0
  175. data/lib/clicksend_client/version.rb +15 -0
  176. data/spec/api/account_api_spec.rb +131 -0
  177. data/spec/api/account_recharge_api_spec.rb +107 -0
  178. data/spec/api/contact_api_spec.rb +129 -0
  179. data/spec/api/contact_list_api_spec.rb +123 -0
  180. data/spec/api/countries_api_spec.rb +46 -0
  181. data/spec/api/delivery_issues_api_spec.rb +60 -0
  182. data/spec/api/detect_address_api_spec.rb +47 -0
  183. data/spec/api/email_delivery_receipt_rules_api_spec.rb +98 -0
  184. data/spec/api/email_marketing_api_spec.rb +213 -0
  185. data/spec/api/email_to_sms_api_spec.rb +122 -0
  186. data/spec/api/fax_api_spec.rb +125 -0
  187. data/spec/api/fax_delivery_receipt_rules_api_spec.rb +98 -0
  188. data/spec/api/inbound_fax_rules_api_spec.rb +98 -0
  189. data/spec/api/inbound_sms_rules_api_spec.rb +98 -0
  190. data/spec/api/master_email_templates_api_spec.rb +99 -0
  191. data/spec/api/mms_api_spec.rb +84 -0
  192. data/spec/api/mms_campaign_api_spec.rb +109 -0
  193. data/spec/api/number_api_spec.rb +76 -0
  194. data/spec/api/post_letter_api_spec.rb +84 -0
  195. data/spec/api/post_postcard_api_spec.rb +84 -0
  196. data/spec/api/post_return_address_api_spec.rb +97 -0
  197. data/spec/api/referral_account_api_spec.rb +48 -0
  198. data/spec/api/reseller_account_api_spec.rb +85 -0
  199. data/spec/api/search_api_spec.rb +49 -0
  200. data/spec/api/sms_api_spec.rb +259 -0
  201. data/spec/api/sms_campaign_api_spec.rb +109 -0
  202. data/spec/api/sms_delivery_receipt_rules_api_spec.rb +98 -0
  203. data/spec/api/statistics_api_spec.rb +57 -0
  204. data/spec/api/subaccount_api_spec.rb +109 -0
  205. data/spec/api/timezones_api_spec.rb +48 -0
  206. data/spec/api/transactional_email_api_spec.rb +88 -0
  207. data/spec/api/transfer_credit_api_spec.rb +47 -0
  208. data/spec/api/upload_api_spec.rb +48 -0
  209. data/spec/api/user_email_templates_api_spec.rb +97 -0
  210. data/spec/api/voice_api_spec.rb +157 -0
  211. data/spec/api/voice_delivery_receipt_rules_api_spec.rb +98 -0
  212. data/spec/api_client_spec.rb +226 -0
  213. data/spec/configuration_spec.rb +42 -0
  214. data/spec/models/account_forgot_password_verify_spec.rb +53 -0
  215. data/spec/models/account_spec.rb +83 -0
  216. data/spec/models/account_verify_spec.rb +53 -0
  217. data/spec/models/address_spec.rb +77 -0
  218. data/spec/models/attachment_spec.rb +65 -0
  219. data/spec/models/contact_list_import_spec.rb +47 -0
  220. data/spec/models/contact_list_spec.rb +41 -0
  221. data/spec/models/contact_spec.rb +131 -0
  222. data/spec/models/credit_card_spec.rb +71 -0
  223. data/spec/models/date_before_spec.rb +41 -0
  224. data/spec/models/delivery_issue_spec.rb +65 -0
  225. data/spec/models/delivery_receipt_rule_spec.rb +65 -0
  226. data/spec/models/email_address_spec.rb +41 -0
  227. data/spec/models/email_campaign_spec.rb +83 -0
  228. data/spec/models/email_from_spec.rb +47 -0
  229. data/spec/models/email_recipient_spec.rb +47 -0
  230. data/spec/models/email_sms_address_spec.rb +53 -0
  231. data/spec/models/email_spec.rb +83 -0
  232. data/spec/models/email_template_new_spec.rb +47 -0
  233. data/spec/models/email_template_update_spec.rb +47 -0
  234. data/spec/models/fax_message_collection_spec.rb +47 -0
  235. data/spec/models/fax_message_spec.rb +83 -0
  236. data/spec/models/fields_fields_spec.rb +131 -0
  237. data/spec/models/fields_spec.rb +41 -0
  238. data/spec/models/forgot_password_spec.rb +41 -0
  239. data/spec/models/forgot_username_spec.rb +47 -0
  240. data/spec/models/inbound_fax_rule_spec.rb +65 -0
  241. data/spec/models/inbound_sms_rule_spec.rb +77 -0
  242. data/spec/models/mms_campaign_spec.rb +77 -0
  243. data/spec/models/mms_message_collection_spec.rb +47 -0
  244. data/spec/models/mms_message_spec.rb +95 -0
  245. data/spec/models/post_letter_spec.rb +77 -0
  246. data/spec/models/post_postcard_spec.rb +47 -0
  247. data/spec/models/post_recipient_spec.rb +89 -0
  248. data/spec/models/reseller_account_spec.rb +83 -0
  249. data/spec/models/reseller_account_transfer_credit_spec.rb +53 -0
  250. data/spec/models/sms_campaign_spec.rb +65 -0
  251. data/spec/models/sms_message_collection_spec.rb +41 -0
  252. data/spec/models/sms_message_spec.rb +89 -0
  253. data/spec/models/sms_template_spec.rb +47 -0
  254. data/spec/models/stripped_string_spec.rb +41 -0
  255. data/spec/models/subaccount_spec.rb +101 -0
  256. data/spec/models/upload_file_spec.rb +41 -0
  257. data/spec/models/url_spec.rb +41 -0
  258. data/spec/models/voice_message_collection_spec.rb +41 -0
  259. data/spec/models/voice_message_spec.rb +101 -0
  260. data/spec/spec_helper.rb +111 -0
  261. metadata +568 -0
@@ -0,0 +1,85 @@
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.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module ClickSendClient
16
+ class ReferralAccountApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get all referral accounts
23
+ # Get all referral accounts
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [Integer] :page Page number (default to 1)
26
+ # @option opts [Integer] :limit Number of records per page (default to 10)
27
+ # @return [String]
28
+ def referral_accounts_get(opts = {})
29
+ data, _status_code, _headers = referral_accounts_get_with_http_info(opts)
30
+ data
31
+ end
32
+
33
+ # Get all referral accounts
34
+ # Get all referral accounts
35
+ # @param [Hash] opts the optional parameters
36
+ # @option opts [Integer] :page Page number
37
+ # @option opts [Integer] :limit Number of records per page
38
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
39
+ def referral_accounts_get_with_http_info(opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: ReferralAccountApi.referral_accounts_get ...'
42
+ end
43
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
44
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ReferralAccountApi.referral_accounts_get, must be greater than or equal to 1.'
45
+ end
46
+
47
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
48
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ReferralAccountApi.referral_accounts_get, must be greater than or equal to 1.'
49
+ end
50
+
51
+ # resource path
52
+ local_var_path = '/referral/accounts'
53
+
54
+ # query parameters
55
+ query_params = {}
56
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
57
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
58
+
59
+ # header parameters
60
+ header_params = {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
63
+ # HTTP header 'Content-Type'
64
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
65
+
66
+ # form parameters
67
+ form_params = {}
68
+
69
+ # http body (model)
70
+ post_body = nil
71
+ auth_names = ['BasicAuth']
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => 'String')
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: ReferralAccountApi#referral_accounts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,253 @@
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.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module ClickSendClient
16
+ class ResellerAccountApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get Reseller clients Account
23
+ # Get Reseller clients Account
24
+ # @param client_user_id User ID of client
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [String]
27
+ def reseller_accounts_by_client_user_id_get(client_user_id, opts = {})
28
+ data, _status_code, _headers = reseller_accounts_by_client_user_id_get_with_http_info(client_user_id, opts)
29
+ data
30
+ end
31
+
32
+ # Get Reseller clients Account
33
+ # Get Reseller clients Account
34
+ # @param client_user_id User ID of client
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
37
+ def reseller_accounts_by_client_user_id_get_with_http_info(client_user_id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ResellerAccountApi.reseller_accounts_by_client_user_id_get ...'
40
+ end
41
+ # verify the required parameter 'client_user_id' is set
42
+ if @api_client.config.client_side_validation && client_user_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'client_user_id' when calling ResellerAccountApi.reseller_accounts_by_client_user_id_get"
44
+ end
45
+ # resource path
46
+ local_var_path = '/reseller/accounts/{client_user_id}'.sub('{' + 'client_user_id' + '}', client_user_id.to_s)
47
+
48
+ # query parameters
49
+ query_params = {}
50
+
51
+ # header parameters
52
+ header_params = {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = {}
60
+
61
+ # http body (model)
62
+ post_body = nil
63
+ auth_names = ['BasicAuth']
64
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
65
+ :header_params => header_params,
66
+ :query_params => query_params,
67
+ :form_params => form_params,
68
+ :body => post_body,
69
+ :auth_names => auth_names,
70
+ :return_type => 'String')
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: ResellerAccountApi#reseller_accounts_by_client_user_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+ # Update Reseller clients Account
77
+ # Update Reseller clients Account
78
+ # @param client_user_id User ID of client
79
+ # @param reseller_account ResellerAccount model
80
+ # @param [Hash] opts the optional parameters
81
+ # @return [String]
82
+ def reseller_accounts_by_client_user_id_put(client_user_id, reseller_account, opts = {})
83
+ data, _status_code, _headers = reseller_accounts_by_client_user_id_put_with_http_info(client_user_id, reseller_account, opts)
84
+ data
85
+ end
86
+
87
+ # Update Reseller clients Account
88
+ # Update Reseller clients Account
89
+ # @param client_user_id User ID of client
90
+ # @param reseller_account ResellerAccount model
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
93
+ def reseller_accounts_by_client_user_id_put_with_http_info(client_user_id, reseller_account, opts = {})
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug 'Calling API: ResellerAccountApi.reseller_accounts_by_client_user_id_put ...'
96
+ end
97
+ # verify the required parameter 'client_user_id' is set
98
+ if @api_client.config.client_side_validation && client_user_id.nil?
99
+ fail ArgumentError, "Missing the required parameter 'client_user_id' when calling ResellerAccountApi.reseller_accounts_by_client_user_id_put"
100
+ end
101
+ # verify the required parameter 'reseller_account' is set
102
+ if @api_client.config.client_side_validation && reseller_account.nil?
103
+ fail ArgumentError, "Missing the required parameter 'reseller_account' when calling ResellerAccountApi.reseller_accounts_by_client_user_id_put"
104
+ end
105
+ # resource path
106
+ local_var_path = '/reseller/accounts/{client_user_id}'.sub('{' + 'client_user_id' + '}', client_user_id.to_s)
107
+
108
+ # query parameters
109
+ query_params = {}
110
+
111
+ # header parameters
112
+ header_params = {}
113
+ # HTTP header 'Accept' (if needed)
114
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
115
+ # HTTP header 'Content-Type'
116
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
117
+
118
+ # form parameters
119
+ form_params = {}
120
+
121
+ # http body (model)
122
+ post_body = @api_client.object_to_http_body(reseller_account)
123
+ auth_names = ['BasicAuth']
124
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
125
+ :header_params => header_params,
126
+ :query_params => query_params,
127
+ :form_params => form_params,
128
+ :body => post_body,
129
+ :auth_names => auth_names,
130
+ :return_type => 'String')
131
+ if @api_client.config.debugging
132
+ @api_client.config.logger.debug "API called: ResellerAccountApi#reseller_accounts_by_client_user_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
133
+ end
134
+ return data, status_code, headers
135
+ end
136
+ # Get list of reseller accounts
137
+ # Get list of reseller accounts
138
+ # @param [Hash] opts the optional parameters
139
+ # @option opts [Integer] :page Page number (default to 1)
140
+ # @option opts [Integer] :limit Number of records per page (default to 10)
141
+ # @return [String]
142
+ def reseller_accounts_get(opts = {})
143
+ data, _status_code, _headers = reseller_accounts_get_with_http_info(opts)
144
+ data
145
+ end
146
+
147
+ # Get list of reseller accounts
148
+ # Get list of reseller accounts
149
+ # @param [Hash] opts the optional parameters
150
+ # @option opts [Integer] :page Page number
151
+ # @option opts [Integer] :limit Number of records per page
152
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
153
+ def reseller_accounts_get_with_http_info(opts = {})
154
+ if @api_client.config.debugging
155
+ @api_client.config.logger.debug 'Calling API: ResellerAccountApi.reseller_accounts_get ...'
156
+ end
157
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
158
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ResellerAccountApi.reseller_accounts_get, must be greater than or equal to 1.'
159
+ end
160
+
161
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
162
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ResellerAccountApi.reseller_accounts_get, must be greater than or equal to 1.'
163
+ end
164
+
165
+ # resource path
166
+ local_var_path = '/reseller/accounts'
167
+
168
+ # query parameters
169
+ query_params = {}
170
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
171
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
172
+
173
+ # header parameters
174
+ header_params = {}
175
+ # HTTP header 'Accept' (if needed)
176
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
177
+ # HTTP header 'Content-Type'
178
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
179
+
180
+ # form parameters
181
+ form_params = {}
182
+
183
+ # http body (model)
184
+ post_body = nil
185
+ auth_names = ['BasicAuth']
186
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
187
+ :header_params => header_params,
188
+ :query_params => query_params,
189
+ :form_params => form_params,
190
+ :body => post_body,
191
+ :auth_names => auth_names,
192
+ :return_type => 'String')
193
+ if @api_client.config.debugging
194
+ @api_client.config.logger.debug "API called: ResellerAccountApi#reseller_accounts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
195
+ end
196
+ return data, status_code, headers
197
+ end
198
+ # Create reseller account
199
+ # Create reseller account
200
+ # @param reseller_account ResellerAccount model
201
+ # @param [Hash] opts the optional parameters
202
+ # @return [String]
203
+ def reseller_accounts_post(reseller_account, opts = {})
204
+ data, _status_code, _headers = reseller_accounts_post_with_http_info(reseller_account, opts)
205
+ data
206
+ end
207
+
208
+ # Create reseller account
209
+ # Create reseller account
210
+ # @param reseller_account ResellerAccount model
211
+ # @param [Hash] opts the optional parameters
212
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
213
+ def reseller_accounts_post_with_http_info(reseller_account, opts = {})
214
+ if @api_client.config.debugging
215
+ @api_client.config.logger.debug 'Calling API: ResellerAccountApi.reseller_accounts_post ...'
216
+ end
217
+ # verify the required parameter 'reseller_account' is set
218
+ if @api_client.config.client_side_validation && reseller_account.nil?
219
+ fail ArgumentError, "Missing the required parameter 'reseller_account' when calling ResellerAccountApi.reseller_accounts_post"
220
+ end
221
+ # resource path
222
+ local_var_path = '/reseller/accounts'
223
+
224
+ # query parameters
225
+ query_params = {}
226
+
227
+ # header parameters
228
+ header_params = {}
229
+ # HTTP header 'Accept' (if needed)
230
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
231
+ # HTTP header 'Content-Type'
232
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
233
+
234
+ # form parameters
235
+ form_params = {}
236
+
237
+ # http body (model)
238
+ post_body = @api_client.object_to_http_body(reseller_account)
239
+ auth_names = ['BasicAuth']
240
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
241
+ :header_params => header_params,
242
+ :query_params => query_params,
243
+ :form_params => form_params,
244
+ :body => post_body,
245
+ :auth_names => auth_names,
246
+ :return_type => 'String')
247
+ if @api_client.config.debugging
248
+ @api_client.config.logger.debug "API called: ResellerAccountApi#reseller_accounts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
249
+ end
250
+ return data, status_code, headers
251
+ end
252
+ end
253
+ end
@@ -0,0 +1,92 @@
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.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module ClickSendClient
16
+ class SearchApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get list of searched contact list
23
+ # Get list of searched contact list
24
+ # @param q Your keyword or query.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Integer] :page Page number (default to 1)
27
+ # @option opts [Integer] :limit Number of records per page (default to 10)
28
+ # @return [String]
29
+ def search_contacts_lists_get(q, opts = {})
30
+ data, _status_code, _headers = search_contacts_lists_get_with_http_info(q, opts)
31
+ data
32
+ end
33
+
34
+ # Get list of searched contact list
35
+ # Get list of searched contact list
36
+ # @param q Your keyword or query.
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [Integer] :page Page number
39
+ # @option opts [Integer] :limit Number of records per page
40
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
41
+ def search_contacts_lists_get_with_http_info(q, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: SearchApi.search_contacts_lists_get ...'
44
+ end
45
+ # verify the required parameter 'q' is set
46
+ if @api_client.config.client_side_validation && q.nil?
47
+ fail ArgumentError, "Missing the required parameter 'q' when calling SearchApi.search_contacts_lists_get"
48
+ end
49
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
50
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SearchApi.search_contacts_lists_get, must be greater than or equal to 1.'
51
+ end
52
+
53
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
54
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SearchApi.search_contacts_lists_get, must be greater than or equal to 1.'
55
+ end
56
+
57
+ # resource path
58
+ local_var_path = '/search/contacts-lists'
59
+
60
+ # query parameters
61
+ query_params = {}
62
+ query_params[:'q'] = q
63
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
64
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
65
+
66
+ # header parameters
67
+ header_params = {}
68
+ # HTTP header 'Accept' (if needed)
69
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
70
+ # HTTP header 'Content-Type'
71
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
72
+
73
+ # form parameters
74
+ form_params = {}
75
+
76
+ # http body (model)
77
+ post_body = nil
78
+ auth_names = ['BasicAuth']
79
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
80
+ :header_params => header_params,
81
+ :query_params => query_params,
82
+ :form_params => form_params,
83
+ :body => post_body,
84
+ :auth_names => auth_names,
85
+ :return_type => 'String')
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: SearchApi#search_contacts_lists_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,1032 @@
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.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module ClickSendClient
16
+ class SMSApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Update all scheduled message as cancelled
23
+ # Update all scheduled message as cancelled
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [String]
26
+ def sms_cancel_all_put(opts = {})
27
+ data, _status_code, _headers = sms_cancel_all_put_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Update all scheduled message as cancelled
32
+ # Update all scheduled message as cancelled
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
35
+ def sms_cancel_all_put_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_cancel_all_put ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/sms/cancel-all'
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(:PUT, 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: SMSApi#sms_cancel_all_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
67
+ end
68
+ return data, status_code, headers
69
+ end
70
+ # Update scheduled message as cancelled
71
+ # Update scheduled message as cancelled
72
+ # @param message_id The message ID you want to cancel
73
+ # @param [Hash] opts the optional parameters
74
+ # @return [String]
75
+ def sms_cancel_by_message_id_put(message_id, opts = {})
76
+ data, _status_code, _headers = sms_cancel_by_message_id_put_with_http_info(message_id, opts)
77
+ data
78
+ end
79
+
80
+ # Update scheduled message as cancelled
81
+ # Update scheduled message as cancelled
82
+ # @param message_id The message ID you want to cancel
83
+ # @param [Hash] opts the optional parameters
84
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
85
+ def sms_cancel_by_message_id_put_with_http_info(message_id, opts = {})
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_cancel_by_message_id_put ...'
88
+ end
89
+ # verify the required parameter 'message_id' is set
90
+ if @api_client.config.client_side_validation && message_id.nil?
91
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling SMSApi.sms_cancel_by_message_id_put"
92
+ end
93
+ # resource path
94
+ local_var_path = '/sms/{message_id}/cancel'.sub('{' + 'message_id' + '}', message_id.to_s)
95
+
96
+ # query parameters
97
+ query_params = {}
98
+
99
+ # header parameters
100
+ header_params = {}
101
+ # HTTP header 'Accept' (if needed)
102
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
103
+ # HTTP header 'Content-Type'
104
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
105
+
106
+ # form parameters
107
+ form_params = {}
108
+
109
+ # http body (model)
110
+ post_body = nil
111
+ auth_names = ['BasicAuth']
112
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
113
+ :header_params => header_params,
114
+ :query_params => query_params,
115
+ :form_params => form_params,
116
+ :body => post_body,
117
+ :auth_names => auth_names,
118
+ :return_type => 'String')
119
+ if @api_client.config.debugging
120
+ @api_client.config.logger.debug "API called: SMSApi#sms_cancel_by_message_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
121
+ end
122
+ return data, status_code, headers
123
+ end
124
+ # Export all sms history
125
+ # Export all sms history
126
+ # @param filename Filename to download history as
127
+ # @param [Hash] opts the optional parameters
128
+ # @return [String]
129
+ def sms_history_export_get(filename, opts = {})
130
+ data, _status_code, _headers = sms_history_export_get_with_http_info(filename, opts)
131
+ data
132
+ end
133
+
134
+ # Export all sms history
135
+ # Export all sms history
136
+ # @param filename Filename to download history as
137
+ # @param [Hash] opts the optional parameters
138
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
139
+ def sms_history_export_get_with_http_info(filename, opts = {})
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_history_export_get ...'
142
+ end
143
+ # verify the required parameter 'filename' is set
144
+ if @api_client.config.client_side_validation && filename.nil?
145
+ fail ArgumentError, "Missing the required parameter 'filename' when calling SMSApi.sms_history_export_get"
146
+ end
147
+ # resource path
148
+ local_var_path = '/sms/history/export'
149
+
150
+ # query parameters
151
+ query_params = {}
152
+ query_params[:'filename'] = filename
153
+
154
+ # header parameters
155
+ header_params = {}
156
+ # HTTP header 'Accept' (if needed)
157
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
158
+ # HTTP header 'Content-Type'
159
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
160
+
161
+ # form parameters
162
+ form_params = {}
163
+
164
+ # http body (model)
165
+ post_body = nil
166
+ auth_names = ['BasicAuth']
167
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
168
+ :header_params => header_params,
169
+ :query_params => query_params,
170
+ :form_params => form_params,
171
+ :body => post_body,
172
+ :auth_names => auth_names,
173
+ :return_type => 'String')
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug "API called: SMSApi#sms_history_export_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
176
+ end
177
+ return data, status_code, headers
178
+ end
179
+ # Get all sms history
180
+ # Get all sms history
181
+ # @param [Hash] opts the optional parameters
182
+ # @option opts [String] :q Custom query Example: from:{number},status_code:201.
183
+ # @option opts [Integer] :date_from Start date
184
+ # @option opts [Integer] :date_to End date
185
+ # @option opts [Integer] :page Page number (default to 1)
186
+ # @option opts [Integer] :limit Number of records per page (default to 10)
187
+ # @return [String]
188
+ def sms_history_get(opts = {})
189
+ data, _status_code, _headers = sms_history_get_with_http_info(opts)
190
+ data
191
+ end
192
+
193
+ # Get all sms history
194
+ # Get all sms history
195
+ # @param [Hash] opts the optional parameters
196
+ # @option opts [String] :q Custom query Example: from:{number},status_code:201.
197
+ # @option opts [Integer] :date_from Start date
198
+ # @option opts [Integer] :date_to End date
199
+ # @option opts [Integer] :page Page number
200
+ # @option opts [Integer] :limit Number of records per page
201
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
202
+ def sms_history_get_with_http_info(opts = {})
203
+ if @api_client.config.debugging
204
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_history_get ...'
205
+ end
206
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
207
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SMSApi.sms_history_get, must be greater than or equal to 1.'
208
+ end
209
+
210
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
211
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SMSApi.sms_history_get, must be greater than or equal to 1.'
212
+ end
213
+
214
+ # resource path
215
+ local_var_path = '/sms/history'
216
+
217
+ # query parameters
218
+ query_params = {}
219
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
220
+ query_params[:'date_from'] = opts[:'date_from'] if !opts[:'date_from'].nil?
221
+ query_params[:'date_to'] = opts[:'date_to'] if !opts[:'date_to'].nil?
222
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
223
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
224
+
225
+ # header parameters
226
+ header_params = {}
227
+ # HTTP header 'Accept' (if needed)
228
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
229
+ # HTTP header 'Content-Type'
230
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
231
+
232
+ # form parameters
233
+ form_params = {}
234
+
235
+ # http body (model)
236
+ post_body = nil
237
+ auth_names = ['BasicAuth']
238
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
239
+ :header_params => header_params,
240
+ :query_params => query_params,
241
+ :form_params => form_params,
242
+ :body => post_body,
243
+ :auth_names => auth_names,
244
+ :return_type => 'String')
245
+ if @api_client.config.debugging
246
+ @api_client.config.logger.debug "API called: SMSApi#sms_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
247
+ end
248
+ return data, status_code, headers
249
+ end
250
+ # Get all inbound sms
251
+ # Get all inbound sms
252
+ # @param [Hash] opts the optional parameters
253
+ # @option opts [String] :q Your keyword or query.
254
+ # @option opts [Integer] :page Page number (default to 1)
255
+ # @option opts [Integer] :limit Number of records per page (default to 10)
256
+ # @return [String]
257
+ def sms_inbound_get(opts = {})
258
+ data, _status_code, _headers = sms_inbound_get_with_http_info(opts)
259
+ data
260
+ end
261
+
262
+ # Get all inbound sms
263
+ # Get all inbound sms
264
+ # @param [Hash] opts the optional parameters
265
+ # @option opts [String] :q Your keyword or query.
266
+ # @option opts [Integer] :page Page number
267
+ # @option opts [Integer] :limit Number of records per page
268
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
269
+ def sms_inbound_get_with_http_info(opts = {})
270
+ if @api_client.config.debugging
271
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_inbound_get ...'
272
+ end
273
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
274
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SMSApi.sms_inbound_get, must be greater than or equal to 1.'
275
+ end
276
+
277
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
278
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SMSApi.sms_inbound_get, must be greater than or equal to 1.'
279
+ end
280
+
281
+ # resource path
282
+ local_var_path = '/sms/inbound'
283
+
284
+ # query parameters
285
+ query_params = {}
286
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
287
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
288
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
289
+
290
+ # header parameters
291
+ header_params = {}
292
+ # HTTP header 'Accept' (if needed)
293
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
294
+ # HTTP header 'Content-Type'
295
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
296
+
297
+ # form parameters
298
+ form_params = {}
299
+
300
+ # http body (model)
301
+ post_body = nil
302
+ auth_names = ['BasicAuth']
303
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
304
+ :header_params => header_params,
305
+ :query_params => query_params,
306
+ :form_params => form_params,
307
+ :body => post_body,
308
+ :auth_names => auth_names,
309
+ :return_type => 'String')
310
+ if @api_client.config.debugging
311
+ @api_client.config.logger.debug "API called: SMSApi#sms_inbound_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
312
+ end
313
+ return data, status_code, headers
314
+ end
315
+ # Create inbound sms
316
+ # Create inbound sms
317
+ # @param url Url model
318
+ # @param [Hash] opts the optional parameters
319
+ # @return [String]
320
+ def sms_inbound_post(url, opts = {})
321
+ data, _status_code, _headers = sms_inbound_post_with_http_info(url, opts)
322
+ data
323
+ end
324
+
325
+ # Create inbound sms
326
+ # Create inbound sms
327
+ # @param url Url model
328
+ # @param [Hash] opts the optional parameters
329
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
330
+ def sms_inbound_post_with_http_info(url, opts = {})
331
+ if @api_client.config.debugging
332
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_inbound_post ...'
333
+ end
334
+ # verify the required parameter 'url' is set
335
+ if @api_client.config.client_side_validation && url.nil?
336
+ fail ArgumentError, "Missing the required parameter 'url' when calling SMSApi.sms_inbound_post"
337
+ end
338
+ # resource path
339
+ local_var_path = '/sms/inbound'
340
+
341
+ # query parameters
342
+ query_params = {}
343
+
344
+ # header parameters
345
+ header_params = {}
346
+ # HTTP header 'Accept' (if needed)
347
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
348
+ # HTTP header 'Content-Type'
349
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
350
+
351
+ # form parameters
352
+ form_params = {}
353
+
354
+ # http body (model)
355
+ post_body = @api_client.object_to_http_body(url)
356
+ auth_names = ['BasicAuth']
357
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
358
+ :header_params => header_params,
359
+ :query_params => query_params,
360
+ :form_params => form_params,
361
+ :body => post_body,
362
+ :auth_names => auth_names,
363
+ :return_type => 'String')
364
+ if @api_client.config.debugging
365
+ @api_client.config.logger.debug "API called: SMSApi#sms_inbound_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
366
+ end
367
+ return data, status_code, headers
368
+ end
369
+ # Mark inbound SMS as read
370
+ # Mark specific inbound SMS as read
371
+ # @param message_id Message ID
372
+ # @param [Hash] opts the optional parameters
373
+ # @return [String]
374
+ def sms_inbound_read_by_message_id_put(message_id, opts = {})
375
+ data, _status_code, _headers = sms_inbound_read_by_message_id_put_with_http_info(message_id, opts)
376
+ data
377
+ end
378
+
379
+ # Mark inbound SMS as read
380
+ # Mark specific inbound SMS as read
381
+ # @param message_id Message ID
382
+ # @param [Hash] opts the optional parameters
383
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
384
+ def sms_inbound_read_by_message_id_put_with_http_info(message_id, opts = {})
385
+ if @api_client.config.debugging
386
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_inbound_read_by_message_id_put ...'
387
+ end
388
+ # verify the required parameter 'message_id' is set
389
+ if @api_client.config.client_side_validation && message_id.nil?
390
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling SMSApi.sms_inbound_read_by_message_id_put"
391
+ end
392
+ # resource path
393
+ local_var_path = '/sms/inbound-read/{message_id}'.sub('{' + 'message_id' + '}', message_id.to_s)
394
+
395
+ # query parameters
396
+ query_params = {}
397
+
398
+ # header parameters
399
+ header_params = {}
400
+ # HTTP header 'Accept' (if needed)
401
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
402
+ # HTTP header 'Content-Type'
403
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
404
+
405
+ # form parameters
406
+ form_params = {}
407
+
408
+ # http body (model)
409
+ post_body = nil
410
+ auth_names = ['BasicAuth']
411
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
412
+ :header_params => header_params,
413
+ :query_params => query_params,
414
+ :form_params => form_params,
415
+ :body => post_body,
416
+ :auth_names => auth_names,
417
+ :return_type => 'String')
418
+ if @api_client.config.debugging
419
+ @api_client.config.logger.debug "API called: SMSApi#sms_inbound_read_by_message_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
420
+ end
421
+ return data, status_code, headers
422
+ end
423
+ # Mark inbound SMS as read
424
+ # Mark all inbound SMS as read optionally before a certain date
425
+ # @param [Hash] opts the optional parameters
426
+ # @option opts [DateBefore] :date_before DateBefore model
427
+ # @return [String]
428
+ def sms_inbound_read_put(opts = {})
429
+ data, _status_code, _headers = sms_inbound_read_put_with_http_info(opts)
430
+ data
431
+ end
432
+
433
+ # Mark inbound SMS as read
434
+ # Mark all inbound SMS as read optionally before a certain date
435
+ # @param [Hash] opts the optional parameters
436
+ # @option opts [DateBefore] :date_before DateBefore model
437
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
438
+ def sms_inbound_read_put_with_http_info(opts = {})
439
+ if @api_client.config.debugging
440
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_inbound_read_put ...'
441
+ end
442
+ # resource path
443
+ local_var_path = '/sms/inbound-read'
444
+
445
+ # query parameters
446
+ query_params = {}
447
+
448
+ # header parameters
449
+ header_params = {}
450
+ # HTTP header 'Accept' (if needed)
451
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
452
+ # HTTP header 'Content-Type'
453
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
454
+
455
+ # form parameters
456
+ form_params = {}
457
+
458
+ # http body (model)
459
+ post_body = @api_client.object_to_http_body(opts[:'date_before'])
460
+ auth_names = ['BasicAuth']
461
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
462
+ :header_params => header_params,
463
+ :query_params => query_params,
464
+ :form_params => form_params,
465
+ :body => post_body,
466
+ :auth_names => auth_names,
467
+ :return_type => 'String')
468
+ if @api_client.config.debugging
469
+ @api_client.config.logger.debug "API called: SMSApi#sms_inbound_read_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
470
+ end
471
+ return data, status_code, headers
472
+ end
473
+ # Calculate sms price
474
+ # Calculate sms price
475
+ # @param sms_messages SmsMessageCollection model
476
+ # @param [Hash] opts the optional parameters
477
+ # @return [String]
478
+ def sms_price_post(sms_messages, opts = {})
479
+ data, _status_code, _headers = sms_price_post_with_http_info(sms_messages, opts)
480
+ data
481
+ end
482
+
483
+ # Calculate sms price
484
+ # Calculate sms price
485
+ # @param sms_messages SmsMessageCollection model
486
+ # @param [Hash] opts the optional parameters
487
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
488
+ def sms_price_post_with_http_info(sms_messages, opts = {})
489
+ if @api_client.config.debugging
490
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_price_post ...'
491
+ end
492
+ # verify the required parameter 'sms_messages' is set
493
+ if @api_client.config.client_side_validation && sms_messages.nil?
494
+ fail ArgumentError, "Missing the required parameter 'sms_messages' when calling SMSApi.sms_price_post"
495
+ end
496
+ # resource path
497
+ local_var_path = '/sms/price'
498
+
499
+ # query parameters
500
+ query_params = {}
501
+
502
+ # header parameters
503
+ header_params = {}
504
+ # HTTP header 'Accept' (if needed)
505
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
506
+ # HTTP header 'Content-Type'
507
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
508
+
509
+ # form parameters
510
+ form_params = {}
511
+
512
+ # http body (model)
513
+ post_body = @api_client.object_to_http_body(sms_messages)
514
+ auth_names = ['BasicAuth']
515
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
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 => 'String')
522
+ if @api_client.config.debugging
523
+ @api_client.config.logger.debug "API called: SMSApi#sms_price_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
524
+ end
525
+ return data, status_code, headers
526
+ end
527
+ # Get a Specific Delivery Receipt
528
+ # Get a Specific Delivery Receipt
529
+ # @param message_id Message ID
530
+ # @param [Hash] opts the optional parameters
531
+ # @return [String]
532
+ def sms_receipts_by_message_id_get(message_id, opts = {})
533
+ data, _status_code, _headers = sms_receipts_by_message_id_get_with_http_info(message_id, opts)
534
+ data
535
+ end
536
+
537
+ # Get a Specific Delivery Receipt
538
+ # Get a Specific Delivery Receipt
539
+ # @param message_id Message ID
540
+ # @param [Hash] opts the optional parameters
541
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
542
+ def sms_receipts_by_message_id_get_with_http_info(message_id, opts = {})
543
+ if @api_client.config.debugging
544
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_receipts_by_message_id_get ...'
545
+ end
546
+ # verify the required parameter 'message_id' is set
547
+ if @api_client.config.client_side_validation && message_id.nil?
548
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling SMSApi.sms_receipts_by_message_id_get"
549
+ end
550
+ # resource path
551
+ local_var_path = '/sms/receipts/{message_id}'.sub('{' + 'message_id' + '}', message_id.to_s)
552
+
553
+ # query parameters
554
+ query_params = {}
555
+
556
+ # header parameters
557
+ header_params = {}
558
+ # HTTP header 'Accept' (if needed)
559
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
560
+ # HTTP header 'Content-Type'
561
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
562
+
563
+ # form parameters
564
+ form_params = {}
565
+
566
+ # http body (model)
567
+ post_body = nil
568
+ auth_names = ['BasicAuth']
569
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
570
+ :header_params => header_params,
571
+ :query_params => query_params,
572
+ :form_params => form_params,
573
+ :body => post_body,
574
+ :auth_names => auth_names,
575
+ :return_type => 'String')
576
+ if @api_client.config.debugging
577
+ @api_client.config.logger.debug "API called: SMSApi#sms_receipts_by_message_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
578
+ end
579
+ return data, status_code, headers
580
+ end
581
+ # Get all delivery receipts
582
+ # Get all delivery receipts
583
+ # @param [Hash] opts the optional parameters
584
+ # @option opts [Integer] :page Page number (default to 1)
585
+ # @option opts [Integer] :limit Number of records per page (default to 10)
586
+ # @return [String]
587
+ def sms_receipts_get(opts = {})
588
+ data, _status_code, _headers = sms_receipts_get_with_http_info(opts)
589
+ data
590
+ end
591
+
592
+ # Get all delivery receipts
593
+ # Get all delivery receipts
594
+ # @param [Hash] opts the optional parameters
595
+ # @option opts [Integer] :page Page number
596
+ # @option opts [Integer] :limit Number of records per page
597
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
598
+ def sms_receipts_get_with_http_info(opts = {})
599
+ if @api_client.config.debugging
600
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_receipts_get ...'
601
+ end
602
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
603
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SMSApi.sms_receipts_get, must be greater than or equal to 1.'
604
+ end
605
+
606
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
607
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SMSApi.sms_receipts_get, must be greater than or equal to 1.'
608
+ end
609
+
610
+ # resource path
611
+ local_var_path = '/sms/receipts'
612
+
613
+ # query parameters
614
+ query_params = {}
615
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
616
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
617
+
618
+ # header parameters
619
+ header_params = {}
620
+ # HTTP header 'Accept' (if needed)
621
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
622
+ # HTTP header 'Content-Type'
623
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
624
+
625
+ # form parameters
626
+ form_params = {}
627
+
628
+ # http body (model)
629
+ post_body = nil
630
+ auth_names = ['BasicAuth']
631
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
632
+ :header_params => header_params,
633
+ :query_params => query_params,
634
+ :form_params => form_params,
635
+ :body => post_body,
636
+ :auth_names => auth_names,
637
+ :return_type => 'String')
638
+ if @api_client.config.debugging
639
+ @api_client.config.logger.debug "API called: SMSApi#sms_receipts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
640
+ end
641
+ return data, status_code, headers
642
+ end
643
+ # Add a delivery receipt
644
+ # Add a delivery receipt
645
+ # @param url Url model
646
+ # @param [Hash] opts the optional parameters
647
+ # @return [String]
648
+ def sms_receipts_post(url, opts = {})
649
+ data, _status_code, _headers = sms_receipts_post_with_http_info(url, opts)
650
+ data
651
+ end
652
+
653
+ # Add a delivery receipt
654
+ # Add a delivery receipt
655
+ # @param url Url model
656
+ # @param [Hash] opts the optional parameters
657
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
658
+ def sms_receipts_post_with_http_info(url, opts = {})
659
+ if @api_client.config.debugging
660
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_receipts_post ...'
661
+ end
662
+ # verify the required parameter 'url' is set
663
+ if @api_client.config.client_side_validation && url.nil?
664
+ fail ArgumentError, "Missing the required parameter 'url' when calling SMSApi.sms_receipts_post"
665
+ end
666
+ # resource path
667
+ local_var_path = '/sms/receipts'
668
+
669
+ # query parameters
670
+ query_params = {}
671
+
672
+ # header parameters
673
+ header_params = {}
674
+ # HTTP header 'Accept' (if needed)
675
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
676
+ # HTTP header 'Content-Type'
677
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
678
+
679
+ # form parameters
680
+ form_params = {}
681
+
682
+ # http body (model)
683
+ post_body = @api_client.object_to_http_body(url)
684
+ auth_names = ['BasicAuth']
685
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
686
+ :header_params => header_params,
687
+ :query_params => query_params,
688
+ :form_params => form_params,
689
+ :body => post_body,
690
+ :auth_names => auth_names,
691
+ :return_type => 'String')
692
+ if @api_client.config.debugging
693
+ @api_client.config.logger.debug "API called: SMSApi#sms_receipts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
694
+ end
695
+ return data, status_code, headers
696
+ end
697
+ # Mark delivery receipts as read
698
+ # Mark delivery receipts as read
699
+ # @param [Hash] opts the optional parameters
700
+ # @option opts [DateBefore] :date_before DateBefore model
701
+ # @return [String]
702
+ def sms_receipts_read_put(opts = {})
703
+ data, _status_code, _headers = sms_receipts_read_put_with_http_info(opts)
704
+ data
705
+ end
706
+
707
+ # Mark delivery receipts as read
708
+ # Mark delivery receipts as read
709
+ # @param [Hash] opts the optional parameters
710
+ # @option opts [DateBefore] :date_before DateBefore model
711
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
712
+ def sms_receipts_read_put_with_http_info(opts = {})
713
+ if @api_client.config.debugging
714
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_receipts_read_put ...'
715
+ end
716
+ # resource path
717
+ local_var_path = '/sms/receipts-read'
718
+
719
+ # query parameters
720
+ query_params = {}
721
+
722
+ # header parameters
723
+ header_params = {}
724
+ # HTTP header 'Accept' (if needed)
725
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
726
+ # HTTP header 'Content-Type'
727
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
728
+
729
+ # form parameters
730
+ form_params = {}
731
+
732
+ # http body (model)
733
+ post_body = @api_client.object_to_http_body(opts[:'date_before'])
734
+ auth_names = ['BasicAuth']
735
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
736
+ :header_params => header_params,
737
+ :query_params => query_params,
738
+ :form_params => form_params,
739
+ :body => post_body,
740
+ :auth_names => auth_names,
741
+ :return_type => 'String')
742
+ if @api_client.config.debugging
743
+ @api_client.config.logger.debug "API called: SMSApi#sms_receipts_read_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
744
+ end
745
+ return data, status_code, headers
746
+ end
747
+ # Send sms message(s)
748
+ # # Send one or more SMS messages You can post up to 1000 messages with each API call. You can send to a mix of contacts and contact lists, as long as the total number of recipients is up to 1000. The response contains status and details for each recipient. *Refer to [Application Status Codes](https://dashboard.clicksend.com/#/signup/step1/) for the possible response message status strings.*
749
+ # @param sms_messages SmsMessageCollection model
750
+ # @param [Hash] opts the optional parameters
751
+ # @return [String]
752
+ def sms_send_post(sms_messages, opts = {})
753
+ data, _status_code, _headers = sms_send_post_with_http_info(sms_messages, opts)
754
+ data
755
+ end
756
+
757
+ # Send sms message(s)
758
+ # # Send one or more SMS messages You can post up to 1000 messages with each API call. You can send to a mix of contacts and contact lists, as long as the total number of recipients is up to 1000. The response contains status and details for each recipient. *Refer to [Application Status Codes](https://dashboard.clicksend.com/#/signup/step1/) for the possible response message status strings.*
759
+ # @param sms_messages SmsMessageCollection model
760
+ # @param [Hash] opts the optional parameters
761
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
762
+ def sms_send_post_with_http_info(sms_messages, opts = {})
763
+ if @api_client.config.debugging
764
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_send_post ...'
765
+ end
766
+ # verify the required parameter 'sms_messages' is set
767
+ if @api_client.config.client_side_validation && sms_messages.nil?
768
+ fail ArgumentError, "Missing the required parameter 'sms_messages' when calling SMSApi.sms_send_post"
769
+ end
770
+ # resource path
771
+ local_var_path = '/sms/send'
772
+
773
+ # query parameters
774
+ query_params = {}
775
+
776
+ # header parameters
777
+ header_params = {}
778
+ # HTTP header 'Accept' (if needed)
779
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
780
+ # HTTP header 'Content-Type'
781
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
782
+
783
+ # form parameters
784
+ form_params = {}
785
+
786
+ # http body (model)
787
+ post_body = @api_client.object_to_http_body(sms_messages)
788
+ auth_names = ['BasicAuth']
789
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
790
+ :header_params => header_params,
791
+ :query_params => query_params,
792
+ :form_params => form_params,
793
+ :body => post_body,
794
+ :auth_names => auth_names,
795
+ :return_type => 'String')
796
+ if @api_client.config.debugging
797
+ @api_client.config.logger.debug "API called: SMSApi#sms_send_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
798
+ end
799
+ return data, status_code, headers
800
+ end
801
+ # Delete sms template
802
+ # Delete sms template
803
+ # @param template_id Template id
804
+ # @param [Hash] opts the optional parameters
805
+ # @return [String]
806
+ def sms_templates_by_template_id_delete(template_id, opts = {})
807
+ data, _status_code, _headers = sms_templates_by_template_id_delete_with_http_info(template_id, opts)
808
+ data
809
+ end
810
+
811
+ # Delete sms template
812
+ # Delete sms template
813
+ # @param template_id Template id
814
+ # @param [Hash] opts the optional parameters
815
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
816
+ def sms_templates_by_template_id_delete_with_http_info(template_id, opts = {})
817
+ if @api_client.config.debugging
818
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_templates_by_template_id_delete ...'
819
+ end
820
+ # verify the required parameter 'template_id' is set
821
+ if @api_client.config.client_side_validation && template_id.nil?
822
+ fail ArgumentError, "Missing the required parameter 'template_id' when calling SMSApi.sms_templates_by_template_id_delete"
823
+ end
824
+ # resource path
825
+ local_var_path = '/sms/templates/{template_id}'.sub('{' + 'template_id' + '}', template_id.to_s)
826
+
827
+ # query parameters
828
+ query_params = {}
829
+
830
+ # header parameters
831
+ header_params = {}
832
+ # HTTP header 'Accept' (if needed)
833
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
834
+ # HTTP header 'Content-Type'
835
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
836
+
837
+ # form parameters
838
+ form_params = {}
839
+
840
+ # http body (model)
841
+ post_body = nil
842
+ auth_names = ['BasicAuth']
843
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
844
+ :header_params => header_params,
845
+ :query_params => query_params,
846
+ :form_params => form_params,
847
+ :body => post_body,
848
+ :auth_names => auth_names,
849
+ :return_type => 'String')
850
+ if @api_client.config.debugging
851
+ @api_client.config.logger.debug "API called: SMSApi#sms_templates_by_template_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
852
+ end
853
+ return data, status_code, headers
854
+ end
855
+ # Update sms template
856
+ # Update sms template
857
+ # @param template_id Template id
858
+ # @param sms_template Template item
859
+ # @param [Hash] opts the optional parameters
860
+ # @return [String]
861
+ def sms_templates_by_template_id_put(template_id, sms_template, opts = {})
862
+ data, _status_code, _headers = sms_templates_by_template_id_put_with_http_info(template_id, sms_template, opts)
863
+ data
864
+ end
865
+
866
+ # Update sms template
867
+ # Update sms template
868
+ # @param template_id Template id
869
+ # @param sms_template Template item
870
+ # @param [Hash] opts the optional parameters
871
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
872
+ def sms_templates_by_template_id_put_with_http_info(template_id, sms_template, opts = {})
873
+ if @api_client.config.debugging
874
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_templates_by_template_id_put ...'
875
+ end
876
+ # verify the required parameter 'template_id' is set
877
+ if @api_client.config.client_side_validation && template_id.nil?
878
+ fail ArgumentError, "Missing the required parameter 'template_id' when calling SMSApi.sms_templates_by_template_id_put"
879
+ end
880
+ # verify the required parameter 'sms_template' is set
881
+ if @api_client.config.client_side_validation && sms_template.nil?
882
+ fail ArgumentError, "Missing the required parameter 'sms_template' when calling SMSApi.sms_templates_by_template_id_put"
883
+ end
884
+ # resource path
885
+ local_var_path = '/sms/templates/{template_id}'.sub('{' + 'template_id' + '}', template_id.to_s)
886
+
887
+ # query parameters
888
+ query_params = {}
889
+
890
+ # header parameters
891
+ header_params = {}
892
+ # HTTP header 'Accept' (if needed)
893
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
894
+ # HTTP header 'Content-Type'
895
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
896
+
897
+ # form parameters
898
+ form_params = {}
899
+
900
+ # http body (model)
901
+ post_body = @api_client.object_to_http_body(sms_template)
902
+ auth_names = ['BasicAuth']
903
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
904
+ :header_params => header_params,
905
+ :query_params => query_params,
906
+ :form_params => form_params,
907
+ :body => post_body,
908
+ :auth_names => auth_names,
909
+ :return_type => 'String')
910
+ if @api_client.config.debugging
911
+ @api_client.config.logger.debug "API called: SMSApi#sms_templates_by_template_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
912
+ end
913
+ return data, status_code, headers
914
+ end
915
+ # Get lists of all sms templates
916
+ # Get lists of all sms templates
917
+ # @param [Hash] opts the optional parameters
918
+ # @option opts [Integer] :page Page number (default to 1)
919
+ # @option opts [Integer] :limit Number of records per page (default to 10)
920
+ # @return [String]
921
+ def sms_templates_get(opts = {})
922
+ data, _status_code, _headers = sms_templates_get_with_http_info(opts)
923
+ data
924
+ end
925
+
926
+ # Get lists of all sms templates
927
+ # Get lists of all sms templates
928
+ # @param [Hash] opts the optional parameters
929
+ # @option opts [Integer] :page Page number
930
+ # @option opts [Integer] :limit Number of records per page
931
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
932
+ def sms_templates_get_with_http_info(opts = {})
933
+ if @api_client.config.debugging
934
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_templates_get ...'
935
+ end
936
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
937
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SMSApi.sms_templates_get, must be greater than or equal to 1.'
938
+ end
939
+
940
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
941
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SMSApi.sms_templates_get, must be greater than or equal to 1.'
942
+ end
943
+
944
+ # resource path
945
+ local_var_path = '/sms/templates'
946
+
947
+ # query parameters
948
+ query_params = {}
949
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
950
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
951
+
952
+ # header parameters
953
+ header_params = {}
954
+ # HTTP header 'Accept' (if needed)
955
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
956
+ # HTTP header 'Content-Type'
957
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
958
+
959
+ # form parameters
960
+ form_params = {}
961
+
962
+ # http body (model)
963
+ post_body = nil
964
+ auth_names = ['BasicAuth']
965
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
966
+ :header_params => header_params,
967
+ :query_params => query_params,
968
+ :form_params => form_params,
969
+ :body => post_body,
970
+ :auth_names => auth_names,
971
+ :return_type => 'String')
972
+ if @api_client.config.debugging
973
+ @api_client.config.logger.debug "API called: SMSApi#sms_templates_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
974
+ end
975
+ return data, status_code, headers
976
+ end
977
+ # Create sms template
978
+ # Create sms template
979
+ # @param sms_template SmsTemplate model
980
+ # @param [Hash] opts the optional parameters
981
+ # @return [String]
982
+ def sms_templates_post(sms_template, opts = {})
983
+ data, _status_code, _headers = sms_templates_post_with_http_info(sms_template, opts)
984
+ data
985
+ end
986
+
987
+ # Create sms template
988
+ # Create sms template
989
+ # @param sms_template SmsTemplate model
990
+ # @param [Hash] opts the optional parameters
991
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
992
+ def sms_templates_post_with_http_info(sms_template, opts = {})
993
+ if @api_client.config.debugging
994
+ @api_client.config.logger.debug 'Calling API: SMSApi.sms_templates_post ...'
995
+ end
996
+ # verify the required parameter 'sms_template' is set
997
+ if @api_client.config.client_side_validation && sms_template.nil?
998
+ fail ArgumentError, "Missing the required parameter 'sms_template' when calling SMSApi.sms_templates_post"
999
+ end
1000
+ # resource path
1001
+ local_var_path = '/sms/templates'
1002
+
1003
+ # query parameters
1004
+ query_params = {}
1005
+
1006
+ # header parameters
1007
+ header_params = {}
1008
+ # HTTP header 'Accept' (if needed)
1009
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1010
+ # HTTP header 'Content-Type'
1011
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1012
+
1013
+ # form parameters
1014
+ form_params = {}
1015
+
1016
+ # http body (model)
1017
+ post_body = @api_client.object_to_http_body(sms_template)
1018
+ auth_names = ['BasicAuth']
1019
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1020
+ :header_params => header_params,
1021
+ :query_params => query_params,
1022
+ :form_params => form_params,
1023
+ :body => post_body,
1024
+ :auth_names => auth_names,
1025
+ :return_type => 'String')
1026
+ if @api_client.config.debugging
1027
+ @api_client.config.logger.debug "API called: SMSApi#sms_templates_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1028
+ end
1029
+ return data, status_code, headers
1030
+ end
1031
+ end
1032
+ end