Skip to content

Latest commit

 

History

History
41 lines (34 loc) · 3.05 KB

NewAttribute.md

File metadata and controls

41 lines (34 loc) · 3.05 KB

TalonOne::NewAttribute

Properties

Name Type Description Notes
entity String The name of the entity that can have this attribute. When creating or updating the entities of a given type, you can include an `attributes` object with keys corresponding to the `name` of the custom attributes for that type.
event_type String [optional]
name String The attribute name that will be used in API requests and Talang. E.g. if `name == "region"` then you would set the region attribute by including an `attributes.region` property in your request payload.
title String The human-readable name for the attribute that will be shown in the Campaign Manager. Like `name`, the combination of entity and title must also be unique.
type String The data type of the attribute, a `time` attribute must be sent as a string that conforms to the RFC3339 timestamp format.
description String A description of this attribute.
suggestions Array<String> A list of suggestions for the attribute.
has_allowed_list Boolean Whether or not this attribute has an allowed list of values associated with it. [optional] [default to false]
restricted_by_suggestions Boolean Whether or not this attribute's value is restricted by suggestions (`suggestions` property) or by an allowed list of value (`hasAllowedList` property). [optional] [default to false]
editable Boolean Whether or not this attribute can be edited.
subscribed_applications_ids Array<Integer> A list of the IDs of the applications where this attribute is available. [optional]
subscribed_catalogs_ids Array<Integer> A list of the IDs of the catalogs where this attribute is available. [optional]
allowed_subscriptions Array<String> A list of allowed subscription types for this attribute. Note: This only applies to attributes associated with the `CartItem` entity. [optional]

Code Sample

require 'TalonOne'

instance = TalonOne::NewAttribute.new(entity: Event,
                                 event_type: pageViewed,
                                 name: pageViewed,
                                 title: Page view event,
                                 type: string,
                                 description: Event triggered when a customer displays a page.,
                                 suggestions: null,
                                 has_allowed_list: false,
                                 restricted_by_suggestions: false,
                                 editable: true,
                                 subscribed_applications_ids: [1, 4, 9],
                                 subscribed_catalogs_ids: [2, 5],
                                 allowed_subscriptions: [application, catalog])