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
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
202 203 204 205 206 207 208 209 210 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 202 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
214 215 216 217 218 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 214 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ UsAppToPersonInstance
Fetch the UsAppToPersonInstance
223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 223 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
285 286 287 288 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 285 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.UsAppToPersonContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
278 279 280 281 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 278 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
245 246 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 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 245 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 |