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.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rcs/brands/client.rb +19 -6
  3. data/lib/rcs/campaigns/dlc/client.rb +12 -12
  4. data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_help_keywords.rb → dlc_campaign_help_keywords.rb} +5 -5
  5. data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_keywords.rb → dlc_campaign_keywords.rb} +20 -20
  6. data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_links.rb → dlc_campaign_links.rb} +5 -5
  7. data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_opt_in_keywords.rb → dlc_campaign_opt_in_keywords.rb} +5 -5
  8. data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_opt_out_keywords.rb → dlc_campaign_opt_out_keywords.rb} +5 -5
  9. data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_options.rb → dlc_campaign_options.rb} +5 -5
  10. data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_use_case.rb → dlc_campaign_use_case.rb} +5 -5
  11. data/lib/rcs/campaigns/rcs/client.rb +144 -51
  12. data/lib/rcs/campaigns/rcs/types/{upsert_rcs_agent.rb → rcs_agent.rb} +15 -9
  13. data/lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb +122 -43
  14. data/lib/rcs/campaigns/rcs/types/{upsert_rcs_opt_out.rb → rcs_campaign_help_keywords.rb} +20 -19
  15. data/lib/rcs/campaigns/rcs/types/rcs_campaign_keywords.rb +98 -0
  16. data/lib/rcs/campaigns/rcs/types/rcs_campaign_opt_in_keywords.rb +87 -0
  17. data/lib/rcs/campaigns/rcs/types/rcs_campaign_opt_out_keywords.rb +83 -0
  18. data/lib/rcs/campaigns/rcs/types/rcs_campaign_traffic.rb +76 -0
  19. data/lib/rcs/campaigns/rcs/types/{upsert_rcs_links.rb → rcs_links.rb} +5 -5
  20. data/lib/rcs/campaigns/rcs/types/{upsert_rcs_use_case.rb → rcs_use_case.rb} +7 -7
  21. data/lib/rcs/campaigns/toll_free/client.rb +53 -10
  22. data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +54 -12
  23. data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_help_keywords.rb +66 -0
  24. data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_keywords.rb +86 -0
  25. data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_links.rb +74 -0
  26. data/lib/rcs/campaigns/toll_free/types/{upsert_toll_free_schema_opt_in.rb → toll_free_campaign_opt_in.rb} +5 -5
  27. data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_opt_in_keywords.rb +78 -0
  28. data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_options.rb +64 -0
  29. data/lib/rcs/campaigns/toll_free/types/{upsert_toll_free_schema_use_case.rb → toll_free_campaign_use_case.rb} +5 -5
  30. data/lib/rcs/messages/blast/client.rb +419 -0
  31. data/lib/rcs/messages/blast/types/blast_mms_options.rb +82 -0
  32. data/lib/rcs/messages/blast/types/blast_mms_response.rb +60 -0
  33. data/lib/rcs/messages/blast/types/blast_rcs_options.rb +118 -0
  34. data/lib/rcs/messages/blast/types/blast_rcs_request_options_standalone_card.rb +82 -0
  35. data/lib/rcs/messages/blast/types/blast_rcs_request_options_standalone_card_image_alignment.rb +16 -0
  36. data/lib/rcs/messages/blast/types/blast_rcs_request_options_standalone_card_orientation.rb +15 -0
  37. data/lib/rcs/messages/blast/types/blast_rcs_response.rb +60 -0
  38. data/lib/rcs/messages/blast/types/blast_sms_options.rb +70 -0
  39. data/lib/rcs/messages/blast/types/blast_sms_response.rb +60 -0
  40. data/lib/rcs/messages/mms/client.rb +6 -6
  41. data/lib/rcs/messages/mms/types/mms_send_response.rb +4 -4
  42. data/lib/rcs/messages/rcs/client.rb +7 -7
  43. data/lib/rcs/messages/rcs/types/{rcs_send_response.rb → send_rich_message_response.rb} +11 -11
  44. data/lib/rcs/messages/schedule/client.rb +103 -0
  45. data/lib/rcs/messages/sms/client.rb +6 -6
  46. data/lib/rcs/messages/sms/types/sms_send_response.rb +4 -4
  47. data/lib/rcs/types/{rcs_base.rb → base_rich_message.rb} +10 -10
  48. data/lib/rcs/types/blast_details.rb +110 -0
  49. data/lib/rcs/types/company_entity_type_enum.rb +14 -0
  50. data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +30 -2
  51. data/lib/rcs/types/dlc_with_extended_brand_and_status_mno_brand_tier.rb +15 -0
  52. data/lib/rcs/types/dlc_with_extended_brand_and_status_mno_tcr_tier.rb +22 -0
  53. data/lib/rcs/types/extended_brand.rb +10 -1
  54. data/lib/rcs/types/extended_brand_with_vetting.rb +10 -1
  55. data/lib/rcs/types/extended_rcs_campaign.rb +122 -51
  56. data/lib/rcs/types/message_schedule.rb +52 -24
  57. data/lib/rcs/types/message_status_enum.rb +1 -0
  58. data/lib/rcs/types/optional_brand_info.rb +10 -1
  59. data/lib/rcs/types/rcs_campaign.rb +122 -43
  60. data/lib/rcs/types/rcs_campaign_schema_extra_keywords.rb +94 -0
  61. data/lib/rcs/types/{rcs_campaign_schema_extra_opt_out.rb → rcs_campaign_schema_extra_keywords_help.rb} +18 -17
  62. data/lib/rcs/types/rcs_campaign_schema_extra_keywords_opt_in.rb +73 -0
  63. data/lib/rcs/types/rcs_campaign_schema_extra_keywords_opt_out.rb +73 -0
  64. data/lib/rcs/types/rcs_campaign_schema_extra_traffic.rb +72 -0
  65. data/lib/rcs/types/rcs_campaign_schema_extra_use_case.rb +2 -2
  66. data/lib/rcs/types/rcs_campaign_schema_keywords.rb +94 -0
  67. data/lib/rcs/types/{rcs_campaign_schema_opt_out.rb → rcs_campaign_schema_keywords_help.rb} +18 -17
  68. data/lib/rcs/types/rcs_campaign_schema_keywords_opt_in.rb +73 -0
  69. data/lib/rcs/types/rcs_campaign_schema_keywords_opt_out.rb +73 -0
  70. data/lib/rcs/types/rcs_campaign_schema_traffic.rb +72 -0
  71. data/lib/rcs/types/rcs_campaign_schema_use_case.rb +2 -2
  72. data/lib/rcs/types/rcs_cards_content_cards_item.rb +4 -2
  73. data/lib/rcs/types/rcs_content.rb +4 -4
  74. data/lib/rcs/types/rcs_messaging_type_enum.rb +17 -0
  75. data/lib/rcs/types/rcs_validate_content.rb +8 -8
  76. data/lib/rcs/types/rcs_validation_result.rb +9 -2
  77. data/lib/rcs/types/{rcs_cards_cards_item.rb → rich_card.rb} +9 -7
  78. data/lib/rcs/types/{rcs_cards.rb → rich_cards.rb} +9 -9
  79. data/lib/rcs/types/rich_cards_message.rb +9 -9
  80. data/lib/rcs/types/rich_media_message.rb +5 -5
  81. data/lib/rcs/types/{send_rcs_card_options_standalone_card.rb → rich_standalone_card_options.rb} +9 -7
  82. data/lib/rcs/types/{rcs_text_content.rb → rich_text.rb} +5 -5
  83. data/lib/rcs/types/rich_text_message.rb +5 -5
  84. data/lib/rcs/types/schedule_cancel_result.rb +58 -0
  85. data/lib/rcs/types/scheduled_blast_details.rb +76 -0
  86. data/lib/rcs/types/scheduled_blast_response_config.rb +89 -0
  87. data/lib/rcs/types/{scheduled_messaage.rb → scheduled_message.rb} +5 -5
  88. data/lib/rcs/types/{send_rcs_card_options.rb → send_rich_cards_options.rb} +18 -14
  89. data/lib/rcs/types/{options.rb → send_rich_message_options.rb} +5 -5
  90. data/lib/rcs/types/{sent_rcs_details.rb → sent_rich_message.rb} +5 -5
  91. data/lib/rcs/types/toll_free_campaign.rb +54 -12
  92. data/lib/rcs/types/toll_free_campaign_schema_keywords.rb +82 -0
  93. data/lib/rcs/types/toll_free_campaign_schema_keywords_help.rb +62 -0
  94. data/lib/rcs/types/toll_free_campaign_schema_keywords_opt_in.rb +74 -0
  95. data/lib/rcs/types/toll_free_campaign_schema_links.rb +70 -0
  96. data/lib/rcs/types/{upsert_toll_free_campaign_opt_in.rb → toll_free_campaign_schema_opt_in.rb} +5 -5
  97. data/lib/rcs/types/toll_free_campaign_schema_options.rb +60 -0
  98. data/lib/rcs/types/{upsert_toll_free_campaign_use_case.rb → toll_free_campaign_schema_use_case.rb} +5 -5
  99. data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +54 -12
  100. data/lib/requests.rb +2 -2
  101. data/lib/types_export.rb +66 -32
  102. metadata +70 -34
  103. data/lib/rcs/campaigns/rcs/types/upsert_rcs_opt_in.rb +0 -75
  104. data/lib/rcs/types/rcs_base_options.rb +0 -111
  105. data/lib/rcs/types/rcs_campaign_opt_in_method_enum.rb +0 -15
  106. data/lib/rcs/types/rcs_campaign_schema_extra_opt_in.rb +0 -71
  107. data/lib/rcs/types/rcs_campaign_schema_opt_in.rb +0 -71
