Class: Twilio::REST::Messaging::V1::ServiceContext::UsAppToPersonInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Messaging::V1::ServiceContext::UsAppToPersonInstance
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that the Campaign belongs to.
-
#brand_registration_sid ⇒ String
The unique string to identify the A2P brand.
-
#campaign_id ⇒ String
The Campaign Registry (TCR) Campaign ID.
-
#campaign_status ⇒ String
Campaign status.
-
#context ⇒ UsAppToPersonContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#delete ⇒ Boolean
Delete the UsAppToPersonInstance.
-
#description ⇒ String
A short description of what this SMS campaign does.
-
#fetch ⇒ UsAppToPersonInstance
Fetch the UsAppToPersonInstance.
-
#has_embedded_links ⇒ Boolean
Indicate that this SMS campaign will send messages that contain links.
-
#has_embedded_phone ⇒ Boolean
Indicates that this SMS campaign will send messages that contain phone numbers.
-
#help_keywords ⇒ Array<String>
End users should be able to text in a keyword to receive help.
-
#help_message ⇒ String
When customers receive the help keywords from their end users, Twilio customers are expected to send back an auto-generated response; this may include the brand name and additional support contact information.
-
#initialize(version, payload, messaging_service_sid: nil, sid: nil) ⇒ UsAppToPersonInstance
constructor
Initialize the UsAppToPersonInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#is_externally_registered ⇒ Boolean
Indicates whether the campaign was registered externally or not.
-
#message_flow ⇒ String
Details around how a consumer opts-in to their campaign, therefore giving consent to receive their messages.
-
#message_samples ⇒ Array<String>
Message samples, at least 1 and up to 5 sample messages (at least 2 for starter/sole proprietor), >=20 chars, <=1024 chars each.
-
#messaging_service_sid ⇒ String
The SID of the [Messaging Service](www.twilio.com/docs/messaging/services/api) that the resource is associated with.
-
#mock ⇒ Boolean
A boolean that specifies whether campaign is a mock or not.
-
#opt_in_keywords ⇒ Array<String>
If end users can text in a keyword to start receiving messages from this campaign, those keywords must be provided.
-
#opt_in_message ⇒ String
If end users can text in a keyword to start receiving messages from this campaign, the auto-reply messages sent to the end users must be provided.
-
#opt_out_keywords ⇒ Array<String>
End users should be able to text in a keyword to stop receiving messages from this campaign.
-
#opt_out_message ⇒ String
Upon receiving the opt-out keywords from the end users, Twilio customers are expected to send back an auto-generated response, which must provide acknowledgment of the opt-out request and confirmation that no further messages will be sent.
-
#rate_limits ⇒ Hash
Rate limit and/or classification set by each carrier, Ex.
-
#sid ⇒ String
The unique string that identifies a US A2P Compliance resource ‘QE2c6890da8086d771620e9b13fadeba0b`.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the US App to Person resource.
-
#us_app_to_person_usecase ⇒ String
A2P Campaign Use Case.
Constructor Details
#initialize(version, payload, messaging_service_sid: nil, sid: nil) ⇒ UsAppToPersonInstance
Initialize the UsAppToPersonInstance
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 279 def initialize(version, payload , messaging_service_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'brand_registration_sid' => payload['brand_registration_sid'], 'messaging_service_sid' => payload['messaging_service_sid'], 'description' => payload['description'], 'message_samples' => payload['message_samples'], 'us_app_to_person_usecase' => payload['us_app_to_person_usecase'], 'has_embedded_links' => payload['has_embedded_links'], 'has_embedded_phone' => payload['has_embedded_phone'], 'campaign_status' => payload['campaign_status'], 'campaign_id' => payload['campaign_id'], 'is_externally_registered' => payload['is_externally_registered'], 'rate_limits' => payload['rate_limits'], 'message_flow' => payload['message_flow'], 'opt_in_message' => payload['opt_in_message'], 'opt_out_message' => payload['opt_out_message'], 'help_message' => payload['help_message'], 'opt_in_keywords' => payload['opt_in_keywords'], 'opt_out_keywords' => payload['opt_out_keywords'], 'help_keywords' => payload['help_keywords'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], 'mock' => payload['mock'], } # Context @instance_context = nil @params = { 'messaging_service_sid' => messaging_service_sid || @properties['messaging_service_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
334 335 336 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 334 def account_sid @properties['account_sid'] end |
#brand_registration_sid ⇒ String
340 341 342 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 340 def brand_registration_sid @properties['brand_registration_sid'] end |
#campaign_id ⇒ String
388 389 390 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 388 def campaign_id @properties['campaign_id'] end |
#campaign_status ⇒ String
382 383 384 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 382 def campaign_status @properties['campaign_status'] end |
#context ⇒ UsAppToPersonContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
319 320 321 322 323 324 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 319 def context unless @instance_context @instance_context = UsAppToPersonContext.new(@version , @params['messaging_service_sid'], @params['sid']) end @instance_context end |
#date_created ⇒ Time
448 449 450 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 448 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
454 455 456 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 454 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the UsAppToPersonInstance
473 474 475 476 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 473 def delete context.delete end |
#description ⇒ String
352 353 354 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 352 def description @properties['description'] end |
#fetch ⇒ UsAppToPersonInstance
Fetch the UsAppToPersonInstance
481 482 483 484 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 481 def fetch context.fetch end |
#has_embedded_links ⇒ Boolean
370 371 372 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 370 def @properties['has_embedded_links'] end |
#has_embedded_phone ⇒ Boolean
376 377 378 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 376 def @properties['has_embedded_phone'] end |
#help_keywords ⇒ Array<String>
442 443 444 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 442 def help_keywords @properties['help_keywords'] end |
#help_message ⇒ String
424 425 426 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 424 def @properties['help_message'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
495 496 497 498 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 495 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.UsAppToPersonInstance #{values}>" end |
#is_externally_registered ⇒ Boolean
394 395 396 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 394 def is_externally_registered @properties['is_externally_registered'] end |
#message_flow ⇒ String
406 407 408 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 406 def @properties['message_flow'] end |
#message_samples ⇒ Array<String>
358 359 360 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 358 def @properties['message_samples'] end |
#messaging_service_sid ⇒ String
346 347 348 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 346 def messaging_service_sid @properties['messaging_service_sid'] end |
#mock ⇒ Boolean
466 467 468 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 466 def mock @properties['mock'] end |
#opt_in_keywords ⇒ Array<String>
430 431 432 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 430 def opt_in_keywords @properties['opt_in_keywords'] end |
#opt_in_message ⇒ String
412 413 414 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 412 def @properties['opt_in_message'] end |
#opt_out_keywords ⇒ Array<String>
436 437 438 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 436 def opt_out_keywords @properties['opt_out_keywords'] end |
#opt_out_message ⇒ String
418 419 420 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 418 def @properties['opt_out_message'] end |
#rate_limits ⇒ Hash
400 401 402 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 400 def rate_limits @properties['rate_limits'] end |
#sid ⇒ String
328 329 330 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 328 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
488 489 490 491 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 488 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.UsAppToPersonInstance #{values}>" end |
#url ⇒ String
460 461 462 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 460 def url @properties['url'] end |
#us_app_to_person_usecase ⇒ String
364 365 366 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 364 def us_app_to_person_usecase @properties['us_app_to_person_usecase'] end |