clicksend_client 1.0.2 → 5.0.75

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) 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 +60 -0
  6. data/docs/InboundSMSRule.md +1 -0
  7. data/docs/MMSApi.md +117 -0
  8. data/docs/MmsMessage.md +1 -1
  9. data/docs/SmsCampaign.md +1 -0
  10. data/docs/SmsMessage.md +1 -1
  11. data/docs/VoiceMessage.md +1 -1
  12. data/lib/clicksend_client/api/account_api.rb +1 -1
  13. data/lib/clicksend_client/api/account_recharge_api.rb +1 -1
  14. data/lib/clicksend_client/api/contact_api.rb +67 -1
  15. data/lib/clicksend_client/api/contact_list_api.rb +1 -1
  16. data/lib/clicksend_client/api/countries_api.rb +1 -1
  17. data/lib/clicksend_client/api/delivery_issues_api.rb +1 -1
  18. data/lib/clicksend_client/api/detect_address_api.rb +1 -1
  19. data/lib/clicksend_client/api/email_delivery_receipt_rules_api.rb +1 -1
  20. data/lib/clicksend_client/api/email_marketing_api.rb +1 -1
  21. data/lib/clicksend_client/api/email_to_sms_api.rb +1 -1
  22. data/lib/clicksend_client/api/fax_api.rb +1 -1
  23. data/lib/clicksend_client/api/fax_delivery_receipt_rules_api.rb +1 -1
  24. data/lib/clicksend_client/api/inbound_fax_rules_api.rb +1 -1
  25. data/lib/clicksend_client/api/inbound_sms_rules_api.rb +1 -1
  26. data/lib/clicksend_client/api/master_email_templates_api.rb +1 -1
  27. data/lib/clicksend_client/api/mms_api.rb +127 -1
  28. data/lib/clicksend_client/api/mms_campaign_api.rb +1 -1
  29. data/lib/clicksend_client/api/number_api.rb +1 -1
  30. data/lib/clicksend_client/api/post_letter_api.rb +1 -1
  31. data/lib/clicksend_client/api/post_postcard_api.rb +1 -1
  32. data/lib/clicksend_client/api/post_return_address_api.rb +1 -1
  33. data/lib/clicksend_client/api/referral_account_api.rb +1 -1
  34. data/lib/clicksend_client/api/reseller_account_api.rb +1 -1
  35. data/lib/clicksend_client/api/search_api.rb +1 -1
  36. data/lib/clicksend_client/api/sms_api.rb +1 -1
  37. data/lib/clicksend_client/api/sms_campaign_api.rb +1 -1
  38. data/lib/clicksend_client/api/sms_delivery_receipt_rules_api.rb +1 -1
  39. data/lib/clicksend_client/api/statistics_api.rb +1 -1
  40. data/lib/clicksend_client/api/subaccount_api.rb +1 -1
  41. data/lib/clicksend_client/api/timezones_api.rb +1 -1
  42. data/lib/clicksend_client/api/transactional_email_api.rb +1 -1
  43. data/lib/clicksend_client/api/transfer_credit_api.rb +1 -1
  44. data/lib/clicksend_client/api/upload_api.rb +1 -1
  45. data/lib/clicksend_client/api/user_email_templates_api.rb +1 -1
  46. data/lib/clicksend_client/api/voice_api.rb +1 -1
  47. data/lib/clicksend_client/api/voice_delivery_receipt_rules_api.rb +1 -1
  48. data/lib/clicksend_client/api_client.rb +6 -4
  49. data/lib/clicksend_client/api_error.rb +1 -1
  50. data/lib/clicksend_client/configuration.rb +3 -3
  51. data/lib/clicksend_client/models/account.rb +3 -2
  52. data/lib/clicksend_client/models/account_forgot_password_verify.rb +3 -2
  53. data/lib/clicksend_client/models/account_verify.rb +3 -2
  54. data/lib/clicksend_client/models/address.rb +3 -2
  55. data/lib/clicksend_client/models/attachment.rb +3 -2
  56. data/lib/clicksend_client/models/contact.rb +3 -2
  57. data/lib/clicksend_client/models/contact_list.rb +3 -2
  58. data/lib/clicksend_client/models/contact_list_import.rb +3 -2
  59. data/lib/clicksend_client/models/credit_card.rb +3 -2
  60. data/lib/clicksend_client/models/date_before.rb +4 -3
  61. data/lib/clicksend_client/models/delivery_issue.rb +3 -2
  62. data/lib/clicksend_client/models/delivery_receipt_rule.rb +3 -2
  63. data/lib/clicksend_client/models/email.rb +3 -2
  64. data/lib/clicksend_client/models/email_address.rb +3 -2
  65. data/lib/clicksend_client/models/email_campaign.rb +3 -2
  66. data/lib/clicksend_client/models/email_from.rb +3 -2
  67. data/lib/clicksend_client/models/email_recipient.rb +3 -2
  68. data/lib/clicksend_client/models/email_sms_address.rb +3 -2
  69. data/lib/clicksend_client/models/email_template_new.rb +3 -2
  70. data/lib/clicksend_client/models/email_template_update.rb +3 -2
  71. data/lib/clicksend_client/models/fax_message.rb +3 -2
  72. data/lib/clicksend_client/models/fax_message_collection.rb +3 -2
  73. data/lib/clicksend_client/models/fields.rb +3 -2
  74. data/lib/clicksend_client/models/fields_fields.rb +3 -2
  75. data/lib/clicksend_client/models/forgot_password.rb +3 -2
  76. data/lib/clicksend_client/models/forgot_username.rb +3 -2
  77. data/lib/clicksend_client/models/inbound_fax_rule.rb +3 -2
  78. data/lib/clicksend_client/models/inbound_sms_rule.rb +17 -6
  79. data/lib/clicksend_client/models/mms_campaign.rb +3 -2
  80. data/lib/clicksend_client/models/mms_message.rb +3 -7
  81. data/lib/clicksend_client/models/mms_message_collection.rb +3 -2
  82. data/lib/clicksend_client/models/post_letter.rb +3 -2
  83. data/lib/clicksend_client/models/post_postcard.rb +3 -2
  84. data/lib/clicksend_client/models/post_recipient.rb +3 -2
  85. data/lib/clicksend_client/models/reseller_account.rb +3 -2
  86. data/lib/clicksend_client/models/reseller_account_transfer_credit.rb +3 -2
  87. data/lib/clicksend_client/models/sms_campaign.rb +17 -6
  88. data/lib/clicksend_client/models/sms_message.rb +3 -7
  89. data/lib/clicksend_client/models/sms_message_collection.rb +3 -2
  90. data/lib/clicksend_client/models/sms_template.rb +3 -2
  91. data/lib/clicksend_client/models/stripped_string.rb +3 -2
  92. data/lib/clicksend_client/models/subaccount.rb +3 -2
  93. data/lib/clicksend_client/models/upload_file.rb +3 -2
  94. data/lib/clicksend_client/models/url.rb +3 -2
  95. data/lib/clicksend_client/models/voice_message.rb +3 -7
  96. data/lib/clicksend_client/models/voice_message_collection.rb +3 -2
  97. data/lib/clicksend_client/version.rb +2 -2
  98. data/lib/clicksend_client.rb +1 -1
  99. data/spec/api/account_api_spec.rb +1 -1
  100. data/spec/api/account_recharge_api_spec.rb +1 -1
  101. data/spec/api/contact_api_spec.rb +15 -1
  102. data/spec/api/contact_list_api_spec.rb +1 -1
  103. data/spec/api/countries_api_spec.rb +1 -1
  104. data/spec/api/delivery_issues_api_spec.rb +1 -1
  105. data/spec/api/detect_address_api_spec.rb +1 -1
  106. data/spec/api/email_delivery_receipt_rules_api_spec.rb +1 -1
  107. data/spec/api/email_marketing_api_spec.rb +1 -1
  108. data/spec/api/email_to_sms_api_spec.rb +1 -1
  109. data/spec/api/fax_api_spec.rb +1 -1
  110. data/spec/api/fax_delivery_receipt_rules_api_spec.rb +1 -1
  111. data/spec/api/inbound_fax_rules_api_spec.rb +1 -1
  112. data/spec/api/inbound_sms_rules_api_spec.rb +1 -1
  113. data/spec/api/master_email_templates_api_spec.rb +1 -1
  114. data/spec/api/mms_api_spec.rb +29 -1
  115. data/spec/api/mms_campaign_api_spec.rb +1 -1
  116. data/spec/api/number_api_spec.rb +1 -1
  117. data/spec/api/post_letter_api_spec.rb +1 -1
  118. data/spec/api/post_postcard_api_spec.rb +1 -1
  119. data/spec/api/post_return_address_api_spec.rb +1 -1
  120. data/spec/api/referral_account_api_spec.rb +1 -1
  121. data/spec/api/reseller_account_api_spec.rb +1 -1
  122. data/spec/api/search_api_spec.rb +1 -1
  123. data/spec/api/sms_api_spec.rb +1 -1
  124. data/spec/api/sms_campaign_api_spec.rb +1 -1
  125. data/spec/api/sms_delivery_receipt_rules_api_spec.rb +1 -1
  126. data/spec/api/statistics_api_spec.rb +1 -1
  127. data/spec/api/subaccount_api_spec.rb +1 -1
  128. data/spec/api/timezones_api_spec.rb +1 -1
  129. data/spec/api/transactional_email_api_spec.rb +1 -1
  130. data/spec/api/transfer_credit_api_spec.rb +1 -1
  131. data/spec/api/upload_api_spec.rb +1 -1
  132. data/spec/api/user_email_templates_api_spec.rb +1 -1
  133. data/spec/api/voice_api_spec.rb +1 -1
  134. data/spec/api/voice_delivery_receipt_rules_api_spec.rb +1 -1
  135. data/spec/api_client_spec.rb +18 -1
  136. data/spec/configuration_spec.rb +1 -1
  137. data/spec/models/account_forgot_password_verify_spec.rb +1 -1
  138. data/spec/models/account_spec.rb +1 -1
  139. data/spec/models/account_verify_spec.rb +1 -1
  140. data/spec/models/address_spec.rb +1 -1
  141. data/spec/models/attachment_spec.rb +1 -1
  142. data/spec/models/contact_list_import_spec.rb +1 -1
  143. data/spec/models/contact_list_spec.rb +1 -1
  144. data/spec/models/contact_spec.rb +1 -1
  145. data/spec/models/credit_card_spec.rb +1 -1
  146. data/spec/models/date_before_spec.rb +1 -1
  147. data/spec/models/delivery_issue_spec.rb +1 -1
  148. data/spec/models/delivery_receipt_rule_spec.rb +1 -1
  149. data/spec/models/email_address_spec.rb +1 -1
  150. data/spec/models/email_campaign_spec.rb +1 -1
  151. data/spec/models/email_from_spec.rb +1 -1
  152. data/spec/models/email_recipient_spec.rb +1 -1
  153. data/spec/models/email_sms_address_spec.rb +1 -1
  154. data/spec/models/email_spec.rb +1 -1
  155. data/spec/models/email_template_new_spec.rb +1 -1
  156. data/spec/models/email_template_update_spec.rb +1 -1
  157. data/spec/models/fax_message_collection_spec.rb +1 -1
  158. data/spec/models/fax_message_spec.rb +1 -1
  159. data/spec/models/fields_fields_spec.rb +1 -1
  160. data/spec/models/fields_spec.rb +1 -1
  161. data/spec/models/forgot_password_spec.rb +1 -1
  162. data/spec/models/forgot_username_spec.rb +1 -1
  163. data/spec/models/inbound_fax_rule_spec.rb +1 -1
  164. data/spec/models/inbound_sms_rule_spec.rb +7 -1
  165. data/spec/models/mms_campaign_spec.rb +1 -1
  166. data/spec/models/mms_message_collection_spec.rb +1 -1
  167. data/spec/models/mms_message_spec.rb +1 -1
  168. data/spec/models/post_letter_spec.rb +1 -1
  169. data/spec/models/post_postcard_spec.rb +1 -1
  170. data/spec/models/post_recipient_spec.rb +1 -1
  171. data/spec/models/reseller_account_spec.rb +1 -1
  172. data/spec/models/reseller_account_transfer_credit_spec.rb +1 -1
  173. data/spec/models/sms_campaign_spec.rb +7 -1
  174. data/spec/models/sms_message_collection_spec.rb +1 -1
  175. data/spec/models/sms_message_spec.rb +1 -1
  176. data/spec/models/sms_template_spec.rb +1 -1
  177. data/spec/models/stripped_string_spec.rb +1 -1
  178. data/spec/models/subaccount_spec.rb +1 -1
  179. data/spec/models/upload_file_spec.rb +1 -1
  180. data/spec/models/url_spec.rb +1 -1
  181. data/spec/models/voice_message_collection_spec.rb +1 -1
  182. data/spec/models/voice_message_spec.rb +1 -1
  183. data/spec/spec_helper.rb +1 -1
  184. metadata +40 -19
  185. 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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-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.22-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'json'
