messente_api 1.4.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +33 -30
- data/docs/BlacklistApi.md +105 -37
- data/docs/BulkMessagingApi.md +76 -0
- data/docs/BulkOmniMessageCreateSuccessResponse.md +18 -0
- data/docs/BulkOmniMessageCreateSuccessResponseMessagesInner.md +49 -0
- data/docs/BulkOmnimessage.md +18 -0
- data/docs/Channel.md +4 -5
- data/docs/ContactEnvelope.md +8 -7
- data/docs/ContactFields.md +26 -25
- data/docs/ContactListEnvelope.md +8 -7
- data/docs/ContactResponseFields.md +28 -27
- data/docs/ContactUpdateFields.md +24 -23
- data/docs/ContactsApi.md +221 -86
- data/docs/DeliveryReportApi.md +29 -13
- data/docs/DeliveryReportResponse.md +12 -11
- data/docs/DeliveryResult.md +22 -17
- data/docs/ErrorCodeOmnichannel.md +4 -5
- data/docs/ErrorCodeOmnichannelMachine.md +4 -5
- data/docs/ErrorCodePhonebook.md +4 -5
- data/docs/ErrorCodeStatistics.md +4 -5
- data/docs/ErrorItemNumberLookup.md +8 -7
- data/docs/ErrorItemNumberLookupError.md +10 -9
- data/docs/ErrorItemOmnichannel.md +14 -13
- data/docs/ErrorItemPhonebook.md +12 -11
- data/docs/ErrorItemStatistics.md +12 -11
- data/docs/ErrorNumberLookup.md +8 -7
- data/docs/ErrorOmnichannel.md +8 -7
- data/docs/ErrorPhonebook.md +8 -7
- data/docs/ErrorStatistics.md +8 -7
- data/docs/ErrorTitleOmnichannel.md +4 -5
- data/docs/ErrorTitlePhonebook.md +4 -5
- data/docs/FetchBlacklistSuccess.md +8 -7
- data/docs/GroupEnvelope.md +8 -7
- data/docs/GroupListEnvelope.md +8 -7
- data/docs/GroupName.md +8 -7
- data/docs/GroupResponseFields.md +14 -13
- data/docs/GroupsApi.md +136 -51
- data/docs/MessageResult.md +12 -11
- data/docs/MobileNetwork.md +16 -15
- data/docs/NumberLookupApi.md +30 -14
- data/docs/NumberToBlacklist.md +8 -7
- data/docs/NumbersToInvestigate.md +8 -7
- data/docs/OmniMessageCreateSuccessResponse.md +12 -11
- data/docs/Omnimessage.md +18 -17
- data/docs/OmnimessageApi.md +56 -23
- data/docs/OmnimessageMessagesInner.md +53 -0
- data/docs/PriceInfo.md +22 -0
- data/docs/Priority.md +4 -5
- data/docs/SMS.md +20 -17
- data/docs/StatisticsApi.md +30 -14
- data/docs/StatisticsReport.md +12 -11
- data/docs/StatisticsReportSettings.md +12 -11
- data/docs/StatisticsReportSuccess.md +8 -7
- data/docs/Status.md +4 -5
- data/docs/SyncNumberLookupResult.md +24 -23
- data/docs/SyncNumberLookupSuccess.md +10 -9
- data/docs/Telegram.md +20 -19
- data/docs/TextStore.md +4 -5
- data/docs/Viber.md +22 -19
- data/docs/WhatsApp.md +16 -19
- data/docs/WhatsAppComponent.md +24 -0
- data/docs/WhatsAppCurrency.md +22 -0
- data/docs/WhatsAppDatetime.md +18 -0
- data/docs/WhatsAppLanguage.md +20 -0
- data/docs/WhatsAppMedia.md +24 -0
- data/docs/WhatsAppParameter.md +30 -0
- data/docs/WhatsAppTemplate.md +22 -0
- data/git_push.sh +3 -4
- data/lib/messente_api/api/blacklist_api.rb +22 -15
- data/lib/messente_api/api/bulk_messaging_api.rb +88 -0
- data/lib/messente_api/api/contacts_api.rb +42 -28
- data/lib/messente_api/api/delivery_report_api.rb +6 -5
- data/lib/messente_api/api/groups_api.rb +30 -19
- data/lib/messente_api/api/number_lookup_api.rb +10 -6
- data/lib/messente_api/api/omnimessage_api.rb +14 -9
- data/lib/messente_api/api/statistics_api.rb +10 -6
- data/lib/messente_api/api_client.rb +72 -66
- data/lib/messente_api/api_error.rb +3 -2
- data/lib/messente_api/configuration.rb +64 -14
- data/lib/messente_api/models/{whats_app_audio.rb → bulk_omni_message_create_success_response.rb} +50 -38
- data/lib/messente_api/models/bulk_omni_message_create_success_response_messages_inner.rb +105 -0
- data/lib/messente_api/models/{whats_app_text.rb → bulk_omnimessage.rb} +49 -49
- data/lib/messente_api/models/channel.rb +9 -5
- data/lib/messente_api/models/contact_envelope.rb +31 -23
- data/lib/messente_api/models/contact_fields.rb +33 -23
- data/lib/messente_api/models/contact_list_envelope.rb +41 -23
- data/lib/messente_api/models/contact_response_fields.rb +31 -23
- data/lib/messente_api/models/contact_update_fields.rb +31 -23
- data/lib/messente_api/models/delivery_report_response.rb +37 -23
- data/lib/messente_api/models/delivery_result.rb +77 -27
- data/lib/messente_api/models/error_code_omnichannel.rb +9 -5
- data/lib/messente_api/models/error_code_omnichannel_machine.rb +9 -5
- data/lib/messente_api/models/error_code_phonebook.rb +9 -5
- data/lib/messente_api/models/error_code_statistics.rb +9 -5
- data/lib/messente_api/models/error_item_number_lookup.rb +33 -23
- data/lib/messente_api/models/error_item_number_lookup_error.rb +35 -23
- data/lib/messente_api/models/error_item_omnichannel.rb +61 -23
- data/lib/messente_api/models/error_item_phonebook.rb +59 -23
- data/lib/messente_api/models/error_item_statistics.rb +59 -23
- data/lib/messente_api/models/error_number_lookup.rb +33 -23
- data/lib/messente_api/models/error_omnichannel.rb +33 -23
- data/lib/messente_api/models/error_phonebook.rb +33 -23
- data/lib/messente_api/models/error_statistics.rb +33 -23
- data/lib/messente_api/models/error_title_omnichannel.rb +9 -5
- data/lib/messente_api/models/error_title_phonebook.rb +9 -5
- data/lib/messente_api/models/fetch_blacklist_success.rb +41 -23
- data/lib/messente_api/models/group_envelope.rb +31 -23
- data/lib/messente_api/models/group_list_envelope.rb +41 -23
- data/lib/messente_api/models/group_name.rb +33 -23
- data/lib/messente_api/models/group_response_fields.rb +37 -23
- data/lib/messente_api/models/message_result.rb +59 -23
- data/lib/messente_api/models/mobile_network.rb +31 -23
- data/lib/messente_api/models/number_to_blacklist.rb +33 -23
- data/lib/messente_api/models/numbers_to_investigate.rb +62 -24
- data/lib/messente_api/models/omni_message_create_success_response.rb +37 -23
- data/lib/messente_api/models/omnimessage.rb +59 -25
- data/lib/messente_api/models/omnimessage_messages_inner.rb +107 -0
- data/lib/messente_api/models/price_info.rb +257 -0
- data/lib/messente_api/models/priority.rb +9 -5
- data/lib/messente_api/models/sms.rb +45 -25
- data/lib/messente_api/models/statistics_report.rb +37 -23
- data/lib/messente_api/models/statistics_report_settings.rb +35 -23
- data/lib/messente_api/models/statistics_report_success.rb +33 -23
- data/lib/messente_api/models/status.rb +9 -5
- data/lib/messente_api/models/sync_number_lookup_result.rb +35 -24
- data/lib/messente_api/models/sync_number_lookup_success.rb +35 -23
- data/lib/messente_api/models/telegram.rb +31 -23
- data/lib/messente_api/models/text_store.rb +9 -5
- data/lib/messente_api/models/viber.rb +43 -25
- data/lib/messente_api/models/whats_app.rb +45 -54
- data/lib/messente_api/models/whats_app_component.rb +255 -0
- data/lib/messente_api/models/whats_app_currency.rb +257 -0
- data/lib/messente_api/models/{whats_app_document.rb → whats_app_datetime.rb} +48 -48
- data/lib/messente_api/models/{whats_app_image.rb → whats_app_language.rb} +55 -45
- data/lib/messente_api/models/whats_app_media.rb +246 -0
- data/lib/messente_api/models/whats_app_parameter.rb +278 -0
- data/lib/messente_api/models/whats_app_template.rb +251 -0
- data/lib/messente_api/version.rb +3 -3
- data/lib/messente_api.rb +15 -6
- data/messente_api.gemspec +5 -5
- data/spec/spec_helper.rb +2 -2
- metadata +33 -39
- data/docs/WhatsAppAudio.md +0 -17
- data/docs/WhatsAppDocument.md +0 -19
- data/docs/WhatsAppImage.md +0 -19
- data/docs/WhatsAppText.md +0 -19
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
@@ -2,36 +2,37 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**phone_number** | **String** | Phone number in e.164 format | [optional]
|
8
|
-
**email** | **String** | The email of the contact | [optional]
|
9
|
-
**first_name** | **String** | The first name of the contact | [optional]
|
10
|
-
**last_name** | **String** | The last name of the contact | [optional]
|
11
|
-
**company** | **String** | The company of the contact | [optional]
|
12
|
-
**title** | **String** | The title of the contact | [optional]
|
13
|
-
**custom** | **String** | The first custom field | [optional]
|
14
|
-
**custom2** | **String** | The second custom field | [optional]
|
15
|
-
**custom3** | **String** | The third custom field | [optional]
|
16
|
-
**custom4** | **String** | The fourth custom field | [optional]
|
17
|
-
**scheduled_deletion_date** | **Date** | The date in ISO 8601 format, YYYY-MM-DD, on which the contact is going to be deleted because it has not belonged to a group for 30 days | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **phone_number** | **String** | Phone number in e.164 format | [optional] |
|
8
|
+
| **email** | **String** | The email of the contact | [optional] |
|
9
|
+
| **first_name** | **String** | The first name of the contact | [optional] |
|
10
|
+
| **last_name** | **String** | The last name of the contact | [optional] |
|
11
|
+
| **company** | **String** | The company of the contact | [optional] |
|
12
|
+
| **title** | **String** | The title of the contact | [optional] |
|
13
|
+
| **custom** | **String** | The first custom field | [optional] |
|
14
|
+
| **custom2** | **String** | The second custom field | [optional] |
|
15
|
+
| **custom3** | **String** | The third custom field | [optional] |
|
16
|
+
| **custom4** | **String** | The fourth custom field | [optional] |
|
17
|
+
| **scheduled_deletion_date** | **Date** | The date in ISO 8601 format, YYYY-MM-DD, on which the contact is going to be deleted because it has not belonged to a group for 30 days | [optional] |
|
18
18
|
|
19
|
-
##
|
19
|
+
## Example
|
20
20
|
|
21
21
|
```ruby
|
22
|
-
require '
|
22
|
+
require 'messente_api'
|
23
23
|
|
24
|
-
instance = MessenteApi::ContactResponseFields.new(
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
24
|
+
instance = MessenteApi::ContactResponseFields.new(
|
25
|
+
phone_number: null,
|
26
|
+
email: null,
|
27
|
+
first_name: null,
|
28
|
+
last_name: null,
|
29
|
+
company: null,
|
30
|
+
title: null,
|
31
|
+
custom: null,
|
32
|
+
custom2: null,
|
33
|
+
custom3: null,
|
34
|
+
custom4: null,
|
35
|
+
scheduled_deletion_date: null
|
36
|
+
)
|
35
37
|
```
|
36
38
|
|
37
|
-
|
data/docs/ContactUpdateFields.md
CHANGED
@@ -2,32 +2,33 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**email** | **String** | The email of the contact | [optional]
|
8
|
-
**first_name** | **String** | The first name of the contact | [optional]
|
9
|
-
**last_name** | **String** | The last name of the contact | [optional]
|
10
|
-
**company** | **String** | The company of the contact | [optional]
|
11
|
-
**title** | **String** | The title of the contact | [optional]
|
12
|
-
**custom** | **String** | The first custom field | [optional]
|
13
|
-
**custom2** | **String** | The second custom field | [optional]
|
14
|
-
**custom3** | **String** | The third custom field | [optional]
|
15
|
-
**custom4** | **String** | The fourth custom field | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **email** | **String** | The email of the contact | [optional] |
|
8
|
+
| **first_name** | **String** | The first name of the contact | [optional] |
|
9
|
+
| **last_name** | **String** | The last name of the contact | [optional] |
|
10
|
+
| **company** | **String** | The company of the contact | [optional] |
|
11
|
+
| **title** | **String** | The title of the contact | [optional] |
|
12
|
+
| **custom** | **String** | The first custom field | [optional] |
|
13
|
+
| **custom2** | **String** | The second custom field | [optional] |
|
14
|
+
| **custom3** | **String** | The third custom field | [optional] |
|
15
|
+
| **custom4** | **String** | The fourth custom field | [optional] |
|
16
16
|
|
17
|
-
##
|
17
|
+
## Example
|
18
18
|
|
19
19
|
```ruby
|
20
|
-
require '
|
20
|
+
require 'messente_api'
|
21
21
|
|
22
|
-
instance = MessenteApi::ContactUpdateFields.new(
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
22
|
+
instance = MessenteApi::ContactUpdateFields.new(
|
23
|
+
email: null,
|
24
|
+
first_name: null,
|
25
|
+
last_name: null,
|
26
|
+
company: null,
|
27
|
+
title: null,
|
28
|
+
custom: null,
|
29
|
+
custom2: null,
|
30
|
+
custom3: null,
|
31
|
+
custom4: null
|
32
|
+
)
|
31
33
|
```
|
32
34
|
|
33
|
-
|
data/docs/ContactsApi.md
CHANGED
@@ -2,17 +2,16 @@
|
|
2
2
|
|
3
3
|
All URIs are relative to *https://api.messente.com/v1*
|
4
4
|
|
5
|
-
Method | HTTP request | Description
|
6
|
-
|
7
|
-
[**add_contact_to_group**](ContactsApi.md#add_contact_to_group) | **POST** /phonebook/groups/{groupId}/contacts/{phone} | Adds a contact to a group
|
8
|
-
[**create_contact**](ContactsApi.md#create_contact) | **POST** /phonebook/contacts | Creates a new contact
|
9
|
-
[**delete_contact**](ContactsApi.md#delete_contact) | **DELETE** /phonebook/contacts/{phone} | Deletes a contact
|
10
|
-
[**fetch_contact**](ContactsApi.md#fetch_contact) | **GET** /phonebook/contacts/{phone} | Lists a contact
|
11
|
-
[**fetch_contact_groups**](ContactsApi.md#fetch_contact_groups) | **GET** /phonebook/contacts/{phone}/groups | Lists groups of a contact
|
12
|
-
[**fetch_contacts**](ContactsApi.md#fetch_contacts) | **GET** /phonebook/contacts | Returns all contacts
|
13
|
-
[**remove_contact_from_group**](ContactsApi.md#remove_contact_from_group) | **DELETE** /phonebook/groups/{groupId}/contacts/{phone} | Removes a contact from a group
|
14
|
-
[**update_contact**](ContactsApi.md#update_contact) | **PATCH** /phonebook/contacts/{phone} | Updates a contact
|
15
|
-
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**add_contact_to_group**](ContactsApi.md#add_contact_to_group) | **POST** /phonebook/groups/{groupId}/contacts/{phone} | Adds a contact to a group |
|
8
|
+
| [**create_contact**](ContactsApi.md#create_contact) | **POST** /phonebook/contacts | Creates a new contact |
|
9
|
+
| [**delete_contact**](ContactsApi.md#delete_contact) | **DELETE** /phonebook/contacts/{phone} | Deletes a contact |
|
10
|
+
| [**fetch_contact**](ContactsApi.md#fetch_contact) | **GET** /phonebook/contacts/{phone} | Lists a contact |
|
11
|
+
| [**fetch_contact_groups**](ContactsApi.md#fetch_contact_groups) | **GET** /phonebook/contacts/{phone}/groups | Lists groups of a contact |
|
12
|
+
| [**fetch_contacts**](ContactsApi.md#fetch_contacts) | **GET** /phonebook/contacts | Returns all contacts |
|
13
|
+
| [**remove_contact_from_group**](ContactsApi.md#remove_contact_from_group) | **DELETE** /phonebook/groups/{groupId}/contacts/{phone} | Removes a contact from a group |
|
14
|
+
| [**update_contact**](ContactsApi.md#update_contact) | **PATCH** /phonebook/contacts/{phone} | Updates a contact |
|
16
15
|
|
17
16
|
|
18
17
|
## add_contact_to_group
|
@@ -21,10 +20,10 @@ Method | HTTP request | Description
|
|
21
20
|
|
22
21
|
Adds a contact to a group
|
23
22
|
|
24
|
-
###
|
23
|
+
### Examples
|
25
24
|
|
26
25
|
```ruby
|
27
|
-
|
26
|
+
require 'time'
|
28
27
|
require 'messente_api'
|
29
28
|
# setup authorization
|
30
29
|
MessenteApi.configure do |config|
|
@@ -38,21 +37,38 @@ group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # String | String in UUID form
|
|
38
37
|
phone = '+37251000000' # String | A phone number
|
39
38
|
|
40
39
|
begin
|
41
|
-
#Adds a contact to a group
|
40
|
+
# Adds a contact to a group
|
42
41
|
result = api_instance.add_contact_to_group(group_id, phone)
|
43
42
|
p result
|
44
43
|
rescue MessenteApi::ApiError => e
|
45
|
-
puts "
|
44
|
+
puts "Error when calling ContactsApi->add_contact_to_group: #{e}"
|
46
45
|
end
|
47
46
|
```
|
48
47
|
|
49
|
-
|
48
|
+
#### Using the add_contact_to_group_with_http_info variant
|
49
|
+
|
50
|
+
This returns an Array which contains the response data, status code and headers.
|
50
51
|
|
52
|
+
> <Array(Object, Integer, Hash)> add_contact_to_group_with_http_info(group_id, phone)
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
begin
|
56
|
+
# Adds a contact to a group
|
57
|
+
data, status_code, headers = api_instance.add_contact_to_group_with_http_info(group_id, phone)
|
58
|
+
p status_code # => 2xx
|
59
|
+
p headers # => { ... }
|
60
|
+
p data # => Object
|
61
|
+
rescue MessenteApi::ApiError => e
|
62
|
+
puts "Error when calling ContactsApi->add_contact_to_group_with_http_info: #{e}"
|
63
|
+
end
|
64
|
+
```
|
65
|
+
|
66
|
+
### Parameters
|
51
67
|
|
52
|
-
Name | Type | Description
|
53
|
-
|
54
|
-
**group_id** | **String
|
55
|
-
**phone** | **String
|
68
|
+
| Name | Type | Description | Notes |
|
69
|
+
| ---- | ---- | ----------- | ----- |
|
70
|
+
| **group_id** | **String** | String in UUID format | |
|
71
|
+
| **phone** | **String** | A phone number | |
|
56
72
|
|
57
73
|
### Return type
|
58
74
|
|
@@ -70,14 +86,14 @@ Name | Type | Description | Notes
|
|
70
86
|
|
71
87
|
## create_contact
|
72
88
|
|
73
|
-
> ContactEnvelope create_contact(contact_fields)
|
89
|
+
> <ContactEnvelope> create_contact(contact_fields)
|
74
90
|
|
75
91
|
Creates a new contact
|
76
92
|
|
77
|
-
###
|
93
|
+
### Examples
|
78
94
|
|
79
95
|
```ruby
|
80
|
-
|
96
|
+
require 'time'
|
81
97
|
require 'messente_api'
|
82
98
|
# setup authorization
|
83
99
|
MessenteApi.configure do |config|
|
@@ -87,23 +103,40 @@ MessenteApi.configure do |config|
|
|
87
103
|
end
|
88
104
|
|
89
105
|
api_instance = MessenteApi::ContactsApi.new
|
90
|
-
contact_fields = {
|
106
|
+
contact_fields = MessenteApi::ContactFields.new({phone_number: 'phone_number_example'}) # ContactFields |
|
91
107
|
|
92
108
|
begin
|
93
|
-
#Creates a new contact
|
109
|
+
# Creates a new contact
|
94
110
|
result = api_instance.create_contact(contact_fields)
|
95
111
|
p result
|
96
112
|
rescue MessenteApi::ApiError => e
|
97
|
-
puts "
|
113
|
+
puts "Error when calling ContactsApi->create_contact: #{e}"
|
98
114
|
end
|
99
115
|
```
|
100
116
|
|
101
|
-
|
117
|
+
#### Using the create_contact_with_http_info variant
|
118
|
+
|
119
|
+
This returns an Array which contains the response data, status code and headers.
|
120
|
+
|
121
|
+
> <Array(<ContactEnvelope>, Integer, Hash)> create_contact_with_http_info(contact_fields)
|
122
|
+
|
123
|
+
```ruby
|
124
|
+
begin
|
125
|
+
# Creates a new contact
|
126
|
+
data, status_code, headers = api_instance.create_contact_with_http_info(contact_fields)
|
127
|
+
p status_code # => 2xx
|
128
|
+
p headers # => { ... }
|
129
|
+
p data # => <ContactEnvelope>
|
130
|
+
rescue MessenteApi::ApiError => e
|
131
|
+
puts "Error when calling ContactsApi->create_contact_with_http_info: #{e}"
|
132
|
+
end
|
133
|
+
```
|
102
134
|
|
135
|
+
### Parameters
|
103
136
|
|
104
|
-
Name | Type | Description
|
105
|
-
|
106
|
-
**contact_fields** | [**ContactFields**](ContactFields.md)| |
|
137
|
+
| Name | Type | Description | Notes |
|
138
|
+
| ---- | ---- | ----------- | ----- |
|
139
|
+
| **contact_fields** | [**ContactFields**](ContactFields.md) | | |
|
107
140
|
|
108
141
|
### Return type
|
109
142
|
|
@@ -125,10 +158,10 @@ Name | Type | Description | Notes
|
|
125
158
|
|
126
159
|
Deletes a contact
|
127
160
|
|
128
|
-
###
|
161
|
+
### Examples
|
129
162
|
|
130
163
|
```ruby
|
131
|
-
|
164
|
+
require 'time'
|
132
165
|
require 'messente_api'
|
133
166
|
# setup authorization
|
134
167
|
MessenteApi.configure do |config|
|
@@ -141,19 +174,36 @@ api_instance = MessenteApi::ContactsApi.new
|
|
141
174
|
phone = '+37251000000' # String | A phone number
|
142
175
|
|
143
176
|
begin
|
144
|
-
#Deletes a contact
|
177
|
+
# Deletes a contact
|
145
178
|
api_instance.delete_contact(phone)
|
146
179
|
rescue MessenteApi::ApiError => e
|
147
|
-
puts "
|
180
|
+
puts "Error when calling ContactsApi->delete_contact: #{e}"
|
148
181
|
end
|
149
182
|
```
|
150
183
|
|
151
|
-
|
184
|
+
#### Using the delete_contact_with_http_info variant
|
185
|
+
|
186
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
187
|
+
|
188
|
+
> <Array(nil, Integer, Hash)> delete_contact_with_http_info(phone)
|
189
|
+
|
190
|
+
```ruby
|
191
|
+
begin
|
192
|
+
# Deletes a contact
|
193
|
+
data, status_code, headers = api_instance.delete_contact_with_http_info(phone)
|
194
|
+
p status_code # => 2xx
|
195
|
+
p headers # => { ... }
|
196
|
+
p data # => nil
|
197
|
+
rescue MessenteApi::ApiError => e
|
198
|
+
puts "Error when calling ContactsApi->delete_contact_with_http_info: #{e}"
|
199
|
+
end
|
200
|
+
```
|
152
201
|
|
202
|
+
### Parameters
|
153
203
|
|
154
|
-
Name | Type | Description
|
155
|
-
|
156
|
-
**phone** | **String
|
204
|
+
| Name | Type | Description | Notes |
|
205
|
+
| ---- | ---- | ----------- | ----- |
|
206
|
+
| **phone** | **String** | A phone number | |
|
157
207
|
|
158
208
|
### Return type
|
159
209
|
|
@@ -171,14 +221,14 @@ nil (empty response body)
|
|
171
221
|
|
172
222
|
## fetch_contact
|
173
223
|
|
174
|
-
> ContactEnvelope fetch_contact(phone)
|
224
|
+
> <ContactEnvelope> fetch_contact(phone)
|
175
225
|
|
176
226
|
Lists a contact
|
177
227
|
|
178
|
-
###
|
228
|
+
### Examples
|
179
229
|
|
180
230
|
```ruby
|
181
|
-
|
231
|
+
require 'time'
|
182
232
|
require 'messente_api'
|
183
233
|
# setup authorization
|
184
234
|
MessenteApi.configure do |config|
|
@@ -191,20 +241,37 @@ api_instance = MessenteApi::ContactsApi.new
|
|
191
241
|
phone = '+37251000000' # String | A phone number
|
192
242
|
|
193
243
|
begin
|
194
|
-
#Lists a contact
|
244
|
+
# Lists a contact
|
195
245
|
result = api_instance.fetch_contact(phone)
|
196
246
|
p result
|
197
247
|
rescue MessenteApi::ApiError => e
|
198
|
-
puts "
|
248
|
+
puts "Error when calling ContactsApi->fetch_contact: #{e}"
|
199
249
|
end
|
200
250
|
```
|
201
251
|
|
202
|
-
|
252
|
+
#### Using the fetch_contact_with_http_info variant
|
253
|
+
|
254
|
+
This returns an Array which contains the response data, status code and headers.
|
255
|
+
|
256
|
+
> <Array(<ContactEnvelope>, Integer, Hash)> fetch_contact_with_http_info(phone)
|
257
|
+
|
258
|
+
```ruby
|
259
|
+
begin
|
260
|
+
# Lists a contact
|
261
|
+
data, status_code, headers = api_instance.fetch_contact_with_http_info(phone)
|
262
|
+
p status_code # => 2xx
|
263
|
+
p headers # => { ... }
|
264
|
+
p data # => <ContactEnvelope>
|
265
|
+
rescue MessenteApi::ApiError => e
|
266
|
+
puts "Error when calling ContactsApi->fetch_contact_with_http_info: #{e}"
|
267
|
+
end
|
268
|
+
```
|
203
269
|
|
270
|
+
### Parameters
|
204
271
|
|
205
|
-
Name | Type | Description
|
206
|
-
|
207
|
-
**phone** | **String
|
272
|
+
| Name | Type | Description | Notes |
|
273
|
+
| ---- | ---- | ----------- | ----- |
|
274
|
+
| **phone** | **String** | A phone number | |
|
208
275
|
|
209
276
|
### Return type
|
210
277
|
|
@@ -222,14 +289,14 @@ Name | Type | Description | Notes
|
|
222
289
|
|
223
290
|
## fetch_contact_groups
|
224
291
|
|
225
|
-
> GroupListEnvelope fetch_contact_groups(phone)
|
292
|
+
> <GroupListEnvelope> fetch_contact_groups(phone)
|
226
293
|
|
227
294
|
Lists groups of a contact
|
228
295
|
|
229
|
-
###
|
296
|
+
### Examples
|
230
297
|
|
231
298
|
```ruby
|
232
|
-
|
299
|
+
require 'time'
|
233
300
|
require 'messente_api'
|
234
301
|
# setup authorization
|
235
302
|
MessenteApi.configure do |config|
|
@@ -242,20 +309,37 @@ api_instance = MessenteApi::ContactsApi.new
|
|
242
309
|
phone = '+37251000000' # String | A phone number
|
243
310
|
|
244
311
|
begin
|
245
|
-
#Lists groups of a contact
|
312
|
+
# Lists groups of a contact
|
246
313
|
result = api_instance.fetch_contact_groups(phone)
|
247
314
|
p result
|
248
315
|
rescue MessenteApi::ApiError => e
|
249
|
-
puts "
|
316
|
+
puts "Error when calling ContactsApi->fetch_contact_groups: #{e}"
|
250
317
|
end
|
251
318
|
```
|
252
319
|
|
253
|
-
|
320
|
+
#### Using the fetch_contact_groups_with_http_info variant
|
321
|
+
|
322
|
+
This returns an Array which contains the response data, status code and headers.
|
323
|
+
|
324
|
+
> <Array(<GroupListEnvelope>, Integer, Hash)> fetch_contact_groups_with_http_info(phone)
|
325
|
+
|
326
|
+
```ruby
|
327
|
+
begin
|
328
|
+
# Lists groups of a contact
|
329
|
+
data, status_code, headers = api_instance.fetch_contact_groups_with_http_info(phone)
|
330
|
+
p status_code # => 2xx
|
331
|
+
p headers # => { ... }
|
332
|
+
p data # => <GroupListEnvelope>
|
333
|
+
rescue MessenteApi::ApiError => e
|
334
|
+
puts "Error when calling ContactsApi->fetch_contact_groups_with_http_info: #{e}"
|
335
|
+
end
|
336
|
+
```
|
254
337
|
|
338
|
+
### Parameters
|
255
339
|
|
256
|
-
Name | Type | Description
|
257
|
-
|
258
|
-
**phone** | **String
|
340
|
+
| Name | Type | Description | Notes |
|
341
|
+
| ---- | ---- | ----------- | ----- |
|
342
|
+
| **phone** | **String** | A phone number | |
|
259
343
|
|
260
344
|
### Return type
|
261
345
|
|
@@ -273,14 +357,14 @@ Name | Type | Description | Notes
|
|
273
357
|
|
274
358
|
## fetch_contacts
|
275
359
|
|
276
|
-
> ContactListEnvelope fetch_contacts(opts)
|
360
|
+
> <ContactListEnvelope> fetch_contacts(opts)
|
277
361
|
|
278
362
|
Returns all contacts
|
279
363
|
|
280
|
-
###
|
364
|
+
### Examples
|
281
365
|
|
282
366
|
```ruby
|
283
|
-
|
367
|
+
require 'time'
|
284
368
|
require 'messente_api'
|
285
369
|
# setup authorization
|
286
370
|
MessenteApi.configure do |config|
|
@@ -291,24 +375,41 @@ end
|
|
291
375
|
|
292
376
|
api_instance = MessenteApi::ContactsApi.new
|
293
377
|
opts = {
|
294
|
-
group_ids: ['
|
378
|
+
group_ids: ['inner_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
379
|
}
|
296
380
|
|
297
381
|
begin
|
298
|
-
#Returns all contacts
|
382
|
+
# Returns all contacts
|
299
383
|
result = api_instance.fetch_contacts(opts)
|
300
384
|
p result
|
301
385
|
rescue MessenteApi::ApiError => e
|
302
|
-
puts "
|
386
|
+
puts "Error when calling ContactsApi->fetch_contacts: #{e}"
|
303
387
|
end
|
304
388
|
```
|
305
389
|
|
306
|
-
|
390
|
+
#### Using the fetch_contacts_with_http_info variant
|
391
|
+
|
392
|
+
This returns an Array which contains the response data, status code and headers.
|
393
|
+
|
394
|
+
> <Array(<ContactListEnvelope>, Integer, Hash)> fetch_contacts_with_http_info(opts)
|
395
|
+
|
396
|
+
```ruby
|
397
|
+
begin
|
398
|
+
# Returns all contacts
|
399
|
+
data, status_code, headers = api_instance.fetch_contacts_with_http_info(opts)
|
400
|
+
p status_code # => 2xx
|
401
|
+
p headers # => { ... }
|
402
|
+
p data # => <ContactListEnvelope>
|
403
|
+
rescue MessenteApi::ApiError => e
|
404
|
+
puts "Error when calling ContactsApi->fetch_contacts_with_http_info: #{e}"
|
405
|
+
end
|
406
|
+
```
|
307
407
|
|
408
|
+
### Parameters
|
308
409
|
|
309
|
-
Name | Type | Description
|
310
|
-
|
311
|
-
**group_ids** | [**Array<String>**](String.md)| Optional one or many group id strings in UUID format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\" | [optional]
|
410
|
+
| Name | Type | Description | Notes |
|
411
|
+
| ---- | ---- | ----------- | ----- |
|
412
|
+
| **group_ids** | [**Array<String>**](String.md) | Optional one or many group id strings in UUID format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\" | [optional] |
|
312
413
|
|
313
414
|
### Return type
|
314
415
|
|
@@ -330,10 +431,10 @@ Name | Type | Description | Notes
|
|
330
431
|
|
331
432
|
Removes a contact from a group
|
332
433
|
|
333
|
-
###
|
434
|
+
### Examples
|
334
435
|
|
335
436
|
```ruby
|
336
|
-
|
437
|
+
require 'time'
|
337
438
|
require 'messente_api'
|
338
439
|
# setup authorization
|
339
440
|
MessenteApi.configure do |config|
|
@@ -347,20 +448,37 @@ group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # String | String in UUID form
|
|
347
448
|
phone = '+37251000000' # String | A phone number
|
348
449
|
|
349
450
|
begin
|
350
|
-
#Removes a contact from a group
|
451
|
+
# Removes a contact from a group
|
351
452
|
api_instance.remove_contact_from_group(group_id, phone)
|
352
453
|
rescue MessenteApi::ApiError => e
|
353
|
-
puts "
|
454
|
+
puts "Error when calling ContactsApi->remove_contact_from_group: #{e}"
|
354
455
|
end
|
355
456
|
```
|
356
457
|
|
357
|
-
|
458
|
+
#### Using the remove_contact_from_group_with_http_info variant
|
459
|
+
|
460
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
461
|
+
|
462
|
+
> <Array(nil, Integer, Hash)> remove_contact_from_group_with_http_info(group_id, phone)
|
463
|
+
|
464
|
+
```ruby
|
465
|
+
begin
|
466
|
+
# Removes a contact from a group
|
467
|
+
data, status_code, headers = api_instance.remove_contact_from_group_with_http_info(group_id, phone)
|
468
|
+
p status_code # => 2xx
|
469
|
+
p headers # => { ... }
|
470
|
+
p data # => nil
|
471
|
+
rescue MessenteApi::ApiError => e
|
472
|
+
puts "Error when calling ContactsApi->remove_contact_from_group_with_http_info: #{e}"
|
473
|
+
end
|
474
|
+
```
|
358
475
|
|
476
|
+
### Parameters
|
359
477
|
|
360
|
-
Name | Type | Description
|
361
|
-
|
362
|
-
**group_id** | **String
|
363
|
-
**phone** | **String
|
478
|
+
| Name | Type | Description | Notes |
|
479
|
+
| ---- | ---- | ----------- | ----- |
|
480
|
+
| **group_id** | **String** | String in UUID format | |
|
481
|
+
| **phone** | **String** | A phone number | |
|
364
482
|
|
365
483
|
### Return type
|
366
484
|
|
@@ -378,14 +496,14 @@ nil (empty response body)
|
|
378
496
|
|
379
497
|
## update_contact
|
380
498
|
|
381
|
-
> ContactEnvelope update_contact(phone, contact_update_fields)
|
499
|
+
> <ContactEnvelope> update_contact(phone, contact_update_fields)
|
382
500
|
|
383
501
|
Updates a contact
|
384
502
|
|
385
|
-
###
|
503
|
+
### Examples
|
386
504
|
|
387
505
|
```ruby
|
388
|
-
|
506
|
+
require 'time'
|
389
507
|
require 'messente_api'
|
390
508
|
# setup authorization
|
391
509
|
MessenteApi.configure do |config|
|
@@ -396,24 +514,41 @@ end
|
|
396
514
|
|
397
515
|
api_instance = MessenteApi::ContactsApi.new
|
398
516
|
phone = '+37251000000' # String | A phone number
|
399
|
-
contact_update_fields =
|
517
|
+
contact_update_fields = MessenteApi::ContactUpdateFields.new # ContactUpdateFields |
|
400
518
|
|
401
519
|
begin
|
402
|
-
#Updates a contact
|
520
|
+
# Updates a contact
|
403
521
|
result = api_instance.update_contact(phone, contact_update_fields)
|
404
522
|
p result
|
405
523
|
rescue MessenteApi::ApiError => e
|
406
|
-
puts "
|
524
|
+
puts "Error when calling ContactsApi->update_contact: #{e}"
|
407
525
|
end
|
408
526
|
```
|
409
527
|
|
410
|
-
|
528
|
+
#### Using the update_contact_with_http_info variant
|
529
|
+
|
530
|
+
This returns an Array which contains the response data, status code and headers.
|
531
|
+
|
532
|
+
> <Array(<ContactEnvelope>, Integer, Hash)> update_contact_with_http_info(phone, contact_update_fields)
|
533
|
+
|
534
|
+
```ruby
|
535
|
+
begin
|
536
|
+
# Updates a contact
|
537
|
+
data, status_code, headers = api_instance.update_contact_with_http_info(phone, contact_update_fields)
|
538
|
+
p status_code # => 2xx
|
539
|
+
p headers # => { ... }
|
540
|
+
p data # => <ContactEnvelope>
|
541
|
+
rescue MessenteApi::ApiError => e
|
542
|
+
puts "Error when calling ContactsApi->update_contact_with_http_info: #{e}"
|
543
|
+
end
|
544
|
+
```
|
411
545
|
|
546
|
+
### Parameters
|
412
547
|
|
413
|
-
Name | Type | Description
|
414
|
-
|
415
|
-
**phone** | **String
|
416
|
-
**contact_update_fields** | [**ContactUpdateFields**](ContactUpdateFields.md)| |
|
548
|
+
| Name | Type | Description | Notes |
|
549
|
+
| ---- | ---- | ----------- | ----- |
|
550
|
+
| **phone** | **String** | A phone number | |
|
551
|
+
| **contact_update_fields** | [**ContactUpdateFields**](ContactUpdateFields.md) | | |
|
417
552
|
|
418
553
|
### Return type
|
419
554
|
|