Class: Twilio::REST::Memory::V1::DataMappingList::MappingTraitItem

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ MappingTraitItem

Returns a new instance of MappingTraitItem.



75
76
77
78
79
80
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 75

def initialize(payload)
        @field_name = payload["field_name"]
        @expression = payload["expression"]
        @trait_group = payload["trait_group"]
        @trait_name = payload["trait_name"]
end

Instance Attribute Details

#expressionObject

Parameters:

  • : (field_name)
    String

    The name of the field/column in the source. Deprecated in favor of expression.

  • : (expression)
    String

    The expression identifying the field/column in the source.

  • : (trait_group)
    String

    The name of the Trait Group to map to.

  • : (trait_name)
    String

    The name of the trait within the Trait Group to map to.



74
75
76
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 74

def expression
  @expression
end

#field_nameObject

Parameters:

  • : (field_name)
    String

    The name of the field/column in the source. Deprecated in favor of expression.

  • : (expression)
    String

    The expression identifying the field/column in the source.

  • : (trait_group)
    String

    The name of the Trait Group to map to.

  • : (trait_name)
    String

    The name of the trait within the Trait Group to map to.



74
75
76
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 74

def field_name
  @field_name
end

#trait_groupObject

Parameters:

  • : (field_name)
    String

    The name of the field/column in the source. Deprecated in favor of expression.

  • : (expression)
    String

    The expression identifying the field/column in the source.

  • : (trait_group)
    String

    The name of the Trait Group to map to.

  • : (trait_name)
    String

    The name of the trait within the Trait Group to map to.



74
75
76
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 74

def trait_group
  @trait_group
end

#trait_nameObject

Parameters:

  • : (field_name)
    String

    The name of the field/column in the source. Deprecated in favor of expression.

  • : (expression)
    String

    The expression identifying the field/column in the source.

  • : (trait_group)
    String

    The name of the Trait Group to map to.

  • : (trait_name)
    String

    The name of the trait within the Trait Group to map to.



74
75
76
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 74

def trait_name
  @trait_name
end

Instance Method Details

#to_json(options = {}) ⇒ Object



81
82
83
84
85
86
87
88
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 81

def to_json(options = {})
{
        "fieldName": @field_name,
        "expression": @expression,
        "traitGroup": @trait_group,
        "traitName": @trait_name,
}.to_json(options)
end