Class: Twilio::REST::Trusthub::V1::CustomerProfilesContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Trusthub::V1::CustomerProfilesContext
- Defined in:
- lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb,
lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb,
lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb,
lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb
Defined Under Namespace
Classes: CustomerProfilesChannelEndpointAssignmentContext, CustomerProfilesChannelEndpointAssignmentInstance, CustomerProfilesChannelEndpointAssignmentList, CustomerProfilesChannelEndpointAssignmentPage, CustomerProfilesEntityAssignmentsContext, CustomerProfilesEntityAssignmentsInstance, CustomerProfilesEntityAssignmentsList, CustomerProfilesEntityAssignmentsPage, CustomerProfilesEvaluationsContext, CustomerProfilesEvaluationsInstance, CustomerProfilesEvaluationsList, CustomerProfilesEvaluationsPage
Instance Method Summary collapse
-
#customer_profiles_channel_endpoint_assignment(sid = :unset) ⇒ CustomerProfilesChannelEndpointAssignmentList, CustomerProfilesChannelEndpointAssignmentContext
Access the customer_profiles_channel_endpoint_assignment.
-
#customer_profiles_entity_assignments(sid = :unset) ⇒ CustomerProfilesEntityAssignmentsList, CustomerProfilesEntityAssignmentsContext
Access the customer_profiles_entity_assignments.
-
#customer_profiles_evaluations(sid = :unset) ⇒ CustomerProfilesEvaluationsList, CustomerProfilesEvaluationsContext
Access the customer_profiles_evaluations.
-
#delete ⇒ Boolean
Delete the CustomerProfilesInstance.
-
#fetch ⇒ CustomerProfilesInstance
Fetch the CustomerProfilesInstance.
-
#initialize(version, sid) ⇒ CustomerProfilesContext
constructor
Initialize the CustomerProfilesContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ CustomerProfilesInstance
Update the CustomerProfilesInstance.
Constructor Details
#initialize(version, sid) ⇒ CustomerProfilesContext
Initialize the CustomerProfilesContext
182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 182 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/CustomerProfiles/#{@solution[:sid]}" # Dependents @customer_profiles_channel_endpoint_assignment = nil @customer_profiles_entity_assignments = nil @customer_profiles_evaluations = nil end |
Instance Method Details
#customer_profiles_channel_endpoint_assignment(sid = :unset) ⇒ CustomerProfilesChannelEndpointAssignmentList, CustomerProfilesChannelEndpointAssignmentContext
Access the customer_profiles_channel_endpoint_assignment
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 248 def customer_profiles_channel_endpoint_assignment(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return CustomerProfilesChannelEndpointAssignmentContext.new(@version, @solution[:sid],sid ) end unless @customer_profiles_channel_endpoint_assignment @customer_profiles_channel_endpoint_assignment = CustomerProfilesChannelEndpointAssignmentList.new( @version, customer_profile_sid: @solution[:sid], ) end @customer_profiles_channel_endpoint_assignment end |
#customer_profiles_entity_assignments(sid = :unset) ⇒ CustomerProfilesEntityAssignmentsList, CustomerProfilesEntityAssignmentsContext
Access the customer_profiles_entity_assignments
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 267 def customer_profiles_entity_assignments(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return CustomerProfilesEntityAssignmentsContext.new(@version, @solution[:sid],sid ) end unless @customer_profiles_entity_assignments @customer_profiles_entity_assignments = CustomerProfilesEntityAssignmentsList.new( @version, customer_profile_sid: @solution[:sid], ) end @customer_profiles_entity_assignments end |
#customer_profiles_evaluations(sid = :unset) ⇒ CustomerProfilesEvaluationsList, CustomerProfilesEvaluationsContext
Access the customer_profiles_evaluations
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 286 def customer_profiles_evaluations(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return CustomerProfilesEvaluationsContext.new(@version, @solution[:sid],sid ) end unless @customer_profiles_evaluations @customer_profiles_evaluations = CustomerProfilesEvaluationsList.new( @version, customer_profile_sid: @solution[:sid], ) end @customer_profiles_evaluations end |
#delete ⇒ Boolean
Delete the CustomerProfilesInstance
197 198 199 200 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 197 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ CustomerProfilesInstance
Fetch the CustomerProfilesInstance
205 206 207 208 209 210 211 212 213 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 205 def fetch payload = @version.fetch('GET', @uri) CustomerProfilesInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
311 312 313 314 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 311 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.CustomerProfilesContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
304 305 306 307 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 304 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.CustomerProfilesContext #{context}>" end |
#update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ CustomerProfilesInstance
Update the CustomerProfilesInstance
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 222 def update( status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset ) data = Twilio::Values.of({ 'Status' => status, 'StatusCallback' => status_callback, 'FriendlyName' => friendly_name, 'Email' => email, }) payload = @version.update('POST', @uri, data: data) CustomerProfilesInstance.new( @version, payload, sid: @solution[:sid], ) end |