Class: Twilio::REST::Memory::V1::TraitGroupList::TraitDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/memory/v1/trait_group.rb,
lib/twilio-ruby/rest/memory/v1/trait_group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ TraitDefinition

Returns a new instance of TraitDefinition.



43
44
45
46
47
# File 'lib/twilio-ruby/rest/memory/v1/trait_group.rb', line 43

def initialize(payload)
        @data_type = payload["data_type"]
        @description = payload["description"]
        @id_type_promotion = payload["id_type_promotion"]
end

Instance Attribute Details

#data_typeObject

Parameters:

  • [String] Data type of the Trait, such as STRING, NUMBER, BOOLEAN, ARRAY. For DELETE operations in PATCH requests, set this to an empty string ("") to mark the trait for deletion.

  • [String] Description of the Trait, providing additional context or information.

  • [String] The name of the identifier type to promote the trait value to, such as ''email'', ''phone'', ''user_id'', etc. This allows the trait to be mapped to an identifier in Identity Resolution. The identifier type should be configured in the Identity Resolution Settings.



42
43
44
# File 'lib/twilio-ruby/rest/memory/v1/trait_group.rb', line 42

def data_type
  @data_type
end

#descriptionObject

Parameters:

  • [String] Data type of the Trait, such as STRING, NUMBER, BOOLEAN, ARRAY. For DELETE operations in PATCH requests, set this to an empty string ("") to mark the trait for deletion.

  • [String] Description of the Trait, providing additional context or information.

  • [String] The name of the identifier type to promote the trait value to, such as ''email'', ''phone'', ''user_id'', etc. This allows the trait to be mapped to an identifier in Identity Resolution. The identifier type should be configured in the Identity Resolution Settings.



42
43
44
# File 'lib/twilio-ruby/rest/memory/v1/trait_group.rb', line 42

def description
  @description
end

#id_type_promotionObject

Parameters:

  • [String] Data type of the Trait, such as STRING, NUMBER, BOOLEAN, ARRAY. For DELETE operations in PATCH requests, set this to an empty string ("") to mark the trait for deletion.

  • [String] Description of the Trait, providing additional context or information.

  • [String] The name of the identifier type to promote the trait value to, such as ''email'', ''phone'', ''user_id'', etc. This allows the trait to be mapped to an identifier in Identity Resolution. The identifier type should be configured in the Identity Resolution Settings.



42
43
44
# File 'lib/twilio-ruby/rest/memory/v1/trait_group.rb', line 42

def id_type_promotion
  @id_type_promotion
end

Instance Method Details

#to_json(options = {}) ⇒ Object



48
49
50
51
52
53
54
# File 'lib/twilio-ruby/rest/memory/v1/trait_group.rb', line 48

def to_json(options = {})
{
        "dataType": @data_type,
        "description": @description,
        "idTypePromotion": @id_type_promotion,
}.to_json(options)
end