15
15
  require 'logger'
16
16
  require 'tempfile'
17
17
  require 'typhoeus'
18
- require 'uri'
18
+ require 'addressable/uri'
19
19
 
20
20
  module ClickSendClient
21
21
  class ApiClient
@@ -63,7 +63,7 @@ module ClickSendClient
63
63
  :message => response.return_message)
64
64
  else
65
65
  fail ApiError.new(:code => response.code,
66
- :response_headers => response.headers,
66
+ :response_headers => response.headers.to_h,
67
67
  :response_body => response.body),
68
68
  response.status_message
69
69
  end
@@ -112,6 +112,8 @@ module ClickSendClient
112
112
  :verbose => @config.debugging
113
113
  }
114
114
 
115
+ req_opts.merge!(multipart: true) if header_params['Content-Type'].start_with? "multipart/"
116
+
115
117
  # set custom cert, if provided
116
118
  req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
117
119
 
@@ -264,7 +266,7 @@ module ClickSendClient
264
266
  def build_request_url(path)
265
267
  # Add leading and trailing slashes to path
266
268
  path = "/#{path}".gsub(/\/+/, '/')
267
- URI.encode(@config.base_url + path)
269
+ Addressable::URI.encode(@config.base_url + path)
268
270
  end
269
271
 
270
272
  # Builds the HTTP request body
