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.
-
#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_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.
-
#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
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 255 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'], '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.
307 308 309 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 307 def account_sid @properties['account_sid'] end |
#brand_registration_sid ⇒ String
Returns A2P Brand Registration SID.
313 314 315 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 313 def brand_registration_sid @properties['brand_registration_sid'] end |
#campaign_id ⇒ String
Returns The Campaign Registry (TCR) Campaign ID.
361 362 363 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 361 def campaign_id @properties['campaign_id'] end |
#campaign_status ⇒ String
Returns Campaign status.
355 356 357 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 355 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
288 289 290 291 292 293 294 295 296 297 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 288 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.
379 380 381 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 379 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.
385 386 387 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 385 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the UsAppToPersonInstance
404 405 406 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 404 def delete context.delete end |
#description ⇒ String
Returns A short description of what this SMS campaign does.
325 326 327 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 325 def description @properties['description'] end |
#fetch ⇒ UsAppToPersonInstance
Fetch the UsAppToPersonInstance
411 412 413 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 411 def fetch context.fetch end |
#has_embedded_links ⇒ Boolean
Returns Indicate that this SMS campaign will send messages that contain links.
343 344 345 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 343 def @properties['has_embedded_links'] end |
#has_embedded_phone ⇒ Boolean
Returns Indicates that this SMS campaign will send messages that contain phone numbers.
349 350 351 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 349 def @properties['has_embedded_phone'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
424 425 426 427 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 424 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.
367 368 369 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 367 def is_externally_registered @properties['is_externally_registered'] end |
#message_samples ⇒ Array[String]
Returns Message samples.
331 332 333 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 331 def @properties['message_samples'] end |
#messaging_service_sid ⇒ String
Returns The SID of the Messaging Service the resource is associated with.
319 320 321 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 319 def messaging_service_sid @properties['messaging_service_sid'] end |
#mock ⇒ Boolean
Returns A boolean that specifies whether campaign is a mock or not.
397 398 399 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 397 def mock @properties['mock'] end |
#rate_limits ⇒ Hash
Returns Rate limit and/or classification set by each carrier.
373 374 375 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 373 def rate_limits @properties['rate_limits'] end |
#sid ⇒ String
Returns The unique string that identifies a US A2P Compliance resource.
301 302 303 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 301 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
417 418 419 420 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 417 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.
391 392 393 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 391 def url @properties['url'] end |
#us_app_to_person_usecase ⇒ String
Returns A2P Campaign Use Case.
337 338 339 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 337 def us_app_to_person_usecase @properties['us_app_to_person_usecase'] end |