Class: Twilio::REST::Serverless::V1::ServiceContext::FunctionContext::FunctionVersionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Serverless::V1::ServiceContext::FunctionContext::FunctionVersionInstance
- Defined in:
- lib/twilio-ruby/rest/serverless/v1/service/function/function_version.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
Account Sid.
-
#context ⇒ FunctionVersionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date that this Function Version was created.
-
#fetch ⇒ FunctionVersionInstance
Fetch a FunctionVersionInstance.
-
#function_sid ⇒ String
Function Sid.
-
#initialize(version, payload, service_sid: nil, function_sid: nil, sid: nil) ⇒ FunctionVersionInstance
constructor
Initialize the FunctionVersionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#path ⇒ String
The URL-friendly string by which this Function Version can be referenced.
-
#pre_signed_upload_url ⇒ Hash
The object which provides the details required for uploading this Function Version.
-
#service_sid ⇒ String
Service Sid.
-
#sid ⇒ String
Function Version Sid.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this Function Version.
-
#visibility ⇒ function_version.Visibility
The access control which determines how the Function Version can be accessed.
Constructor Details
#initialize(version, payload, service_sid: nil, function_sid: nil, sid: nil) ⇒ FunctionVersionInstance
Initialize the FunctionVersionInstance
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 254 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'], 'path' => payload['path'], 'pre_signed_upload_url' => payload['pre_signed_upload_url'], 'visibility' => payload['visibility'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'url' => payload['url'], } # Context @instance_context = nil @params = { 'service_sid' => service_sid, 'function_sid' => function_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns Account Sid.
303 304 305 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 303 def account_sid @properties['account_sid'] end |
#context ⇒ FunctionVersionContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 283 def context unless @instance_context @instance_context = FunctionVersionContext.new( @version, @params['service_sid'], @params['function_sid'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The date that this Function Version was created.
339 340 341 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 339 def date_created @properties['date_created'] end |
#fetch ⇒ FunctionVersionInstance
Fetch a FunctionVersionInstance
352 353 354 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 352 def fetch context.fetch end |
#function_sid ⇒ String
Returns Function Sid.
315 316 317 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 315 def function_sid @properties['function_sid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
365 366 367 368 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 365 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Serverless.V1.FunctionVersionInstance #{values}>" end |
#path ⇒ String
Returns The URL-friendly string by which this Function Version can be referenced.
321 322 323 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 321 def path @properties['path'] end |
#pre_signed_upload_url ⇒ Hash
Returns The object which provides the details required for uploading this Function Version.
327 328 329 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 327 def pre_signed_upload_url @properties['pre_signed_upload_url'] end |
#service_sid ⇒ String
Returns Service Sid.
309 310 311 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 309 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns Function Version Sid.
297 298 299 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 297 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
358 359 360 361 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 358 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Serverless.V1.FunctionVersionInstance #{values}>" end |
#url ⇒ String
Returns The URL of this Function Version.
345 346 347 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 345 def url @properties['url'] end |
#visibility ⇒ function_version.Visibility
Returns The access control which determines how the Function Version can be accessed.
333 334 335 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 333 def visibility @properties['visibility'] end |