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.



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

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

Instance Attribute Details

#expression ⇒ Object

Parameters:

  • : (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.



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

def expression
  @expression
end

#trait_group ⇒ Object

Parameters:

  • : (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.



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

def trait_group
  @trait_group
end

#trait_name ⇒ Object

Parameters:

  • : (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.



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

def trait_name
  @trait_name
end

Instance Method Details

#to_json(options = {}) ⇒ Object



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

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