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 Siprec resource.
-
#call_sid ⇒ String
The SID of the Call the Siprec 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 date and time in GMT that this resource was last updated, specified in RFC 2822 format.
-
#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 user-specified name of this Siprec, if one was given when the Siprec was created.
-
#sid ⇒ String
The SID of the Siprec resource.
- #status ⇒ Status
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(status: nil) ⇒ SiprecInstance
Update the SiprecInstance.
-
#uri ⇒ String
The URI of the resource, relative to
https://api.twilio.com.
Constructor Details
#initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil) ⇒ SiprecInstance
Initialize the SiprecInstance
1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 1502 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']), 'uri' => payload['uri'], } # Context @instance_context = nil @params = { 'account_sid' => account_sid ,'call_sid' => call_sid || @properties['call_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created this Siprec resource.
1541 1542 1543 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 1541 def account_sid @properties['account_sid'] end |
#call_sid ⇒ String
Returns The SID of the Call the Siprec resource is associated with.
1547 1548 1549 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 1547 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
1526 1527 1528 1529 1530 1531 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 1526 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 date and time in GMT that this resource was last updated, specified in RFC 2822 format.
1565 1566 1567 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 1565 def date_updated @properties['date_updated'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
1597 1598 1599 1600 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 1597 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.SiprecInstance #{values}>" end |
#name ⇒ String
Returns The user-specified name of this Siprec, if one was given when the Siprec was created. This may be used to stop the Siprec.
1553 1554 1555 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 1553 def name @properties['name'] end |
#sid ⇒ String
Returns The SID of the Siprec resource.
1535 1536 1537 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 1535 def sid @properties['sid'] end |
#status ⇒ Status
1559 1560 1561 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 1559 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
1590 1591 1592 1593 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 1590 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.SiprecInstance #{values}>" end |
#update(status: nil) ⇒ SiprecInstance
Update the SiprecInstance
1579 1580 1581 1582 1583 1584 1585 1586 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 1579 def update( status: nil ) context.update( status: status, ) end |
#uri ⇒ String
Returns The URI of the resource, relative to https://api.twilio.com.
1571 1572 1573 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb', line 1571 def uri @properties['uri'] end |