Class: Twilio::REST::Messaging::V1::ServiceContext::UsAppToPersonList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Messaging::V1::ServiceContext::UsAppToPersonList
- 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
-
#create(brand_registration_sid: nil, description: nil, message_samples: nil, us_app_to_person_usecase: nil, has_embedded_links: nil, has_embedded_phone: nil) ⇒ UsAppToPersonInstance
Create the UsAppToPersonInstance.
-
#delete ⇒ Boolean
Delete the UsAppToPersonInstance.
-
#fetch ⇒ UsAppToPersonInstance
Fetch the UsAppToPersonInstance.
-
#initialize(version, messaging_service_sid: nil) ⇒ UsAppToPersonList
constructor
Initialize the UsAppToPersonList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, messaging_service_sid: nil) ⇒ UsAppToPersonList
Initialize the UsAppToPersonList
24 25 26 27 28 29 30 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 24 def initialize(version, messaging_service_sid: nil) super(version) # Path Solution @solution = {messaging_service_sid: messaging_service_sid} @uri = "/Services/#{@solution[:messaging_service_sid]}/Compliance/Usa2p" end |
Instance Method Details
#create(brand_registration_sid: nil, description: nil, message_samples: nil, us_app_to_person_usecase: nil, has_embedded_links: nil, has_embedded_phone: nil) ⇒ UsAppToPersonInstance
Create the UsAppToPersonInstance
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 45 def create(brand_registration_sid: nil, description: nil, message_samples: nil, us_app_to_person_usecase: nil, has_embedded_links: nil, has_embedded_phone: nil) data = Twilio::Values.of({ 'BrandRegistrationSid' => brand_registration_sid, 'Description' => description, 'MessageSamples' => Twilio.serialize_list() { |e| e }, 'UsAppToPersonUsecase' => us_app_to_person_usecase, 'HasEmbeddedLinks' => , 'HasEmbeddedPhone' => , }) payload = @version.create('POST', @uri, data: data) UsAppToPersonInstance.new( @version, payload, messaging_service_sid: @solution[:messaging_service_sid], ) end |
#delete ⇒ Boolean
Delete the UsAppToPersonInstance
67 68 69 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 67 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ UsAppToPersonInstance
Fetch the UsAppToPersonInstance
74 75 76 77 78 79 80 81 82 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 74 def fetch payload = @version.fetch('GET', @uri) UsAppToPersonInstance.new( @version, payload, messaging_service_sid: @solution[:messaging_service_sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
86 87 88 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 86 def to_s '#<Twilio.Messaging.V1.UsAppToPersonList>' end |