Class: Twilio::REST::Insights::V3::CustomFieldMappingList::CustomFieldMappingRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb,
lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ CustomFieldMappingRequest

Returns a new instance of CustomFieldMappingRequest.



28
29
30
31
32
33
# File 'lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb', line 28

def initialize(payload)
        @category = payload["category"]
        @name = payload["name"]
        @description = payload["description"]
        @entity_metadata = payload["entity_metadata"]
end

Instance Attribute Details

#category ⇒ Object

Parameters:

  • : (category) —

    [MappingCategory]

  • : (name) —

    [String] Name of the custom field, used to reference it in Insights queries. Contains only letters, digits and _, and must not be empty. Must be unique within the account across every sourceType; registering an existing name returns 409. Cannot be changed after registration.

  • : (description) —

    [String] Optional, free-text description of this custom field mapping, up to 150 characters. Display-only — not part of any uniqueness check.

  • : (entity_metadata) —

    [CustomFieldMappingList.EntityMetadata]



27
28
29
# File 'lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb', line 27

def category
  @category
end

#description ⇒ Object

Parameters:

  • : (category) —

    [MappingCategory]

  • : (name) —

    [String] Name of the custom field, used to reference it in Insights queries. Contains only letters, digits and _, and must not be empty. Must be unique within the account across every sourceType; registering an existing name returns 409. Cannot be changed after registration.

  • : (description) —

    [String] Optional, free-text description of this custom field mapping, up to 150 characters. Display-only — not part of any uniqueness check.

  • : (entity_metadata) —

    [CustomFieldMappingList.EntityMetadata]



27
28
29
# File 'lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb', line 27

def description
  @description
end

#entity_metadata ⇒ Object

Parameters:

  • : (category) —

    [MappingCategory]

  • : (name) —

    [String] Name of the custom field, used to reference it in Insights queries. Contains only letters, digits and _, and must not be empty. Must be unique within the account across every sourceType; registering an existing name returns 409. Cannot be changed after registration.

  • : (description) —

    [String] Optional, free-text description of this custom field mapping, up to 150 characters. Display-only — not part of any uniqueness check.

  • : (entity_metadata) —

    [CustomFieldMappingList.EntityMetadata]



27
28
29
# File 'lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb', line 27

def 
  @entity_metadata
end

#name ⇒ Object

Parameters:

  • : (category) —

    [MappingCategory]

  • : (name) —

    [String] Name of the custom field, used to reference it in Insights queries. Contains only letters, digits and _, and must not be empty. Must be unique within the account across every sourceType; registering an existing name returns 409. Cannot be changed after registration.

  • : (description) —

    [String] Optional, free-text description of this custom field mapping, up to 150 characters. Display-only — not part of any uniqueness check.

  • : (entity_metadata) —

    [CustomFieldMappingList.EntityMetadata]



27
28
29
# File 'lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb', line 27

def name
  @name
end

Instance Method Details

#to_json(options = {}) ⇒ Object



34
35
36
37
38
39
40
41
# File 'lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb', line 34

def to_json(options = {})
{
        "category": @category,
        "name": @name,
        "description": @description,
        "entityMetadata": @entity_metadata,
}.to_json(options)
end