Class: Twilio::REST::Serverless::V1::ServiceContext::FunctionContext::FunctionVersionContext::FunctionVersionContentContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Serverless::V1::ServiceContext::FunctionContext::FunctionVersionContext::FunctionVersionContentContext
- Defined in:
- lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb
Instance Method Summary collapse
-
#fetch ⇒ FunctionVersionContentInstance
Fetch the FunctionVersionContentInstance.
-
#initialize(version, service_sid, function_sid, sid) ⇒ FunctionVersionContentContext
constructor
Initialize the FunctionVersionContentContext.
-
#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) ⇒ FunctionVersionContentContext
Initialize the FunctionVersionContentContext
55 56 57 58 59 60 61 62 63 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 55 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]}/Content" end |
Instance Method Details
#fetch ⇒ FunctionVersionContentInstance
Fetch the FunctionVersionContentInstance
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 67 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) FunctionVersionContentInstance.new( @version, payload, service_sid: @solution[:service_sid], function_sid: @solution[:function_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
95 96 97 98 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 95 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Serverless.V1.FunctionVersionContentContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
88 89 90 91 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb', line 88 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Serverless.V1.FunctionVersionContentContext #{context}>" end |