Class: Twilio::REST::Content::V1::ContentList::ContentCreateRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ ContentCreateRequest

Returns a new instance of ContentCreateRequest.



172
173
174
175
176
177
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 172

def initialize(payload)
        @friendly_name = payload["friendly_name"]
        @variables = payload["variables"]
        @language = payload["language"]
        @types = payload["types"]
end

Instance Attribute Details

#friendly_nameObject

Parameters:

  • : (friendly_name)
    String

    User defined name of the content

  • : (variables)
    Hash<String, String>

    Key value pairs of variable name to value

  • : (language)
    String

    Language code for the content

  • : (types)
    ContentList.Types


171
172
173
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 171

def friendly_name
  @friendly_name
end

#languageObject

Parameters:

  • : (friendly_name)
    String

    User defined name of the content

  • : (variables)
    Hash<String, String>

    Key value pairs of variable name to value

  • : (language)
    String

    Language code for the content

  • : (types)
    ContentList.Types


171
172
173
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 171

def language
  @language
end

#typesObject

Parameters:

  • : (friendly_name)
    String

    User defined name of the content

  • : (variables)
    Hash<String, String>

    Key value pairs of variable name to value

  • : (language)
    String

    Language code for the content

  • : (types)
    ContentList.Types


171
172
173
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 171

def types
  @types
end

#variablesObject

Parameters:

  • : (friendly_name)
    String

    User defined name of the content

  • : (variables)
    Hash<String, String>

    Key value pairs of variable name to value

  • : (language)
    String

    Language code for the content

  • : (types)
    ContentList.Types


171
172
173
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 171

def variables
  @variables
end

Instance Method Details

#to_json(options = {}) ⇒ Object



178
179
180
181
182
183
184
185
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 178

def to_json(options = {})
{
        "friendly_name": @friendly_name,
        "variables": @variables,
        "language": @language,
        "types": @types,
}.to_json(options)
end