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,17 @@
1
+ # MessenteApi::ContactEnvelope
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **contact** | [**ContactFields**](ContactFields.md) | | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'MessenteApi'
13
+
14
+ instance = MessenteApi::ContactEnvelope.new(contact: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,35 @@
1
+ # MessenteApi::ContactFields
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **phone_number** | **String** | Phone number in e.164 format |
8
+ **email** | **String** | | [optional]
9
+ **first_name** | **String** | | [optional]
10
+ **last_name** | **String** | | [optional]
11
+ **company** | **String** | | [optional]
12
+ **title** | **String** | | [optional]
13
+ **custom** | **String** | | [optional]
14
+ **custom2** | **String** | | [optional]
15
+ **custom3** | **String** | | [optional]
16
+ **custom4** | **String** | | [optional]
17
+
18
+ ## Code Sample
19
+
20
+ ```ruby
21
+ require 'MessenteApi'
22
+
23
+ instance = MessenteApi::ContactFields.new(phone_number: null,
24
+ email: null,
25
+ first_name: null,
26
+ last_name: null,
27
+ company: null,
28
+ title: null,
29
+ custom: null,
30
+ custom2: null,
31
+ custom3: null,
32
+ custom4: null)
33
+ ```
34
+
35
+
@@ -0,0 +1,17 @@
1
+ # MessenteApi::ContactListEnvelope
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **contacts** | [**Array<ContactFields>**](ContactFields.md) | | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'MessenteApi'
13
+
14
+ instance = MessenteApi::ContactListEnvelope.new(contacts: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,33 @@
1
+ # MessenteApi::ContactUpdateFields
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **email** | **String** | | [optional]
8
+ **first_name** | **String** | | [optional]
9
+ **last_name** | **String** | | [optional]
10
+ **company** | **String** | | [optional]
11
+ **title** | **String** | | [optional]
12
+ **custom** | **String** | | [optional]
13
+ **custom2** | **String** | | [optional]
14
+ **custom3** | **String** | | [optional]
15
+ **custom4** | **String** | | [optional]
16
+
17
+ ## Code Sample
18
+
19
+ ```ruby
20
+ require 'MessenteApi'
21
+
22
+ instance = MessenteApi::ContactUpdateFields.new(email: null,
23
+ first_name: null,
24
+ last_name: null,
25
+ company: null,
26
+ title: null,
27
+ custom: null,
28
+ custom2: null,
29
+ custom3: null,
30
+ custom4: null)
31
+ ```
32
+
33
+
@@ -0,0 +1,430 @@
1
+ # MessenteApi::ContactsApi
2
+
3
+ All URIs are relative to *https://api.messente.com/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**add_contact_to_group**](ContactsApi.md#add_contact_to_group) | **POST** /groups/{groupId}/contacts/{phone} | Adds a contact to a group.
8
+ [**create_contact**](ContactsApi.md#create_contact) | **POST** /contacts | Creates a new contact.
9
+ [**delete_contact**](ContactsApi.md#delete_contact) | **DELETE** /contacts/{phone} | Deletes a contact.
10
+ [**fetch_contact**](ContactsApi.md#fetch_contact) | **GET** /contacts/{phone} | Lists a contact.
11
+ [**fetch_contact_groups**](ContactsApi.md#fetch_contact_groups) | **GET** /contacts/{phone}/groups | Lists groups of a contact.
12
+ [**fetch_contacts**](ContactsApi.md#fetch_contacts) | **GET** /contacts | Returns all contacts.
13
+ [**remove_contact_from_group**](ContactsApi.md#remove_contact_from_group) | **DELETE** /groups/{groupId}/contacts/{phone} | Removes a contact from a group.
14
+ [**update_contact**](ContactsApi.md#update_contact) | **PATCH** /contacts/{phone} | Updates a contact.
15
+
16
+
17
+
18
+ ## add_contact_to_group
19
+
20
+ > Object add_contact_to_group(group_id, phone)
21
+
22
+ Adds a contact to a group.
23
+
24
+ ### Example
25
+
26
+ ```ruby
27
+ # load the gem
28
+ require 'messente_api'
29
+ # setup authorization
30
+ MessenteApi.configure do |config|
31
+ # Configure HTTP basic authorization: basicAuth
32
+ config.username = 'YOUR USERNAME'
33
+ config.password = 'YOUR PASSWORD'
34
+ end
35
+
36
+ api_instance = MessenteApi::ContactsApi.new
37
+ group_id = 'group_id_example' # String | String in uuid format.
38
+ phone = 'phone_example' # String | A phone number
39
+
40
+ begin
41
+ #Adds a contact to a group.
42
+ result = api_instance.add_contact_to_group(group_id, phone)
43
+ p result
44
+ rescue MessenteApi::ApiError => e
45
+ puts "Exception when calling ContactsApi->add_contact_to_group: #{e}"
46
+ end
47
+ ```
48
+
49
+ ### Parameters
50
+
51
+
52
+ Name | Type | Description | Notes
53
+ ------------- | ------------- | ------------- | -------------
54
+ **group_id** | **String**| String in uuid format. |
55
+ **phone** | **String**| A phone number |
56
+
57
+ ### Return type
58
+
59
+ **Object**
60
+
61
+ ### Authorization
62
+
63
+ [basicAuth](../README.md#basicAuth)
64
+
65
+ ### HTTP request headers
66
+
67
+ - **Content-Type**: Not defined
68
+ - **Accept**: application/json
69
+
70
+
71
+ ## create_contact
72
+
73
+ > ContactEnvelope create_contact(contact_fields)
74
+
75
+ Creates a new contact.
76
+
77
+ ### Example
78
+
79
+ ```ruby
80
+ # load the gem
81
+ require 'messente_api'
82
+ # setup authorization
83
+ MessenteApi.configure do |config|
84
+ # Configure HTTP basic authorization: basicAuth
85
+ config.username = 'YOUR USERNAME'
86
+ config.password = 'YOUR PASSWORD'
87
+ end
88
+
89
+ api_instance = MessenteApi::ContactsApi.new
90
+ contact_fields = MessenteApi::ContactFields.new # ContactFields |
91
+
92
+ begin
93
+ #Creates a new contact.
94
+ result = api_instance.create_contact(contact_fields)
95
+ p result
96
+ rescue MessenteApi::ApiError => e
97
+ puts "Exception when calling ContactsApi->create_contact: #{e}"
98
+ end
99
+ ```
100
+
101
+ ### Parameters
102
+
103
+
104
+ Name | Type | Description | Notes
105
+ ------------- | ------------- | ------------- | -------------
106
+ **contact_fields** | [**ContactFields**](ContactFields.md)| |
107
+
108
+ ### Return type
109
+
110
+ [**ContactEnvelope**](ContactEnvelope.md)
111
+
112
+ ### Authorization
113
+
114
+ [basicAuth](../README.md#basicAuth)
115
+
116
+ ### HTTP request headers
117
+
118
+ - **Content-Type**: application/json
119
+ - **Accept**: application/json
120
+
121
+
122
+ ## delete_contact
123
+
124
+ > delete_contact(phone)
125
+
126
+ Deletes a contact.
127
+
128
+ ### Example
129
+
130
+ ```ruby
131
+ # load the gem
132
+ require 'messente_api'
133
+ # setup authorization
134
+ MessenteApi.configure do |config|
135
+ # Configure HTTP basic authorization: basicAuth
136
+ config.username = 'YOUR USERNAME'
137
+ config.password = 'YOUR PASSWORD'
138
+ end
139
+
140
+ api_instance = MessenteApi::ContactsApi.new
141
+ phone = 'phone_example' # String | A phone number
142
+
143
+ begin
144
+ #Deletes a contact.
145
+ api_instance.delete_contact(phone)
146
+ rescue MessenteApi::ApiError => e
147
+ puts "Exception when calling ContactsApi->delete_contact: #{e}"
148
+ end
149
+ ```
150
+
151
+ ### Parameters
152
+
153
+
154
+ Name | Type | Description | Notes
155
+ ------------- | ------------- | ------------- | -------------
156
+ **phone** | **String**| A phone number |
157
+
158
+ ### Return type
159
+
160
+ nil (empty response body)
161
+
162
+ ### Authorization
163
+
164
+ [basicAuth](../README.md#basicAuth)
165
+
166
+ ### HTTP request headers
167
+
168
+ - **Content-Type**: Not defined
169
+ - **Accept**: application/json
170
+
171
+
172
+ ## fetch_contact
173
+
174
+ > ContactEnvelope fetch_contact(phone)
175
+
176
+ Lists a contact.
177
+
178
+ ### Example
179
+
180
+ ```ruby
181
+ # load the gem
182
+ require 'messente_api'
183
+ # setup authorization
184
+ MessenteApi.configure do |config|
185
+ # Configure HTTP basic authorization: basicAuth
186
+ config.username = 'YOUR USERNAME'
187
+ config.password = 'YOUR PASSWORD'
188
+ end
189
+
190
+ api_instance = MessenteApi::ContactsApi.new
191
+ phone = 'phone_example' # String | A phone number
192
+
193
+ begin
194
+ #Lists a contact.
195
+ result = api_instance.fetch_contact(phone)
196
+ p result
197
+ rescue MessenteApi::ApiError => e
198
+ puts "Exception when calling ContactsApi->fetch_contact: #{e}"
199
+ end
200
+ ```
201
+
202
+ ### Parameters
203
+
204
+
205
+ Name | Type | Description | Notes
206
+ ------------- | ------------- | ------------- | -------------
207
+ **phone** | **String**| A phone number |
208
+
209
+ ### Return type
210
+
211
+ [**ContactEnvelope**](ContactEnvelope.md)
212
+
213
+ ### Authorization
214
+
215
+ [basicAuth](../README.md#basicAuth)
216
+
217
+ ### HTTP request headers
218
+
219
+ - **Content-Type**: Not defined
220
+ - **Accept**: application/json
221
+
222
+
223
+ ## fetch_contact_groups
224
+
225
+ > GroupListEnvelope fetch_contact_groups(phone)
226
+
227
+ Lists groups of a contact.
228
+
229
+ ### Example
230
+
231
+ ```ruby
232
+ # load the gem
233
+ require 'messente_api'
234
+ # setup authorization
235
+ MessenteApi.configure do |config|
236
+ # Configure HTTP basic authorization: basicAuth
237
+ config.username = 'YOUR USERNAME'
238
+ config.password = 'YOUR PASSWORD'
239
+ end
240
+
241
+ api_instance = MessenteApi::ContactsApi.new
242
+ phone = 'phone_example' # String | A phone number
243
+
244
+ begin
245
+ #Lists groups of a contact.
246
+ result = api_instance.fetch_contact_groups(phone)
247
+ p result
248
+ rescue MessenteApi::ApiError => e
249
+ puts "Exception when calling ContactsApi->fetch_contact_groups: #{e}"
250
+ end
251
+ ```
252
+
253
+ ### Parameters
254
+
255
+
256
+ Name | Type | Description | Notes
257
+ ------------- | ------------- | ------------- | -------------
258
+ **phone** | **String**| A phone number |
259
+
260
+ ### Return type
261
+
262
+ [**GroupListEnvelope**](GroupListEnvelope.md)
263
+
264
+ ### Authorization
265
+
266
+ [basicAuth](../README.md#basicAuth)
267
+
268
+ ### HTTP request headers
269
+
270
+ - **Content-Type**: Not defined
271
+ - **Accept**: application/json
272
+
273
+
274
+ ## fetch_contacts
275
+
276
+ > ContactListEnvelope fetch_contacts(opts)
277
+
278
+ Returns all contacts.
279
+
280
+ ### Example
281
+
282
+ ```ruby
283
+ # load the gem
284
+ require 'messente_api'
285
+ # setup authorization
286
+ MessenteApi.configure do |config|
287
+ # Configure HTTP basic authorization: basicAuth
288
+ config.username = 'YOUR USERNAME'
289
+ config.password = 'YOUR PASSWORD'
290
+ end
291
+
292
+ api_instance = MessenteApi::ContactsApi.new
293
+ opts = {
294
+ group_ids: ['group_ids_example'] # Array<String> | Optional one or many group id strings in uuid format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\"
295
+ }
296
+
297
+ begin
298
+ #Returns all contacts.
299
+ result = api_instance.fetch_contacts(opts)
300
+ p result
301
+ rescue MessenteApi::ApiError => e
302
+ puts "Exception when calling ContactsApi->fetch_contacts: #{e}"
303
+ end
304
+ ```
305
+
306
+ ### Parameters
307
+
308
+
309
+ Name | Type | Description | Notes
310
+ ------------- | ------------- | ------------- | -------------
311
+ **group_ids** | [**Array&lt;String&gt;**](String.md)| Optional one or many group id strings in uuid format. For example: \&quot;/contacts?groupIds&#x3D;group_id_one&amp;groupIds&#x3D;group_id_two\&quot; | [optional]
312
+
313
+ ### Return type
314
+
315
+ [**ContactListEnvelope**](ContactListEnvelope.md)
316
+
317
+ ### Authorization
318
+
319
+ [basicAuth](../README.md#basicAuth)
320
+
321
+ ### HTTP request headers
322
+
323
+ - **Content-Type**: Not defined
324
+ - **Accept**: application/json
325
+
326
+
327
+ ## remove_contact_from_group
328
+
329
+ > remove_contact_from_group(group_id, phone)
330
+
331
+ Removes a contact from a group.
332
+
333
+ ### Example
334
+
335
+ ```ruby
336
+ # load the gem
337
+ require 'messente_api'
338
+ # setup authorization
339
+ MessenteApi.configure do |config|
340
+ # Configure HTTP basic authorization: basicAuth
341
+ config.username = 'YOUR USERNAME'
342
+ config.password = 'YOUR PASSWORD'
343
+ end
344
+
345
+ api_instance = MessenteApi::ContactsApi.new
346
+ group_id = 'group_id_example' # String | String in uuid format.
347
+ phone = 'phone_example' # String | A phone number
348
+
349
+ begin
350
+ #Removes a contact from a group.
351
+ api_instance.remove_contact_from_group(group_id, phone)
352
+ rescue MessenteApi::ApiError => e
353
+ puts "Exception when calling ContactsApi->remove_contact_from_group: #{e}"
354
+ end
355
+ ```
356
+
357
+ ### Parameters
358
+
359
+
360
+ Name | Type | Description | Notes
361
+ ------------- | ------------- | ------------- | -------------
362
+ **group_id** | **String**| String in uuid format. |
363
+ **phone** | **String**| A phone number |
364
+
365
+ ### Return type
366
+
367
+ nil (empty response body)
368
+
369
+ ### Authorization
370
+
371
+ [basicAuth](../README.md#basicAuth)
372
+
373
+ ### HTTP request headers
374
+
375
+ - **Content-Type**: Not defined
376
+ - **Accept**: application/json
377
+
378
+
379
+ ## update_contact
380
+
381
+ > ContactEnvelope update_contact(phone, contact_update_fields)
382
+
383
+ Updates a contact.
384
+
385
+ ### Example
386
+
387
+ ```ruby
388
+ # load the gem
389
+ require 'messente_api'
390
+ # setup authorization
391
+ MessenteApi.configure do |config|
392
+ # Configure HTTP basic authorization: basicAuth
393
+ config.username = 'YOUR USERNAME'
394
+ config.password = 'YOUR PASSWORD'
395
+ end
396
+
397
+ api_instance = MessenteApi::ContactsApi.new
398
+ phone = 'phone_example' # String | A phone number
399
+ contact_update_fields = MessenteApi::ContactUpdateFields.new # ContactUpdateFields |
400
+
401
+ begin
402
+ #Updates a contact.
403
+ result = api_instance.update_contact(phone, contact_update_fields)
404
+ p result
405
+ rescue MessenteApi::ApiError => e
406
+ puts "Exception when calling ContactsApi->update_contact: #{e}"
407
+ end
408
+ ```
409
+
410
+ ### Parameters
411
+
412
+
413
+ Name | Type | Description | Notes
414
+ ------------- | ------------- | ------------- | -------------
415
+ **phone** | **String**| A phone number |
416
+ **contact_update_fields** | [**ContactUpdateFields**](ContactUpdateFields.md)| |
417
+
418
+ ### Return type
419
+
420
+ [**ContactEnvelope**](ContactEnvelope.md)
421
+
422
+ ### Authorization
423
+
424
+ [basicAuth](../README.md#basicAuth)
425
+
426
+ ### HTTP request headers
427
+
428
+ - **Content-Type**: application/json
429
+ - **Accept**: application/json
430
+