messente_api 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +79 -0
  4. data/README.md +118 -0
  5. data/Rakefile +10 -0
  6. data/docs/BlacklistApi.md +209 -0
  7. data/docs/Channel.md +16 -0
  8. data/docs/ContactEnvelope.md +17 -0
  9. data/docs/ContactFields.md +35 -0
  10. data/docs/ContactListEnvelope.md +17 -0
  11. data/docs/ContactUpdateFields.md +33 -0
  12. data/docs/ContactsApi.md +430 -0
  13. data/docs/DeliveryReportApi.md +60 -0
  14. data/docs/DeliveryReportResponse.md +21 -0
  15. data/docs/DeliveryResult.md +27 -0
  16. data/docs/ErrorCodeOmnichannel.md +16 -0
  17. data/docs/ErrorCodeOmnichannelMachine.md +16 -0
  18. data/docs/ErrorCodePhonebook.md +16 -0
  19. data/docs/ErrorItemOmnichannel.md +23 -0
  20. data/docs/ErrorItemPhonebook.md +21 -0
  21. data/docs/ErrorOmnichannel.md +17 -0
  22. data/docs/ErrorPhonebook.md +17 -0
  23. data/docs/ErrorTitleOmnichannel.md +16 -0
  24. data/docs/ErrorTitlePhonebook.md +16 -0
  25. data/docs/FetchBlacklistSuccess.md +17 -0
  26. data/docs/GroupEnvelope.md +17 -0
  27. data/docs/GroupListEnvelope.md +17 -0
  28. data/docs/GroupName.md +17 -0
  29. data/docs/GroupResponseFields.md +23 -0
  30. data/docs/GroupsApi.md +265 -0
  31. data/docs/MessageResult.md +21 -0
  32. data/docs/NumberToBlacklist.md +17 -0
  33. data/docs/OmniMessageCreateSuccessResponse.md +21 -0
  34. data/docs/Omnimessage.md +25 -0
  35. data/docs/OmnimessageApi.md +111 -0
  36. data/docs/SMS.md +27 -0
  37. data/docs/Status.md +16 -0
  38. data/docs/TextStore.md +16 -0
  39. data/docs/Viber.md +29 -0
  40. data/docs/WhatsApp.md +29 -0
  41. data/docs/WhatsAppAudio.md +17 -0
  42. data/docs/WhatsAppDocument.md +19 -0
  43. data/docs/WhatsAppImage.md +19 -0
  44. data/docs/WhatsAppText.md +19 -0
  45. data/git_push.sh +55 -0
  46. data/lib/messente_api.rb +78 -0
  47. data/lib/messente_api/api/blacklist_api.rb +258 -0
  48. data/lib/messente_api/api/contacts_api.rb +521 -0
  49. data/lib/messente_api/api/delivery_report_api.rb +82 -0
  50. data/lib/messente_api/api/groups_api.rb +326 -0
  51. data/lib/messente_api/api/omnimessage_api.rb +144 -0
  52. data/lib/messente_api/api_client.rb +387 -0
  53. data/lib/messente_api/api_error.rb +57 -0
  54. data/lib/messente_api/configuration.rb +251 -0
  55. data/lib/messente_api/models/channel.rb +37 -0
  56. data/lib/messente_api/models/contact_envelope.rb +196 -0
  57. data/lib/messente_api/models/contact_fields.rb +283 -0
  58. data/lib/messente_api/models/contact_list_envelope.rb +198 -0
  59. data/lib/messente_api/models/contact_update_fields.rb +268 -0
  60. data/lib/messente_api/models/delivery_report_response.rb +234 -0
  61. data/lib/messente_api/models/delivery_result.rb +244 -0
  62. data/lib/messente_api/models/error_code_omnichannel.rb +41 -0
  63. data/lib/messente_api/models/error_code_omnichannel_machine.rb +46 -0
  64. data/lib/messente_api/models/error_code_phonebook.rb +40 -0
  65. data/lib/messente_api/models/error_item_omnichannel.rb +245 -0
  66. data/lib/messente_api/models/error_item_phonebook.rb +230 -0
  67. data/lib/messente_api/models/error_omnichannel.rb +203 -0
  68. data/lib/messente_api/models/error_phonebook.rb +203 -0
  69. data/lib/messente_api/models/error_title_omnichannel.rb +41 -0
  70. data/lib/messente_api/models/error_title_phonebook.rb +40 -0
  71. data/lib/messente_api/models/fetch_blacklist_success.rb +198 -0
  72. data/lib/messente_api/models/group_envelope.rb +196 -0
  73. data/lib/messente_api/models/group_list_envelope.rb +198 -0
  74. data/lib/messente_api/models/group_name.rb +220 -0
  75. data/lib/messente_api/models/group_response_fields.rb +240 -0
  76. data/lib/messente_api/models/message_result.rb +231 -0
  77. data/lib/messente_api/models/number_to_blacklist.rb +202 -0
  78. data/lib/messente_api/models/omni_message_create_success_response.rb +234 -0
  79. data/lib/messente_api/models/omnimessage.rb +247 -0
  80. data/lib/messente_api/models/sms.rb +300 -0
  81. data/lib/messente_api/models/status.rb +45 -0
  82. data/lib/messente_api/models/text_store.rb +37 -0
  83. data/lib/messente_api/models/viber.rb +293 -0
  84. data/lib/messente_api/models/whats_app.rb +289 -0
  85. data/lib/messente_api/models/whats_app_audio.rb +202 -0
  86. data/lib/messente_api/models/whats_app_document.rb +212 -0
  87. data/lib/messente_api/models/whats_app_image.rb +212 -0
  88. data/lib/messente_api/models/whats_app_text.rb +214 -0
  89. data/lib/messente_api/version.rb +15 -0
  90. data/messente_api.gemspec +45 -0
  91. data/spec/api/blacklist_api_spec.rb +78 -0
  92. data/spec/api/contacts_api_spec.rb +126 -0
  93. data/spec/api/delivery_report_api_spec.rb +46 -0
  94. data/spec/api/groups_api_spec.rb +90 -0
  95. data/spec/api/omnimessage_api_spec.rb +57 -0
  96. data/spec/api_client_spec.rb +226 -0
  97. data/spec/configuration_spec.rb +42 -0
  98. data/spec/models/channel_spec.rb +35 -0
  99. data/spec/models/contact_envelope_spec.rb +41 -0
  100. data/spec/models/contact_fields_spec.rb +95 -0
  101. data/spec/models/contact_list_envelope_spec.rb +41 -0
  102. data/spec/models/contact_update_fields_spec.rb +89 -0
  103. data/spec/models/delivery_report_response_spec.rb +53 -0
  104. data/spec/models/delivery_result_spec.rb +71 -0
  105. data/spec/models/error_code_omnichannel_machine_spec.rb +35 -0
  106. data/spec/models/error_code_omnichannel_spec.rb +35 -0
  107. data/spec/models/error_code_phonebook_spec.rb +35 -0
  108. data/spec/models/error_item_omnichannel_spec.rb +59 -0
  109. data/spec/models/error_item_phonebook_spec.rb +53 -0
  110. data/spec/models/error_omnichannel_spec.rb +41 -0
  111. data/spec/models/error_phonebook_spec.rb +41 -0
  112. data/spec/models/error_title_omnichannel_spec.rb +35 -0
  113. data/spec/models/error_title_phonebook_spec.rb +35 -0
  114. data/spec/models/fetch_blacklist_success_spec.rb +41 -0
  115. data/spec/models/group_envelope_spec.rb +41 -0
  116. data/spec/models/group_list_envelope_spec.rb +41 -0
  117. data/spec/models/group_name_spec.rb +41 -0
  118. data/spec/models/group_response_fields_spec.rb +59 -0
  119. data/spec/models/message_result_spec.rb +53 -0
  120. data/spec/models/number_to_blacklist_spec.rb +41 -0
  121. data/spec/models/omni_message_create_success_response_spec.rb +53 -0
  122. data/spec/models/omnimessage_spec.rb +65 -0
  123. data/spec/models/sms_spec.rb +79 -0
  124. data/spec/models/status_spec.rb +35 -0
  125. data/spec/models/text_store_spec.rb +35 -0
  126. data/spec/models/viber_spec.rb +81 -0
  127. data/spec/models/whats_app_audio_spec.rb +41 -0
  128. data/spec/models/whats_app_document_spec.rb +47 -0
  129. data/spec/models/whats_app_image_spec.rb +47 -0
  130. data/spec/models/whats_app_spec.rb +81 -0
  131. data/spec/models/whats_app_text_spec.rb +47 -0
  132. data/spec/spec_helper.rb +111 -0
  133. metadata +401 -0
