Class: Twilio::REST::Insights::V3::CustomFieldMappingList::IntelligenceOperatorSource

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) ⇒ IntelligenceOperatorSource

Returns a new instance of IntelligenceOperatorSource.



78
79
80
81
82
# File 'lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb', line 78

def initialize(payload)
        @operator_id = payload["operator_id"]
        @operator_name = payload["operator_name"]
        @field = payload["field"]
end

Instance Attribute Details

#field ⇒ Object

Parameters:

  • : (operator_id) —

    [String] The ID of the Conversational Intelligence operator whose output supplies this field's value. Must match ^intelligence_operator_[0-7][0-9a-z]{25}$. Cannot be changed after registration.

  • : (operator_name) —

    [String] Optional, display-only name of the operator. Stored as supplied and not validated against the operator.

  • : (field) —

    [String] Path to the property in the operator's output schema that supplies this field's value. Rules: - one or two segments separated by . — a top-level property (leadScore) or one level of nesting (scores.leadScore); - each segment contains only letters, digits and _; array indexing (such as items[0]) is not supported; - the path must exist in the output schema of the operator's latest active version and resolve to a property of type number or integer.



77
78
79
# File 'lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb', line 77

def field
  @field
end

#operator_id ⇒ Object

Parameters:

  • : (operator_id) —

    [String] The ID of the Conversational Intelligence operator whose output supplies this field's value. Must match ^intelligence_operator_[0-7][0-9a-z]{25}$. Cannot be changed after registration.

  • : (operator_name) —

    [String] Optional, display-only name of the operator. Stored as supplied and not validated against the operator.

  • : (field) —

    [String] Path to the property in the operator's output schema that supplies this field's value. Rules: - one or two segments separated by . — a top-level property (leadScore) or one level of nesting (scores.leadScore); - each segment contains only letters, digits and _; array indexing (such as items[0]) is not supported; - the path must exist in the output schema of the operator's latest active version and resolve to a property of type number or integer.



77
78
79
# File 'lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb', line 77

def operator_id
  @operator_id
end

#operator_name ⇒ Object

Parameters:

  • : (operator_id) —

    [String] The ID of the Conversational Intelligence operator whose output supplies this field's value. Must match ^intelligence_operator_[0-7][0-9a-z]{25}$. Cannot be changed after registration.

  • : (operator_name) —

    [String] Optional, display-only name of the operator. Stored as supplied and not validated against the operator.

  • : (field) —

    [String] Path to the property in the operator's output schema that supplies this field's value. Rules: - one or two segments separated by . — a top-level property (leadScore) or one level of nesting (scores.leadScore); - each segment contains only letters, digits and _; array indexing (such as items[0]) is not supported; - the path must exist in the output schema of the operator's latest active version and resolve to a property of type number or integer.



77
78
79
# File 'lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb', line 77

def operator_name
  @operator_name
end

Instance Method Details

#to_json(options = {}) ⇒ Object



83
84
85
86
87
88
89
# File 'lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb', line 83

def to_json(options = {})
{
        "operatorId": @operator_id,
        "operatorName": @operator_name,
        "field": @field,
}.to_json(options)
end