rcs 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rcs/brands/client.rb +19 -6
- data/lib/rcs/campaigns/dlc/client.rb +12 -12
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_help_keywords.rb → dlc_campaign_help_keywords.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_keywords.rb → dlc_campaign_keywords.rb} +20 -20
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_links.rb → dlc_campaign_links.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_opt_in_keywords.rb → dlc_campaign_opt_in_keywords.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_opt_out_keywords.rb → dlc_campaign_opt_out_keywords.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_options.rb → dlc_campaign_options.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_use_case.rb → dlc_campaign_use_case.rb} +5 -5
- data/lib/rcs/campaigns/rcs/client.rb +144 -51
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_agent.rb → rcs_agent.rb} +15 -9
- data/lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb +122 -43
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_opt_out.rb → rcs_campaign_help_keywords.rb} +20 -19
- data/lib/rcs/campaigns/rcs/types/rcs_campaign_keywords.rb +98 -0
- data/lib/rcs/campaigns/rcs/types/rcs_campaign_opt_in_keywords.rb +87 -0
- data/lib/rcs/campaigns/rcs/types/rcs_campaign_opt_out_keywords.rb +83 -0
- data/lib/rcs/campaigns/rcs/types/rcs_campaign_traffic.rb +76 -0
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_links.rb → rcs_links.rb} +5 -5
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_use_case.rb → rcs_use_case.rb} +7 -7
- data/lib/rcs/campaigns/toll_free/client.rb +53 -10
- data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +54 -12
- data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_help_keywords.rb +66 -0
- data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_keywords.rb +86 -0
- data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_links.rb +74 -0
- data/lib/rcs/campaigns/toll_free/types/{upsert_toll_free_schema_opt_in.rb → toll_free_campaign_opt_in.rb} +5 -5
- data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_opt_in_keywords.rb +78 -0
- data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_options.rb +64 -0
- data/lib/rcs/campaigns/toll_free/types/{upsert_toll_free_schema_use_case.rb → toll_free_campaign_use_case.rb} +5 -5
- data/lib/rcs/messages/blast/client.rb +419 -0
- data/lib/rcs/messages/blast/types/blast_mms_options.rb +82 -0
- data/lib/rcs/messages/blast/types/blast_mms_response.rb +60 -0
- data/lib/rcs/messages/blast/types/blast_rcs_options.rb +118 -0
- data/lib/rcs/messages/blast/types/blast_rcs_request_options_standalone_card.rb +82 -0
- data/lib/rcs/messages/blast/types/blast_rcs_request_options_standalone_card_image_alignment.rb +16 -0
- data/lib/rcs/messages/blast/types/blast_rcs_request_options_standalone_card_orientation.rb +15 -0
- data/lib/rcs/messages/blast/types/blast_rcs_response.rb +60 -0
- data/lib/rcs/messages/blast/types/blast_sms_options.rb +70 -0
- data/lib/rcs/messages/blast/types/blast_sms_response.rb +60 -0
- data/lib/rcs/messages/mms/client.rb +6 -6
- data/lib/rcs/messages/mms/types/mms_send_response.rb +4 -4
- data/lib/rcs/messages/rcs/client.rb +7 -7
- data/lib/rcs/messages/rcs/types/{rcs_send_response.rb → send_rich_message_response.rb} +11 -11
- data/lib/rcs/messages/schedule/client.rb +103 -0
- data/lib/rcs/messages/sms/client.rb +6 -6
- data/lib/rcs/messages/sms/types/sms_send_response.rb +4 -4
- data/lib/rcs/types/{rcs_base.rb → base_rich_message.rb} +10 -10
- data/lib/rcs/types/blast_details.rb +110 -0
- data/lib/rcs/types/company_entity_type_enum.rb +14 -0
- data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +30 -2
- data/lib/rcs/types/dlc_with_extended_brand_and_status_mno_brand_tier.rb +15 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_mno_tcr_tier.rb +22 -0
- data/lib/rcs/types/extended_brand.rb +10 -1
- data/lib/rcs/types/extended_brand_with_vetting.rb +10 -1
- data/lib/rcs/types/extended_rcs_campaign.rb +122 -51
- data/lib/rcs/types/message_schedule.rb +52 -24
- data/lib/rcs/types/message_status_enum.rb +1 -0
- data/lib/rcs/types/optional_brand_info.rb +10 -1
- data/lib/rcs/types/rcs_campaign.rb +122 -43
- data/lib/rcs/types/rcs_campaign_schema_extra_keywords.rb +94 -0
- data/lib/rcs/types/{rcs_campaign_schema_extra_opt_out.rb → rcs_campaign_schema_extra_keywords_help.rb} +18 -17
- data/lib/rcs/types/rcs_campaign_schema_extra_keywords_opt_in.rb +73 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_keywords_opt_out.rb +73 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_traffic.rb +72 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_use_case.rb +2 -2
- data/lib/rcs/types/rcs_campaign_schema_keywords.rb +94 -0
- data/lib/rcs/types/{rcs_campaign_schema_opt_out.rb → rcs_campaign_schema_keywords_help.rb} +18 -17
- data/lib/rcs/types/rcs_campaign_schema_keywords_opt_in.rb +73 -0
- data/lib/rcs/types/rcs_campaign_schema_keywords_opt_out.rb +73 -0
- data/lib/rcs/types/rcs_campaign_schema_traffic.rb +72 -0
- data/lib/rcs/types/rcs_campaign_schema_use_case.rb +2 -2
- data/lib/rcs/types/rcs_cards_content_cards_item.rb +4 -2
- data/lib/rcs/types/rcs_content.rb +4 -4
- data/lib/rcs/types/rcs_messaging_type_enum.rb +17 -0
- data/lib/rcs/types/rcs_validate_content.rb +8 -8
- data/lib/rcs/types/rcs_validation_result.rb +9 -2
- data/lib/rcs/types/{rcs_cards_cards_item.rb → rich_card.rb} +9 -7
- data/lib/rcs/types/{rcs_cards.rb → rich_cards.rb} +9 -9
- data/lib/rcs/types/rich_cards_message.rb +9 -9
- data/lib/rcs/types/rich_media_message.rb +5 -5
- data/lib/rcs/types/{send_rcs_card_options_standalone_card.rb → rich_standalone_card_options.rb} +9 -7
- data/lib/rcs/types/{rcs_text_content.rb → rich_text.rb} +5 -5
- data/lib/rcs/types/rich_text_message.rb +5 -5
- data/lib/rcs/types/schedule_cancel_result.rb +58 -0
- data/lib/rcs/types/scheduled_blast_details.rb +76 -0
- data/lib/rcs/types/scheduled_blast_response_config.rb +89 -0
- data/lib/rcs/types/{scheduled_messaage.rb → scheduled_message.rb} +5 -5
- data/lib/rcs/types/{send_rcs_card_options.rb → send_rich_cards_options.rb} +18 -14
- data/lib/rcs/types/{options.rb → send_rich_message_options.rb} +5 -5
- data/lib/rcs/types/{sent_rcs_details.rb → sent_rich_message.rb} +5 -5
- data/lib/rcs/types/toll_free_campaign.rb +54 -12
- data/lib/rcs/types/toll_free_campaign_schema_keywords.rb +82 -0
- data/lib/rcs/types/toll_free_campaign_schema_keywords_help.rb +62 -0
- data/lib/rcs/types/toll_free_campaign_schema_keywords_opt_in.rb +74 -0
- data/lib/rcs/types/toll_free_campaign_schema_links.rb +70 -0
- data/lib/rcs/types/{upsert_toll_free_campaign_opt_in.rb → toll_free_campaign_schema_opt_in.rb} +5 -5
- data/lib/rcs/types/toll_free_campaign_schema_options.rb +60 -0
- data/lib/rcs/types/{upsert_toll_free_campaign_use_case.rb → toll_free_campaign_schema_use_case.rb} +5 -5
- data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +54 -12
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +66 -32
- metadata +70 -34
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_opt_in.rb +0 -75
- data/lib/rcs/types/rcs_base_options.rb +0 -111
- data/lib/rcs/types/rcs_campaign_opt_in_method_enum.rb +0 -15
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_in.rb +0 -71
- data/lib/rcs/types/rcs_campaign_schema_opt_in.rb +0 -71
|
@@ -5,11 +5,12 @@ require_relative "../../types/autofill_campaign_params"
|
|
|
5
5
|
require_relative "types/rcs_autofill_response"
|
|
6
6
|
require_relative "../../types/extended_rcs_campaign"
|
|
7
7
|
require_relative "../../types/campaign_submission_result"
|
|
8
|
-
require_relative "types/
|
|
9
|
-
require_relative "types/
|
|
10
|
-
require_relative "types/
|
|
11
|
-
require_relative "types/
|
|
12
|
-
require_relative "types/
|
|
8
|
+
require_relative "types/rcs_agent"
|
|
9
|
+
require_relative "types/rcs_links"
|
|
10
|
+
require_relative "types/rcs_use_case"
|
|
11
|
+
require_relative "../../types/rcs_messaging_type_enum"
|
|
12
|
+
require_relative "types/rcs_campaign_keywords"
|
|
13
|
+
require_relative "types/rcs_campaign_traffic"
|
|
13
14
|
require_relative "../../types/validate_campaign_params"
|
|
14
15
|
require_relative "../../types/campaign_validation_result"
|
|
15
16
|
require "async"
|
|
@@ -127,7 +128,7 @@ module Pinnacle
|
|
|
127
128
|
# Create a new RCS campaign or updates an existing one. <br>
|
|
128
129
|
# Omit campaignId to create a campaign.
|
|
129
130
|
#
|
|
130
|
-
# @param agent [Hash] Create an agent for the campaign.Request of type Pinnacle::Campaigns::Rcs::Types::
|
|
131
|
+
# @param agent [Hash] Create an agent for the campaign.Request of type Pinnacle::Campaigns::Rcs::Types::RcsAgent, as a Hash
|
|
131
132
|
# * :color (String)
|
|
132
133
|
# * :description (String)
|
|
133
134
|
# * :emails (Array<Pinnacle::Campaigns::Rcs::Types::RcsAgentEmail>)
|
|
@@ -136,24 +137,49 @@ module Pinnacle
|
|
|
136
137
|
# * :name (String)
|
|
137
138
|
# * :phones (Array<Pinnacle::Campaigns::Rcs::Types::RcsAgentPhone>)
|
|
138
139
|
# * :websites (Array<Pinnacle::Campaigns::Rcs::Types::RcsAgentWebsite>)
|
|
139
|
-
# @param brand_verification_url [String] Link to document verifying the brand's name. This may be the certificate of
|
|
140
|
-
# incorporation, business license, or other relevant document. You can typically
|
|
141
|
-
# find this on the Secretary of State website.
|
|
142
140
|
# @param brand [String] Unique identifier for the brand.
|
|
143
141
|
# @param campaign_id [String] Unique identifier for the campaign.
|
|
144
142
|
# @param expected_agent_responses [Array<String>] List of what the agent might say to users (1-5 required).
|
|
145
|
-
# @param links [Hash] Legal documentation links.Request of type Pinnacle::Campaigns::Rcs::Types::
|
|
143
|
+
# @param links [Hash] Legal documentation links.Request of type Pinnacle::Campaigns::Rcs::Types::RcsLinks, as a Hash
|
|
146
144
|
# * :privacy_policy (String)
|
|
147
145
|
# * :terms_of_service (String)
|
|
148
|
-
# @param
|
|
149
|
-
# * :method_ (Pinnacle::Types::RcsCampaignOptInMethodEnum)
|
|
150
|
-
# * :terms_and_conditions (String)
|
|
151
|
-
# @param opt_out [Hash] Opt-out configuration.Request of type Pinnacle::Campaigns::Rcs::Types::UpsertRcsOptOut, as a Hash
|
|
152
|
-
# * :description (String)
|
|
153
|
-
# * :keywords (Array<String>)
|
|
154
|
-
# @param use_case [Hash] Use case classification for the campaign.Request of type Pinnacle::Campaigns::Rcs::Types::UpsertRcsUseCase, as a Hash
|
|
146
|
+
# @param use_case [Hash] Use case classification for the campaign.Request of type Pinnacle::Campaigns::Rcs::Types::RcsUseCase, as a Hash
|
|
155
147
|
# * :behavior (String)
|
|
156
148
|
# * :value (Pinnacle::Types::RcsCampaignUseCaseEnum)
|
|
149
|
+
# @param opt_in_terms_and_conditions [String] Details on how opt-in is acquired. If it is done through a website or app,
|
|
150
|
+
# provide the link.
|
|
151
|
+
# @param messaging_type [Pinnacle::Types::RcsMessagingTypeEnum]
|
|
152
|
+
# @param carrier_description [String] Description of the agent's purpose, shown to carriers for approval.
|
|
153
|
+
# @param keywords [Hash] Request of type Pinnacle::Campaigns::Rcs::Types::RcsCampaignKeywords, as a Hash
|
|
154
|
+
# * :help (Hash)
|
|
155
|
+
# * :message (String)
|
|
156
|
+
# * :keywords (Array<String>)
|
|
157
|
+
# * :opt_in (Hash)
|
|
158
|
+
# * :message (String)
|
|
159
|
+
# * :keywords (Array<String>)
|
|
160
|
+
# * :opt_out (Hash)
|
|
161
|
+
# * :message (String)
|
|
162
|
+
# * :keywords (Array<String>)
|
|
163
|
+
# @param traffic [Hash] Request of type Pinnacle::Campaigns::Rcs::Types::RcsCampaignTraffic, as a Hash
|
|
164
|
+
# * :monthly_website (Integer)
|
|
165
|
+
# * :monthly_rcs_estimate (Integer)
|
|
166
|
+
# @param agent_triggers [String] Explanation of how the agent is triggered. This includes how the first message
|
|
167
|
+
# is delivered, whether messages follow a schedule or triggered by user actions,
|
|
168
|
+
# and any external triggers.
|
|
169
|
+
# @param interaction_description [String] Description of all agent interactions.
|
|
170
|
+
# @param is_conversational [Boolean] Whether the agent supports conversational flows or respond to P2A messages from
|
|
171
|
+
# the users. Set to false for one-way messages from agent to user.
|
|
172
|
+
# @param cta_language [String] Required text that appears next to the opt-in checkbox for your opt-in form.
|
|
173
|
+
# This checkbox has to be unchecked by default. The text should meet the US CTIA
|
|
174
|
+
# requirements and is usually in the following format: <br>
|
|
175
|
+
# [Program description of the company sending the messages and what type of
|
|
176
|
+
# messages are being sent]. Msg&data rates may apply. [Message frequency: How
|
|
177
|
+
# frequently messages are sent]. [Privacy statement or link to privacy policy].
|
|
178
|
+
# [Link to full mobile
|
|
179
|
+
# T&Cs page].
|
|
180
|
+
# @param demo_trigger [String] Instructions on how an external reviewer can trigger messages and an example
|
|
181
|
+
# flow from the agent. This is usually an inbound text message to the agent that
|
|
182
|
+
# will start a flow of messages between the agent and the user.
|
|
157
183
|
# @param request_options [Pinnacle::RequestOptions]
|
|
158
184
|
# @return [Pinnacle::Types::ExtendedRcsCampaign]
|
|
159
185
|
# @example
|
|
@@ -163,18 +189,32 @@ module Pinnacle
|
|
|
163
189
|
# api_key: "YOUR_API_KEY"
|
|
164
190
|
# )
|
|
165
191
|
# api.campaigns.rcs.upsert(
|
|
166
|
-
# agent: { color: "#000000", description: "
|
|
167
|
-
# brand_verification_url: "https://www.pinnacle.sh/articles-of-incorporation.pdf",
|
|
192
|
+
# agent: { color: "#000000", description: "Experience the power of RCS messaging with interactive demos. Test rich features like carousels, suggested replies, and media sharing. Get started with our developer-friendly APIs.", emails: [{ email: "founders@trypinnacle.app", label: "Email Us" }], hero_url: "https://pncl.to/D6pDSqGxqgfbCfQmw4gXdnlHu4uSB4", icon_url: "https://pncl.to/mq_tdIDenRb5eYpJiM8-3THCaUBrZP", name: "Pinnacle - RCS Demo", phones: [{ label: "Contact us directly", phone: "+14154467821" }], websites: [{ label: "Get started with Pinnacle", url: "https://www.trypinnacle.app/" }] },
|
|
168
193
|
# brand: "b_1234567890",
|
|
169
194
|
# campaign_id: "rcs_1234567890",
|
|
170
195
|
# expected_agent_responses: ["Here are the things I can help you with.", "I can assist you with booking an appointment, or you may choose to book manually.", "Here are the available times to connect with a representative tomorrow.", "Your appointment has been scheduled."],
|
|
171
196
|
# links: { privacy_policy: "https://www.trypinnacle.app/privacy", terms_of_service: "https://www.trypinnacle.app/terms" },
|
|
172
|
-
#
|
|
173
|
-
#
|
|
174
|
-
#
|
|
197
|
+
# use_case: { behavior: "Pinnacle is a developer-focused RCS assistant that helps teams design, test, and optimize rich messaging experiences across SMS, MMS, and RCS. The agent acts as both an “onboarding guide” for new customers and a “best-practices coach” for existing teams exploring higher-value RCS workflows like rich cards, carousels, and suggested actions.<br>
|
|
198
|
+
# The agent delivers a mix of operational updates and educational content (2–6 messages/month). Content includes important platform notices (e.g., deliverability or throughput changes), implementation tips with sample RCS templates, and personalized recommendations on how to upgrade existing SMS campaigns into richer, higher-converting RCS conversations.
|
|
199
|
+
# ", value: OTHER },
|
|
200
|
+
# opt_in_terms_and_conditions: "We ensure consent through an explicit opt-in process that follows 10DLC best practices.Users must agree to receive messages from Pinnacle before the agent sends them any messages.<br>
|
|
201
|
+
# Users agree to these messages by signing an opt-in paper form that they can be found online at https://www.pinnacle.sh/opt-in. We only send messages once users have filled out the form and submitted it to us via email or through the dashboard.
|
|
202
|
+
# ",
|
|
203
|
+
# messaging_type: MULTI_USE,
|
|
204
|
+
# carrier_description: "Demonstrate the power of RCS to medium and large companies already sending massive SMS/MMS volumes through our platform. These clients send conversational messages in industries such as commerce, appointments, and customer support.",
|
|
205
|
+
# keywords: { help: { message: "Email founders@trypinnacle.app for support.", keywords: ["HELP", "SUPPORT"] }, opt_in: { message: "Welcome back to Pinnacle!<br>
|
|
206
|
+
# 🔔 You're now subscribed to Pinnacle - RCS Demo and will continue receiving important updates and news. Feel free to contact this us at any time for help.<br>
|
|
207
|
+
# Reply STOP to opt out and HELP for support. Message & rates may apply.
|
|
208
|
+
# ", keywords: ["START", "SUBSCRIBE"] }, opt_out: { message: "You've been unsubscribed from Pinnacle - RCS Demo and will no longer receive notifications. If you ever change your mind, reply START or SUBSCRIBE to rejoin anytime.", keywords: ["STOP", "UNSUBSCRIBE", "END"] } },
|
|
209
|
+
# traffic: { monthly_website: 10000, monthly_rcs_estimate: 10000 },
|
|
210
|
+
# agent_triggers: "The agent sends the first message when the user subscribes to Pinnacle. Messages are based on user actions such as pressing suggestion buttons. External triggers such as reminders can be setup by users in advance for a later time.",
|
|
211
|
+
# interaction_description: "The agent's primary interaction will be customer service — helping users with questions, troubleshooting issues, and providing quick assistance through chat. Other interactions include appointment management and sending notifications to the user.",
|
|
212
|
+
# is_conversational: true,
|
|
213
|
+
# cta_language: "By checking this box and submitting this form, you consent to receive transactional text messages for support, appointment, and reminder messages from Pinnacle Software Development Inc. Reply STOP to opt out. Reply HELP for help. Standard message and data rates may apply. Message frequency may vary. View our Terms and Conditions at https://www.pinnacle.sh/terms. View our Privacy Policy at https://www.pinnacle.sh/privacy.",
|
|
214
|
+
# demo_trigger: "Text "START" to trigger the flow."
|
|
175
215
|
# )
|
|
176
|
-
def upsert(agent: nil,
|
|
177
|
-
|
|
216
|
+
def upsert(agent: nil, brand: nil, campaign_id: nil, expected_agent_responses: nil, links: nil, use_case: nil,
|
|
217
|
+
opt_in_terms_and_conditions: nil, messaging_type: nil, carrier_description: nil, keywords: nil, traffic: nil, agent_triggers: nil, interaction_description: nil, is_conversational: nil, cta_language: nil, demo_trigger: nil, request_options: nil)
|
|
178
218
|
response = @request_client.conn.post do |req|
|
|
179
219
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
180
220
|
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
@@ -189,14 +229,21 @@ module Pinnacle
|
|
|
189
229
|
req.body = {
|
|
190
230
|
**(request_options&.additional_body_parameters || {}),
|
|
191
231
|
agent: agent,
|
|
192
|
-
brandVerificationUrl: brand_verification_url,
|
|
193
232
|
brand: brand,
|
|
194
233
|
campaignId: campaign_id,
|
|
195
234
|
expectedAgentResponses: expected_agent_responses,
|
|
196
235
|
links: links,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
236
|
+
useCase: use_case,
|
|
237
|
+
optInTermsAndConditions: opt_in_terms_and_conditions,
|
|
238
|
+
messagingType: messaging_type,
|
|
239
|
+
carrierDescription: carrier_description,
|
|
240
|
+
keywords: keywords,
|
|
241
|
+
traffic: traffic,
|
|
242
|
+
agentTriggers: agent_triggers,
|
|
243
|
+
interactionDescription: interaction_description,
|
|
244
|
+
isConversational: is_conversational,
|
|
245
|
+
ctaLanguage: cta_language,
|
|
246
|
+
demoTrigger: demo_trigger
|
|
200
247
|
}.compact
|
|
201
248
|
req.url "#{@request_client.get_url(request_options: request_options)}/campaigns/rcs"
|
|
202
249
|
end
|
|
@@ -354,7 +401,7 @@ module Pinnacle
|
|
|
354
401
|
# Create a new RCS campaign or updates an existing one. <br>
|
|
355
402
|
# Omit campaignId to create a campaign.
|
|
356
403
|
#
|
|
357
|
-
# @param agent [Hash] Create an agent for the campaign.Request of type Pinnacle::Campaigns::Rcs::Types::
|
|
404
|
+
# @param agent [Hash] Create an agent for the campaign.Request of type Pinnacle::Campaigns::Rcs::Types::RcsAgent, as a Hash
|
|
358
405
|
# * :color (String)
|
|
359
406
|
# * :description (String)
|
|
360
407
|
# * :emails (Array<Pinnacle::Campaigns::Rcs::Types::RcsAgentEmail>)
|
|
@@ -363,24 +410,49 @@ module Pinnacle
|
|
|
363
410
|
# * :name (String)
|
|
364
411
|
# * :phones (Array<Pinnacle::Campaigns::Rcs::Types::RcsAgentPhone>)
|
|
365
412
|
# * :websites (Array<Pinnacle::Campaigns::Rcs::Types::RcsAgentWebsite>)
|
|
366
|
-
# @param brand_verification_url [String] Link to document verifying the brand's name. This may be the certificate of
|
|
367
|
-
# incorporation, business license, or other relevant document. You can typically
|
|
368
|
-
# find this on the Secretary of State website.
|
|
369
413
|
# @param brand [String] Unique identifier for the brand.
|
|
370
414
|
# @param campaign_id [String] Unique identifier for the campaign.
|
|
371
415
|
# @param expected_agent_responses [Array<String>] List of what the agent might say to users (1-5 required).
|
|
372
|
-
# @param links [Hash] Legal documentation links.Request of type Pinnacle::Campaigns::Rcs::Types::
|
|
416
|
+
# @param links [Hash] Legal documentation links.Request of type Pinnacle::Campaigns::Rcs::Types::RcsLinks, as a Hash
|
|
373
417
|
# * :privacy_policy (String)
|
|
374
418
|
# * :terms_of_service (String)
|
|
375
|
-
# @param
|
|
376
|
-
# * :method_ (Pinnacle::Types::RcsCampaignOptInMethodEnum)
|
|
377
|
-
# * :terms_and_conditions (String)
|
|
378
|
-
# @param opt_out [Hash] Opt-out configuration.Request of type Pinnacle::Campaigns::Rcs::Types::UpsertRcsOptOut, as a Hash
|
|
379
|
-
# * :description (String)
|
|
380
|
-
# * :keywords (Array<String>)
|
|
381
|
-
# @param use_case [Hash] Use case classification for the campaign.Request of type Pinnacle::Campaigns::Rcs::Types::UpsertRcsUseCase, as a Hash
|
|
419
|
+
# @param use_case [Hash] Use case classification for the campaign.Request of type Pinnacle::Campaigns::Rcs::Types::RcsUseCase, as a Hash
|
|
382
420
|
# * :behavior (String)
|
|
383
421
|
# * :value (Pinnacle::Types::RcsCampaignUseCaseEnum)
|
|
422
|
+
# @param opt_in_terms_and_conditions [String] Details on how opt-in is acquired. If it is done through a website or app,
|
|
423
|
+
# provide the link.
|
|
424
|
+
# @param messaging_type [Pinnacle::Types::RcsMessagingTypeEnum]
|
|
425
|
+
# @param carrier_description [String] Description of the agent's purpose, shown to carriers for approval.
|
|
426
|
+
# @param keywords [Hash] Request of type Pinnacle::Campaigns::Rcs::Types::RcsCampaignKeywords, as a Hash
|
|
427
|
+
# * :help (Hash)
|
|
428
|
+
# * :message (String)
|
|
429
|
+
# * :keywords (Array<String>)
|
|
430
|
+
# * :opt_in (Hash)
|
|
431
|
+
# * :message (String)
|
|
432
|
+
# * :keywords (Array<String>)
|
|
433
|
+
# * :opt_out (Hash)
|
|
434
|
+
# * :message (String)
|
|
435
|
+
# * :keywords (Array<String>)
|
|
436
|
+
# @param traffic [Hash] Request of type Pinnacle::Campaigns::Rcs::Types::RcsCampaignTraffic, as a Hash
|
|
437
|
+
# * :monthly_website (Integer)
|
|
438
|
+
# * :monthly_rcs_estimate (Integer)
|
|
439
|
+
# @param agent_triggers [String] Explanation of how the agent is triggered. This includes how the first message
|
|
440
|
+
# is delivered, whether messages follow a schedule or triggered by user actions,
|
|
441
|
+
# and any external triggers.
|
|
442
|
+
# @param interaction_description [String] Description of all agent interactions.
|
|
443
|
+
# @param is_conversational [Boolean] Whether the agent supports conversational flows or respond to P2A messages from
|
|
444
|
+
# the users. Set to false for one-way messages from agent to user.
|
|
445
|
+
# @param cta_language [String] Required text that appears next to the opt-in checkbox for your opt-in form.
|
|
446
|
+
# This checkbox has to be unchecked by default. The text should meet the US CTIA
|
|
447
|
+
# requirements and is usually in the following format: <br>
|
|
448
|
+
# [Program description of the company sending the messages and what type of
|
|
449
|
+
# messages are being sent]. Msg&data rates may apply. [Message frequency: How
|
|
450
|
+
# frequently messages are sent]. [Privacy statement or link to privacy policy].
|
|
451
|
+
# [Link to full mobile
|
|
452
|
+
# T&Cs page].
|
|
453
|
+
# @param demo_trigger [String] Instructions on how an external reviewer can trigger messages and an example
|
|
454
|
+
# flow from the agent. This is usually an inbound text message to the agent that
|
|
455
|
+
# will start a flow of messages between the agent and the user.
|
|
384
456
|
# @param request_options [Pinnacle::RequestOptions]
|
|
385
457
|
# @return [Pinnacle::Types::ExtendedRcsCampaign]
|
|
386
458
|
# @example
|
|
@@ -390,18 +462,32 @@ module Pinnacle
|
|
|
390
462
|
# api_key: "YOUR_API_KEY"
|
|
391
463
|
# )
|
|
392
464
|
# api.campaigns.rcs.upsert(
|
|
393
|
-
# agent: { color: "#000000", description: "
|
|
394
|
-
# brand_verification_url: "https://www.pinnacle.sh/articles-of-incorporation.pdf",
|
|
465
|
+
# agent: { color: "#000000", description: "Experience the power of RCS messaging with interactive demos. Test rich features like carousels, suggested replies, and media sharing. Get started with our developer-friendly APIs.", emails: [{ email: "founders@trypinnacle.app", label: "Email Us" }], hero_url: "https://pncl.to/D6pDSqGxqgfbCfQmw4gXdnlHu4uSB4", icon_url: "https://pncl.to/mq_tdIDenRb5eYpJiM8-3THCaUBrZP", name: "Pinnacle - RCS Demo", phones: [{ label: "Contact us directly", phone: "+14154467821" }], websites: [{ label: "Get started with Pinnacle", url: "https://www.trypinnacle.app/" }] },
|
|
395
466
|
# brand: "b_1234567890",
|
|
396
467
|
# campaign_id: "rcs_1234567890",
|
|
397
468
|
# expected_agent_responses: ["Here are the things I can help you with.", "I can assist you with booking an appointment, or you may choose to book manually.", "Here are the available times to connect with a representative tomorrow.", "Your appointment has been scheduled."],
|
|
398
469
|
# links: { privacy_policy: "https://www.trypinnacle.app/privacy", terms_of_service: "https://www.trypinnacle.app/terms" },
|
|
399
|
-
#
|
|
400
|
-
#
|
|
401
|
-
#
|
|
470
|
+
# use_case: { behavior: "Pinnacle is a developer-focused RCS assistant that helps teams design, test, and optimize rich messaging experiences across SMS, MMS, and RCS. The agent acts as both an “onboarding guide” for new customers and a “best-practices coach” for existing teams exploring higher-value RCS workflows like rich cards, carousels, and suggested actions.<br>
|
|
471
|
+
# The agent delivers a mix of operational updates and educational content (2–6 messages/month). Content includes important platform notices (e.g., deliverability or throughput changes), implementation tips with sample RCS templates, and personalized recommendations on how to upgrade existing SMS campaigns into richer, higher-converting RCS conversations.
|
|
472
|
+
# ", value: OTHER },
|
|
473
|
+
# opt_in_terms_and_conditions: "We ensure consent through an explicit opt-in process that follows 10DLC best practices.Users must agree to receive messages from Pinnacle before the agent sends them any messages.<br>
|
|
474
|
+
# Users agree to these messages by signing an opt-in paper form that they can be found online at https://www.pinnacle.sh/opt-in. We only send messages once users have filled out the form and submitted it to us via email or through the dashboard.
|
|
475
|
+
# ",
|
|
476
|
+
# messaging_type: MULTI_USE,
|
|
477
|
+
# carrier_description: "Demonstrate the power of RCS to medium and large companies already sending massive SMS/MMS volumes through our platform. These clients send conversational messages in industries such as commerce, appointments, and customer support.",
|
|
478
|
+
# keywords: { help: { message: "Email founders@trypinnacle.app for support.", keywords: ["HELP", "SUPPORT"] }, opt_in: { message: "Welcome back to Pinnacle!<br>
|
|
479
|
+
# 🔔 You're now subscribed to Pinnacle - RCS Demo and will continue receiving important updates and news. Feel free to contact this us at any time for help.<br>
|
|
480
|
+
# Reply STOP to opt out and HELP for support. Message & rates may apply.
|
|
481
|
+
# ", keywords: ["START", "SUBSCRIBE"] }, opt_out: { message: "You've been unsubscribed from Pinnacle - RCS Demo and will no longer receive notifications. If you ever change your mind, reply START or SUBSCRIBE to rejoin anytime.", keywords: ["STOP", "UNSUBSCRIBE", "END"] } },
|
|
482
|
+
# traffic: { monthly_website: 10000, monthly_rcs_estimate: 10000 },
|
|
483
|
+
# agent_triggers: "The agent sends the first message when the user subscribes to Pinnacle. Messages are based on user actions such as pressing suggestion buttons. External triggers such as reminders can be setup by users in advance for a later time.",
|
|
484
|
+
# interaction_description: "The agent's primary interaction will be customer service — helping users with questions, troubleshooting issues, and providing quick assistance through chat. Other interactions include appointment management and sending notifications to the user.",
|
|
485
|
+
# is_conversational: true,
|
|
486
|
+
# cta_language: "By checking this box and submitting this form, you consent to receive transactional text messages for support, appointment, and reminder messages from Pinnacle Software Development Inc. Reply STOP to opt out. Reply HELP for help. Standard message and data rates may apply. Message frequency may vary. View our Terms and Conditions at https://www.pinnacle.sh/terms. View our Privacy Policy at https://www.pinnacle.sh/privacy.",
|
|
487
|
+
# demo_trigger: "Text "START" to trigger the flow."
|
|
402
488
|
# )
|
|
403
|
-
def upsert(agent: nil,
|
|
404
|
-
|
|
489
|
+
def upsert(agent: nil, brand: nil, campaign_id: nil, expected_agent_responses: nil, links: nil, use_case: nil,
|
|
490
|
+
opt_in_terms_and_conditions: nil, messaging_type: nil, carrier_description: nil, keywords: nil, traffic: nil, agent_triggers: nil, interaction_description: nil, is_conversational: nil, cta_language: nil, demo_trigger: nil, request_options: nil)
|
|
405
491
|
Async do
|
|
406
492
|
response = @request_client.conn.post do |req|
|
|
407
493
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
@@ -417,14 +503,21 @@ module Pinnacle
|
|
|
417
503
|
req.body = {
|
|
418
504
|
**(request_options&.additional_body_parameters || {}),
|
|
419
505
|
agent: agent,
|
|
420
|
-
brandVerificationUrl: brand_verification_url,
|
|
421
506
|
brand: brand,
|
|
422
507
|
campaignId: campaign_id,
|
|
423
508
|
expectedAgentResponses: expected_agent_responses,
|
|
424
509
|
links: links,
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
510
|
+
useCase: use_case,
|
|
511
|
+
optInTermsAndConditions: opt_in_terms_and_conditions,
|
|
512
|
+
messagingType: messaging_type,
|
|
513
|
+
carrierDescription: carrier_description,
|
|
514
|
+
keywords: keywords,
|
|
515
|
+
traffic: traffic,
|
|
516
|
+
agentTriggers: agent_triggers,
|
|
517
|
+
interactionDescription: interaction_description,
|
|
518
|
+
isConversational: is_conversational,
|
|
519
|
+
ctaLanguage: cta_language,
|
|
520
|
+
demoTrigger: demo_trigger
|
|
428
521
|
}.compact
|
|
429
522
|
req.url "#{@request_client.get_url(request_options: request_options)}/campaigns/rcs"
|
|
430
523
|
end
|
|
@@ -11,11 +11,13 @@ module Pinnacle
|
|
|
11
11
|
module Rcs
|
|
12
12
|
module Types
|
|
13
13
|
# Create an agent for the campaign.
|
|
14
|
-
class
|
|
14
|
+
class RcsAgent
|
|
15
15
|
# @return [String] Color of the agent's buttons. <br>
|
|
16
16
|
# Must have sufficient contrast with white.
|
|
17
17
|
attr_reader :color
|
|
18
|
-
# @return [String] Description of the agent.
|
|
18
|
+
# @return [String] Description of the agent. <br>
|
|
19
|
+
# Be clear, concise, user-focused, and highlight what the agent does and the
|
|
20
|
+
# benefits it provides for the user.
|
|
19
21
|
attr_reader :description
|
|
20
22
|
# @return [Array<Pinnacle::Campaigns::Rcs::Types::RcsAgentEmail>] List of emails (1-3 required).
|
|
21
23
|
attr_reader :emails
|
|
@@ -23,7 +25,8 @@ module Pinnacle
|
|
|
23
25
|
attr_reader :hero_url
|
|
24
26
|
# @return [String] Link to the agent's icon. Icon must be an image file with dimensions 224x224px.
|
|
25
27
|
attr_reader :icon_url
|
|
26
|
-
# @return [String] Name of the agent.
|
|
28
|
+
# @return [String] Name of the agent. <br>
|
|
29
|
+
# Recommended format: [Brand Name] - [1-2 word description of purpose]
|
|
27
30
|
attr_reader :name
|
|
28
31
|
# @return [Array<Pinnacle::Campaigns::Rcs::Types::RcsAgentPhone>] List of phone numbers (1-3 required).
|
|
29
32
|
attr_reader :phones
|
|
@@ -39,15 +42,18 @@ module Pinnacle
|
|
|
39
42
|
|
|
40
43
|
# @param color [String] Color of the agent's buttons. <br>
|
|
41
44
|
# Must have sufficient contrast with white.
|
|
42
|
-
# @param description [String] Description of the agent.
|
|
45
|
+
# @param description [String] Description of the agent. <br>
|
|
46
|
+
# Be clear, concise, user-focused, and highlight what the agent does and the
|
|
47
|
+
# benefits it provides for the user.
|
|
43
48
|
# @param emails [Array<Pinnacle::Campaigns::Rcs::Types::RcsAgentEmail>] List of emails (1-3 required).
|
|
44
49
|
# @param hero_url [String] Link to the agent's hero. Hero must be an image file with dimensions 1440x448px.
|
|
45
50
|
# @param icon_url [String] Link to the agent's icon. Icon must be an image file with dimensions 224x224px.
|
|
46
|
-
# @param name [String] Name of the agent.
|
|
51
|
+
# @param name [String] Name of the agent. <br>
|
|
52
|
+
# Recommended format: [Brand Name] - [1-2 word description of purpose]
|
|
47
53
|
# @param phones [Array<Pinnacle::Campaigns::Rcs::Types::RcsAgentPhone>] List of phone numbers (1-3 required).
|
|
48
54
|
# @param websites [Array<Pinnacle::Campaigns::Rcs::Types::RcsAgentWebsite>] List of urls (1-3 required).
|
|
49
55
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
50
|
-
# @return [Pinnacle::Campaigns::Rcs::Types::
|
|
56
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsAgent]
|
|
51
57
|
def initialize(color: OMIT, description: OMIT, emails: OMIT, hero_url: OMIT, icon_url: OMIT, name: OMIT,
|
|
52
58
|
phones: OMIT, websites: OMIT, additional_properties: nil)
|
|
53
59
|
@color = color if color != OMIT
|
|
@@ -73,10 +79,10 @@ module Pinnacle
|
|
|
73
79
|
end
|
|
74
80
|
end
|
|
75
81
|
|
|
76
|
-
# Deserialize a JSON object to an instance of
|
|
82
|
+
# Deserialize a JSON object to an instance of RcsAgent
|
|
77
83
|
#
|
|
78
84
|
# @param json_object [String]
|
|
79
|
-
# @return [Pinnacle::Campaigns::Rcs::Types::
|
|
85
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsAgent]
|
|
80
86
|
def self.from_json(json_object:)
|
|
81
87
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
82
88
|
parsed_json = JSON.parse(json_object)
|
|
@@ -110,7 +116,7 @@ module Pinnacle
|
|
|
110
116
|
)
|
|
111
117
|
end
|
|
112
118
|
|
|
113
|
-
# Serialize an instance of
|
|
119
|
+
# Serialize an instance of RcsAgent to a JSON object
|
|
114
120
|
#
|
|
115
121
|
# @return [String]
|
|
116
122
|
def to_json(*_args)
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
require_relative "../../../types/rcs_campaign_schema_agent"
|
|
4
4
|
require_relative "../../../types/rcs_campaign_schema_links"
|
|
5
|
-
require_relative "../../../types/rcs_campaign_schema_opt_in"
|
|
6
|
-
require_relative "../../../types/rcs_campaign_schema_opt_out"
|
|
7
5
|
require_relative "../../../types/rcs_campaign_schema_use_case"
|
|
6
|
+
require_relative "../../../types/rcs_messaging_type_enum"
|
|
7
|
+
require_relative "../../../types/rcs_campaign_schema_keywords"
|
|
8
|
+
require_relative "../../../types/rcs_campaign_schema_traffic"
|
|
8
9
|
require "ostruct"
|
|
9
10
|
require "json"
|
|
10
11
|
|
|
@@ -19,20 +20,45 @@ module Pinnacle
|
|
|
19
20
|
attr_reader :agent
|
|
20
21
|
# @return [String] Unique identifier for the campaign.
|
|
21
22
|
attr_reader :campaign_id
|
|
22
|
-
# @return [String] Link to document verifying the brand's name. This may be the certificate of
|
|
23
|
-
# incorporation, business license, or other relevant document. You can typically
|
|
24
|
-
# find this on the Secretary of State website.
|
|
25
|
-
attr_reader :brand_verification_url
|
|
26
23
|
# @return [Array<String>] List of what the agent might say to users.
|
|
27
24
|
attr_reader :expected_agent_responses
|
|
28
25
|
# @return [Pinnacle::Types::RcsCampaignSchemaLinks] Legal documentation links.
|
|
29
26
|
attr_reader :links
|
|
30
|
-
# @return [Pinnacle::Types::RcsCampaignSchemaOptIn] Opt-in configuration.
|
|
31
|
-
attr_reader :opt_in
|
|
32
|
-
# @return [Pinnacle::Types::RcsCampaignSchemaOptOut] Opt-out configuration.
|
|
33
|
-
attr_reader :opt_out
|
|
34
27
|
# @return [Pinnacle::Types::RcsCampaignSchemaUseCase] Use case classification for the campaign.
|
|
35
28
|
attr_reader :use_case
|
|
29
|
+
# @return [String] Details on how opt-in is acquired. If it is done through a website or app,
|
|
30
|
+
# provide the link.
|
|
31
|
+
attr_reader :opt_in_terms_and_conditions
|
|
32
|
+
# @return [Pinnacle::Types::RcsMessagingTypeEnum]
|
|
33
|
+
attr_reader :messaging_type
|
|
34
|
+
# @return [String] Description of the agent's purpose, shown to carriers for approval.
|
|
35
|
+
attr_reader :carrier_description
|
|
36
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaKeywords]
|
|
37
|
+
attr_reader :keywords
|
|
38
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaTraffic]
|
|
39
|
+
attr_reader :traffic
|
|
40
|
+
# @return [String] Explanation of how the agent is triggered. This includes how the first message
|
|
41
|
+
# is delivered, whether messages follow a schedule or triggered by user actions,
|
|
42
|
+
# and any external triggers.
|
|
43
|
+
attr_reader :agent_triggers
|
|
44
|
+
# @return [String] Description of all agent interactions.
|
|
45
|
+
attr_reader :interaction_description
|
|
46
|
+
# @return [Boolean] Whether the agent supports conversational flows or respond to P2A messages from
|
|
47
|
+
# the users. Set to false for one-way messages from agent to user.
|
|
48
|
+
attr_reader :is_conversational
|
|
49
|
+
# @return [String] Required text that appears next to the opt-in checkbox for your opt-in form.
|
|
50
|
+
# This checkbox has to be unchecked by default. The text should meet the US CTIA
|
|
51
|
+
# requirements and is usually in the following format: <br>
|
|
52
|
+
# [Program description of the company sending the messages and what type of
|
|
53
|
+
# messages are being sent]. Msg&data rates may apply. [Message frequency: How
|
|
54
|
+
# frequently messages are sent]. [Privacy statement or link to privacy policy].
|
|
55
|
+
# [Link to full mobile
|
|
56
|
+
# T&Cs page].
|
|
57
|
+
attr_reader :cta_language
|
|
58
|
+
# @return [String] Instructions on how an external reviewer can trigger messages and an example
|
|
59
|
+
# flow from the agent. This is usually an inbound text message to the agent that
|
|
60
|
+
# will start a flow of messages between the agent and the user.
|
|
61
|
+
attr_reader :demo_trigger
|
|
36
62
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
37
63
|
attr_reader :additional_properties
|
|
38
64
|
# @return [Object]
|
|
@@ -44,38 +70,70 @@ module Pinnacle
|
|
|
44
70
|
# @param brand [String]
|
|
45
71
|
# @param agent [Pinnacle::Types::RcsCampaignSchemaAgent] Agent configured to the campaign.
|
|
46
72
|
# @param campaign_id [String] Unique identifier for the campaign.
|
|
47
|
-
# @param brand_verification_url [String] Link to document verifying the brand's name. This may be the certificate of
|
|
48
|
-
# incorporation, business license, or other relevant document. You can typically
|
|
49
|
-
# find this on the Secretary of State website.
|
|
50
73
|
# @param expected_agent_responses [Array<String>] List of what the agent might say to users.
|
|
51
74
|
# @param links [Pinnacle::Types::RcsCampaignSchemaLinks] Legal documentation links.
|
|
52
|
-
# @param opt_in [Pinnacle::Types::RcsCampaignSchemaOptIn] Opt-in configuration.
|
|
53
|
-
# @param opt_out [Pinnacle::Types::RcsCampaignSchemaOptOut] Opt-out configuration.
|
|
54
75
|
# @param use_case [Pinnacle::Types::RcsCampaignSchemaUseCase] Use case classification for the campaign.
|
|
76
|
+
# @param opt_in_terms_and_conditions [String] Details on how opt-in is acquired. If it is done through a website or app,
|
|
77
|
+
# provide the link.
|
|
78
|
+
# @param messaging_type [Pinnacle::Types::RcsMessagingTypeEnum]
|
|
79
|
+
# @param carrier_description [String] Description of the agent's purpose, shown to carriers for approval.
|
|
80
|
+
# @param keywords [Pinnacle::Types::RcsCampaignSchemaKeywords]
|
|
81
|
+
# @param traffic [Pinnacle::Types::RcsCampaignSchemaTraffic]
|
|
82
|
+
# @param agent_triggers [String] Explanation of how the agent is triggered. This includes how the first message
|
|
83
|
+
# is delivered, whether messages follow a schedule or triggered by user actions,
|
|
84
|
+
# and any external triggers.
|
|
85
|
+
# @param interaction_description [String] Description of all agent interactions.
|
|
86
|
+
# @param is_conversational [Boolean] Whether the agent supports conversational flows or respond to P2A messages from
|
|
87
|
+
# the users. Set to false for one-way messages from agent to user.
|
|
88
|
+
# @param cta_language [String] Required text that appears next to the opt-in checkbox for your opt-in form.
|
|
89
|
+
# This checkbox has to be unchecked by default. The text should meet the US CTIA
|
|
90
|
+
# requirements and is usually in the following format: <br>
|
|
91
|
+
# [Program description of the company sending the messages and what type of
|
|
92
|
+
# messages are being sent]. Msg&data rates may apply. [Message frequency: How
|
|
93
|
+
# frequently messages are sent]. [Privacy statement or link to privacy policy].
|
|
94
|
+
# [Link to full mobile
|
|
95
|
+
# T&Cs page].
|
|
96
|
+
# @param demo_trigger [String] Instructions on how an external reviewer can trigger messages and an example
|
|
97
|
+
# flow from the agent. This is usually an inbound text message to the agent that
|
|
98
|
+
# will start a flow of messages between the agent and the user.
|
|
55
99
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
56
100
|
# @return [Pinnacle::Campaigns::Rcs::Types::RcsAutofillResponse]
|
|
57
|
-
def initialize(brand: OMIT, agent: OMIT, campaign_id: OMIT,
|
|
58
|
-
|
|
101
|
+
def initialize(brand: OMIT, agent: OMIT, campaign_id: OMIT, expected_agent_responses: OMIT, links: OMIT,
|
|
102
|
+
use_case: OMIT, opt_in_terms_and_conditions: OMIT, messaging_type: OMIT, carrier_description: OMIT, keywords: OMIT, traffic: OMIT, agent_triggers: OMIT, interaction_description: OMIT, is_conversational: OMIT, cta_language: OMIT, demo_trigger: OMIT, additional_properties: nil)
|
|
59
103
|
@brand = brand if brand != OMIT
|
|
60
104
|
@agent = agent if agent != OMIT
|
|
61
105
|
@campaign_id = campaign_id if campaign_id != OMIT
|
|
62
|
-
@brand_verification_url = brand_verification_url if brand_verification_url != OMIT
|
|
63
106
|
@expected_agent_responses = expected_agent_responses if expected_agent_responses != OMIT
|
|
64
107
|
@links = links if links != OMIT
|
|
65
|
-
@opt_in = opt_in if opt_in != OMIT
|
|
66
|
-
@opt_out = opt_out if opt_out != OMIT
|
|
67
108
|
@use_case = use_case if use_case != OMIT
|
|
109
|
+
@opt_in_terms_and_conditions = opt_in_terms_and_conditions if opt_in_terms_and_conditions != OMIT
|
|
110
|
+
@messaging_type = messaging_type if messaging_type != OMIT
|
|
111
|
+
@carrier_description = carrier_description if carrier_description != OMIT
|
|
112
|
+
@keywords = keywords if keywords != OMIT
|
|
113
|
+
@traffic = traffic if traffic != OMIT
|
|
114
|
+
@agent_triggers = agent_triggers if agent_triggers != OMIT
|
|
115
|
+
@interaction_description = interaction_description if interaction_description != OMIT
|
|
116
|
+
@is_conversational = is_conversational if is_conversational != OMIT
|
|
117
|
+
@cta_language = cta_language if cta_language != OMIT
|
|
118
|
+
@demo_trigger = demo_trigger if demo_trigger != OMIT
|
|
68
119
|
@additional_properties = additional_properties
|
|
69
120
|
@_field_set = {
|
|
70
121
|
"brand": brand,
|
|
71
122
|
"agent": agent,
|
|
72
123
|
"campaignId": campaign_id,
|
|
73
|
-
"brandVerificationUrl": brand_verification_url,
|
|
74
124
|
"expectedAgentResponses": expected_agent_responses,
|
|
75
125
|
"links": links,
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
126
|
+
"useCase": use_case,
|
|
127
|
+
"optInTermsAndConditions": opt_in_terms_and_conditions,
|
|
128
|
+
"messagingType": messaging_type,
|
|
129
|
+
"carrierDescription": carrier_description,
|
|
130
|
+
"keywords": keywords,
|
|
131
|
+
"traffic": traffic,
|
|
132
|
+
"agentTriggers": agent_triggers,
|
|
133
|
+
"interactionDescription": interaction_description,
|
|
134
|
+
"isConversational": is_conversational,
|
|
135
|
+
"ctaLanguage": cta_language,
|
|
136
|
+
"demoTrigger": demo_trigger
|
|
79
137
|
}.reject do |_k, v|
|
|
80
138
|
v == OMIT
|
|
81
139
|
end
|
|
@@ -96,7 +154,6 @@ module Pinnacle
|
|
|
96
154
|
agent = Pinnacle::Types::RcsCampaignSchemaAgent.from_json(json_object: agent)
|
|
97
155
|
end
|
|
98
156
|
campaign_id = parsed_json["campaignId"]
|
|
99
|
-
brand_verification_url = parsed_json["brandVerificationUrl"]
|
|
100
157
|
expected_agent_responses = parsed_json["expectedAgentResponses"]
|
|
101
158
|
if parsed_json["links"].nil?
|
|
102
159
|
links = nil
|
|
@@ -104,34 +161,49 @@ module Pinnacle
|
|
|
104
161
|
links = parsed_json["links"].to_json
|
|
105
162
|
links = Pinnacle::Types::RcsCampaignSchemaLinks.from_json(json_object: links)
|
|
106
163
|
end
|
|
107
|
-
if parsed_json["optIn"].nil?
|
|
108
|
-
opt_in = nil
|
|
109
|
-
else
|
|
110
|
-
opt_in = parsed_json["optIn"].to_json
|
|
111
|
-
opt_in = Pinnacle::Types::RcsCampaignSchemaOptIn.from_json(json_object: opt_in)
|
|
112
|
-
end
|
|
113
|
-
if parsed_json["optOut"].nil?
|
|
114
|
-
opt_out = nil
|
|
115
|
-
else
|
|
116
|
-
opt_out = parsed_json["optOut"].to_json
|
|
117
|
-
opt_out = Pinnacle::Types::RcsCampaignSchemaOptOut.from_json(json_object: opt_out)
|
|
118
|
-
end
|
|
119
164
|
if parsed_json["useCase"].nil?
|
|
120
165
|
use_case = nil
|
|
121
166
|
else
|
|
122
167
|
use_case = parsed_json["useCase"].to_json
|
|
123
168
|
use_case = Pinnacle::Types::RcsCampaignSchemaUseCase.from_json(json_object: use_case)
|
|
124
169
|
end
|
|
170
|
+
opt_in_terms_and_conditions = parsed_json["optInTermsAndConditions"]
|
|
171
|
+
messaging_type = parsed_json["messagingType"]
|
|
172
|
+
carrier_description = parsed_json["carrierDescription"]
|
|
173
|
+
if parsed_json["keywords"].nil?
|
|
174
|
+
keywords = nil
|
|
175
|
+
else
|
|
176
|
+
keywords = parsed_json["keywords"].to_json
|
|
177
|
+
keywords = Pinnacle::Types::RcsCampaignSchemaKeywords.from_json(json_object: keywords)
|
|
178
|
+
end
|
|
179
|
+
if parsed_json["traffic"].nil?
|
|
180
|
+
traffic = nil
|
|
181
|
+
else
|
|
182
|
+
traffic = parsed_json["traffic"].to_json
|
|
183
|
+
traffic = Pinnacle::Types::RcsCampaignSchemaTraffic.from_json(json_object: traffic)
|
|
184
|
+
end
|
|
185
|
+
agent_triggers = parsed_json["agentTriggers"]
|
|
186
|
+
interaction_description = parsed_json["interactionDescription"]
|
|
187
|
+
is_conversational = parsed_json["isConversational"]
|
|
188
|
+
cta_language = parsed_json["ctaLanguage"]
|
|
189
|
+
demo_trigger = parsed_json["demoTrigger"]
|
|
125
190
|
new(
|
|
126
191
|
brand: brand,
|
|
127
192
|
agent: agent,
|
|
128
193
|
campaign_id: campaign_id,
|
|
129
|
-
brand_verification_url: brand_verification_url,
|
|
130
194
|
expected_agent_responses: expected_agent_responses,
|
|
131
195
|
links: links,
|
|
132
|
-
opt_in: opt_in,
|
|
133
|
-
opt_out: opt_out,
|
|
134
196
|
use_case: use_case,
|
|
197
|
+
opt_in_terms_and_conditions: opt_in_terms_and_conditions,
|
|
198
|
+
messaging_type: messaging_type,
|
|
199
|
+
carrier_description: carrier_description,
|
|
200
|
+
keywords: keywords,
|
|
201
|
+
traffic: traffic,
|
|
202
|
+
agent_triggers: agent_triggers,
|
|
203
|
+
interaction_description: interaction_description,
|
|
204
|
+
is_conversational: is_conversational,
|
|
205
|
+
cta_language: cta_language,
|
|
206
|
+
demo_trigger: demo_trigger,
|
|
135
207
|
additional_properties: struct
|
|
136
208
|
)
|
|
137
209
|
end
|
|
@@ -153,12 +225,19 @@ module Pinnacle
|
|
|
153
225
|
obj.brand&.is_a?(String) != false || raise("Passed value for field obj.brand is not the expected type, validation failed.")
|
|
154
226
|
obj.agent.nil? || Pinnacle::Types::RcsCampaignSchemaAgent.validate_raw(obj: obj.agent)
|
|
155
227
|
obj.campaign_id&.is_a?(String) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
|
|
156
|
-
obj.brand_verification_url&.is_a?(String) != false || raise("Passed value for field obj.brand_verification_url is not the expected type, validation failed.")
|
|
157
228
|
obj.expected_agent_responses&.is_a?(Array) != false || raise("Passed value for field obj.expected_agent_responses is not the expected type, validation failed.")
|
|
158
229
|
obj.links.nil? || Pinnacle::Types::RcsCampaignSchemaLinks.validate_raw(obj: obj.links)
|
|
159
|
-
obj.opt_in.nil? || Pinnacle::Types::RcsCampaignSchemaOptIn.validate_raw(obj: obj.opt_in)
|
|
160
|
-
obj.opt_out.nil? || Pinnacle::Types::RcsCampaignSchemaOptOut.validate_raw(obj: obj.opt_out)
|
|
161
230
|
obj.use_case.nil? || Pinnacle::Types::RcsCampaignSchemaUseCase.validate_raw(obj: obj.use_case)
|
|
231
|
+
obj.opt_in_terms_and_conditions&.is_a?(String) != false || raise("Passed value for field obj.opt_in_terms_and_conditions is not the expected type, validation failed.")
|
|
232
|
+
obj.messaging_type&.is_a?(Pinnacle::Types::RcsMessagingTypeEnum) != false || raise("Passed value for field obj.messaging_type is not the expected type, validation failed.")
|
|
233
|
+
obj.carrier_description&.is_a?(String) != false || raise("Passed value for field obj.carrier_description is not the expected type, validation failed.")
|
|
234
|
+
obj.keywords.nil? || Pinnacle::Types::RcsCampaignSchemaKeywords.validate_raw(obj: obj.keywords)
|
|
235
|
+
obj.traffic.nil? || Pinnacle::Types::RcsCampaignSchemaTraffic.validate_raw(obj: obj.traffic)
|
|
236
|
+
obj.agent_triggers&.is_a?(String) != false || raise("Passed value for field obj.agent_triggers is not the expected type, validation failed.")
|
|
237
|
+
obj.interaction_description&.is_a?(String) != false || raise("Passed value for field obj.interaction_description is not the expected type, validation failed.")
|
|
238
|
+
obj.is_conversational&.is_a?(Boolean) != false || raise("Passed value for field obj.is_conversational is not the expected type, validation failed.")
|
|
239
|
+
obj.cta_language&.is_a?(String) != false || raise("Passed value for field obj.cta_language is not the expected type, validation failed.")
|
|
240
|
+
obj.demo_trigger&.is_a?(String) != false || raise("Passed value for field obj.demo_trigger is not the expected type, validation failed.")
|
|
162
241
|
end
|
|
163
242
|
end
|
|
164
243
|
end
|