@@ -2,9 +2,10 @@
2
2
 
3
3
  require_relative "rcs_campaign_schema_agent"
4
4
  require_relative "rcs_campaign_schema_links"
5
- require_relative "rcs_campaign_schema_opt_in"
6
- require_relative "rcs_campaign_schema_opt_out"
7
5
  require_relative "rcs_campaign_schema_use_case"
6
+ require_relative "rcs_messaging_type_enum"
7
+ require_relative "rcs_campaign_schema_keywords"
8
+ require_relative "rcs_campaign_schema_traffic"
8
9
  require "ostruct"
9
10
  require "json"
10
11
 
@@ -15,20 +16,45 @@ module Pinnacle
15
16
  attr_reader :agent
16
17
  # @return [String] Unique identifier for the campaign.
17
18
  attr_reader :campaign_id
18
- # @return [String] Link to document verifying the brand's name. This may be the certificate of
19
- # incorporation, business license, or other relevant document. You can typically
20
- # find this on the Secretary of State website.
21
- attr_reader :brand_verification_url
22
19
  # @return [Array<String>] List of what the agent might say to users.
23
20
  attr_reader :expected_agent_responses
24
21
  # @return [Pinnacle::Types::RcsCampaignSchemaLinks] Legal documentation links.
25
22
  attr_reader :links
