Class: Twilio::REST::Messaging::V1::ServiceInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Messaging::V1::ServiceInstance
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/service.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
The account_sid.
-
#alpha_senders ⇒ alpha_senders
Access the alpha_senders.
-
#area_code_geomatch ⇒ Boolean
The area_code_geomatch.
-
#context ⇒ ServiceContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date_created.
-
#date_updated ⇒ Time
The date_updated.
-
#delete ⇒ Boolean
Deletes the ServiceInstance.
-
#fallback_method ⇒ String
The fallback_method.
-
#fallback_to_long_code ⇒ Boolean
The fallback_to_long_code.
-
#fallback_url ⇒ String
The fallback_url.
-
#fetch ⇒ ServiceInstance
Fetch a ServiceInstance.
-
#friendly_name ⇒ String
The friendly_name.
-
#inbound_method ⇒ String
The inbound_method.
-
#inbound_request_url ⇒ String
The inbound_request_url.
-
#initialize(version, payload, sid: nil) ⇒ ServiceInstance
constructor
Initialize the ServiceInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
The links.
-
#mms_converter ⇒ Boolean
The mms_converter.
-
#phone_numbers ⇒ phone_numbers
Access the phone_numbers.
-
#scan_message_content ⇒ service.ScanMessageContent
The scan_message_content.
-
#short_codes ⇒ short_codes
Access the short_codes.
-
#sid ⇒ String
The sid.
-
#smart_encoding ⇒ Boolean
The smart_encoding.
-
#status_callback ⇒ String
The status_callback.
-
#sticky_sender ⇒ Boolean
The sticky_sender.
-
#synchronous_validation ⇒ Boolean
The synchronous_validation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset) ⇒ ServiceInstance
Update the ServiceInstance.
-
#url ⇒ String
The url.
-
#validity_period ⇒ String
The validity_period.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ ServiceInstance
Initialize the ServiceInstance
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 395 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'friendly_name' => payload['friendly_name'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'inbound_request_url' => payload['inbound_request_url'], 'inbound_method' => payload['inbound_method'], 'fallback_url' => payload['fallback_url'], 'fallback_method' => payload['fallback_method'], 'status_callback' => payload['status_callback'], 'sticky_sender' => payload['sticky_sender'], 'mms_converter' => payload['mms_converter'], 'smart_encoding' => payload['smart_encoding'], 'scan_message_content' => payload['scan_message_content'], 'fallback_to_long_code' => payload['fallback_to_long_code'], 'area_code_geomatch' => payload['area_code_geomatch'], 'synchronous_validation' => payload['synchronous_validation'], 'validity_period' => payload['validity_period'].to_i, 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The account_sid.
451 452 453 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 451 def account_sid @properties['account_sid'] end |
#alpha_senders ⇒ alpha_senders
Access the alpha_senders
631 632 633 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 631 def alpha_senders context.alpha_senders end |
#area_code_geomatch ⇒ Boolean
Returns The area_code_geomatch.
535 536 537 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 535 def area_code_geomatch @properties['area_code_geomatch'] end |
#context ⇒ ServiceContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
433 434 435 436 437 438 439 440 441 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 433 def context unless @instance_context @instance_context = ServiceContext.new( @version, @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The date_created.
463 464 465 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 463 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date_updated.
469 470 471 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 469 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the ServiceInstance
610 611 612 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 610 def delete context.delete end |
#fallback_method ⇒ String
Returns The fallback_method.
493 494 495 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 493 def fallback_method @properties['fallback_method'] end |
#fallback_to_long_code ⇒ Boolean
Returns The fallback_to_long_code.
529 530 531 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 529 def fallback_to_long_code @properties['fallback_to_long_code'] end |
#fallback_url ⇒ String
Returns The fallback_url.
487 488 489 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 487 def fallback_url @properties['fallback_url'] end |
#fetch ⇒ ServiceInstance
Fetch a ServiceInstance
603 604 605 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 603 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The friendly_name.
457 458 459 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 457 def friendly_name @properties['friendly_name'] end |
#inbound_method ⇒ String
Returns The inbound_method.
481 482 483 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 481 def inbound_method @properties['inbound_method'] end |
#inbound_request_url ⇒ String
Returns The inbound_request_url.
475 476 477 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 475 def inbound_request_url @properties['inbound_request_url'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
644 645 646 647 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 644 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.ServiceInstance #{values}>" end |
#links ⇒ String
Returns The links.
559 560 561 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 559 def links @properties['links'] end |
#mms_converter ⇒ Boolean
Returns The mms_converter.
511 512 513 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 511 def mms_converter @properties['mms_converter'] end |
#phone_numbers ⇒ phone_numbers
Access the phone_numbers
617 618 619 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 617 def phone_numbers context.phone_numbers end |
#scan_message_content ⇒ service.ScanMessageContent
Returns The scan_message_content.
523 524 525 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 523 def @properties['scan_message_content'] end |
#short_codes ⇒ short_codes
Access the short_codes
624 625 626 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 624 def short_codes context.short_codes end |
#sid ⇒ String
Returns The sid.
445 446 447 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 445 def sid @properties['sid'] end |
#smart_encoding ⇒ Boolean
Returns The smart_encoding.
517 518 519 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 517 def smart_encoding @properties['smart_encoding'] end |
#status_callback ⇒ String
Returns The status_callback.
499 500 501 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 499 def status_callback @properties['status_callback'] end |
#sticky_sender ⇒ Boolean
Returns The sticky_sender.
505 506 507 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 505 def sticky_sender @properties['sticky_sender'] end |
#synchronous_validation ⇒ Boolean
Returns The synchronous_validation.
541 542 543 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 541 def synchronous_validation @properties['synchronous_validation'] end |
#to_s ⇒ Object
Provide a user friendly representation
637 638 639 640 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 637 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.ServiceInstance #{values}>" end |
#update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset) ⇒ ServiceInstance
Update the ServiceInstance
581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 581 def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset) context.update( friendly_name: friendly_name, inbound_request_url: inbound_request_url, inbound_method: inbound_method, fallback_url: fallback_url, fallback_method: fallback_method, status_callback: status_callback, sticky_sender: sticky_sender, mms_converter: mms_converter, smart_encoding: smart_encoding, scan_message_content: , fallback_to_long_code: fallback_to_long_code, area_code_geomatch: area_code_geomatch, validity_period: validity_period, synchronous_validation: synchronous_validation, ) end |
#url ⇒ String
Returns The url.
553 554 555 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 553 def url @properties['url'] end |
#validity_period ⇒ String
Returns The validity_period.
547 548 549 |
# File 'lib/twilio-ruby/rest/messaging/v1/service.rb', line 547 def validity_period @properties['validity_period'] end |