Class: Twilio::REST::Serverless::V1::ServiceContext::BuildContext::BuildStatusContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Serverless::V1::ServiceContext::BuildContext::BuildStatusContext
- Defined in:
- lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb
Instance Method Summary collapse
-
#fetch ⇒ BuildStatusInstance
Fetch the BuildStatusInstance.
-
#initialize(version, service_sid, sid) ⇒ BuildStatusContext
constructor
Initialize the BuildStatusContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, service_sid, sid) ⇒ BuildStatusContext
Initialize the BuildStatusContext
53 54 55 56 57 58 59 60 61 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb', line 53 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]}/Status" end |
Instance Method Details
#fetch ⇒ BuildStatusInstance
Fetch the BuildStatusInstance
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb', line 65 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) BuildStatusInstance.new( @version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
92 93 94 95 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb', line 92 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Serverless.V1.BuildStatusContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
85 86 87 88 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb', line 85 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Serverless.V1.BuildStatusContext #{context}>" end |