Class: Twilio::REST::Verify::V2::TemplateInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/verify/v2/template.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ TemplateInstance

Initialize the TemplateInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio



155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/twilio-ruby/rest/verify/v2/template.rb', line 155

def initialize(version, payload)
  super(version)

  # Marshaled Properties
  @properties = {
      'sid' => payload['sid'],
      'account_sid' => payload['account_sid'],
      'friendly_name' => payload['friendly_name'],
      'channels' => payload['channels'],
      'translations' => payload['translations'],
  }
end

Instance Method Details

#account_sidString

Returns Account Sid.

Returns:

  • (String)

    Account Sid



176
177
178
# File 'lib/twilio-ruby/rest/verify/v2/template.rb', line 176

def 
  @properties['account_sid']
end

#channelsArray[String]

Returns A list of channels that support the Template.

Returns:

  • (Array[String])

    A list of channels that support the Template



188
189
190
# File 'lib/twilio-ruby/rest/verify/v2/template.rb', line 188

def channels
  @properties['channels']
end

#friendly_nameString

Returns A string to describe the verification template.

Returns:

  • (String)

    A string to describe the verification template



182
183
184
# File 'lib/twilio-ruby/rest/verify/v2/template.rb', line 182

def friendly_name
  @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



206
207
208
# File 'lib/twilio-ruby/rest/verify/v2/template.rb', line 206

def inspect
  "<Twilio.Verify.V2.TemplateInstance>"
end

#sidString

Returns A string that uniquely identifies this Template.

Returns:

  • (String)

    A string that uniquely identifies this Template



170
171
172
# File 'lib/twilio-ruby/rest/verify/v2/template.rb', line 170

def sid
  @properties['sid']
end

#to_sObject

Provide a user friendly representation



200
201
202
# File 'lib/twilio-ruby/rest/verify/v2/template.rb', line 200

def to_s
  "<Twilio.Verify.V2.TemplateInstance>"
end

#translationsHash

Returns Object with the template translations.

Returns:

  • (Hash)

    Object with the template translations.



194
195
196
# File 'lib/twilio-ruby/rest/verify/v2/template.rb', line 194

def translations
  @properties['translations']
end