26
- # @return [Pinnacle::Types::RcsCampaignSchemaOptIn] Opt-in configuration.
27
- attr_reader :opt_in
28
- # @return [Pinnacle::Types::RcsCampaignSchemaOptOut] Opt-out configuration.
29
- attr_reader :opt_out
30
23
  # @return [Pinnacle::Types::RcsCampaignSchemaUseCase] Use case classification for the campaign.
31
24
  attr_reader :use_case
25
+ # @return [String] Details on how opt-in is acquired. If it is done through a website or app,
26
+ # provide the link.
27
+ attr_reader :opt_in_terms_and_conditions
28
+ # @return [Pinnacle::Types::RcsMessagingTypeEnum]
29
+ attr_reader :messaging_type
30
+ # @return [String] Description of the agent's purpose, shown to carriers for approval.
31
+ attr_reader :carrier_description
32
+ # @return [Pinnacle::Types::RcsCampaignSchemaKeywords]
33
+ attr_reader :keywords
34
+ # @return [Pinnacle::Types::RcsCampaignSchemaTraffic]
35
+ attr_reader :traffic
36
+ # @return [String] Explanation of how the agent is triggered. This includes how the first message
37
+ # is delivered, whether messages follow a schedule or triggered by user actions,
38
+ # and any external triggers.
39
+ attr_reader :agent_triggers
40
+ # @return [String] Description of all agent interactions.
41
+ attr_reader :interaction_description
42
+ # @return [Boolean] Whether the agent supports conversational flows or respond to P2A messages from
43
+ # the users. Set to false for one-way messages from agent to user.
44
+ attr_reader :is_conversational
45
+ # @return [String] Required text that appears next to the opt-in checkbox for your opt-in form.
46
+ # This checkbox has to be unchecked by default. The text should meet the US CTIA
47
+ # requirements and is usually in the following format: <br>
48
+ # [Program description of the company sending the messages and what type of
49
+ # messages are being sent]. Msg&data rates may apply. [Message frequency: How
50
+ # frequently messages are sent]. [Privacy statement or link to privacy policy].
51
+ # [Link to full mobile
52
+ # T&Cs page].
53
+ attr_reader :cta_language
54
+ # @return [String] Instructions on how an external reviewer can trigger messages and an example
55
+ # flow from the agent. This is usually an inbound text message to the agent that
56
+ # will start a flow of messages between the agent and the user.
57
+ attr_reader :demo_trigger
32
58
  # @return [OpenStruct] Additional properties unmapped to the current class definition
33
59
  attr_reader :additional_properties
34
60
  # @return [Object]
@@ -39,36 +65,68 @@ module Pinnacle
39
65
 
40
66
  # @param agent [Pinnacle::Types::RcsCampaignSchemaAgent] Agent configured to the campaign.
41
67
  # @param campaign_id [String] Unique identifier for the campaign.
42
- # @param brand_verification_url [String] Link to document verifying the brand's name. This may be the certificate of
43
- # incorporation, business license, or other relevant document. You can typically
44
- # find this on the Secretary of State website.
45
68
  # @param expected_agent_responses [Array<String>] List of what the agent might say to users.
46
69
  # @param links [Pinnacle::Types::RcsCampaignSchemaLinks] Legal documentation links.
47
- # @param opt_in [Pinnacle::Types::RcsCampaignSchemaOptIn] Opt-in configuration.
48
- # @param opt_out [Pinnacle::Types::RcsCampaignSchemaOptOut] Opt-out configuration.
49
70
  # @param use_case [Pinnacle::Types::RcsCampaignSchemaUseCase] Use case classification for the campaign.
71
+ # @param opt_in_terms_and_conditions [String] Details on how opt-in is acquired. If it is done through a website or app,
72
+ # provide the link.
73
+ # @param messaging_type [Pinnacle::Types::RcsMessagingTypeEnum]
74
+ # @param carrier_description [String] Description of the agent's purpose, shown to carriers for approval.
75
+ # @param keywords [Pinnacle::Types::RcsCampaignSchemaKeywords]
76
+ # @param traffic [Pinnacle::Types::RcsCampaignSchemaTraffic]
77
+ # @param agent_triggers [String] Explanation of how the agent is triggered. This includes how the first message
78
+ # is delivered, whether messages follow a schedule or triggered by user actions,
79
+ # and any external triggers.
80
+ # @param interaction_description [String] Description of all agent interactions.
81
+ # @param is_conversational [Boolean] Whether the agent supports conversational flows or respond to P2A messages from
82
+ # the users. Set to false for one-way messages from agent to user.
83
+ # @param cta_language [String] Required text that appears next to the opt-in checkbox for your opt-in form.
84
+ # This checkbox has to be unchecked by default. The text should meet the US CTIA
85
+ # requirements and is usually in the following format: <br>
86
+ # [Program description of the company sending the messages and what type of
87
+ # messages are being sent]. Msg&data rates may apply. [Message frequency: How
88
+ # frequently messages are sent]. [Privacy statement or link to privacy policy].
89
+ # [Link to full mobile
90
+ # T&Cs page].
91
+ # @param demo_trigger [String] Instructions on how an external reviewer can trigger messages and an example
92
+ # flow from the agent. This is usually an inbound text message to the agent that
93
+ # will start a flow of messages between the agent and the user.
50
94
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
51
95
  # @return [Pinnacle::Types::RcsCampaign]
