class Twilio::REST::Messaging::V1::ServiceContext::UsAppToPersonInstance

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Public Class Methods

new(version, payload, messaging_service_sid: nil, sid: nil) click to toggle source

Initialize the UsAppToPersonInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] messaging_service_sid The SID of the {Messaging

Service}[https://www.twilio.com/docs/messaging/services/api] that the resource
is associated with.

@param [String] sid The SID of the US A2P Compliance resource to fetch

`QE2c6890da8086d771620e9b13fadeba0b`.

@return [UsAppToPersonInstance] UsAppToPersonInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
255 def initialize(version, payload, messaging_service_sid: nil, sid: nil)
256   super(version)
257 
258   # Marshaled Properties
259   @properties = {
260       'sid' => payload['sid'],
261       'account_sid' => payload['account_sid'],
262       'brand_registration_sid' => payload['brand_registration_sid'],
263       'messaging_service_sid' => payload['messaging_service_sid'],
264       'description' => payload['description'],
265       'message_samples' => payload['message_samples'],
266       'us_app_to_person_usecase' => payload['us_app_to_person_usecase'],
267       'has_embedded_links' => payload['has_embedded_links'],
268       'has_embedded_phone' => payload['has_embedded_phone'],
269       'campaign_status' => payload['campaign_status'],
270       'campaign_id' => payload['campaign_id'],
271       'is_externally_registered' => payload['is_externally_registered'],
272       'rate_limits' => payload['rate_limits'],
273       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
274       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
275       'url' => payload['url'],
276       'mock' => payload['mock'],
277   }
278 
279   # Context
280   @instance_context = nil
281   @params = {'messaging_service_sid' => messaging_service_sid, 'sid' => sid || @properties['sid'], }
282 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
307 def account_sid
308   @properties['account_sid']
309 end
brand_registration_sid() click to toggle source

@return [String] A2P Brand Registration SID

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
313 def brand_registration_sid
314   @properties['brand_registration_sid']
315 end
campaign_id() click to toggle source

@return [String] The Campaign Registry (TCR) Campaign ID.

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
361 def campaign_id
362   @properties['campaign_id']
363 end
campaign_status() click to toggle source

@return [String] Campaign status

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
355 def campaign_status
356   @properties['campaign_status']
357 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [UsAppToPersonContext] UsAppToPersonContext for this UsAppToPersonInstance

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
288 def context
289   unless @instance_context
290     @instance_context = UsAppToPersonContext.new(
291         @version,
292         @params['messaging_service_sid'],
293         @params['sid'],
294     )
295   end
296   @instance_context
297 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
379 def date_created
380   @properties['date_created']
381 end
date_updated() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
385 def date_updated
386   @properties['date_updated']
387 end
delete() click to toggle source

Delete the UsAppToPersonInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
404 def delete
405   context.delete
406 end
description() click to toggle source

@return [String] A short description of what this SMS campaign does

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
325 def description
326   @properties['description']
327 end
fetch() click to toggle source

Fetch the UsAppToPersonInstance @return [UsAppToPersonInstance] Fetched UsAppToPersonInstance

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
411 def fetch
412   context.fetch
413 end
has_embedded_phone() click to toggle source

@return [Boolean] Indicates that this SMS campaign will send messages that contain phone numbers

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
349 def has_embedded_phone
350   @properties['has_embedded_phone']
351 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
424 def inspect
425   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
426   "<Twilio.Messaging.V1.UsAppToPersonInstance #{values}>"
427 end
is_externally_registered() click to toggle source

@return [Boolean] Indicates whether the campaign was registered externally or not

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
367 def is_externally_registered
368   @properties['is_externally_registered']
369 end
message_samples() click to toggle source

@return [Array] Message samples

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
331 def message_samples
332   @properties['message_samples']
333 end
messaging_service_sid() click to toggle source

@return [String] The SID of the Messaging Service the resource is associated with

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
319 def messaging_service_sid
320   @properties['messaging_service_sid']
321 end
mock() click to toggle source

@return [Boolean] A boolean that specifies whether campaign is a mock or not.

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
397 def mock
398   @properties['mock']
399 end
rate_limits() click to toggle source

@return [Hash] Rate limit and/or classification set by each carrier

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
373 def rate_limits
374   @properties['rate_limits']
375 end
sid() click to toggle source

@return [String] The unique string that identifies a US A2P Compliance resource

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
301 def sid
302   @properties['sid']
303 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
417 def to_s
418   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
419   "<Twilio.Messaging.V1.UsAppToPersonInstance #{values}>"
420 end
url() click to toggle source

@return [String] The absolute URL of the US App to Person resource

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
391 def url
392   @properties['url']
393 end
us_app_to_person_usecase() click to toggle source

@return [String] A2P Campaign Use Case.

    # File lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
337 def us_app_to_person_usecase
338   @properties['us_app_to_person_usecase']
339 end