Class: Twilio::REST::Intelligence::V2::OperatorTypeInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Intelligence::V2::OperatorTypeInstance
- Defined in:
- lib/twilio-ruby/rest/intelligence/v2/operator_type.rb
Instance Method Summary collapse
- #availability ⇒ Availability
-
#config_schema ⇒ Hash
JSON Schema for configuring an Operator with this Operator Type.
-
#configurable ⇒ Boolean
Operators can be created from configurable Operator Types.
-
#context ⇒ OperatorTypeContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date that this Operator Type was created, given in ISO 8601 format.
-
#date_updated ⇒ Time
The date that this Operator Type was updated, given in ISO 8601 format.
-
#description ⇒ String
A human-readable description of this resource, longer than the friendly name.
-
#docs_link ⇒ String
Additional documentation for the Operator Type.
-
#fetch ⇒ OperatorTypeInstance
Fetch the OperatorTypeInstance.
-
#friendly_name ⇒ String
A human-readable name of this resource, up to 64 characters.
-
#initialize(version, payload, sid: nil) ⇒ OperatorTypeInstance
constructor
Initialize the OperatorTypeInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#name ⇒ String
A unique name that references an Operator’s Operator Type.
- #output_type ⇒ OutputType
- #provider ⇒ Provider
-
#sid ⇒ String
A 34 character string that uniquely identifies this Operator Type.
-
#supported_languages ⇒ Array<String>
List of languages this Operator Type supports.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ OperatorTypeInstance
Initialize the OperatorTypeInstance
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 375 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
#availability ⇒ Availability
463 464 465 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 463 def availability @properties['availability'] end |
#config_schema ⇒ Hash
Returns JSON Schema for configuring an Operator with this Operator Type. Following json-schema.org/.
475 476 477 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 475 def config_schema @properties['config_schema'] end |
#configurable ⇒ Boolean
Returns Operators can be created from configurable Operator Types.
469 470 471 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 469 def configurable @properties['configurable'] end |
#context ⇒ OperatorTypeContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
406 407 408 409 410 411 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 406 def context unless @instance_context @instance_context = OperatorTypeContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date that this Operator Type was created, given in ISO 8601 format.
481 482 483 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 481 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this Operator Type was updated, given in ISO 8601 format.
487 488 489 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 487 def date_updated @properties['date_updated'] end |
#description ⇒ String
Returns A human-readable description of this resource, longer than the friendly name.
433 434 435 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 433 def description @properties['description'] end |
#docs_link ⇒ String
Returns Additional documentation for the Operator Type.
439 440 441 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 439 def docs_link @properties['docs_link'] end |
#fetch ⇒ OperatorTypeInstance
Fetch the OperatorTypeInstance
500 501 502 503 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 500 def fetch context.fetch end |
#friendly_name ⇒ String
Returns A human-readable name of this resource, up to 64 characters.
427 428 429 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 427 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
514 515 516 517 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 514 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V2.OperatorTypeInstance #{values}>" end |
#name ⇒ String
Returns A unique name that references an Operator’s Operator Type.
415 416 417 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 415 def name @properties['name'] end |
#output_type ⇒ OutputType
445 446 447 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 445 def output_type @properties['output_type'] end |
#provider ⇒ Provider
457 458 459 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 457 def provider @properties['provider'] end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this Operator Type.
421 422 423 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 421 def sid @properties['sid'] end |
#supported_languages ⇒ Array<String>
Returns List of languages this Operator Type supports.
451 452 453 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 451 def supported_languages @properties['supported_languages'] end |
#to_s ⇒ Object
Provide a user friendly representation
507 508 509 510 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 507 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V2.OperatorTypeInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
493 494 495 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_type.rb', line 493 def url @properties['url'] end |