52
- def initialize(agent: OMIT, campaign_id: OMIT, brand_verification_url: OMIT, expected_agent_responses: OMIT,
53
- links: OMIT, opt_in: OMIT, opt_out: OMIT, use_case: OMIT, additional_properties: nil)
96
+ def initialize(agent: OMIT, campaign_id: OMIT, expected_agent_responses: OMIT, links: OMIT, use_case: OMIT,
97
+ 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)
54
98
  @agent = agent if agent != OMIT
55
99
  @campaign_id = campaign_id if campaign_id != OMIT
56
- @brand_verification_url = brand_verification_url if brand_verification_url != OMIT
57
100
  @expected_agent_responses = expected_agent_responses if expected_agent_responses != OMIT
58
101
  @links = links if links != OMIT
59
- @opt_in = opt_in if opt_in != OMIT
60
- @opt_out = opt_out if opt_out != OMIT
61
102
  @use_case = use_case if use_case != OMIT
103
+ @opt_in_terms_and_conditions = opt_in_terms_and_conditions if opt_in_terms_and_conditions != OMIT
104
+ @messaging_type = messaging_type if messaging_type != OMIT
105
+ @carrier_description = carrier_description if carrier_description != OMIT
106
+ @keywords = keywords if keywords != OMIT
107
+ @traffic = traffic if traffic != OMIT
108
+ @agent_triggers = agent_triggers if agent_triggers != OMIT
109
+ @interaction_description = interaction_description if interaction_description != OMIT
110
+ @is_conversational = is_conversational if is_conversational != OMIT
111
+ @cta_language = cta_language if cta_language != OMIT
112
+ @demo_trigger = demo_trigger if demo_trigger != OMIT
62
113
  @additional_properties = additional_properties
63
114
  @_field_set = {
64
115
  "agent": agent,
65
116
  "campaignId": campaign_id,
66
- "brandVerificationUrl": brand_verification_url,
67
117
  "expectedAgentResponses": expected_agent_responses,
68
118
  "links": links,
69
- "optIn": opt_in,
70
- "optOut": opt_out,
71
- "useCase": use_case
119
+ "useCase": use_case,
120
+ "optInTermsAndConditions": opt_in_terms_and_conditions,
121
+ "messagingType": messaging_type,
122
+ "carrierDescription": carrier_description,
123
+ "keywords": keywords,
124
+ "traffic": traffic,
125
+ "agentTriggers": agent_triggers,
126
+ "interactionDescription": interaction_description,
127
+ "isConversational": is_conversational,
128
+ "ctaLanguage": cta_language,
129
+ "demoTrigger": demo_trigger
72
130
  }.reject do |_k, v|
73
131
  v == OMIT
74
132
  end
@@ -88,7 +146,6 @@ module Pinnacle
88
146
  agent = Pinnacle::Types::RcsCampaignSchemaAgent.from_json(json_object: agent)
89
147
  end
90
148
  campaign_id = parsed_json["campaignId"]
91
- brand_verification_url = parsed_json["brandVerificationUrl"]
92
149
  expected_agent_responses = parsed_json["expectedAgentResponses"]
93
150
  if parsed_json["links"].nil?
94
151
  links = nil
@@ -96,33 +153,48 @@ module Pinnacle
96
153
  links = parsed_json["links"].to_json
97
154
  links = Pinnacle::Types::RcsCampaignSchemaLinks.from_json(json_object: links)
98
155
  end
99
- if parsed_json["optIn"].nil?
100
- opt_in = nil
101
- else
102
- opt_in = parsed_json["optIn"].to_json
103
- opt_in = Pinnacle::Types::RcsCampaignSchemaOptIn.from_json(json_object: opt_in)
104
- end
105
- if parsed_json["optOut"].nil?
106
- opt_out = nil
107
- else
108
- opt_out = parsed_json["optOut"].to_json
109
- opt_out = Pinnacle::Types::RcsCampaignSchemaOptOut.from_json(json_object: opt_out)
110
- end
111
156
  if parsed_json["useCase"].nil?
112
157
  use_case = nil
113
158
  else
114
159
  use_case = parsed_json["useCase"].to_json
115
160
  use_case = Pinnacle::Types::RcsCampaignSchemaUseCase.from_json(json_object: use_case)
116
161
  end
