Class: Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsEntityAssignmentsContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsEntityAssignmentsContext
- Defined in:
- lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the TrustProductsEntityAssignmentsInstance.
-
#delete_with_metadata ⇒ Boolean
Delete the TrustProductsEntityAssignmentsInstanceMetadata.
-
#fetch ⇒ TrustProductsEntityAssignmentsInstance
Fetch the TrustProductsEntityAssignmentsInstance.
-
#fetch_with_metadata ⇒ TrustProductsEntityAssignmentsInstance
Fetch the TrustProductsEntityAssignmentsInstanceMetadata.
-
#initialize(version, trust_product_sid, sid) ⇒ TrustProductsEntityAssignmentsContext
constructor
Initialize the TrustProductsEntityAssignmentsContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, trust_product_sid, sid) ⇒ TrustProductsEntityAssignmentsContext
Initialize the TrustProductsEntityAssignmentsContext
236 237 238 239 240 241 242 243 244 245 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 236 def initialize(version, trust_product_sid, sid) super(version) # Path Solution @solution = { trust_product_sid: trust_product_sid, sid: sid, } @uri = "/TrustProducts/#{@solution[:trust_product_sid]}/EntityAssignments/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the TrustProductsEntityAssignmentsInstance
249 250 251 252 253 254 255 256 257 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 249 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#delete_with_metadata ⇒ Boolean
Delete the TrustProductsEntityAssignmentsInstanceMetadata
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 262 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) trustProductsEntityAssignments_instance = TrustProductsEntityAssignmentsInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) TrustProductsEntityAssignmentsInstanceMetadata.new(@version, trustProductsEntityAssignments_instance, response.headers, response.status_code) end |
#fetch ⇒ TrustProductsEntityAssignmentsInstance
Fetch the TrustProductsEntityAssignmentsInstance
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 281 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) TrustProductsEntityAssignmentsInstance.new( @version, payload, trust_product_sid: @solution[:trust_product_sid], sid: @solution[:sid], ) end |
#fetch_with_metadata ⇒ TrustProductsEntityAssignmentsInstance
Fetch the TrustProductsEntityAssignmentsInstanceMetadata
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 301 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) trust_products_entity_assignments_instance = TrustProductsEntityAssignmentsInstance.new( @version, response.body, trust_product_sid: @solution[:trust_product_sid], sid: @solution[:sid], ) TrustProductsEntityAssignmentsInstanceMetadata.new( @version, trust_products_entity_assignments_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
334 335 336 337 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 334 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.TrustProductsEntityAssignmentsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
327 328 329 330 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 327 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.TrustProductsEntityAssignmentsContext #{context}>" end |