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
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
Defined Under Namespace
Classes: ApprovalFetchContext, ApprovalFetchInstance, ApprovalFetchList, ApprovalFetchPage
Instance Method Summary collapse
-
#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
134 135 136 137 138 139 140 141 142 143 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 134 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Content/#{@solution[:sid]}" # Dependents @approval_fetch = nil end |
Instance Method Details
#approval_fetch ⇒ ApprovalFetchList, ApprovalFetchContext
Access the approval_fetch
169 170 171 172 173 174 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 169 def approval_fetch ApprovalFetchContext.new( @version, @solution[:sid] ) end |
#delete ⇒ Boolean
Delete the ContentInstance
147 148 149 150 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 147 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ ContentInstance
Fetch the ContentInstance
155 156 157 158 159 160 161 162 163 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 155 def fetch payload = @version.fetch('GET', @uri) ContentInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
185 186 187 188 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 185 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Content.V1.ContentContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
178 179 180 181 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 178 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Content.V1.ContentContext #{context}>" end |