@@ -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.22-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,11 +6,11 @@
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.22-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
- require 'uri'
13
+ require 'addressable/uri'
14
14
 
15
15
  module ClickSendClient
16
16
  class Configuration
@@ -175,7 +175,7 @@ module ClickSendClient
175
175
 
176
176
  def base_url
177
177
  url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
178
- URI.encode(url)
178
+ Addressable::URI.encode(url)
179
179
  end
180
180
 
181
181
  # Gets API key (with prefix if set).
@@ -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.22-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -195,7 +195,7 @@ module ClickSendClient
195
195
  return nil unless attributes.is_a?(Hash)
196
196
  self.class.clicksend_types.each_pair do |key, type|
197
197
  if type =~ /\AArray<(.*)>/i
198
- # check to ensure the input is an array given that the the attribute
198
+ # check to ensure the input is an array given that the attribute
199
199
  # is documented as an array but the input is not
200
200
  if attributes[self.class.attribute_map[key]].is_a?(Array)
201
201
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -291,5 +291,6 @@ module ClickSendClient
291
291
  value
292
292
  end
293
293
  end
294
+
294
295
  end
295
296
  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.22-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -119,7 +119,7 @@ module ClickSendClient
119
119
  return nil unless attributes.is_a?(Hash)
120
120
  self.class.clicksend_types.each_pair do |key, type|
