Class: Twilio::REST::Messaging::V1::ServiceContext::UsAppToPersonContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Messaging::V1::ServiceContext::UsAppToPersonContext
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the UsAppToPersonInstance.
-
#fetch ⇒ UsAppToPersonInstance
Fetch the UsAppToPersonInstance.
-
#initialize(version, messaging_service_sid, sid) ⇒ UsAppToPersonContext
constructor
Initialize the UsAppToPersonContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(has_embedded_links: nil, has_embedded_phone: nil, message_samples: nil, message_flow: nil, description: nil, age_gated: nil, direct_lending: nil) ⇒ UsAppToPersonInstance
Update the UsAppToPersonInstance.
Constructor Details
#initialize(version, messaging_service_sid, sid) ⇒ UsAppToPersonContext
Initialize the UsAppToPersonContext
204 205 206 207 208 209 210 211 212 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 204 def initialize(version, messaging_service_sid, sid) super(version) # Path Solution @solution = { messaging_service_sid: messaging_service_sid, sid: sid, } @uri = "/Services/#{@solution[:messaging_service_sid]}/Compliance/Usa2p/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the UsAppToPersonInstance
216 217 218 219 220 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 216 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ UsAppToPersonInstance
Fetch the UsAppToPersonInstance
225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 225 def fetch payload = @version.fetch('GET', @uri) UsAppToPersonInstance.new( @version, payload, messaging_service_sid: @solution[:messaging_service_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
287 288 289 290 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 287 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.UsAppToPersonContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
280 281 282 283 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 280 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.UsAppToPersonContext #{context}>" end |
#update(has_embedded_links: nil, has_embedded_phone: nil, message_samples: nil, message_flow: nil, description: nil, age_gated: nil, direct_lending: nil) ⇒ UsAppToPersonInstance
Update the UsAppToPersonInstance
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 247 def update( has_embedded_links: nil, has_embedded_phone: nil, message_samples: nil, message_flow: nil, description: nil, age_gated: nil, direct_lending: nil ) data = Twilio::Values.of({ 'HasEmbeddedLinks' => , 'HasEmbeddedPhone' => , 'MessageSamples' => Twilio.serialize_list() { |e| e }, 'MessageFlow' => , 'Description' => description, 'AgeGated' => age_gated, 'DirectLending' => direct_lending, }) payload = @version.update('POST', @uri, data: data) UsAppToPersonInstance.new( @version, payload, messaging_service_sid: @solution[:messaging_service_sid], sid: @solution[:sid], ) end |