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.
-
#age_gated ⇒ Boolean
A boolean that specifies whether campaign is age gated or not.
-
#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.
-
#direct_lending ⇒ Boolean
A boolean that specifies whether campaign allows direct lending or not.
-
#errors ⇒ Array<Hash>
Details indicating why a campaign registration failed.
-
#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>
An array of sample message strings, min two and max five.
-
#messaging_service_sid ⇒ String
The SID of the [Messaging Service](www.twilio.com/docs/messaging/api/service-resource) 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. -
#subscriber_opt_in ⇒ Boolean
A boolean that specifies whether campaign has Subscriber Optin or not.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(has_embedded_links: nil, has_embedded_phone: nil, message_samples: nil, message_flow: nil, description: nil, age_gated: nil, direct_lending: nil) ⇒ UsAppToPersonInstance
Update the UsAppToPersonInstance.
-
#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
656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 656 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'], 'subscriber_opt_in' => payload['subscriber_opt_in'], 'age_gated' => payload['age_gated'], 'direct_lending' => payload['direct_lending'], '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'], 'errors' => payload['errors'], } # 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
716 717 718 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 716 def account_sid @properties['account_sid'] end |
#age_gated ⇒ Boolean
770 771 772 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 770 def age_gated @properties['age_gated'] end |
#brand_registration_sid ⇒ String
722 723 724 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 722 def brand_registration_sid @properties['brand_registration_sid'] end |
#campaign_id ⇒ String
788 789 790 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 788 def campaign_id @properties['campaign_id'] end |
#campaign_status ⇒ String
782 783 784 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 782 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
701 702 703 704 705 706 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 701 def context unless @instance_context @instance_context = UsAppToPersonContext.new(@version , @params['messaging_service_sid'], @params['sid']) end @instance_context end |
#date_created ⇒ Time
848 849 850 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 848 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
854 855 856 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 854 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the UsAppToPersonInstance
879 880 881 882 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 879 def delete context.delete end |
#description ⇒ String
734 735 736 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 734 def description @properties['description'] end |
#direct_lending ⇒ Boolean
776 777 778 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 776 def direct_lending @properties['direct_lending'] end |
#errors ⇒ Array<Hash>
872 873 874 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 872 def errors @properties['errors'] end |
#fetch ⇒ UsAppToPersonInstance
Fetch the UsAppToPersonInstance
887 888 889 890 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 887 def fetch context.fetch end |
#has_embedded_links ⇒ Boolean
752 753 754 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 752 def @properties['has_embedded_links'] end |
#has_embedded_phone ⇒ Boolean
758 759 760 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 758 def @properties['has_embedded_phone'] end |
#help_keywords ⇒ Array<String>
842 843 844 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 842 def help_keywords @properties['help_keywords'] end |
#help_message ⇒ String
824 825 826 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 824 def @properties['help_message'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
932 933 934 935 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 932 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.UsAppToPersonInstance #{values}>" end |
#is_externally_registered ⇒ Boolean
794 795 796 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 794 def is_externally_registered @properties['is_externally_registered'] end |
#message_flow ⇒ String
806 807 808 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 806 def @properties['message_flow'] end |
#message_samples ⇒ Array<String>
740 741 742 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 740 def @properties['message_samples'] end |
#messaging_service_sid ⇒ String
728 729 730 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 728 def messaging_service_sid @properties['messaging_service_sid'] end |
#mock ⇒ Boolean
866 867 868 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 866 def mock @properties['mock'] end |
#opt_in_keywords ⇒ Array<String>
830 831 832 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 830 def opt_in_keywords @properties['opt_in_keywords'] end |
#opt_in_message ⇒ String
812 813 814 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 812 def @properties['opt_in_message'] end |
#opt_out_keywords ⇒ Array<String>
836 837 838 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 836 def opt_out_keywords @properties['opt_out_keywords'] end |
#opt_out_message ⇒ String
818 819 820 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 818 def @properties['opt_out_message'] end |
#rate_limits ⇒ Hash
800 801 802 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 800 def rate_limits @properties['rate_limits'] end |
#sid ⇒ String
710 711 712 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 710 def sid @properties['sid'] end |
#subscriber_opt_in ⇒ Boolean
764 765 766 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 764 def subscriber_opt_in @properties['subscriber_opt_in'] end |
#to_s ⇒ Object
Provide a user friendly representation
925 926 927 928 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 925 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.UsAppToPersonInstance #{values}>" end |
#update(has_embedded_links: nil, has_embedded_phone: nil, message_samples: nil, message_flow: nil, description: nil, age_gated: nil, direct_lending: nil) ⇒ UsAppToPersonInstance
Update the UsAppToPersonInstance
902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 902 def update( has_embedded_links: nil, has_embedded_phone: nil, message_samples: nil, message_flow: nil, description: nil, age_gated: nil, direct_lending: nil ) context.update( has_embedded_links: , has_embedded_phone: , message_samples: , message_flow: , description: description, age_gated: age_gated, direct_lending: direct_lending, ) end |
#url ⇒ String
860 861 862 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 860 def url @properties['url'] end |
#us_app_to_person_usecase ⇒ String
746 747 748 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb', line 746 def us_app_to_person_usecase @properties['us_app_to_person_usecase'] end |