@@ -0,0 +1,82 @@
1
+ =begin
2
+ #Messente API
3
+
4
+ #[Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: messente@messente.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module MessenteApi
16
+ class DeliveryReportApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Retrieves the delivery report for the Omnimessage.
23
+ # @param omnimessage_id [String] UUID of the Omnimessage to for which the delivery report is to be retrieved
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [DeliveryReportResponse]
26
+ def retrieve_delivery_report(omnimessage_id, opts = {})
27
+ data, _status_code, _headers = retrieve_delivery_report_with_http_info(omnimessage_id, opts)
28
+ data
29
+ end
30
+
31
+ # Retrieves the delivery report for the Omnimessage.
32
+ # @param omnimessage_id [String] UUID of the Omnimessage to for which the delivery report is to be retrieved
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(DeliveryReportResponse, Integer, Hash)>] DeliveryReportResponse data, response status code and response headers
35
+ def retrieve_delivery_report_with_http_info(omnimessage_id, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: DeliveryReportApi.retrieve_delivery_report ...'
38
+ end
39
+ # verify the required parameter 'omnimessage_id' is set
40
+ if @api_client.config.client_side_validation && omnimessage_id.nil?
41
+ fail ArgumentError, "Missing the required parameter 'omnimessage_id' when calling DeliveryReportApi.retrieve_delivery_report"
42
+ end
43
+ # resource path
44
+ local_var_path = '/omnimessage/{omnimessageId}/status'.sub('{' + 'omnimessageId' + '}', omnimessage_id.to_s)
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:body]
59
+
60
+ # return_type
61
+ return_type = opts[:return_type] || 'DeliveryReportResponse'
62
+
63
+ # auth_names
64
+ auth_names = opts[:auth_names] || ['basicAuth']
65
+
66
+ new_options = opts.merge(
67
+ :header_params => header_params,
68
+ :query_params => query_params,
69
+ :form_params => form_params,
70
+ :body => post_body,
71
+ :auth_names => auth_names,
72
+ :return_type => return_type
73
+ )
74
+
75
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
76
+ if @api_client.config.debugging
77
+ @api_client.config.logger.debug "API called: DeliveryReportApi#retrieve_delivery_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
+ end
79
+ return data, status_code, headers
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,326 @@
1
+ =begin
2
+ #Messente API
3
+
4
+ #[Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: messente@messente.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module MessenteApi
16
+ class GroupsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Creates a new group with the provided name.
23
+ # @param group_name [GroupName]
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [GroupEnvelope]
26
+ def create_group(group_name, opts = {})
27
+ data, _status_code, _headers = create_group_with_http_info(group_name, opts)
28
+ data
29
+ end
30
+
31
+ # Creates a new group with the provided name.
32
+ # @param group_name [GroupName]
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(GroupEnvelope, Integer, Hash)>] GroupEnvelope data, response status code and response headers
35
+ def create_group_with_http_info(group_name, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: GroupsApi.create_group ...'
38
+ end
39
+ # verify the required parameter 'group_name' is set
40
+ if @api_client.config.client_side_validation && group_name.nil?
41
+ fail ArgumentError, "Missing the required parameter 'group_name' when calling GroupsApi.create_group"
42
+ end
43
+ # resource path
44
+ local_var_path = '/groups'
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
53
+ # HTTP header 'Content-Type'
54
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
55
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:body] || @api_client.object_to_http_body(group_name)
61
+
62
+ # return_type
63
+ return_type = opts[:return_type] || 'GroupEnvelope'
64
+
65
+ # auth_names
66
+ auth_names = opts[:auth_names] || ['basicAuth']
67
+
68
+ new_options = opts.merge(
69
+ :header_params => header_params,
70
+ :query_params => query_params,
71
+ :form_params => form_params,
72
+ :body => post_body,
73
+ :auth_names => auth_names,
74
+ :return_type => return_type
75
+ )
76
+
77
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: GroupsApi#create_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+
84
+ # Deletes a group.
85
+ # @param group_id [String] String in uuid format.
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [nil]
88
+ def delete_group(group_id, opts = {})
89
+ delete_group_with_http_info(group_id, opts)
90
+ nil
91
+ end
92
+
93
+ # Deletes a group.
94
+ # @param group_id [String] String in uuid format.
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
97
+ def delete_group_with_http_info(group_id, opts = {})
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug 'Calling API: GroupsApi.delete_group ...'
100
+ end
101
+ # verify the required parameter 'group_id' is set
102
+ if @api_client.config.client_side_validation && group_id.nil?
103
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.delete_group"
104
+ end
105
+ # resource path
106
+ local_var_path = '/groups/{groupId}'.sub('{' + 'groupId' + '}', group_id.to_s)
107
+
108
+ # query parameters
109
+ query_params = opts[:query_params] || {}
110
+
111
+ # header parameters
112
+ header_params = opts[:header_params] || {}
113
+ # HTTP header 'Accept' (if needed)
114
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
115
+
116
+ # form parameters
117
+ form_params = opts[:form_params] || {}
118
+
119
+ # http body (model)
120
+ post_body = opts[:body]
121
+
122
+ # return_type
123
+ return_type = opts[:return_type]
124
+
125
+ # auth_names
126
+ auth_names = opts[:auth_names] || ['basicAuth']
127
+
128
+ new_options = opts.merge(
129
+ :header_params => header_params,
130
+ :query_params => query_params,
131
+ :form_params => form_params,
132
+ :body => post_body,
133
+ :auth_names => auth_names,
134
+ :return_type => return_type
135
+ )
136
+
137
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug "API called: GroupsApi#delete_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
140
+ end
141
+ return data, status_code, headers
142
+ end
143
+
144
+ # Lists a group.
145
+ # @param group_id [String] String in uuid format.
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [GroupEnvelope]
148
+ def fetch_group(group_id, opts = {})
149
+ data, _status_code, _headers = fetch_group_with_http_info(group_id, opts)
150
+ data
151
+ end
152
+
153
+ # Lists a group.
154
+ # @param group_id [String] String in uuid format.
155
+ # @param [Hash] opts the optional parameters
156
+ # @return [Array<(GroupEnvelope, Integer, Hash)>] GroupEnvelope data, response status code and response headers
157
+ def fetch_group_with_http_info(group_id, opts = {})
158
+ if @api_client.config.debugging
159
+ @api_client.config.logger.debug 'Calling API: GroupsApi.fetch_group ...'
160
+ end
161
+ # verify the required parameter 'group_id' is set
162
+ if @api_client.config.client_side_validation && group_id.nil?
163
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.fetch_group"
164
+ end
165
+ # resource path
166
+ local_var_path = '/groups/{groupId}'.sub('{' + 'groupId' + '}', group_id.to_s)
167
+
168
+ # query parameters
169
+ query_params = opts[:query_params] || {}
170
+
171
+ # header parameters
172
+ header_params = opts[:header_params] || {}
173
+ # HTTP header 'Accept' (if needed)
174
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
175
+
176
+ # form parameters
177
+ form_params = opts[:form_params] || {}
178
+
179
+ # http body (model)
180
+ post_body = opts[:body]
181
+
182
+ # return_type
183
+ return_type = opts[:return_type] || 'GroupEnvelope'
184
+
185
+ # auth_names
186
+ auth_names = opts[:auth_names] || ['basicAuth']
187
+
188
+ new_options = opts.merge(
189
+ :header_params => header_params,
190
+ :query_params => query_params,
191
+ :form_params => form_params,
192
+ :body => post_body,
193
+ :auth_names => auth_names,
194
+ :return_type => return_type
195
+ )
196
+
197
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
198
+ if @api_client.config.debugging
199
+ @api_client.config.logger.debug "API called: GroupsApi#fetch_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
200
+ end
201
+ return data, status_code, headers
202
+ end
203
+
204
+ # Returns all groups.
205
+ # @param [Hash] opts the optional parameters
206
+ # @return [GroupListEnvelope]
207
+ def fetch_groups(opts = {})
208
+ data, _status_code, _headers = fetch_groups_with_http_info(opts)
209
+ data
210
+ end
211
+
212
+ # Returns all groups.
213
+ # @param [Hash] opts the optional parameters
214
+ # @return [Array<(GroupListEnvelope, Integer, Hash)>] GroupListEnvelope data, response status code and response headers
215
+ def fetch_groups_with_http_info(opts = {})
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug 'Calling API: GroupsApi.fetch_groups ...'
218
+ end
219
+ # resource path
220
+ local_var_path = '/groups'
221
+
222
+ # query parameters
223
+ query_params = opts[:query_params] || {}
224
+
225
+ # header parameters
226
+ header_params = opts[:header_params] || {}
227
+ # HTTP header 'Accept' (if needed)
228
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
229
+
230
+ # form parameters
231
+ form_params = opts[:form_params] || {}
232
+
233
+ # http body (model)
234
+ post_body = opts[:body]
235
+
236
+ # return_type
237
+ return_type = opts[:return_type] || 'GroupListEnvelope'
238
+
239
+ # auth_names
240
+ auth_names = opts[:auth_names] || ['basicAuth']
241
+
242
+ new_options = opts.merge(
243
+ :header_params => header_params,
244
+ :query_params => query_params,
245
+ :form_params => form_params,
246
+ :body => post_body,
247
+ :auth_names => auth_names,
248
+ :return_type => return_type
249
+ )
250
+
251
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
252
+ if @api_client.config.debugging
253
+ @api_client.config.logger.debug "API called: GroupsApi#fetch_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
254
+ end
255
+ return data, status_code, headers
256
+ end
257
+
258
+ # Updates a group with the provided name.
259
+ # @param group_id [String] String in uuid format.
260
+ # @param group_name [GroupName]
261
+ # @param [Hash] opts the optional parameters
262
+ # @return [GroupEnvelope]
263
+ def update_group(group_id, group_name, opts = {})
264
+ data, _status_code, _headers = update_group_with_http_info(group_id, group_name, opts)
265
+ data
266
+ end
267
+
268
+ # Updates a group with the provided name.
269
+ # @param group_id [String] String in uuid format.
270
+ # @param group_name [GroupName]
271
+ # @param [Hash] opts the optional parameters
272
+ # @return [Array<(GroupEnvelope, Integer, Hash)>] GroupEnvelope data, response status code and response headers
273
+ def update_group_with_http_info(group_id, group_name, opts = {})
274
+ if @api_client.config.debugging
275
+ @api_client.config.logger.debug 'Calling API: GroupsApi.update_group ...'
276
+ end
277
+ # verify the required parameter 'group_id' is set
278
+ if @api_client.config.client_side_validation && group_id.nil?
279
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.update_group"
280
+ end
281
+ # verify the required parameter 'group_name' is set
282
+ if @api_client.config.client_side_validation && group_name.nil?
283
+ fail ArgumentError, "Missing the required parameter 'group_name' when calling GroupsApi.update_group"
284
+ end
285
+ # resource path
286
+ local_var_path = '/groups/{groupId}'.sub('{' + 'groupId' + '}', group_id.to_s)
287
+
288
+ # query parameters
289
+ query_params = opts[:query_params] || {}
290
+
291
+ # header parameters
292
+ header_params = opts[:header_params] || {}
293
+ # HTTP header 'Accept' (if needed)
294
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
295
+ # HTTP header 'Content-Type'
296
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
297
+
298
+ # form parameters
299
+ form_params = opts[:form_params] || {}
300
+
301
+ # http body (model)
302
+ post_body = opts[:body] || @api_client.object_to_http_body(group_name)
303
+
304
+ # return_type
305
+ return_type = opts[:return_type] || 'GroupEnvelope'
306
+
307
+ # auth_names
308
+ auth_names = opts[:auth_names] || ['basicAuth']
309
+
310
+ new_options = opts.merge(
311
+ :header_params => header_params,
312
+ :query_params => query_params,
313
+ :form_params => form_params,
314
+ :body => post_body,
315
+ :auth_names => auth_names,
316
+ :return_type => return_type
317
+ )
318
+
319
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
320
+ if @api_client.config.debugging
321
+ @api_client.config.logger.debug "API called: GroupsApi#update_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
322
+ end
323
+ return data, status_code, headers
324
+ end
325
+ end
326
+ end
@@ -0,0 +1,144 @@
1
+ =begin
2
+ #Messente API
3
+
4
+ #[Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: messente@messente.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module MessenteApi
16
+ class OmnimessageApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Cancels a scheduled Omnimessage.
23
+ # @param omnimessage_id [String] UUID of the scheduled Omnimessage to be cancelled
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [nil]
26
+ def cancel_scheduled_message(omnimessage_id, opts = {})
27
+ cancel_scheduled_message_with_http_info(omnimessage_id, opts)
28
+ nil
29
+ end
30
+
31
+ # Cancels a scheduled Omnimessage.
32
+ # @param omnimessage_id [String] UUID of the scheduled Omnimessage to be cancelled
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
35
+ def cancel_scheduled_message_with_http_info(omnimessage_id, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: OmnimessageApi.cancel_scheduled_message ...'
38
+ end
39
+ # verify the required parameter 'omnimessage_id' is set
40
+ if @api_client.config.client_side_validation && omnimessage_id.nil?
41
+ fail ArgumentError, "Missing the required parameter 'omnimessage_id' when calling OmnimessageApi.cancel_scheduled_message"
42
+ end
43
+ # resource path
44
+ local_var_path = '/omnimessage/{omnimessageId}'.sub('{' + 'omnimessageId' + '}', omnimessage_id.to_s)
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:body]
59
+
60
+ # return_type
61
+ return_type = opts[:return_type]
62
+
63
+ # auth_names
64
+ auth_names = opts[:auth_names] || ['basicAuth']
65
+
66
+ new_options = opts.merge(
67
+ :header_params => header_params,
68
+ :query_params => query_params,
69
+ :form_params => form_params,
70
+ :body => post_body,
71
+ :auth_names => auth_names,
72
+ :return_type => return_type
73
+ )
74
+
75
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
76
+ if @api_client.config.debugging
77
+ @api_client.config.logger.debug "API called: OmnimessageApi#cancel_scheduled_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
+ end
79
+ return data, status_code, headers
80
+ end
81
+
82
+ # Sends an Omnimessage.
83
+ # @param omnimessage [Omnimessage] Omnimessage to be sent
84
+ # @param [Hash] opts the optional parameters
85
+ # @return [OmniMessageCreateSuccessResponse]
86
+ def send_omnimessage(omnimessage, opts = {})
87
+ data, _status_code, _headers = send_omnimessage_with_http_info(omnimessage, opts)
88
+ data
89
+ end
90
+
91
+ # Sends an Omnimessage.
92
+ # @param omnimessage [Omnimessage] Omnimessage to be sent
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [Array<(OmniMessageCreateSuccessResponse, Integer, Hash)>] OmniMessageCreateSuccessResponse data, response status code and response headers
95
+ def send_omnimessage_with_http_info(omnimessage, opts = {})
96
+ if @api_client.config.debugging
97
+ @api_client.config.logger.debug 'Calling API: OmnimessageApi.send_omnimessage ...'
98
+ end
99
+ # verify the required parameter 'omnimessage' is set
100
+ if @api_client.config.client_side_validation && omnimessage.nil?
101
+ fail ArgumentError, "Missing the required parameter 'omnimessage' when calling OmnimessageApi.send_omnimessage"
102
+ end
103
+ # resource path
104
+ local_var_path = '/omnimessage'
105
+
106
+ # query parameters
107
+ query_params = opts[:query_params] || {}
108
+
109
+ # header parameters
110
+ header_params = opts[:header_params] || {}
111
+ # HTTP header 'Accept' (if needed)
112
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
113
+ # HTTP header 'Content-Type'
114
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
115
+
116
+ # form parameters
117
+ form_params = opts[:form_params] || {}
118
+
119
+ # http body (model)
120
+ post_body = opts[:body] || @api_client.object_to_http_body(omnimessage)
121
+
122
+ # return_type
123
+ return_type = opts[:return_type] || 'OmniMessageCreateSuccessResponse'
124
+
125
+ # auth_names
126
+ auth_names = opts[:auth_names] || ['basicAuth']
127
+
128
+ new_options = opts.merge(
129
+ :header_params => header_params,
130
+ :query_params => query_params,
131
+ :form_params => form_params,
132
+ :body => post_body,
133
+ :auth_names => auth_names,
134
+ :return_type => return_type
135
+ )
136
+
137
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug "API called: OmnimessageApi#send_omnimessage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
140
+ end
141
+ return data, status_code, headers
142
+ end
143
+ end
144
+ end