Class: Twilio::REST::Trusthub::V1::CustomerProfilesContext::CustomerProfilesChannelEndpointAssignmentContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Trusthub::V1::CustomerProfilesContext::CustomerProfilesChannelEndpointAssignmentContext
- Defined in:
- lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the CustomerProfilesChannelEndpointAssignmentInstance.
-
#delete_with_metadata ⇒ Boolean
Delete the CustomerProfilesChannelEndpointAssignmentInstanceMetadata.
-
#fetch ⇒ CustomerProfilesChannelEndpointAssignmentInstance
Fetch the CustomerProfilesChannelEndpointAssignmentInstance.
-
#fetch_with_metadata ⇒ CustomerProfilesChannelEndpointAssignmentInstance
Fetch the CustomerProfilesChannelEndpointAssignmentInstanceMetadata.
-
#initialize(version, customer_profile_sid, sid) ⇒ CustomerProfilesChannelEndpointAssignmentContext
constructor
Initialize the CustomerProfilesChannelEndpointAssignmentContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, customer_profile_sid, sid) ⇒ CustomerProfilesChannelEndpointAssignmentContext
Initialize the CustomerProfilesChannelEndpointAssignmentContext
250 251 252 253 254 255 256 257 258 259 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 250 def initialize(version, customer_profile_sid, sid) super(version) # Path Solution @solution = { customer_profile_sid: customer_profile_sid, sid: sid, } @uri = "/CustomerProfiles/#{@solution[:customer_profile_sid]}/ChannelEndpointAssignments/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the CustomerProfilesChannelEndpointAssignmentInstance
263 264 265 266 267 268 269 270 271 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 263 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 CustomerProfilesChannelEndpointAssignmentInstanceMetadata
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 276 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) customerProfilesChannelEndpointAssignment_instance = CustomerProfilesChannelEndpointAssignmentInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) CustomerProfilesChannelEndpointAssignmentInstanceMetadata.new(@version, customerProfilesChannelEndpointAssignment_instance, response.headers, response.status_code) end |
#fetch ⇒ CustomerProfilesChannelEndpointAssignmentInstance
Fetch the CustomerProfilesChannelEndpointAssignmentInstance
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 295 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) CustomerProfilesChannelEndpointAssignmentInstance.new( @version, payload, customer_profile_sid: @solution[:customer_profile_sid], sid: @solution[:sid], ) end |
#fetch_with_metadata ⇒ CustomerProfilesChannelEndpointAssignmentInstance
Fetch the CustomerProfilesChannelEndpointAssignmentInstanceMetadata
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 315 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) customer_profiles_channel_endpoint_assignment_instance = CustomerProfilesChannelEndpointAssignmentInstance.new( @version, response.body, customer_profile_sid: @solution[:customer_profile_sid], sid: @solution[:sid], ) CustomerProfilesChannelEndpointAssignmentInstanceMetadata.new( @version, customer_profiles_channel_endpoint_assignment_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
348 349 350 351 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 348 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.CustomerProfilesChannelEndpointAssignmentContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
341 342 343 344 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 341 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.CustomerProfilesChannelEndpointAssignmentContext #{context}>" end |