162
+ opt_in_terms_and_conditions = parsed_json["optInTermsAndConditions"]
163
+ messaging_type = parsed_json["messagingType"]
164
+ carrier_description = parsed_json["carrierDescription"]
165
+ if parsed_json["keywords"].nil?
166
+ keywords = nil
167
+ else
168
+ keywords = parsed_json["keywords"].to_json
169
+ keywords = Pinnacle::Types::RcsCampaignSchemaKeywords.from_json(json_object: keywords)
170
+ end
171
+ if parsed_json["traffic"].nil?
172
+ traffic = nil
173
+ else
174
+ traffic = parsed_json["traffic"].to_json
175
+ traffic = Pinnacle::Types::RcsCampaignSchemaTraffic.from_json(json_object: traffic)
176
+ end
177
+ agent_triggers = parsed_json["agentTriggers"]
178
+ interaction_description = parsed_json["interactionDescription"]
179
+ is_conversational = parsed_json["isConversational"]
180
+ cta_language = parsed_json["ctaLanguage"]
181
+ demo_trigger = parsed_json["demoTrigger"]
117
182
  new(
118
183
  agent: agent,
119
184
  campaign_id: campaign_id,
120
- brand_verification_url: brand_verification_url,
121
185
  expected_agent_responses: expected_agent_responses,
122
186
  links: links,
123
- opt_in: opt_in,
124
- opt_out: opt_out,
125
187
  use_case: use_case,
188
+ opt_in_terms_and_conditions: opt_in_terms_and_conditions,
189
+ messaging_type: messaging_type,
190
+ carrier_description: carrier_description,
191
+ keywords: keywords,
192
+ traffic: traffic,
193
+ agent_triggers: agent_triggers,
194
+ interaction_description: interaction_description,
195
+ is_conversational: is_conversational,
196
+ cta_language: cta_language,
197
+ demo_trigger: demo_trigger,
126
198
  additional_properties: struct
127
199
  )
128
200
  end
@@ -143,12 +215,19 @@ module Pinnacle
143
215
  def self.validate_raw(obj:)
144
216
  obj.agent.nil? || Pinnacle::Types::RcsCampaignSchemaAgent.validate_raw(obj: obj.agent)
145
217
  obj.campaign_id&.is_a?(String) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
146
- obj.brand_verification_url&.is_a?(String) != false || raise("Passed value for field obj.brand_verification_url is not the expected type, validation failed.")
147
218
  obj.expected_agent_responses&.is_a?(Array) != false || raise("Passed value for field obj.expected_agent_responses is not the expected type, validation failed.")
148
219
  obj.links.nil? || Pinnacle::Types::RcsCampaignSchemaLinks.validate_raw(obj: obj.links)
149
- obj.opt_in.nil? || Pinnacle::Types::RcsCampaignSchemaOptIn.validate_raw(obj: obj.opt_in)
150
- obj.opt_out.nil? || Pinnacle::Types::RcsCampaignSchemaOptOut.validate_raw(obj: obj.opt_out)
151
220
  obj.use_case.nil? || Pinnacle::Types::RcsCampaignSchemaUseCase.validate_raw(obj: obj.use_case)
221
+ 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.")
222
+ obj.messaging_type&.is_a?(Pinnacle::Types::RcsMessagingTypeEnum) != false || raise("Passed value for field obj.messaging_type is not the expected type, validation failed.")
223
+ obj.carrier_description&.is_a?(String) != false || raise("Passed value for field obj.carrier_description is not the expected type, validation failed.")
224
+ obj.keywords.nil? || Pinnacle::Types::RcsCampaignSchemaKeywords.validate_raw(obj: obj.keywords)
225
+ obj.traffic.nil? || Pinnacle::Types::RcsCampaignSchemaTraffic.validate_raw(obj: obj.traffic)
226
+ obj.agent_triggers&.is_a?(String) != false || raise("Passed value for field obj.agent_triggers is not the expected type, validation failed.")
227
+ obj.interaction_description&.is_a?(String) != false || raise("Passed value for field obj.interaction_description is not the expected type, validation failed.")
228
+ obj.is_conversational&.is_a?(Boolean) != false || raise("Passed value for field obj.is_conversational is not the expected type, validation failed.")
229
+ obj.cta_language&.is_a?(String) != false || raise("Passed value for field obj.cta_language is not the expected type, validation failed.")
230
+ obj.demo_trigger&.is_a?(String) != false || raise("Passed value for field obj.demo_trigger is not the expected type, validation failed.")
152
231
  end
153
232
  end
154
233
  end
