Class: Twilio::REST::Serverless::V1::ServiceContext::BuildContext::BuildStatusInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Serverless::V1::ServiceContext::BuildContext::BuildStatusInstance
- Defined in:
- lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Build resource.
-
#context ⇒ BuildStatusContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ BuildStatusInstance
Fetch the BuildStatusInstance.
-
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ BuildStatusInstance
constructor
Initialize the BuildStatusInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#service_sid ⇒ String
The SID of the Service that the Build resource is associated with.
-
#sid ⇒ String
The unique string that we created to identify the Build resource.
- #status ⇒ Status
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the Build Status resource.
Constructor Details
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ BuildStatusInstance
Initialize the BuildStatusInstance
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb', line 136 def initialize(version, payload , service_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'service_sid' => payload['service_sid'], 'status' => payload['status'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'service_sid' => service_sid || @properties['service_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 Build resource.
172 173 174 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb', line 172 def account_sid @properties['account_sid'] end |
#context ⇒ BuildStatusContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
157 158 159 160 161 162 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb', line 157 def context unless @instance_context @instance_context = BuildStatusContext.new(@version , @params['service_sid'], @params['sid']) end @instance_context end |
#fetch ⇒ BuildStatusInstance
Fetch the BuildStatusInstance
197 198 199 200 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb', line 197 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
211 212 213 214 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb', line 211 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Serverless.V1.BuildStatusInstance #{values}>" end |
#service_sid ⇒ String
Returns The SID of the Service that the Build resource is associated with.
178 179 180 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb', line 178 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The unique string that we created to identify the Build resource.
166 167 168 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb', line 166 def sid @properties['sid'] end |
#status ⇒ Status
184 185 186 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb', line 184 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
204 205 206 207 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb', line 204 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Serverless.V1.BuildStatusInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the Build Status resource.
190 191 192 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb', line 190 def url @properties['url'] end |