Class: Twilio::REST::Serverless::V1::ServiceContext::BuildContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Serverless::V1::ServiceContext::BuildContext
- Defined in:
- lib/twilio-ruby/rest/serverless/v1/service/build.rb,
lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb
Defined Under Namespace
Classes: BuildStatusContext, BuildStatusInstance, BuildStatusList, BuildStatusPage
Instance Method Summary collapse
-
#build_status ⇒ BuildStatusList, BuildStatusContext
Access the build_status.
-
#delete ⇒ Boolean
Delete the BuildInstance.
-
#fetch ⇒ BuildInstance
Fetch the BuildInstance.
-
#initialize(version, service_sid, sid) ⇒ BuildContext
constructor
Initialize the BuildContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, service_sid, sid) ⇒ BuildContext
Initialize the BuildContext
174 175 176 177 178 179 180 181 182 183 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 174 def initialize(version, service_sid, sid) super(version) # Path Solution @solution = { service_sid: service_sid, sid: sid, } @uri = "/Services/#{@solution[:service_sid]}/Builds/#{@solution[:sid]}" # Dependents @build_status = nil end |
Instance Method Details
#build_status ⇒ BuildStatusList, BuildStatusContext
Access the build_status
220 221 222 223 224 225 226 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 220 def build_status BuildStatusContext.new( @version, @solution[:service_sid], @solution[:sid] ) end |
#delete ⇒ Boolean
Delete the BuildInstance
187 188 189 190 191 192 193 194 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 187 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch ⇒ BuildInstance
Fetch the BuildInstance
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 199 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) BuildInstance.new( @version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
237 238 239 240 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 237 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Serverless.V1.BuildContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
230 231 232 233 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 230 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Serverless.V1.BuildContext #{context}>" end |