121
121
  if type =~ /\AArray<(.*)>/i
122
- # check to ensure the input is an array given that the the attribute
122
+ # check to ensure the input is an array given that the attribute
123
123
  # is documented as an array but the input is not
124
124
  if attributes[self.class.attribute_map[key]].is_a?(Array)
125
125
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -215,5 +215,6 @@ module ClickSendClient
215
215
  value
216
216
  end
217
217
  end
218
+
218
219
  end
219
220
  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.22-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -120,7 +120,7 @@ module ClickSendClient
120
120
  return nil unless attributes.is_a?(Hash)
121
121
  self.class.clicksend_types.each_pair do |key, type|
122
122
  if type =~ /\AArray<(.*)>/i
123
- # check to ensure the input is an array given that the the attribute
123
+ # check to ensure the input is an array given that the attribute
124
124
  # is documented as an array but the input is not
125
125
  if attributes[self.class.attribute_map[key]].is_a?(Array)
126
126
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -216,5 +216,6 @@ module ClickSendClient
216
216
  value
217
217
  end
218
218
  end
219
+
219
220
  end
220
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.22-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -170,7 +170,7 @@ module ClickSendClient
170
170
  return nil unless attributes.is_a?(Hash)
171
171
  self.class.clicksend_types.each_pair do |key, type|
