Class: Twilio::REST::Intelligence::V2::OperatorTypeInstance

Inherits:
Twilio::REST::InstanceResource show all
Defined in:
lib/twilio-ruby/rest/intelligence/v2/operator_type.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, sid: nil) ⇒ OperatorTypeInstance

Initialize the OperatorTypeInstance

Parameters:

  • Version that contains the resource

  • payload that contains response from Twilio

  • The SID of the Account that created this OperatorType resource.

  • (defaults to: nil)

    The SID of the Call resource to fetch.



383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 383

def initialize(version, payload , sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'name' => payload['name'],
        'sid' => payload['sid'],
        'friendly_name' => payload['friendly_name'],
        'description' => payload['description'],
        'docs_link' => payload['docs_link'],
        'output_type' => payload['output_type'],
        'supported_languages' => payload['supported_languages'],
        'provider' => payload['provider'],
        'availability' => payload['availability'],
        'configurable' => payload['configurable'],
        'config_schema' => payload['config_schema'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = { 'sid' => sid  || @properties['sid']  , }
end

Instance Method Details

#availabilityAvailability

Returns:



471
472
473
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 471

def availability
    @properties['availability']
end

#config_schemaHash

Returns JSON Schema for configuring an Operator with this Operator Type. Following json-schema.org/.

Returns:

  • JSON Schema for configuring an Operator with this Operator Type. Following json-schema.org/



483
484
485
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 483

def config_schema
    @properties['config_schema']
end

#configurableBoolean

Returns Operators can be created from configurable Operator Types.

Returns:

  • Operators can be created from configurable Operator Types.



477
478
479
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 477

def configurable
    @properties['configurable']
end

#contextOperatorTypeContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:

  • CallContext for this CallInstance



414
415
416
417
418
419
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 414

def context
    unless @instance_context
        @instance_context = OperatorTypeContext.new(@version , @params['sid'])
    end
    @instance_context
end

#date_createdTime

Returns The date that this Operator Type was created, given in ISO 8601 format.

Returns:

  • The date that this Operator Type was created, given in ISO 8601 format.



489
490
491
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 489

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The date that this Operator Type was updated, given in ISO 8601 format.

Returns:

  • The date that this Operator Type was updated, given in ISO 8601 format.



495
496
497
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 495

def date_updated
    @properties['date_updated']
end

#descriptionString

Returns A human-readable description of this resource, longer than the friendly name.

Returns:

  • A human-readable description of this resource, longer than the friendly name.



441
442
443
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 441

def description
    @properties['description']
end

Returns Additional documentation for the Operator Type.

Returns:

  • Additional documentation for the Operator Type.



447
448
449
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 447

def docs_link
    @properties['docs_link']
end

#fetchOperatorTypeInstance

Fetch the OperatorTypeInstance

Returns:

  • Fetched OperatorTypeInstance



508
509
510
511
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 508

def fetch

    context.fetch
end

#friendly_nameString

Returns A human-readable name of this resource, up to 64 characters.

Returns:

  • A human-readable name of this resource, up to 64 characters.



435
436
437
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 435

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



522
523
524
525
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 522

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Intelligence.V2.OperatorTypeInstance #{values}>"
end

#nameString

Returns A unique name that references an Operator’s Operator Type.

Returns:

  • A unique name that references an Operator’s Operator Type.



423
424
425
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 423

def name
    @properties['name']
end

#output_typeOutputType

Returns:



453
454
455
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 453

def output_type
    @properties['output_type']
end

#providerProvider

Returns:



465
466
467
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 465

def provider
    @properties['provider']
end

#sidString

Returns A 34 character string that uniquely identifies this Operator Type.

Returns:

  • A 34 character string that uniquely identifies this Operator Type.



429
430
431
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 429

def sid
    @properties['sid']
end

#supported_languagesArray<String>

Returns List of languages this Operator Type supports.

Returns:

  • List of languages this Operator Type supports.



459
460
461
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 459

def supported_languages
    @properties['supported_languages']
end

#to_sObject

Provide a user friendly representation



515
516
517
518
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 515

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Intelligence.V2.OperatorTypeInstance #{values}>"
end

#urlString

Returns The URL of this resource.

Returns:

  • The URL of this resource.



501
502
503
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 501

def url
    @properties['url']
end