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
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
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
139 140 141 142 143 144 145 146 147 148 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 139 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
152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 152 def fetch payload = @version.fetch('GET', @uri) 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
168 169 170 171 172 173 174 175 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 168 def function_version_content FunctionVersionContentContext.new( @version, @solution[:service_sid], @solution[:function_sid], @solution[:sid] ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
186 187 188 189 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 186 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Serverless.V1.FunctionVersionContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
179 180 181 182 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 179 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Serverless.V1.FunctionVersionContext #{context}>" end |