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
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#brand_registration_sid ⇒ String
A2P Brand Registration SID.
-
#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 ISO 8601 date and time in GMT when the resource was created.
-
#date_updated ⇒ Time
The ISO 8601 date and time in GMT when the resource was last updated.
-
#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]
Help Keywords.
-
#help_message ⇒ String
Help Message.
-
#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
Consumer opt-in flow.
-
#message_samples ⇒ Array[String]
Message samples.
-
#messaging_service_sid ⇒ String
The SID of the Messaging Service the resource is associated with.
-
#mock ⇒ Boolean
A boolean that specifies whether campaign is a mock or not.
-
#opt_in_keywords ⇒ Array[String]
Opt In Keywords.
-
#opt_in_message ⇒ String
Opt In Message.
-
#opt_out_keywords ⇒ Array[String]
Opt Out Keywords.
-
#opt_out_message ⇒ String
Opt Out Message.
-
#rate_limits ⇒ Hash
Rate limit and/or classification set by each carrier.
-
#sid ⇒ String
The unique string that identifies a US A2P Compliance resource.
-
#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
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 301 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, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
360 361 362 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 360 def account_sid @properties['account_sid'] end |
#brand_registration_sid ⇒ String
Returns A2P Brand Registration SID.
366 367 368 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 366 def brand_registration_sid @properties['brand_registration_sid'] end |
#campaign_id ⇒ String
Returns The Campaign Registry (TCR) Campaign ID.
414 415 416 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 414 def campaign_id @properties['campaign_id'] end |
#campaign_status ⇒ String
Returns Campaign status.
408 409 410 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 408 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
341 342 343 344 345 346 347 348 349 350 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 341 def context unless @instance_context @instance_context = UsAppToPersonContext.new( @version, @params['messaging_service_sid'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was created.
474 475 476 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 474 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was last updated.
480 481 482 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 480 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the UsAppToPersonInstance
499 500 501 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 499 def delete context.delete end |
#description ⇒ String
Returns A short description of what this SMS campaign does.
378 379 380 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 378 def description @properties['description'] end |
#fetch ⇒ UsAppToPersonInstance
Fetch the UsAppToPersonInstance
506 507 508 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 506 def fetch context.fetch end |
#has_embedded_links ⇒ Boolean
Returns Indicate that this SMS campaign will send messages that contain links.
396 397 398 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 396 def @properties['has_embedded_links'] end |
#has_embedded_phone ⇒ Boolean
Returns Indicates that this SMS campaign will send messages that contain phone numbers.
402 403 404 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 402 def @properties['has_embedded_phone'] end |
#help_keywords ⇒ Array[String]
Returns Help Keywords.
468 469 470 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 468 def help_keywords @properties['help_keywords'] end |
#help_message ⇒ String
Returns Help Message.
450 451 452 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 450 def @properties['help_message'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
519 520 521 522 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 519 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.UsAppToPersonInstance #{values}>" end |
#is_externally_registered ⇒ Boolean
Returns Indicates whether the campaign was registered externally or not.
420 421 422 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 420 def is_externally_registered @properties['is_externally_registered'] end |
#message_flow ⇒ String
Returns Consumer opt-in flow.
432 433 434 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 432 def @properties['message_flow'] end |
#message_samples ⇒ Array[String]
Returns Message samples.
384 385 386 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 384 def @properties['message_samples'] end |
#messaging_service_sid ⇒ String
Returns The SID of the Messaging Service the resource is associated with.
372 373 374 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 372 def messaging_service_sid @properties['messaging_service_sid'] end |
#mock ⇒ Boolean
Returns A boolean that specifies whether campaign is a mock or not.
492 493 494 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 492 def mock @properties['mock'] end |
#opt_in_keywords ⇒ Array[String]
Returns Opt In Keywords.
456 457 458 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 456 def opt_in_keywords @properties['opt_in_keywords'] end |
#opt_in_message ⇒ String
Returns Opt In Message.
438 439 440 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 438 def @properties['opt_in_message'] end |
#opt_out_keywords ⇒ Array[String]
Returns Opt Out Keywords.
462 463 464 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 462 def opt_out_keywords @properties['opt_out_keywords'] end |
#opt_out_message ⇒ String
Returns Opt Out Message.
444 445 446 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 444 def @properties['opt_out_message'] end |
#rate_limits ⇒ Hash
Returns Rate limit and/or classification set by each carrier.
426 427 428 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 426 def rate_limits @properties['rate_limits'] end |
#sid ⇒ String
Returns The unique string that identifies a US A2P Compliance resource.
354 355 356 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 354 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
512 513 514 515 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 512 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.UsAppToPersonInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the US App to Person resource.
486 487 488 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 486 def url @properties['url'] end |
#us_app_to_person_usecase ⇒ String
Returns A2P Campaign Use Case.
390 391 392 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 390 def us_app_to_person_usecase @properties['us_app_to_person_usecase'] end |