docs/AttributesApi.md in sib-api-v3-sdk-2.1.3 vs docs/AttributesApi.md in sib-api-v3-sdk-2.1.4

- old
+ new

@@ -2,19 +2,20 @@ All URIs are relative to *https://api.sendinblue.com/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_attribute**](AttributesApi.md#create_attribute) | **POST** /contacts/attributes | Creates contact attributes -[**delete_attribute**](AttributesApi.md#delete_attribute) | **DELETE** /contacts/attributes/{attributeId} | Deletes an attribute +[**create_attribute**](AttributesApi.md#create_attribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute +[**delete_attribute**](AttributesApi.md#delete_attribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute [**get_attributes**](AttributesApi.md#get_attributes) | **GET** /contacts/attributes | Lists all attributes +[**update_attribute**](AttributesApi.md#update_attribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute # **create_attribute** -> CreateModel create_attribute(create_attribute) +> create_attribute(attribute_category, attribute_name, create_attribute) -Creates contact attributes +Creates contact attribute ### Example ```ruby # load the gem require 'sib-api-v3-sdk' @@ -26,31 +27,36 @@ #config.api_key_prefix['api-key'] = 'Bearer' end api_instance = SibApiV3Sdk::AttributesApi.new +attribute_category = "attribute_category_example" # String | Category of the attribute + +attribute_name = "attribute_name_example" # String | Name of the attribute + create_attribute = SibApiV3Sdk::CreateAttribute.new # CreateAttribute | Values to create an attribute begin - #Creates contact attributes - result = api_instance.create_attribute(create_attribute) - p result + #Creates contact attribute + api_instance.create_attribute(attribute_category, attribute_name, create_attribute) rescue SibApiV3Sdk::ApiError => e puts "Exception when calling AttributesApi->create_attribute: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **attribute_category** | **String**| Category of the attribute | + **attribute_name** | **String**| Name of the attribute | **create_attribute** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute | ### Return type -[**CreateModel**](CreateModel.md) +nil (empty response body) ### Authorization [api-key](../README.md#api-key) @@ -60,11 +66,11 @@ - **Accept**: application/json # **delete_attribute** -> delete_attribute(attribute_id) +> delete_attribute(attribute_category, attribute_name) Deletes an attribute ### Example ```ruby @@ -78,26 +84,29 @@ #config.api_key_prefix['api-key'] = 'Bearer' end api_instance = SibApiV3Sdk::AttributesApi.new -attribute_id = 789 # Integer | id of the attribute +attribute_category = "attribute_category_example" # String | Category of the attribute +attribute_name = "attribute_name_example" # String | Name of the existing attribute + begin #Deletes an attribute - api_instance.delete_attribute(attribute_id) + api_instance.delete_attribute(attribute_category, attribute_name) rescue SibApiV3Sdk::ApiError => e puts "Exception when calling AttributesApi->delete_attribute: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **attribute_id** | **Integer**| id of the attribute | + **attribute_category** | **String**| Category of the attribute | + **attribute_name** | **String**| Name of the existing attribute | ### Return type nil (empty response body) @@ -144,9 +153,66 @@ This endpoint does not need any parameter. ### Return type [**GetAttributes**](GetAttributes.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **update_attribute** +> update_attribute(attribute_category, attribute_name, update_attribute) + +Updates contact attribute + +### Example +```ruby +# load the gem +require 'sib-api-v3-sdk' +# setup authorization +SibApiV3Sdk.configure do |config| + # Configure API key authorization: api-key + config.api_key['api-key'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + #config.api_key_prefix['api-key'] = 'Bearer' +end + +api_instance = SibApiV3Sdk::AttributesApi.new + +attribute_category = "attribute_category_example" # String | Category of the attribute + +attribute_name = "attribute_name_example" # String | Name of the existing attribute + +update_attribute = SibApiV3Sdk::UpdateAttribute.new # UpdateAttribute | Values to update an attribute + + +begin + #Updates contact attribute + api_instance.update_attribute(attribute_category, attribute_name, update_attribute) +rescue SibApiV3Sdk::ApiError => e + puts "Exception when calling AttributesApi->update_attribute: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_category** | **String**| Category of the attribute | + **attribute_name** | **String**| Name of the existing attribute | + **update_attribute** | [**UpdateAttribute**](UpdateAttribute.md)| Values to update an attribute | + +### Return type + +nil (empty response body) ### Authorization [api-key](../README.md#api-key)