@@ -0,0 +1,94 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "rcs_campaign_schema_extra_keywords_help"
4
+ require_relative "rcs_campaign_schema_extra_keywords_opt_in"
5
+ require_relative "rcs_campaign_schema_extra_keywords_opt_out"
6
+ require "ostruct"
7
+ require "json"
8
+
9
+ module Pinnacle
10
+ module Types
11
+ class RcsCampaignSchemaExtraKeywords
12
+ # @return [Pinnacle::Types::RcsCampaignSchemaExtraKeywordsHelp]
13
+ attr_reader :help
14
+ # @return [Pinnacle::Types::RcsCampaignSchemaExtraKeywordsOptIn]
15
+ attr_reader :opt_in
16
+ # @return [Pinnacle::Types::RcsCampaignSchemaExtraKeywordsOptOut]
17
+ attr_reader :opt_out
18
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
19
+ attr_reader :additional_properties
20
+ # @return [Object]
21
+ attr_reader :_field_set
22
+ protected :_field_set
23
+
24
+ OMIT = Object.new
25
+
26
+ # @param help [Pinnacle::Types::RcsCampaignSchemaExtraKeywordsHelp]
27
+ # @param opt_in [Pinnacle::Types::RcsCampaignSchemaExtraKeywordsOptIn]
28
+ # @param opt_out [Pinnacle::Types::RcsCampaignSchemaExtraKeywordsOptOut]
29
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
30
+ # @return [Pinnacle::Types::RcsCampaignSchemaExtraKeywords]
31
+ def initialize(help: OMIT, opt_in: OMIT, opt_out: OMIT, additional_properties: nil)
32
+ @help = help if help != OMIT
33
+ @opt_in = opt_in if opt_in != OMIT
34
+ @opt_out = opt_out if opt_out != OMIT
35
+ @additional_properties = additional_properties
36
+ @_field_set = { "HELP": help, "OPT_IN": opt_in, "OPT_OUT": opt_out }.reject do |_k, v|
37
+ v == OMIT
38
+ end
39
+ end
40
+
41
+ # Deserialize a JSON object to an instance of RcsCampaignSchemaExtraKeywords
42
+ #
43
+ # @param json_object [String]
44
+ # @return [Pinnacle::Types::RcsCampaignSchemaExtraKeywords]
45
+ def self.from_json(json_object:)
46
+ struct = JSON.parse(json_object, object_class: OpenStruct)
47
+ parsed_json = JSON.parse(json_object)
48
+ if parsed_json["HELP"].nil?
49
+ help = nil
50
+ else
51
+ help = parsed_json["HELP"].to_json
52
+ help = Pinnacle::Types::RcsCampaignSchemaExtraKeywordsHelp.from_json(json_object: help)
53
+ end
54
+ if parsed_json["OPT_IN"].nil?
55
+ opt_in = nil
56
+ else
57
+ opt_in = parsed_json["OPT_IN"].to_json
58
+ opt_in = Pinnacle::Types::RcsCampaignSchemaExtraKeywordsOptIn.from_json(json_object: opt_in)
59
+ end
60
+ if parsed_json["OPT_OUT"].nil?
61
+ opt_out = nil
62
+ else
63
+ opt_out = parsed_json["OPT_OUT"].to_json
64
+ opt_out = Pinnacle::Types::RcsCampaignSchemaExtraKeywordsOptOut.from_json(json_object: opt_out)
65
+ end
66
+ new(
67
+ help: help,
68
+ opt_in: opt_in,
69
+ opt_out: opt_out,
70
+ additional_properties: struct
71
+ )
72
+ end
73
+
74
+ # Serialize an instance of RcsCampaignSchemaExtraKeywords to a JSON object
75
+ #
76
+ # @return [String]
77
+ def to_json(*_args)
78
+ @_field_set&.to_json
79
+ end
80
+
81
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
82
+ # hash and check each fields type against the current object's property
83
+ # definitions.
84
+ #
85
+ # @param obj [Object]
86
+ # @return [Void]
87
+ def self.validate_raw(obj:)
88
+ obj.help.nil? || Pinnacle::Types::RcsCampaignSchemaExtraKeywordsHelp.validate_raw(obj: obj.help)
89
+ obj.opt_in.nil? || Pinnacle::Types::RcsCampaignSchemaExtraKeywordsOptIn.validate_raw(obj: obj.opt_in)
90
+ obj.opt_out.nil? || Pinnacle::Types::RcsCampaignSchemaExtraKeywordsOptOut.validate_raw(obj: obj.opt_out)
91
+ end
92
+ end
93
+ end
94
+ end
@@ -5,11 +5,11 @@ require "json"
5
5
 
6
6
  module Pinnacle
7
7
  module Types
8
- # Opt-out configuration.
9
- class RcsCampaignSchemaExtraOptOut
10
- # @return [String] Description for the keyword.
11
- attr_reader :description
12
- # @return [Array<String>] Keywords to opt-out.
8
+ class RcsCampaignSchemaExtraKeywordsHelp
9
+ # @return [String] Message sent when a user sends HELP. Must include at least one support contact
10
+ # method (phone, email, or website).
11
+ attr_reader :message
12
+ # @return [Array<String>] Keywords that trigger help response.
13
13
  attr_reader :keywords
14
14
  # @return [OpenStruct] Additional properties unmapped to the current class definition
15
15
  attr_reader :additional_properties
@@ -19,36 +19,37 @@ module Pinnacle
19
19
 
20
20
  OMIT = Object.new
21
21
 
22
- # @param description [String] Description for the keyword.
23
- # @param keywords [Array<String>] Keywords to opt-out.
22
+ # @param message [String] Message sent when a user sends HELP. Must include at least one support contact
23
+ # method (phone, email, or website).
24
+ # @param keywords [Array<String>] Keywords that trigger help response.
24
25
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
25
- # @return [Pinnacle::Types::RcsCampaignSchemaExtraOptOut]
26
- def initialize(description: OMIT, keywords: OMIT, additional_properties: nil)
27
- @description = description if description != OMIT
26
+ # @return [Pinnacle::Types::RcsCampaignSchemaExtraKeywordsHelp]
27
+ def initialize(message: OMIT, keywords: OMIT, additional_properties: nil)
28
+ @message = message if message != OMIT
28
29
  @keywords = keywords if keywords != OMIT
29
30
  @additional_properties = additional_properties
30
- @_field_set = { "description": description, "keywords": keywords }.reject do |_k, v|
31
+ @_field_set = { "message": message, "keywords": keywords }.reject do |_k, v|
31
32
  v == OMIT
32
33
  end
33
34
  end
34
35
 
35
- # Deserialize a JSON object to an instance of RcsCampaignSchemaExtraOptOut
36
+ # Deserialize a JSON object to an instance of RcsCampaignSchemaExtraKeywordsHelp
36
37
  #
37
38
  # @param json_object [String]
