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
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Function Version resource.
-
#context ⇒ FunctionVersionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date and time in GMT when the Function Version resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#fetch ⇒ FunctionVersionInstance
Fetch the FunctionVersionInstance.
-
#function_sid ⇒ String
The SID of the Function resource that is the parent of the Function Version resource.
-
#function_version_content ⇒ function_version_content
Access the function_version_content.
-
#initialize(version, payload, service_sid: nil, function_sid: nil, sid: nil) ⇒ FunctionVersionInstance
constructor
Initialize the FunctionVersionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
- #links ⇒ Hash
-
#path ⇒ String
The URL-friendly string by which the Function Version resource can be referenced.
-
#service_sid ⇒ String
The SID of the Service that the Function Version resource is associated with.
-
#sid ⇒ String
The unique string that we created to identify the Function Version resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the Function Version resource.
- #visibility ⇒ Visibility
Constructor Details
#initialize(version, payload, service_sid: nil, function_sid: nil, sid: nil) ⇒ FunctionVersionInstance
Initialize the FunctionVersionInstance
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 238 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'], 'visibility' => payload['visibility'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'service_sid' => service_sid || @properties['service_sid'] ,'function_sid' => function_sid || @properties['function_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Function Version resource.
278 279 280 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 278 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
263 264 265 266 267 268 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 263 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 and time in GMT when the Function Version resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
308 309 310 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 308 def date_created @properties['date_created'] end |
#fetch ⇒ FunctionVersionInstance
Fetch the FunctionVersionInstance
327 328 329 330 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 327 def fetch context.fetch end |
#function_sid ⇒ String
Returns The SID of the Function resource that is the parent of the Function Version resource.
290 291 292 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 290 def function_sid @properties['function_sid'] end |
#function_version_content ⇒ function_version_content
Access the function_version_content
335 336 337 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 335 def function_version_content context.function_version_content end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
348 349 350 351 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 348 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Serverless.V1.FunctionVersionInstance #{values}>" end |
#links ⇒ Hash
320 321 322 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 320 def links @properties['links'] end |
#path ⇒ String
Returns The URL-friendly string by which the Function Version resource can be referenced. It can be a maximum of 255 characters. All paths begin with a forward slash (‘/’). If a Function Version creation request is submitted with a path not containing a leading slash, the path will automatically be prepended with one.
296 297 298 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 296 def path @properties['path'] end |
#service_sid ⇒ String
Returns The SID of the Service that the Function Version resource is associated with.
284 285 286 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 284 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The unique string that we created to identify the Function Version resource.
272 273 274 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 272 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
341 342 343 344 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 341 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Serverless.V1.FunctionVersionInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the Function Version resource.
314 315 316 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 314 def url @properties['url'] end |
#visibility ⇒ Visibility
302 303 304 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb', line 302 def visibility @properties['visibility'] end |