172
172
  if type =~ /\AArray<(.*)>/i
173
- # check to ensure the input is an array given that the the attribute
173
+ # check to ensure the input is an array given that the attribute
174
174
  # is documented as an array but the input is not
175
175
  if attributes[self.class.attribute_map[key]].is_a?(Array)
176
176
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -266,5 +266,6 @@ module ClickSendClient
266
266
  value
267
267
  end
268
268
  end
269
+
269
270
  end
270
271
  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.22-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -150,7 +150,7 @@ module ClickSendClient
150
150
  return nil unless attributes.is_a?(Hash)
151
151
  self.class.clicksend_types.each_pair do |key, type|
152
152
  if type =~ /\AArray<(.*)>/i
153
- # check to ensure the input is an array given that the the attribute
153
+ # check to ensure the input is an array given that the attribute
154
154
  # is documented as an array but the input is not
155
155
  if attributes[self.class.attribute_map[key]].is_a?(Array)
156
156
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -246,5 +246,6 @@ module ClickSendClient
246
246
  value
247
247
  end
248
248
  end
249
+
249
250
  end
250
251
  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.22-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -245,7 +245,7 @@ module ClickSendClient
245
245
  return nil unless attributes.is_a?(Hash)
246
246
  self.class.clicksend_types.each_pair do |key, type|
247
247
  if type =~ /\AArray<(.*)>/i
248
- # check to ensure the input is an array given that the the attribute
248
+ # check to ensure the input is an array given that the attribute
249
249
  # is documented as an array but the input is not
250
250
  if attributes[self.class.attribute_map[key]].is_a?(Array)
251
251
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -341,5 +341,6 @@ module ClickSendClient
341
341
  value
342
342
  end
343
343
  end
344
+
344
345
  end
345
346
  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.22-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -90,7 +90,7 @@ module ClickSendClient
90
90
  return nil unless attributes.is_a?(Hash)
91
91
  self.class.clicksend_types.each_pair do |key, type|
92
92
  if type =~ /\AArray<(.*)>/i
93
- # check to ensure the input is an array given that the the attribute
93
+ # check to ensure the input is an array given that the attribute
94
94
  # is documented as an array but the input is not
95
95
  if attributes[self.class.attribute_map[key]].is_a?(Array)
96
96
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -186,5 +186,6 @@ module ClickSendClient
186
186
  value
187
187
  end
188
188
  end
189
+
189
190
  end
190
191
  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.22-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -107,7 +107,7 @@ module ClickSendClient
107
107
  return nil unless attributes.is_a?(Hash)
108
108
  self.class.clicksend_types.each_pair do |key, type|
109
109
  if type =~ /\AArray<(.*)>/i
110
- # check to ensure the input is an array given that the the attribute
110
+ # check to ensure the input is an array given that the attribute
111
111
  # is documented as an array but the input is not
112
112
  if attributes[self.class.attribute_map[key]].is_a?(Array)
113
113
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -203,5 +203,6 @@ module ClickSendClient
203
203
  value
204
204
  end
205
205
  end
206
+
206
207
  end
207
208
  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.22-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -165,7 +165,7 @@ module ClickSendClient
165
165
  return nil unless attributes.is_a?(Hash)
166
166
  self.class.clicksend_types.each_pair do |key, type|
167
167
  if type =~ /\AArray<(.*)>/i
168
- # check to ensure the input is an array given that the the attribute
168
+ # check to ensure the input is an array given that the attribute
169
169
  # is documented as an array but the input is not
170
170
  if attributes[self.class.attribute_map[key]].is_a?(Array)
171
171
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -261,5 +261,6 @@ module ClickSendClient
261
261
  value
262
262
  end
263
263
  end
264
+
264
265
  end
265
266
  end