38
- # @return [Pinnacle::Types::RcsCampaignSchemaExtraOptOut]
39
+ # @return [Pinnacle::Types::RcsCampaignSchemaExtraKeywordsHelp]
39
40
  def self.from_json(json_object:)
40
41
  struct = JSON.parse(json_object, object_class: OpenStruct)
41
42
  parsed_json = JSON.parse(json_object)
42
- description = parsed_json["description"]
43
+ message = parsed_json["message"]
43
44
  keywords = parsed_json["keywords"]
44
45
  new(
45
- description: description,
46
+ message: message,
46
47
  keywords: keywords,
47
48
  additional_properties: struct
48
49
  )
49
50
  end
50
51
 
51
- # Serialize an instance of RcsCampaignSchemaExtraOptOut to a JSON object
52
+ # Serialize an instance of RcsCampaignSchemaExtraKeywordsHelp to a JSON object
52
53
  #
53
54
  # @return [String]
54
55
  def to_json(*_args)
@@ -62,7 +63,7 @@ module Pinnacle
62
63
  # @param obj [Object]
63
64
  # @return [Void]
64
65
  def self.validate_raw(obj:)
65
- obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
66
+ obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
66
67
  obj.keywords&.is_a?(Array) != false || raise("Passed value for field obj.keywords is not the expected type, validation failed.")
67
68
  end
