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
242 243 244 245 246 247 248 249 250 251 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 242 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
255 256 257 258 259 260 261 262 263 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 255 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
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 268 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
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 287 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
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 307 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
340 341 342 343 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 340 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.CustomerProfilesChannelEndpointAssignmentContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
333 334 335 336 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 333 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.CustomerProfilesChannelEndpointAssignmentContext #{context}>" end |