Class: Twilio::REST::Serverless::V1::ServiceContext::FunctionContext::FunctionVersionContext::FunctionVersionContentInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Serverless::V1::ServiceContext::FunctionContext::FunctionVersionContext::FunctionVersionContentInstance
- Defined in:
- lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.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].
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the Function Version resource.
-
#content ⇒ String
The content of the Function Version resource.
-
#context ⇒ FunctionVersionContentContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ FunctionVersionContentInstance
Fetch a FunctionVersionContentInstance.
-
#function_sid ⇒ String
The SID of the Function that is the parent of the Function Version.
-
#initialize(version, payload, service_sid: nil, function_sid: nil, sid: nil) ⇒ FunctionVersionContentInstance
constructor
Initialize the FunctionVersionContentInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#service_sid ⇒ String
The SID of the Service that the Function Version resource is associated with.
-
#sid ⇒ String
The unique string that identifies the Function Version resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, service_sid: nil, function_sid: nil, sid: nil) ⇒ FunctionVersionContentInstance
Initialize the FunctionVersionContentInstance
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 150 def initialize(version, payload, service_sid: nil, function_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'service_sid' => payload['service_sid'], 'function_sid' => payload['function_sid'], 'content' => payload['content'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'service_sid' => service_sid, 'function_sid' => function_sid, 'sid' => sid, } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the Function Version resource.
192 193 194 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 192 def account_sid @properties['account_sid'] end |
#content ⇒ String
Returns The content of the Function Version resource.
210 211 212 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 210 def content @properties['content'] end |
#context ⇒ FunctionVersionContentContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 172 def context unless @instance_context @instance_context = FunctionVersionContentContext.new( @version, @params['service_sid'], @params['function_sid'], @params['sid'], ) end @instance_context end |
#fetch ⇒ FunctionVersionContentInstance
Fetch a FunctionVersionContentInstance
223 224 225 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 223 def fetch context.fetch end |
#function_sid ⇒ String
Returns The SID of the Function that is the parent of the Function Version.
204 205 206 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 204 def function_sid @properties['function_sid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
236 237 238 239 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 236 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Serverless.V1.FunctionVersionContentInstance #{values}>" end |
#service_sid ⇒ String
Returns The SID of the Service that the Function Version resource is associated with.
198 199 200 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 198 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The unique string that identifies the Function Version resource.
186 187 188 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 186 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
229 230 231 232 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 229 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Serverless.V1.FunctionVersionContentInstance #{values}>" end |
#url ⇒ String
Returns The url.
216 217 218 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 216 def url @properties['url'] end |