Class: Twilio::REST::Serverless::V1::ServiceContext::FunctionContext::FunctionVersionContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Serverless::V1::ServiceContext::FunctionContext::FunctionVersionContext
- Defined in:
- lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb,
lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb
Defined Under Namespace
Classes: FunctionVersionContentContext, FunctionVersionContentInstance, FunctionVersionContentList, FunctionVersionContentPage
Instance Method Summary collapse
-
#fetch ⇒ FunctionVersionInstance
Fetch the FunctionVersionInstance.
-
#function_version_content ⇒ FunctionVersionContentList, FunctionVersionContentContext
Access the function_version_content.
-
#initialize(version, service_sid, function_sid, sid) ⇒ FunctionVersionContext
constructor
Initialize the FunctionVersionContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, service_sid, function_sid, sid) ⇒ FunctionVersionContext
Initialize the FunctionVersionContext
141 142 143 144 145 146 147 148 149 150 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 141 def initialize(version, service_sid, function_sid, sid) super(version) # Path Solution @solution = { service_sid: service_sid, function_sid: function_sid, sid: sid, } @uri = "/Services/#{@solution[:service_sid]}/Functions/#{@solution[:function_sid]}/Versions/#{@solution[:sid]}" # Dependents @function_version_content = nil end |
Instance Method Details
#fetch ⇒ FunctionVersionInstance
Fetch the FunctionVersionInstance
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 154 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) FunctionVersionInstance.new( @version, payload, service_sid: @solution[:service_sid], function_sid: @solution[:function_sid], sid: @solution[:sid], ) end |
#function_version_content ⇒ FunctionVersionContentList, FunctionVersionContentContext
Access the function_version_content
176 177 178 179 180 181 182 183 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 176 def function_version_content FunctionVersionContentContext.new( @version, @solution[:service_sid], @solution[:function_sid], @solution[:sid] ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
194 195 196 197 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 194 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Serverless.V1.FunctionVersionContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
187 188 189 190 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 187 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Serverless.V1.FunctionVersionContext #{context}>" end |