sib-api-v3-sdk 2.1.3 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -5
- data/docs/AttributesApi.md +78 -12
- data/docs/ContactsApi.md +78 -12
- data/docs/CreateAttribute.md +3 -5
- data/docs/CreateAttributeEnumeration.md +9 -0
- data/docs/GetAttributesAttributes.md +0 -1
- data/docs/SendSms.md +1 -0
- data/docs/UpdateAttribute.md +9 -0
- data/docs/{CreateAttributeEnumemaration.md → UpdateAttributeEnumeration.md} +1 -1
- data/lib/sib-api-v3-sdk.rb +3 -1
- data/lib/sib-api-v3-sdk/api/attributes_api.rb +115 -20
- data/lib/sib-api-v3-sdk/api/contacts_api.rb +115 -20
- data/lib/sib-api-v3-sdk/models/create_attribute.rb +12 -59
- data/lib/sib-api-v3-sdk/models/create_attribute_enumeration.rb +209 -0
- data/lib/sib-api-v3-sdk/models/error_model.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_attributes_attributes.rb +1 -16
- data/lib/sib-api-v3-sdk/models/send_sms.rb +18 -4
- data/lib/sib-api-v3-sdk/models/update_attribute.rb +201 -0
- data/lib/sib-api-v3-sdk/models/{create_attribute_enumemaration.rb → update_attribute_enumeration.rb} +1 -1
- data/lib/sib-api-v3-sdk/version.rb +1 -1
- data/spec/api/attributes_api_spec.rb +20 -3
- data/spec/api/contacts_api_spec.rb +20 -3
- data/spec/models/{create_attribute_enumemaration_spec.rb → create_attribute_enumeration_spec.rb} +7 -7
- data/spec/models/create_attribute_spec.rb +2 -18
- data/spec/models/error_model_spec.rb +1 -1
- data/spec/models/get_attributes_attributes_spec.rb +0 -6
- data/spec/models/send_sms_spec.rb +6 -0
- data/spec/models/update_attribute_enumeration_spec.rb +48 -0
- data/spec/models/update_attribute_spec.rb +48 -0
- metadata +14 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f40a8a4a33e345f692abd9267b472b9151026497
|
4
|
+
data.tar.gz: 23a4d1d1b59de476a60e88e7b8eaed7da9411f72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a22a2d47aa5e4000e121abc2a15f8dee49a93320dd9be1cea747537f8ad41dbe6f8192b5f4653f452b5374a13ff62906caf644d5d58571d62263dd5cfd4f4e2d
|
7
|
+
data.tar.gz: c6a1b864ed343c44e5d7bca0c778978ff9a242b1ae0d4f8bdd2058ae796950e1715a648412f2c521b20c5738931dc4566d29c2fa071c2e4a1ba302eaa7af8845
|
data/README.md
CHANGED
@@ -80,15 +80,16 @@ All URIs are relative to *https://api.sendinblue.com/v3*
|
|
80
80
|
Class | Method | HTTP request | Description
|
81
81
|
------------ | ------------- | ------------- | -------------
|
82
82
|
*SibApiV3Sdk::AccountApi* | [**get_account**](docs/AccountApi.md#get_account) | **GET** /account | Get your account informations, plans and credits details
|
83
|
-
*SibApiV3Sdk::AttributesApi* | [**create_attribute**](docs/AttributesApi.md#create_attribute) | **POST** /contacts/attributes | Creates contact
|
84
|
-
*SibApiV3Sdk::AttributesApi* | [**delete_attribute**](docs/AttributesApi.md#delete_attribute) | **DELETE** /contacts/attributes/{
|
83
|
+
*SibApiV3Sdk::AttributesApi* | [**create_attribute**](docs/AttributesApi.md#create_attribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute
|
84
|
+
*SibApiV3Sdk::AttributesApi* | [**delete_attribute**](docs/AttributesApi.md#delete_attribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute
|
85
85
|
*SibApiV3Sdk::AttributesApi* | [**get_attributes**](docs/AttributesApi.md#get_attributes) | **GET** /contacts/attributes | Lists all attributes
|
86
|
+
*SibApiV3Sdk::AttributesApi* | [**update_attribute**](docs/AttributesApi.md#update_attribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
|
86
87
|
*SibApiV3Sdk::ContactsApi* | [**add_contact_to_list**](docs/ContactsApi.md#add_contact_to_list) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list
|
87
|
-
*SibApiV3Sdk::ContactsApi* | [**create_attribute**](docs/ContactsApi.md#create_attribute) | **POST** /contacts/attributes | Creates contact
|
88
|
+
*SibApiV3Sdk::ContactsApi* | [**create_attribute**](docs/ContactsApi.md#create_attribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute
|
88
89
|
*SibApiV3Sdk::ContactsApi* | [**create_contact**](docs/ContactsApi.md#create_contact) | **POST** /contacts | Create a contact
|
89
90
|
*SibApiV3Sdk::ContactsApi* | [**create_folder**](docs/ContactsApi.md#create_folder) | **POST** /contacts/folders | Create a folder
|
90
91
|
*SibApiV3Sdk::ContactsApi* | [**create_list**](docs/ContactsApi.md#create_list) | **POST** /contacts/lists | Create a list
|
91
|
-
*SibApiV3Sdk::ContactsApi* | [**delete_attribute**](docs/ContactsApi.md#delete_attribute) | **DELETE** /contacts/attributes/{
|
92
|
+
*SibApiV3Sdk::ContactsApi* | [**delete_attribute**](docs/ContactsApi.md#delete_attribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute
|
92
93
|
*SibApiV3Sdk::ContactsApi* | [**delete_folder**](docs/ContactsApi.md#delete_folder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists)
|
93
94
|
*SibApiV3Sdk::ContactsApi* | [**delete_list**](docs/ContactsApi.md#delete_list) | **DELETE** /contacts/lists/{listId} | Delete a list
|
94
95
|
*SibApiV3Sdk::ContactsApi* | [**get_attributes**](docs/ContactsApi.md#get_attributes) | **GET** /contacts/attributes | Lists all attributes
|
@@ -104,6 +105,7 @@ Class | Method | HTTP request | Description
|
|
104
105
|
*SibApiV3Sdk::ContactsApi* | [**import_contacts**](docs/ContactsApi.md#import_contacts) | **POST** /contacts/import | Import contacts
|
105
106
|
*SibApiV3Sdk::ContactsApi* | [**remove_contact_to_list**](docs/ContactsApi.md#remove_contact_to_list) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
|
106
107
|
*SibApiV3Sdk::ContactsApi* | [**request_contact_export**](docs/ContactsApi.md#request_contact_export) | **POST** /contacts/export | Export contacts
|
108
|
+
*SibApiV3Sdk::ContactsApi* | [**update_attribute**](docs/ContactsApi.md#update_attribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
|
107
109
|
*SibApiV3Sdk::ContactsApi* | [**update_contact**](docs/ContactsApi.md#update_contact) | **PUT** /contacts/{email} | Updates a contact
|
108
110
|
*SibApiV3Sdk::ContactsApi* | [**update_folder**](docs/ContactsApi.md#update_folder) | **PUT** /contacts/folders/{folderId} | Update a contact folder
|
109
111
|
*SibApiV3Sdk::ContactsApi* | [**update_list**](docs/ContactsApi.md#update_list) | **PUT** /contacts/lists/{listId} | Update a list
|
@@ -187,7 +189,7 @@ Class | Method | HTTP request | Description
|
|
187
189
|
- [SibApiV3Sdk::AddCredits](docs/AddCredits.md)
|
188
190
|
- [SibApiV3Sdk::AddRemoveContactToList](docs/AddRemoveContactToList.md)
|
189
191
|
- [SibApiV3Sdk::CreateAttribute](docs/CreateAttribute.md)
|
190
|
-
- [SibApiV3Sdk::
|
192
|
+
- [SibApiV3Sdk::CreateAttributeEnumeration](docs/CreateAttributeEnumeration.md)
|
191
193
|
- [SibApiV3Sdk::CreateChild](docs/CreateChild.md)
|
192
194
|
- [SibApiV3Sdk::CreateContact](docs/CreateContact.md)
|
193
195
|
- [SibApiV3Sdk::CreateEmailCampaign](docs/CreateEmailCampaign.md)
|
@@ -310,6 +312,8 @@ Class | Method | HTTP request | Description
|
|
310
312
|
- [SibApiV3Sdk::SendTestEmail](docs/SendTestEmail.md)
|
311
313
|
- [SibApiV3Sdk::SendTestSms](docs/SendTestSms.md)
|
312
314
|
- [SibApiV3Sdk::SendTransacSms](docs/SendTransacSms.md)
|
315
|
+
- [SibApiV3Sdk::UpdateAttribute](docs/UpdateAttribute.md)
|
316
|
+
- [SibApiV3Sdk::UpdateAttributeEnumeration](docs/UpdateAttributeEnumeration.md)
|
313
317
|
- [SibApiV3Sdk::UpdateCampaignStatus](docs/UpdateCampaignStatus.md)
|
314
318
|
- [SibApiV3Sdk::UpdateChild](docs/UpdateChild.md)
|
315
319
|
- [SibApiV3Sdk::UpdateContact](docs/UpdateContact.md)
|
data/docs/AttributesApi.md
CHANGED
@@ -4,15 +4,16 @@ All URIs are relative to *https://api.sendinblue.com/v3*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
-
[**create_attribute**](AttributesApi.md#create_attribute) | **POST** /contacts/attributes | Creates contact
|
8
|
-
[**delete_attribute**](AttributesApi.md#delete_attribute) | **DELETE** /contacts/attributes/{
|
7
|
+
[**create_attribute**](AttributesApi.md#create_attribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute
|
8
|
+
[**delete_attribute**](AttributesApi.md#delete_attribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute
|
9
9
|
[**get_attributes**](AttributesApi.md#get_attributes) | **GET** /contacts/attributes | Lists all attributes
|
10
|
+
[**update_attribute**](AttributesApi.md#update_attribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
|
10
11
|
|
11
12
|
|
12
13
|
# **create_attribute**
|
13
|
-
>
|
14
|
+
> create_attribute(attribute_category, attribute_name, create_attribute)
|
14
15
|
|
15
|
-
Creates contact
|
16
|
+
Creates contact attribute
|
16
17
|
|
17
18
|
### Example
|
18
19
|
```ruby
|
@@ -28,13 +29,16 @@ end
|
|
28
29
|
|
29
30
|
api_instance = SibApiV3Sdk::AttributesApi.new
|
30
31
|
|
32
|
+
attribute_category = "attribute_category_example" # String | Category of the attribute
|
33
|
+
|
34
|
+
attribute_name = "attribute_name_example" # String | Name of the attribute
|
35
|
+
|
31
36
|
create_attribute = SibApiV3Sdk::CreateAttribute.new # CreateAttribute | Values to create an attribute
|
32
37
|
|
33
38
|
|
34
39
|
begin
|
35
|
-
#Creates contact
|
36
|
-
|
37
|
-
p result
|
40
|
+
#Creates contact attribute
|
41
|
+
api_instance.create_attribute(attribute_category, attribute_name, create_attribute)
|
38
42
|
rescue SibApiV3Sdk::ApiError => e
|
39
43
|
puts "Exception when calling AttributesApi->create_attribute: #{e}"
|
40
44
|
end
|
@@ -44,11 +48,13 @@ end
|
|
44
48
|
|
45
49
|
Name | Type | Description | Notes
|
46
50
|
------------- | ------------- | ------------- | -------------
|
51
|
+
**attribute_category** | **String**| Category of the attribute |
|
52
|
+
**attribute_name** | **String**| Name of the attribute |
|
47
53
|
**create_attribute** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute |
|
48
54
|
|
49
55
|
### Return type
|
50
56
|
|
51
|
-
|
57
|
+
nil (empty response body)
|
52
58
|
|
53
59
|
### Authorization
|
54
60
|
|
@@ -62,7 +68,7 @@ Name | Type | Description | Notes
|
|
62
68
|
|
63
69
|
|
64
70
|
# **delete_attribute**
|
65
|
-
> delete_attribute(
|
71
|
+
> delete_attribute(attribute_category, attribute_name)
|
66
72
|
|
67
73
|
Deletes an attribute
|
68
74
|
|
@@ -80,12 +86,14 @@ end
|
|
80
86
|
|
81
87
|
api_instance = SibApiV3Sdk::AttributesApi.new
|
82
88
|
|
83
|
-
|
89
|
+
attribute_category = "attribute_category_example" # String | Category of the attribute
|
90
|
+
|
91
|
+
attribute_name = "attribute_name_example" # String | Name of the existing attribute
|
84
92
|
|
85
93
|
|
86
94
|
begin
|
87
95
|
#Deletes an attribute
|
88
|
-
api_instance.delete_attribute(
|
96
|
+
api_instance.delete_attribute(attribute_category, attribute_name)
|
89
97
|
rescue SibApiV3Sdk::ApiError => e
|
90
98
|
puts "Exception when calling AttributesApi->delete_attribute: #{e}"
|
91
99
|
end
|
@@ -95,7 +103,8 @@ end
|
|
95
103
|
|
96
104
|
Name | Type | Description | Notes
|
97
105
|
------------- | ------------- | ------------- | -------------
|
98
|
-
**
|
106
|
+
**attribute_category** | **String**| Category of the attribute |
|
107
|
+
**attribute_name** | **String**| Name of the existing attribute |
|
99
108
|
|
100
109
|
### Return type
|
101
110
|
|
@@ -158,3 +167,60 @@ This endpoint does not need any parameter.
|
|
158
167
|
|
159
168
|
|
160
169
|
|
170
|
+
# **update_attribute**
|
171
|
+
> update_attribute(attribute_category, attribute_name, update_attribute)
|
172
|
+
|
173
|
+
Updates contact attribute
|
174
|
+
|
175
|
+
### Example
|
176
|
+
```ruby
|
177
|
+
# load the gem
|
178
|
+
require 'sib-api-v3-sdk'
|
179
|
+
# setup authorization
|
180
|
+
SibApiV3Sdk.configure do |config|
|
181
|
+
# Configure API key authorization: api-key
|
182
|
+
config.api_key['api-key'] = 'YOUR API KEY'
|
183
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
184
|
+
#config.api_key_prefix['api-key'] = 'Bearer'
|
185
|
+
end
|
186
|
+
|
187
|
+
api_instance = SibApiV3Sdk::AttributesApi.new
|
188
|
+
|
189
|
+
attribute_category = "attribute_category_example" # String | Category of the attribute
|
190
|
+
|
191
|
+
attribute_name = "attribute_name_example" # String | Name of the existing attribute
|
192
|
+
|
193
|
+
update_attribute = SibApiV3Sdk::UpdateAttribute.new # UpdateAttribute | Values to update an attribute
|
194
|
+
|
195
|
+
|
196
|
+
begin
|
197
|
+
#Updates contact attribute
|
198
|
+
api_instance.update_attribute(attribute_category, attribute_name, update_attribute)
|
199
|
+
rescue SibApiV3Sdk::ApiError => e
|
200
|
+
puts "Exception when calling AttributesApi->update_attribute: #{e}"
|
201
|
+
end
|
202
|
+
```
|
203
|
+
|
204
|
+
### Parameters
|
205
|
+
|
206
|
+
Name | Type | Description | Notes
|
207
|
+
------------- | ------------- | ------------- | -------------
|
208
|
+
**attribute_category** | **String**| Category of the attribute |
|
209
|
+
**attribute_name** | **String**| Name of the existing attribute |
|
210
|
+
**update_attribute** | [**UpdateAttribute**](UpdateAttribute.md)| Values to update an attribute |
|
211
|
+
|
212
|
+
### Return type
|
213
|
+
|
214
|
+
nil (empty response body)
|
215
|
+
|
216
|
+
### Authorization
|
217
|
+
|
218
|
+
[api-key](../README.md#api-key)
|
219
|
+
|
220
|
+
### HTTP request headers
|
221
|
+
|
222
|
+
- **Content-Type**: application/json
|
223
|
+
- **Accept**: application/json
|
224
|
+
|
225
|
+
|
226
|
+
|
data/docs/ContactsApi.md
CHANGED
@@ -5,11 +5,11 @@ All URIs are relative to *https://api.sendinblue.com/v3*
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
7
|
[**add_contact_to_list**](ContactsApi.md#add_contact_to_list) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list
|
8
|
-
[**create_attribute**](ContactsApi.md#create_attribute) | **POST** /contacts/attributes | Creates contact
|
8
|
+
[**create_attribute**](ContactsApi.md#create_attribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute
|
9
9
|
[**create_contact**](ContactsApi.md#create_contact) | **POST** /contacts | Create a contact
|
10
10
|
[**create_folder**](ContactsApi.md#create_folder) | **POST** /contacts/folders | Create a folder
|
11
11
|
[**create_list**](ContactsApi.md#create_list) | **POST** /contacts/lists | Create a list
|
12
|
-
[**delete_attribute**](ContactsApi.md#delete_attribute) | **DELETE** /contacts/attributes/{
|
12
|
+
[**delete_attribute**](ContactsApi.md#delete_attribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute
|
13
13
|
[**delete_folder**](ContactsApi.md#delete_folder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists)
|
14
14
|
[**delete_list**](ContactsApi.md#delete_list) | **DELETE** /contacts/lists/{listId} | Delete a list
|
15
15
|
[**get_attributes**](ContactsApi.md#get_attributes) | **GET** /contacts/attributes | Lists all attributes
|
@@ -25,6 +25,7 @@ Method | HTTP request | Description
|
|
25
25
|
[**import_contacts**](ContactsApi.md#import_contacts) | **POST** /contacts/import | Import contacts
|
26
26
|
[**remove_contact_to_list**](ContactsApi.md#remove_contact_to_list) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
|
27
27
|
[**request_contact_export**](ContactsApi.md#request_contact_export) | **POST** /contacts/export | Export contacts
|
28
|
+
[**update_attribute**](ContactsApi.md#update_attribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
|
28
29
|
[**update_contact**](ContactsApi.md#update_contact) | **PUT** /contacts/{email} | Updates a contact
|
29
30
|
[**update_folder**](ContactsApi.md#update_folder) | **PUT** /contacts/folders/{folderId} | Update a contact folder
|
30
31
|
[**update_list**](ContactsApi.md#update_list) | **PUT** /contacts/lists/{listId} | Update a list
|
@@ -86,9 +87,9 @@ Name | Type | Description | Notes
|
|
86
87
|
|
87
88
|
|
88
89
|
# **create_attribute**
|
89
|
-
>
|
90
|
+
> create_attribute(attribute_category, attribute_name, create_attribute)
|
90
91
|
|
91
|
-
Creates contact
|
92
|
+
Creates contact attribute
|
92
93
|
|
93
94
|
### Example
|
94
95
|
```ruby
|
@@ -104,13 +105,16 @@ end
|
|
104
105
|
|
105
106
|
api_instance = SibApiV3Sdk::ContactsApi.new
|
106
107
|
|
108
|
+
attribute_category = "attribute_category_example" # String | Category of the attribute
|
109
|
+
|
110
|
+
attribute_name = "attribute_name_example" # String | Name of the attribute
|
111
|
+
|
107
112
|
create_attribute = SibApiV3Sdk::CreateAttribute.new # CreateAttribute | Values to create an attribute
|
108
113
|
|
109
114
|
|
110
115
|
begin
|
111
|
-
#Creates contact
|
112
|
-
|
113
|
-
p result
|
116
|
+
#Creates contact attribute
|
117
|
+
api_instance.create_attribute(attribute_category, attribute_name, create_attribute)
|
114
118
|
rescue SibApiV3Sdk::ApiError => e
|
115
119
|
puts "Exception when calling ContactsApi->create_attribute: #{e}"
|
116
120
|
end
|
@@ -120,11 +124,13 @@ end
|
|
120
124
|
|
121
125
|
Name | Type | Description | Notes
|
122
126
|
------------- | ------------- | ------------- | -------------
|
127
|
+
**attribute_category** | **String**| Category of the attribute |
|
128
|
+
**attribute_name** | **String**| Name of the attribute |
|
123
129
|
**create_attribute** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute |
|
124
130
|
|
125
131
|
### Return type
|
126
132
|
|
127
|
-
|
133
|
+
nil (empty response body)
|
128
134
|
|
129
135
|
### Authorization
|
130
136
|
|
@@ -294,7 +300,7 @@ Name | Type | Description | Notes
|
|
294
300
|
|
295
301
|
|
296
302
|
# **delete_attribute**
|
297
|
-
> delete_attribute(
|
303
|
+
> delete_attribute(attribute_category, attribute_name)
|
298
304
|
|
299
305
|
Deletes an attribute
|
300
306
|
|
@@ -312,12 +318,14 @@ end
|
|
312
318
|
|
313
319
|
api_instance = SibApiV3Sdk::ContactsApi.new
|
314
320
|
|
315
|
-
|
321
|
+
attribute_category = "attribute_category_example" # String | Category of the attribute
|
322
|
+
|
323
|
+
attribute_name = "attribute_name_example" # String | Name of the existing attribute
|
316
324
|
|
317
325
|
|
318
326
|
begin
|
319
327
|
#Deletes an attribute
|
320
|
-
api_instance.delete_attribute(
|
328
|
+
api_instance.delete_attribute(attribute_category, attribute_name)
|
321
329
|
rescue SibApiV3Sdk::ApiError => e
|
322
330
|
puts "Exception when calling ContactsApi->delete_attribute: #{e}"
|
323
331
|
end
|
@@ -327,7 +335,8 @@ end
|
|
327
335
|
|
328
336
|
Name | Type | Description | Notes
|
329
337
|
------------- | ------------- | ------------- | -------------
|
330
|
-
**
|
338
|
+
**attribute_category** | **String**| Category of the attribute |
|
339
|
+
**attribute_name** | **String**| Name of the existing attribute |
|
331
340
|
|
332
341
|
### Return type
|
333
342
|
|
@@ -1148,6 +1157,63 @@ Name | Type | Description | Notes
|
|
1148
1157
|
|
1149
1158
|
|
1150
1159
|
|
1160
|
+
# **update_attribute**
|
1161
|
+
> update_attribute(attribute_category, attribute_name, update_attribute)
|
1162
|
+
|
1163
|
+
Updates contact attribute
|
1164
|
+
|
1165
|
+
### Example
|
1166
|
+
```ruby
|
1167
|
+
# load the gem
|
1168
|
+
require 'sib-api-v3-sdk'
|
1169
|
+
# setup authorization
|
1170
|
+
SibApiV3Sdk.configure do |config|
|
1171
|
+
# Configure API key authorization: api-key
|
1172
|
+
config.api_key['api-key'] = 'YOUR API KEY'
|
1173
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1174
|
+
#config.api_key_prefix['api-key'] = 'Bearer'
|
1175
|
+
end
|
1176
|
+
|
1177
|
+
api_instance = SibApiV3Sdk::ContactsApi.new
|
1178
|
+
|
1179
|
+
attribute_category = "attribute_category_example" # String | Category of the attribute
|
1180
|
+
|
1181
|
+
attribute_name = "attribute_name_example" # String | Name of the existing attribute
|
1182
|
+
|
1183
|
+
update_attribute = SibApiV3Sdk::UpdateAttribute.new # UpdateAttribute | Values to update an attribute
|
1184
|
+
|
1185
|
+
|
1186
|
+
begin
|
1187
|
+
#Updates contact attribute
|
1188
|
+
api_instance.update_attribute(attribute_category, attribute_name, update_attribute)
|
1189
|
+
rescue SibApiV3Sdk::ApiError => e
|
1190
|
+
puts "Exception when calling ContactsApi->update_attribute: #{e}"
|
1191
|
+
end
|
1192
|
+
```
|
1193
|
+
|
1194
|
+
### Parameters
|
1195
|
+
|
1196
|
+
Name | Type | Description | Notes
|
1197
|
+
------------- | ------------- | ------------- | -------------
|
1198
|
+
**attribute_category** | **String**| Category of the attribute |
|
1199
|
+
**attribute_name** | **String**| Name of the existing attribute |
|
1200
|
+
**update_attribute** | [**UpdateAttribute**](UpdateAttribute.md)| Values to update an attribute |
|
1201
|
+
|
1202
|
+
### Return type
|
1203
|
+
|
1204
|
+
nil (empty response body)
|
1205
|
+
|
1206
|
+
### Authorization
|
1207
|
+
|
1208
|
+
[api-key](../README.md#api-key)
|
1209
|
+
|
1210
|
+
### HTTP request headers
|
1211
|
+
|
1212
|
+
- **Content-Type**: application/json
|
1213
|
+
- **Accept**: application/json
|
1214
|
+
|
1215
|
+
|
1216
|
+
|
1151
1217
|
# **update_contact**
|
1152
1218
|
> update_contact(email, update_contact)
|
1153
1219
|
|
data/docs/CreateAttribute.md
CHANGED
@@ -3,10 +3,8 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**
|
7
|
-
**
|
8
|
-
**
|
9
|
-
**enumemaration** | [**Array<CreateAttributeEnumemaration>**](CreateAttributeEnumemaration.md) | Values that the attribute can take. Use only if the attribute's category is category | [optional]
|
10
|
-
**type** | **String** | Type of the attribute | [optional]
|
6
|
+
**value** | **String** | Value of the attribute. Use only if the attribute's category is calculated or global | [optional]
|
7
|
+
**enumeration** | [**Array<CreateAttributeEnumeration>**](CreateAttributeEnumeration.md) | Values that the attribute can take. Use only if the attribute's category is category | [optional]
|
8
|
+
**type** | **String** | Type of the attribute. Use only if the attribute's category is normal, category or transactional ( type 'id' only available if the category is 'transactional' attribute & type 'category' only available if the category is 'category' attribute ) | [optional]
|
11
9
|
|
12
10
|
|
@@ -3,7 +3,6 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**id** | **Integer** | ID of the attribute |
|
7
6
|
**name** | **String** | Name of the attribute |
|
8
7
|
**category** | **String** | Category of the attribute |
|
9
8
|
**type** | **String** | Type of the attribute | [optional]
|
data/docs/SendSms.md
CHANGED
@@ -0,0 +1,9 @@
|
|
1
|
+
# SibApiV3Sdk::UpdateAttribute
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**value** | **String** | Value of the attribute. Use only if the attribute's category is calculated or global | [optional]
|
7
|
+
**enumeration** | [**Array<UpdateAttributeEnumeration>**](UpdateAttributeEnumeration.md) | Values that the attribute can take. Use only if the attribute's category is category | [optional]
|
8
|
+
|
9
|
+
|
data/lib/sib-api-v3-sdk.rb
CHANGED
@@ -20,7 +20,7 @@ require 'sib-api-v3-sdk/configuration'
|
|
20
20
|
require 'sib-api-v3-sdk/models/add_credits'
|
21
21
|
require 'sib-api-v3-sdk/models/add_remove_contact_to_list'
|
22
22
|
require 'sib-api-v3-sdk/models/create_attribute'
|
23
|
-
require 'sib-api-v3-sdk/models/
|
23
|
+
require 'sib-api-v3-sdk/models/create_attribute_enumeration'
|
24
24
|
require 'sib-api-v3-sdk/models/create_child'
|
25
25
|
require 'sib-api-v3-sdk/models/create_contact'
|
26
26
|
require 'sib-api-v3-sdk/models/create_email_campaign'
|
@@ -143,6 +143,8 @@ require 'sib-api-v3-sdk/models/send_template_email'
|
|
143
143
|
require 'sib-api-v3-sdk/models/send_test_email'
|
144
144
|
require 'sib-api-v3-sdk/models/send_test_sms'
|
145
145
|
require 'sib-api-v3-sdk/models/send_transac_sms'
|
146
|
+
require 'sib-api-v3-sdk/models/update_attribute'
|
147
|
+
require 'sib-api-v3-sdk/models/update_attribute_enumeration'
|
146
148
|
require 'sib-api-v3-sdk/models/update_campaign_status'
|
147
149
|
require 'sib-api-v3-sdk/models/update_child'
|
148
150
|
require 'sib-api-v3-sdk/models/update_contact'
|