Class: Twilio::REST::Api::V2010::AccountContext::CallContext::SiprecInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::CallContext::SiprecInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created this resource.
-
#call_sid ⇒ String
The SID of the Call the resource is associated with.
-
#context ⇒ SiprecContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_updated ⇒ Time
The RFC 2822 date and time in GMT that this resource was last updated.
-
#initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil) ⇒ SiprecInstance
constructor
Initialize the SiprecInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#name ⇒ String
The name of this resource.
-
#sid ⇒ String
The SID of the Siprec resource.
-
#status ⇒ siprec.Status
The status - one of ‘stopped`, `in-progress`.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(status: nil) ⇒ SiprecInstance
Update the SiprecInstance.
Constructor Details
#initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil) ⇒ SiprecInstance
Initialize the SiprecInstance
570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 570 def initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'call_sid' => payload['call_sid'], 'name' => payload['name'], 'status' => payload['status'], 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), } # Context @instance_context = nil @params = {'account_sid' => account_sid, 'call_sid' => call_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created this resource.
612 613 614 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 612 def account_sid @properties['account_sid'] end |
#call_sid ⇒ String
Returns The SID of the Call the resource is associated with.
618 619 620 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 618 def call_sid @properties['call_sid'] end |
#context ⇒ SiprecContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
592 593 594 595 596 597 598 599 600 601 602 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 592 def context unless @instance_context @instance_context = SiprecContext.new( @version, @params['account_sid'], @params['call_sid'], @params['sid'], ) end @instance_context end |
#date_updated ⇒ Time
Returns The RFC 2822 date and time in GMT that this resource was last updated.
636 637 638 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 636 def date_updated @properties['date_updated'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
657 658 659 660 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 657 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.SiprecInstance #{values}>" end |
#name ⇒ String
Returns The name of this resource.
624 625 626 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 624 def name @properties['name'] end |
#sid ⇒ String
Returns The SID of the Siprec resource.
606 607 608 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 606 def sid @properties['sid'] end |
#status ⇒ siprec.Status
Returns The status - one of ‘stopped`, `in-progress`.
630 631 632 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 630 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
650 651 652 653 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 650 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.SiprecInstance #{values}>" end |
#update(status: nil) ⇒ SiprecInstance
Update the SiprecInstance
644 645 646 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 644 def update(status: nil) context.update(status: status, ) end |