rcs 2.0.2 → 2.0.4
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 +52 -90
- data/lib/rcs/brands/types/{brand_contact.rb → upsert_brand_schema_contact.rb} +20 -18
- data/lib/rcs/brands/types/upsert_brand_schema_entity_type.rb +16 -0
- data/lib/rcs/brands/types/upsert_brand_schema_sector.rb +28 -0
- data/lib/rcs/brands/types/upsert_brand_schema_type.rb +16 -0
- 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/{rcs_base_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 +70 -34
- metadata +74 -36
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_opt_in.rb +0 -75
- data/lib/rcs/types/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
- data/lib/rcs/types/upsert_contact.rb +0 -84
|
@@ -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
|
|
@@ -7,12 +7,12 @@ module Pinnacle
|
|
|
7
7
|
module Campaigns
|
|
8
8
|
module Rcs
|
|
9
9
|
module Types
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
#
|
|
10
|
+
class RcsCampaignHelpKeywords
|
|
11
|
+
# @return [String] Message sent when a user sends HELP. Must include at least one support contact
|
|
12
|
+
# method (phone, email, or website).<br>
|
|
13
|
+
# Recommended format: [Verb] [Contact Information] for support.
|
|
14
|
+
attr_reader :message
|
|
15
|
+
# @return [Array<String>] Keywords that trigger help response (HELP, SUPPORT, INFO, etc).
|
|
16
16
|
attr_reader :keywords
|
|
17
17
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
18
18
|
attr_reader :additional_properties
|
|
@@ -22,37 +22,38 @@ module Pinnacle
|
|
|
22
22
|
|
|
23
23
|
OMIT = Object.new
|
|
24
24
|
|
|
25
|
-
# @param
|
|
26
|
-
#
|
|
27
|
-
#
|
|
25
|
+
# @param message [String] Message sent when a user sends HELP. Must include at least one support contact
|
|
26
|
+
# method (phone, email, or website).<br>
|
|
27
|
+
# Recommended format: [Verb] [Contact Information] for support.
|
|
28
|
+
# @param keywords [Array<String>] Keywords that trigger help response (HELP, SUPPORT, INFO, etc).
|
|
28
29
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
29
|
-
# @return [Pinnacle::Campaigns::Rcs::Types::
|
|
30
|
-
def initialize(
|
|
31
|
-
@
|
|
30
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsCampaignHelpKeywords]
|
|
31
|
+
def initialize(message: OMIT, keywords: OMIT, additional_properties: nil)
|
|
32
|
+
@message = message if message != OMIT
|
|
32
33
|
@keywords = keywords if keywords != OMIT
|
|
33
34
|
@additional_properties = additional_properties
|
|
34
|
-
@_field_set = { "
|
|
35
|
+
@_field_set = { "message": message, "keywords": keywords }.reject do |_k, v|
|
|
35
36
|
v == OMIT
|
|
36
37
|
end
|
|
37
38
|
end
|
|
38
39
|
|
|
39
|
-
# Deserialize a JSON object to an instance of
|
|
40
|
+
# Deserialize a JSON object to an instance of RcsCampaignHelpKeywords
|
|
40
41
|
#
|
|
41
42
|
# @param json_object [String]
|
|
42
|
-
# @return [Pinnacle::Campaigns::Rcs::Types::
|
|
43
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsCampaignHelpKeywords]
|
|
43
44
|
def self.from_json(json_object:)
|
|
44
45
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
45
46
|
parsed_json = JSON.parse(json_object)
|
|
46
|
-
|
|
47
|
+
message = parsed_json["message"]
|
|
47
48
|
keywords = parsed_json["keywords"]
|
|
48
49
|
new(
|
|
49
|
-
|
|
50
|
+
message: message,
|
|
50
51
|
keywords: keywords,
|
|
51
52
|
additional_properties: struct
|
|
52
53
|
)
|
|
53
54
|
end
|
|
54
55
|
|
|
55
|
-
# Serialize an instance of
|
|
56
|
+
# Serialize an instance of RcsCampaignHelpKeywords to a JSON object
|
|
56
57
|
#
|
|
57
58
|
# @return [String]
|
|
58
59
|
def to_json(*_args)
|
|
@@ -66,7 +67,7 @@ module Pinnacle
|
|
|
66
67
|
# @param obj [Object]
|
|
67
68
|
# @return [Void]
|
|
68
69
|
def self.validate_raw(obj:)
|
|
69
|
-
obj.
|
|
70
|
+
obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
|
70
71
|
obj.keywords&.is_a?(Array) != false || raise("Passed value for field obj.keywords is not the expected type, validation failed.")
|
|
71
72
|
end
|
|
72
73
|
end
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "rcs_campaign_help_keywords"
|
|
4
|
+
require_relative "rcs_campaign_opt_in_keywords"
|
|
5
|
+
require_relative "rcs_campaign_opt_out_keywords"
|
|
6
|
+
require "ostruct"
|
|
7
|
+
require "json"
|
|
8
|
+
|
|
9
|
+
module Pinnacle
|
|
10
|
+
module Campaigns
|
|
11
|
+
module Rcs
|
|
12
|
+
module Types
|
|
13
|
+
class RcsCampaignKeywords
|
|
14
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsCampaignHelpKeywords]
|
|
15
|
+
attr_reader :help
|
|
16
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsCampaignOptInKeywords]
|
|
17
|
+
attr_reader :opt_in
|
|
18
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsCampaignOptOutKeywords]
|
|
19
|
+
attr_reader :opt_out
|
|
20
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
21
|
+
attr_reader :additional_properties
|
|
22
|
+
# @return [Object]
|
|
23
|
+
attr_reader :_field_set
|
|
24
|
+
protected :_field_set
|
|
25
|
+
|
|
26
|
+
OMIT = Object.new
|
|
27
|
+
|
|
28
|
+
# @param help [Pinnacle::Campaigns::Rcs::Types::RcsCampaignHelpKeywords]
|
|
29
|
+
# @param opt_in [Pinnacle::Campaigns::Rcs::Types::RcsCampaignOptInKeywords]
|
|
30
|
+
# @param opt_out [Pinnacle::Campaigns::Rcs::Types::RcsCampaignOptOutKeywords]
|
|
31
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
32
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsCampaignKeywords]
|
|
33
|
+
def initialize(help: OMIT, opt_in: OMIT, opt_out: OMIT, additional_properties: nil)
|
|
34
|
+
@help = help if help != OMIT
|
|
35
|
+
@opt_in = opt_in if opt_in != OMIT
|
|
36
|
+
@opt_out = opt_out if opt_out != OMIT
|
|
37
|
+
@additional_properties = additional_properties
|
|
38
|
+
@_field_set = { "HELP": help, "OPT_IN": opt_in, "OPT_OUT": opt_out }.reject do |_k, v|
|
|
39
|
+
v == OMIT
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Deserialize a JSON object to an instance of RcsCampaignKeywords
|
|
44
|
+
#
|
|
45
|
+
# @param json_object [String]
|
|
46
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsCampaignKeywords]
|
|
47
|
+
def self.from_json(json_object:)
|
|
48
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
49
|
+
parsed_json = JSON.parse(json_object)
|
|
50
|
+
if parsed_json["HELP"].nil?
|
|
51
|
+
help = nil
|
|
52
|
+
else
|
|
53
|
+
help = parsed_json["HELP"].to_json
|
|
54
|
+
help = Pinnacle::Campaigns::Rcs::Types::RcsCampaignHelpKeywords.from_json(json_object: help)
|
|
55
|
+
end
|
|
56
|
+
if parsed_json["OPT_IN"].nil?
|
|
57
|
+
opt_in = nil
|
|
58
|
+
else
|
|
59
|
+
opt_in = parsed_json["OPT_IN"].to_json
|
|
60
|
+
opt_in = Pinnacle::Campaigns::Rcs::Types::RcsCampaignOptInKeywords.from_json(json_object: opt_in)
|
|
61
|
+
end
|
|
62
|
+
if parsed_json["OPT_OUT"].nil?
|
|
63
|
+
opt_out = nil
|
|
64
|
+
else
|
|
65
|
+
opt_out = parsed_json["OPT_OUT"].to_json
|
|
66
|
+
opt_out = Pinnacle::Campaigns::Rcs::Types::RcsCampaignOptOutKeywords.from_json(json_object: opt_out)
|
|
67
|
+
end
|
|
68
|
+
new(
|
|
69
|
+
help: help,
|
|
70
|
+
opt_in: opt_in,
|
|
71
|
+
opt_out: opt_out,
|
|
72
|
+
additional_properties: struct
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Serialize an instance of RcsCampaignKeywords to a JSON object
|
|
77
|
+
#
|
|
78
|
+
# @return [String]
|
|
79
|
+
def to_json(*_args)
|
|
80
|
+
@_field_set&.to_json
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
84
|
+
# hash and check each fields type against the current object's property
|
|
85
|
+
# definitions.
|
|
86
|
+
#
|
|
87
|
+
# @param obj [Object]
|
|
88
|
+
# @return [Void]
|
|
89
|
+
def self.validate_raw(obj:)
|
|
90
|
+
obj.help.nil? || Pinnacle::Campaigns::Rcs::Types::RcsCampaignHelpKeywords.validate_raw(obj: obj.help)
|
|
91
|
+
obj.opt_in.nil? || Pinnacle::Campaigns::Rcs::Types::RcsCampaignOptInKeywords.validate_raw(obj: obj.opt_in)
|
|
92
|
+
obj.opt_out.nil? || Pinnacle::Campaigns::Rcs::Types::RcsCampaignOptOutKeywords.validate_raw(obj: obj.opt_out)
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ostruct"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
6
|
+
module Pinnacle
|
|
7
|
+
module Campaigns
|
|
8
|
+
module Rcs
|
|
9
|
+
module Types
|
|
10
|
+
class RcsCampaignOptInKeywords
|
|
11
|
+
# @return [String] Message sent when a user opt-in. Must include brand name, confirmation of
|
|
12
|
+
# subscription, and disclosures (STOP and HELP instructions, message and data
|
|
13
|
+
# rates).<br>
|
|
14
|
+
# Recommended Format:<br>
|
|
15
|
+
# [Greetings]<br>
|
|
16
|
+
# You are now subscribed to [Agent Name] and will receive [type of messages that
|
|
17
|
+
# the agent will send]. Feel free to contact us any time for help. <br>
|
|
18
|
+
# Reply STOP to opt out and HELP for support. Message & rates may apply.
|
|
19
|
+
attr_reader :message
|
|
20
|
+
# @return [Array<String>] Keywords that trigger opt-in response (START, SUBSCRIBE, JOIN, etc).
|
|
21
|
+
attr_reader :keywords
|
|
22
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
23
|
+
attr_reader :additional_properties
|
|
24
|
+
# @return [Object]
|
|
25
|
+
attr_reader :_field_set
|
|
26
|
+
protected :_field_set
|
|
27
|
+
|
|
28
|
+
OMIT = Object.new
|
|
29
|
+
|
|
30
|
+
# @param message [String] Message sent when a user opt-in. Must include brand name, confirmation of
|
|
31
|
+
# subscription, and disclosures (STOP and HELP instructions, message and data
|
|
32
|
+
# rates).<br>
|
|
33
|
+
# Recommended Format:<br>
|
|
34
|
+
# [Greetings]<br>
|
|
35
|
+
# You are now subscribed to [Agent Name] and will receive [type of messages that
|
|
36
|
+
# the agent will send]. Feel free to contact us any time for help. <br>
|
|
37
|
+
# Reply STOP to opt out and HELP for support. Message & rates may apply.
|
|
38
|
+
# @param keywords [Array<String>] Keywords that trigger opt-in response (START, SUBSCRIBE, JOIN, etc).
|
|
39
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
40
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsCampaignOptInKeywords]
|
|
41
|
+
def initialize(message: OMIT, keywords: OMIT, additional_properties: nil)
|
|
42
|
+
@message = message if message != OMIT
|
|
43
|
+
@keywords = keywords if keywords != OMIT
|
|
44
|
+
@additional_properties = additional_properties
|
|
45
|
+
@_field_set = { "message": message, "keywords": keywords }.reject do |_k, v|
|
|
46
|
+
v == OMIT
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Deserialize a JSON object to an instance of RcsCampaignOptInKeywords
|
|
51
|
+
#
|
|
52
|
+
# @param json_object [String]
|
|
53
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsCampaignOptInKeywords]
|
|
54
|
+
def self.from_json(json_object:)
|
|
55
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
56
|
+
parsed_json = JSON.parse(json_object)
|
|
57
|
+
message = parsed_json["message"]
|
|
58
|
+
keywords = parsed_json["keywords"]
|
|
59
|
+
new(
|
|
60
|
+
message: message,
|
|
61
|
+
keywords: keywords,
|
|
62
|
+
additional_properties: struct
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Serialize an instance of RcsCampaignOptInKeywords to a JSON object
|
|
67
|
+
#
|
|
68
|
+
# @return [String]
|
|
69
|
+
def to_json(*_args)
|
|
70
|
+
@_field_set&.to_json
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
74
|
+
# hash and check each fields type against the current object's property
|
|
75
|
+
# definitions.
|
|
76
|
+
#
|
|
77
|
+
# @param obj [Object]
|
|
78
|
+
# @return [Void]
|
|
79
|
+
def self.validate_raw(obj:)
|
|
80
|
+
obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
|
81
|
+
obj.keywords&.is_a?(Array) != false || raise("Passed value for field obj.keywords is not the expected type, validation failed.")
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ostruct"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
6
|
+
module Pinnacle
|
|
7
|
+
module Campaigns
|
|
8
|
+
module Rcs
|
|
9
|
+
module Types
|
|
10
|
+
class RcsCampaignOptOutKeywords
|
|
11
|
+
# @return [String] Message sent when a user opt-out. Must include brand name, acknowledge opt-out
|
|
12
|
+
# request and state user will not receive further messages. No marketing or
|
|
13
|
+
# re-engagement attempts.<br>
|
|
14
|
+
# Recommended format: "You've been unsubscribed from [Agent Name] and will no
|
|
15
|
+
# longer receive messages. If you ever change your mind, reply START or SUBSCRIBE
|
|
16
|
+
# to rejoin anytime."
|
|
17
|
+
attr_reader :message
|
|
18
|
+
# @return [Array<String>] Keywords that trigger opt-out response (END, UNSUBSCRIBE, STOP, etc).
|
|
19
|
+
attr_reader :keywords
|
|
20
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
21
|
+
attr_reader :additional_properties
|
|
22
|
+
# @return [Object]
|
|
23
|
+
attr_reader :_field_set
|
|
24
|
+
protected :_field_set
|
|
25
|
+
|
|
26
|
+
OMIT = Object.new
|
|
27
|
+
|
|
28
|
+
# @param message [String] Message sent when a user opt-out. Must include brand name, acknowledge opt-out
|
|
29
|
+
# request and state user will not receive further messages. No marketing or
|
|
30
|
+
# re-engagement attempts.<br>
|
|
31
|
+
# Recommended format: "You've been unsubscribed from [Agent Name] and will no
|
|
32
|
+
# longer receive messages. If you ever change your mind, reply START or SUBSCRIBE
|
|
33
|
+
# to rejoin anytime."
|
|
34
|
+
# @param keywords [Array<String>] Keywords that trigger opt-out response (END, UNSUBSCRIBE, STOP, etc).
|
|
35
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
36
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsCampaignOptOutKeywords]
|
|
37
|
+
def initialize(message: OMIT, keywords: OMIT, additional_properties: nil)
|
|
38
|
+
@message = message if message != OMIT
|
|
39
|
+
@keywords = keywords if keywords != OMIT
|
|
40
|
+
@additional_properties = additional_properties
|
|
41
|
+
@_field_set = { "message": message, "keywords": keywords }.reject do |_k, v|
|
|
42
|
+
v == OMIT
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Deserialize a JSON object to an instance of RcsCampaignOptOutKeywords
|
|
47
|
+
#
|
|
48
|
+
# @param json_object [String]
|
|
49
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsCampaignOptOutKeywords]
|
|
50
|
+
def self.from_json(json_object:)
|
|
51
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
52
|
+
parsed_json = JSON.parse(json_object)
|
|
53
|
+
message = parsed_json["message"]
|
|
54
|
+
keywords = parsed_json["keywords"]
|
|
55
|
+
new(
|
|
56
|
+
message: message,
|
|
57
|
+
keywords: keywords,
|
|
58
|
+
additional_properties: struct
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Serialize an instance of RcsCampaignOptOutKeywords to a JSON object
|
|
63
|
+
#
|
|
64
|
+
# @return [String]
|
|
65
|
+
def to_json(*_args)
|
|
66
|
+
@_field_set&.to_json
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
70
|
+
# hash and check each fields type against the current object's property
|
|
71
|
+
# definitions.
|
|
72
|
+
#
|
|
73
|
+
# @param obj [Object]
|
|
74
|
+
# @return [Void]
|
|
75
|
+
def self.validate_raw(obj:)
|
|
76
|
+
obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
|
77
|
+
obj.keywords&.is_a?(Array) != false || raise("Passed value for field obj.keywords is not the expected type, validation failed.")
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|