Class: Twilio::REST::Content::V1::ContentContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Content::V1::ContentContext
- Defined in:
- lib/twilio-ruby/rest/content/v1/content.rb,
lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb,
lib/twilio-ruby/rest/content/v1/content/approval_create.rb
Defined Under Namespace
Classes: ApprovalCreateInstance, ApprovalCreateList, ApprovalCreatePage, ApprovalFetchContext, ApprovalFetchInstance, ApprovalFetchList, ApprovalFetchPage
Instance Method Summary collapse
-
#approval_create ⇒ ApprovalCreateList, ApprovalCreateContext
Access the approval_create.
-
#approval_fetch ⇒ ApprovalFetchList, ApprovalFetchContext
Access the approval_fetch.
-
#delete ⇒ Boolean
Delete the ContentInstance.
-
#fetch ⇒ ContentInstance
Fetch the ContentInstance.
-
#initialize(version, sid) ⇒ ContentContext
constructor
Initialize the ContentContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ ContentContext
Initialize the ContentContext
535 536 537 538 539 540 541 542 543 544 545 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 535 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Content/#{@solution[:sid]}" # Dependents @approval_create = nil @approval_fetch = nil end |
Instance Method Details
#approval_create ⇒ ApprovalCreateList, ApprovalCreateContext
Access the approval_create
573 574 575 576 577 578 579 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 573 def approval_create unless @approval_create @approval_create = ApprovalCreateList.new( @version, content_sid: @solution[:sid], ) end @approval_create end |
#approval_fetch ⇒ ApprovalFetchList, ApprovalFetchContext
Access the approval_fetch
584 585 586 587 588 589 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 584 def approval_fetch ApprovalFetchContext.new( @version, @solution[:sid] ) end |
#delete ⇒ Boolean
Delete the ContentInstance
549 550 551 552 553 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 549 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ ContentInstance
Fetch the ContentInstance
558 559 560 561 562 563 564 565 566 567 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 558 def fetch payload = @version.fetch('GET', @uri) ContentInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
600 601 602 603 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 600 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Content.V1.ContentContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
593 594 595 596 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 593 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Content.V1.ContentContext #{context}>" end |