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

  • account_sid (String)

    The SID of the Account that created this Template resource.

  • sid (String)

    The SID of the Call resource to fetch.



170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/twilio-ruby/rest/verify/v2/template.rb', line 170

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 The unique SID identifier of the Account.

Returns:

  • (String)

    The unique SID identifier of the Account.



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

def 
    @properties['account_sid']
end

#channelsArray<String>

Returns A list of channels that support the Template. Can include: sms, voice.

Returns:

  • (Array<String>)

    A list of channels that support the Template. Can include: sms, voice.



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

def channels
    @properties['channels']
end

#friendly_nameString

Returns A descriptive string that you create to describe a Template. It can be up to 32 characters long.

Returns:

  • (String)

    A descriptive string that you create to describe a Template. It can be up to 32 characters long.



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

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



222
223
224
# File 'lib/twilio-ruby/rest/verify/v2/template.rb', line 222

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

#sidString

Returns A 34 character string that uniquely identifies a Verification Template.

Returns:

  • (String)

    A 34 character string that uniquely identifies a Verification Template.



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

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



216
217
218
# File 'lib/twilio-ruby/rest/verify/v2/template.rb', line 216

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

#translationsHash

Returns An object that contains the different translations of the template. Every translation is identified by the language short name and contains its respective information as the approval status, text and created/modified date.

Returns:

  • (Hash)

    An object that contains the different translations of the template. Every translation is identified by the language short name and contains its respective information as the approval status, text and created/modified date.



210
211
212
# File 'lib/twilio-ruby/rest/verify/v2/template.rb', line 210

def translations
    @properties['translations']
end