68
69
  end
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Pinnacle
7
+ module Types
8
+ class RcsCampaignSchemaExtraKeywordsOptIn
9
+ # @return [String] Message sent when a user opt-in. Must include brand name, confirmation of
10
+ # subscription, and disclosures (STOP and HELP instructions, message and data
11
+ # rates).
12
+ attr_reader :message
13
+ # @return [Array<String>] Keywords that trigger opt-in response.
14
+ attr_reader :keywords
15
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
16
+ attr_reader :additional_properties
17
+ # @return [Object]
18
+ attr_reader :_field_set
19
+ protected :_field_set
20
+
21
+ OMIT = Object.new
22
+
23
+ # @param message [String] Message sent when a user opt-in. Must include brand name, confirmation of
24
+ # subscription, and disclosures (STOP and HELP instructions, message and data
25
+ # rates).
26
+ # @param keywords [Array<String>] Keywords that trigger opt-in response.
27
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
28
+ # @return [Pinnacle::Types::RcsCampaignSchemaExtraKeywordsOptIn]
29
+ def initialize(message: OMIT, keywords: OMIT, additional_properties: nil)
30
+ @message = message if message != OMIT
31
+ @keywords = keywords if keywords != OMIT
32
+ @additional_properties = additional_properties
33
+ @_field_set = { "message": message, "keywords": keywords }.reject do |_k, v|
34
+ v == OMIT
35
+ end
36
+ end
37
+
38
+ # Deserialize a JSON object to an instance of RcsCampaignSchemaExtraKeywordsOptIn
39
+ #
40
+ # @param json_object [String]
41
+ # @return [Pinnacle::Types::RcsCampaignSchemaExtraKeywordsOptIn]
42
+ def self.from_json(json_object:)
43
+ struct = JSON.parse(json_object, object_class: OpenStruct)
44
+ parsed_json = JSON.parse(json_object)
45
+ message = parsed_json["message"]
46
+ keywords = parsed_json["keywords"]
47
+ new(
48
+ message: message,
49
+ keywords: keywords,
50
+ additional_properties: struct
51
+ )
52
+ end
53
+
54
+ # Serialize an instance of RcsCampaignSchemaExtraKeywordsOptIn to a JSON object
55
+ #
56
+ # @return [String]
57
+ def to_json(*_args)
58
+ @_field_set&.to_json
59
+ end
60
+
61
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
62
+ # hash and check each fields type against the current object's property
63
+ # definitions.
64
+ #
65
+ # @param obj [Object]
66
+ # @return [Void]
67
+ def self.validate_raw(obj:)
68
+ obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
69
+ obj.keywords&.is_a?(Array) != false || raise("Passed value for field obj.keywords is not the expected type, validation failed.")
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Pinnacle
7
+ module Types
8
+ class RcsCampaignSchemaExtraKeywordsOptOut
9
+ # @return [String] Message sent when a user opt-out. Must include brand name, acknowledge opt-out
10
+ # request and state user will not receive further messages. No marketing or
11
+ # re-engagement attempts.
12
+ attr_reader :message
13
+ # @return [Array<String>] Keywords that trigger opt-out response.
14
+ attr_reader :keywords
15
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
16
+ attr_reader :additional_properties
17
+ # @return [Object]
18
+ attr_reader :_field_set
19
+ protected :_field_set
20
+
21
+ OMIT = Object.new
22
+
23
+ # @param message [String] Message sent when a user opt-out. Must include brand name, acknowledge opt-out
24
+ # request and state user will not receive further messages. No marketing or
25
+ # re-engagement attempts.
26
+ # @param keywords [Array<String>] Keywords that trigger opt-out response.
27
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
28
+ # @return [Pinnacle::Types::RcsCampaignSchemaExtraKeywordsOptOut]
29
+ def initialize(message: OMIT, keywords: OMIT, additional_properties: nil)
30
+ @message = message if message != OMIT
31
+ @keywords = keywords if keywords != OMIT
32
+ @additional_properties = additional_properties
33
+ @_field_set = { "message": message, "keywords": keywords }.reject do |_k, v|
34
+ v == OMIT
35
+ end
36
+ end
37
+
38
+ # Deserialize a JSON object to an instance of RcsCampaignSchemaExtraKeywordsOptOut
39
+ #
40
+ # @param json_object [String]
41
+ # @return [Pinnacle::Types::RcsCampaignSchemaExtraKeywordsOptOut]
42
+ def self.from_json(json_object:)
43
+ struct = JSON.parse(json_object, object_class: OpenStruct)
44
+ parsed_json = JSON.parse(json_object)
45
+ message = parsed_json["message"]
46
+ keywords = parsed_json["keywords"]
47
+ new(
48
+ message: message,
49
+ keywords: keywords,
50
+ additional_properties: struct
51
+ )
52
+ end
53
+
54
+ # Serialize an instance of RcsCampaignSchemaExtraKeywordsOptOut to a JSON object
55
+ #
56
+ # @return [String]
57
+ def to_json(*_args)
58
+ @_field_set&.to_json
59
+ end
60
+
61
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
62
+ # hash and check each fields type against the current object's property
63
+ # definitions.
64
+ #
65
+ # @param obj [Object]
66
+ # @return [Void]
67
+ def self.validate_raw(obj:)
68
+ obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
69
+ obj.keywords&.is_a?(Array) != false || raise("Passed value for field obj.keywords is not the expected type, validation failed.")
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Pinnacle
7
+ module Types
8
+ class RcsCampaignSchemaExtraTraffic
9
+ # @return [Integer] Estimated monthly website visitors.
10
+ attr_reader :monthly_website
11
+ # @return [Integer] Estimated monthly RCS messages sent.
12
+ attr_reader :monthly_rcs_estimate
13
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
14
+ attr_reader :additional_properties
15
+ # @return [Object]
16
+ attr_reader :_field_set
17
+ protected :_field_set
18
+
19
+ OMIT = Object.new
20
+
21
+ # @param monthly_website [Integer] Estimated monthly website visitors.
22
+ # @param monthly_rcs_estimate [Integer] Estimated monthly RCS messages sent.
23
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
24
+ # @return [Pinnacle::Types::RcsCampaignSchemaExtraTraffic]
25
+ def initialize(monthly_website: OMIT, monthly_rcs_estimate: OMIT, additional_properties: nil)
26
+ @monthly_website = monthly_website if monthly_website != OMIT
27
+ @monthly_rcs_estimate = monthly_rcs_estimate if monthly_rcs_estimate != OMIT
28
+ @additional_properties = additional_properties
29
+ @_field_set = {
30
+ "monthlyWebsite": monthly_website,
31
+ "monthlyRcsEstimate": monthly_rcs_estimate
32
+ }.reject do |_k, v|
33
+ v == OMIT
34
+ end
35
+ end
36
+
37
+ # Deserialize a JSON object to an instance of RcsCampaignSchemaExtraTraffic
38
+ #
39
+ # @param json_object [String]
40
+ # @return [Pinnacle::Types::RcsCampaignSchemaExtraTraffic]
41
+ def self.from_json(json_object:)
42
+ struct = JSON.parse(json_object, object_class: OpenStruct)
43
+ parsed_json = JSON.parse(json_object)
44
+ monthly_website = parsed_json["monthlyWebsite"]
45
+ monthly_rcs_estimate = parsed_json["monthlyRcsEstimate"]
46
+ new(
47
+ monthly_website: monthly_website,
48
+ monthly_rcs_estimate: monthly_rcs_estimate,
49
+ additional_properties: struct
50
+ )
51
+ end
52
+
53
+ # Serialize an instance of RcsCampaignSchemaExtraTraffic to a JSON object
54
+ #
55
+ # @return [String]
56
+ def to_json(*_args)
57
+ @_field_set&.to_json
58
+ end
59
+
60
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
61
+ # hash and check each fields type against the current object's property
62
+ # definitions.
63
+ #
64
+ # @param obj [Object]
65
+ # @return [Void]
66
+ def self.validate_raw(obj:)
67
+ obj.monthly_website&.is_a?(Integer) != false || raise("Passed value for field obj.monthly_website is not the expected type, validation failed.")
68
+ obj.monthly_rcs_estimate&.is_a?(Integer) != false || raise("Passed value for field obj.monthly_rcs_estimate is not the expected type, validation failed.")
69
+ end
70
+ end
71
+ end
72
+ end
@@ -8,7 +8,7 @@ module Pinnacle
8
8
  module Types
9
9
  # Use case classification for the campaign.
10
10
  class RcsCampaignSchemaExtraUseCase
11
- # @return [String] Summary of the use case.
11
+ # @return [String] Detailed summary of what the brand is and how this agent will be used.
12
12
  attr_reader :behavior
13
13
  # @return [Pinnacle::Types::RcsCampaignUseCaseEnum]
14
14
  attr_reader :value
@@ -20,7 +20,7 @@ module Pinnacle
20
20
 
21
21
  OMIT = Object.new
22
22
 
23
- # @param behavior [String] Summary of the use case.
23
+ # @param behavior [String] Detailed summary of what the brand is and how this agent will be used.
24
24
  # @param value [Pinnacle::Types::RcsCampaignUseCaseEnum]
25
25
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
26
26
  # @return [Pinnacle::Types::RcsCampaignSchemaExtraUseCase]