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
|
@@ -4,9 +4,10 @@ require_relative "rcs_campaign_schema_extra_agent"
|
|
|
4
4
|
require_relative "extended_brand"
|
|
5
5
|
require_relative "rcs_campaign_schema_extra_links"
|
|
6
6
|
require_relative "profile_status_enum"
|
|
7
|
-
require_relative "rcs_campaign_schema_extra_opt_in"
|
|
8
|
-
require_relative "rcs_campaign_schema_extra_opt_out"
|
|
9
7
|
require_relative "rcs_campaign_schema_extra_use_case"
|
|
8
|
+
require_relative "rcs_messaging_type_enum"
|
|
9
|
+
require_relative "rcs_campaign_schema_extra_keywords"
|
|
10
|
+
require_relative "rcs_campaign_schema_extra_traffic"
|
|
10
11
|
require "ostruct"
|
|
11
12
|
require "json"
|
|
12
13
|
|
|
@@ -19,12 +20,6 @@ module Pinnacle
|
|
|
19
20
|
attr_reader :agent_id
|
|
20
21
|
# @return [Pinnacle::Types::ExtendedBrand] Brand associated with this campaign.
|
|
21
22
|
attr_reader :brand
|
|
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
|
-
# @return [Boolean] Indicates whether the brand has provided an attestation.
|
|
27
|
-
attr_reader :brand_attestation
|
|
28
23
|
# @return [String] Unique identifier for the campaign. This identifier is a string that always
|
|
29
24
|
# begins with the prefix `rcs_`, for example: `rcs_1234567890`.
|
|
30
25
|
attr_reader :campaign_id
|
|
@@ -34,12 +29,41 @@ module Pinnacle
|
|
|
34
29
|
attr_reader :links
|
|
35
30
|
# @return [Pinnacle::Types::ProfileStatusEnum]
|
|
36
31
|
attr_reader :status
|
|
37
|
-
# @return [Pinnacle::Types::RcsCampaignSchemaExtraOptIn] Opt-in configuration.
|
|
38
|
-
attr_reader :opt_in
|
|
39
|
-
# @return [Pinnacle::Types::RcsCampaignSchemaExtraOptOut] Opt-out configuration.
|
|
40
|
-
attr_reader :opt_out
|
|
41
32
|
# @return [Pinnacle::Types::RcsCampaignSchemaExtraUseCase] Use case classification for the campaign.
|
|
42
33
|
attr_reader :use_case
|
|
34
|
+
# @return [String] Details on how opt-in is acquired. If it is done through a website or app,
|
|
35
|
+
# provide the link.
|
|
36
|
+
attr_reader :opt_in_terms_and_conditions
|
|
37
|
+
# @return [Pinnacle::Types::RcsMessagingTypeEnum]
|
|
38
|
+
attr_reader :messaging_type
|
|
39
|
+
# @return [String] Description of the agent's purpose, shown to carriers for approval.
|
|
40
|
+
attr_reader :carrier_description
|
|
41
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaExtraKeywords]
|
|
42
|
+
attr_reader :keywords
|
|
43
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaExtraTraffic]
|
|
44
|
+
attr_reader :traffic
|
|
45
|
+
# @return [String] Explanation of how the agent is triggered. This includes how the first message
|
|
46
|
+
# is delivered, whether messages follow a schedule or triggered by user actions,
|
|
47
|
+
# and any external triggers.
|
|
48
|
+
attr_reader :agent_triggers
|
|
49
|
+
# @return [String] Description of all agent interactions.
|
|
50
|
+
attr_reader :interaction_description
|
|
51
|
+
# @return [Boolean] Whether the agent supports conversational flows or respond to P2A messages from
|
|
52
|
+
# the users. Set to false for one-way messages from agent to user.
|
|
53
|
+
attr_reader :is_conversational
|
|
54
|
+
# @return [String] Required text that appears next to the opt-in checkbox for your opt-in form.
|
|
55
|
+
# This checkbox has to be unchecked by default. The text should meet the US CTIA
|
|
56
|
+
# requirements and is usually in the following format: <br>
|
|
57
|
+
# [Program description of the company sending the messages and what type of
|
|
58
|
+
# messages are being sent]. Msg&data rates may apply. [Message frequency: How
|
|
59
|
+
# frequently messages are sent]. [Privacy statement or link to privacy policy].
|
|
60
|
+
# [Link to full mobile
|
|
61
|
+
# T&Cs page].
|
|
62
|
+
attr_reader :cta_language
|
|
63
|
+
# @return [String] Instructions on how an external reviewer can trigger messages and an example
|
|
64
|
+
# flow from the agent. This is usually an inbound text message to the agent that
|
|
65
|
+
# will start a flow of messages between the agent and the user.
|
|
66
|
+
attr_reader :demo_trigger
|
|
43
67
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
44
68
|
attr_reader :additional_properties
|
|
45
69
|
# @return [Object]
|
|
@@ -51,48 +75,77 @@ module Pinnacle
|
|
|
51
75
|
# @param agent [Pinnacle::Types::RcsCampaignSchemaExtraAgent] Agent configured to the campaign.
|
|
52
76
|
# @param agent_id [String] Agent's unique identifier.
|
|
53
77
|
# @param brand [Pinnacle::Types::ExtendedBrand] Brand associated with this campaign.
|
|
54
|
-
# @param brand_verification_url [String] Link to document verifying the brand's name. This may be the certificate of
|
|
55
|
-
# incorporation, business license, or other relevant document. You can typically
|
|
56
|
-
# find this on the Secretary of State website.
|
|
57
|
-
# @param brand_attestation [Boolean] Indicates whether the brand has provided an attestation.
|
|
58
78
|
# @param campaign_id [String] Unique identifier for the campaign. This identifier is a string that always
|
|
59
79
|
# begins with the prefix `rcs_`, for example: `rcs_1234567890`.
|
|
60
80
|
# @param expected_agent_responses [Array<String>] List of what the agent might say to users.
|
|
61
81
|
# @param links [Pinnacle::Types::RcsCampaignSchemaExtraLinks] Legal documentation links.
|
|
62
82
|
# @param status [Pinnacle::Types::ProfileStatusEnum]
|
|
63
|
-
# @param opt_in [Pinnacle::Types::RcsCampaignSchemaExtraOptIn] Opt-in configuration.
|
|
64
|
-
# @param opt_out [Pinnacle::Types::RcsCampaignSchemaExtraOptOut] Opt-out configuration.
|
|
65
83
|
# @param use_case [Pinnacle::Types::RcsCampaignSchemaExtraUseCase] Use case classification for the campaign.
|
|
84
|
+
# @param opt_in_terms_and_conditions [String] Details on how opt-in is acquired. If it is done through a website or app,
|
|
85
|
+
# provide the link.
|
|
86
|
+
# @param messaging_type [Pinnacle::Types::RcsMessagingTypeEnum]
|
|
87
|
+
# @param carrier_description [String] Description of the agent's purpose, shown to carriers for approval.
|
|
88
|
+
# @param keywords [Pinnacle::Types::RcsCampaignSchemaExtraKeywords]
|
|
89
|
+
# @param traffic [Pinnacle::Types::RcsCampaignSchemaExtraTraffic]
|
|
90
|
+
# @param agent_triggers [String] Explanation of how the agent is triggered. This includes how the first message
|
|
91
|
+
# is delivered, whether messages follow a schedule or triggered by user actions,
|
|
92
|
+
# and any external triggers.
|
|
93
|
+
# @param interaction_description [String] Description of all agent interactions.
|
|
94
|
+
# @param is_conversational [Boolean] Whether the agent supports conversational flows or respond to P2A messages from
|
|
95
|
+
# the users. Set to false for one-way messages from agent to user.
|
|
96
|
+
# @param cta_language [String] Required text that appears next to the opt-in checkbox for your opt-in form.
|
|
97
|
+
# This checkbox has to be unchecked by default. The text should meet the US CTIA
|
|
98
|
+
# requirements and is usually in the following format: <br>
|
|
99
|
+
# [Program description of the company sending the messages and what type of
|
|
100
|
+
# messages are being sent]. Msg&data rates may apply. [Message frequency: How
|
|
101
|
+
# frequently messages are sent]. [Privacy statement or link to privacy policy].
|
|
102
|
+
# [Link to full mobile
|
|
103
|
+
# T&Cs page].
|
|
104
|
+
# @param demo_trigger [String] Instructions on how an external reviewer can trigger messages and an example
|
|
105
|
+
# flow from the agent. This is usually an inbound text message to the agent that
|
|
106
|
+
# will start a flow of messages between the agent and the user.
|
|
66
107
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
67
108
|
# @return [Pinnacle::Types::ExtendedRcsCampaign]
|
|
68
|
-
def initialize(agent:, agent_id:, brand:,
|
|
69
|
-
|
|
109
|
+
def initialize(agent:, agent_id:, brand:, status:, campaign_id: OMIT, expected_agent_responses: OMIT,
|
|
110
|
+
links: OMIT, 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)
|
|
70
111
|
@agent = agent
|
|
71
112
|
@agent_id = agent_id
|
|
72
113
|
@brand = brand
|
|
73
|
-
@brand_verification_url = brand_verification_url if brand_verification_url != OMIT
|
|
74
|
-
@brand_attestation = brand_attestation
|
|
75
114
|
@campaign_id = campaign_id if campaign_id != OMIT
|
|
76
115
|
@expected_agent_responses = expected_agent_responses if expected_agent_responses != OMIT
|
|
77
116
|
@links = links if links != OMIT
|
|
78
117
|
@status = status
|
|
79
|
-
@opt_in = opt_in if opt_in != OMIT
|
|
80
|
-
@opt_out = opt_out if opt_out != OMIT
|
|
81
118
|
@use_case = use_case if use_case != OMIT
|
|
119
|
+
@opt_in_terms_and_conditions = opt_in_terms_and_conditions if opt_in_terms_and_conditions != OMIT
|
|
120
|
+
@messaging_type = messaging_type if messaging_type != OMIT
|
|
121
|
+
@carrier_description = carrier_description if carrier_description != OMIT
|
|
122
|
+
@keywords = keywords if keywords != OMIT
|
|
123
|
+
@traffic = traffic if traffic != OMIT
|
|
124
|
+
@agent_triggers = agent_triggers if agent_triggers != OMIT
|
|
125
|
+
@interaction_description = interaction_description if interaction_description != OMIT
|
|
126
|
+
@is_conversational = is_conversational if is_conversational != OMIT
|
|
127
|
+
@cta_language = cta_language if cta_language != OMIT
|
|
128
|
+
@demo_trigger = demo_trigger if demo_trigger != OMIT
|
|
82
129
|
@additional_properties = additional_properties
|
|
83
130
|
@_field_set = {
|
|
84
131
|
"agent": agent,
|
|
85
132
|
"agentId": agent_id,
|
|
86
133
|
"brand": brand,
|
|
87
|
-
"brandVerificationUrl": brand_verification_url,
|
|
88
|
-
"brandAttestation": brand_attestation,
|
|
89
134
|
"campaignId": campaign_id,
|
|
90
135
|
"expectedAgentResponses": expected_agent_responses,
|
|
91
136
|
"links": links,
|
|
92
137
|
"status": status,
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
138
|
+
"useCase": use_case,
|
|
139
|
+
"optInTermsAndConditions": opt_in_terms_and_conditions,
|
|
140
|
+
"messagingType": messaging_type,
|
|
141
|
+
"carrierDescription": carrier_description,
|
|
142
|
+
"keywords": keywords,
|
|
143
|
+
"traffic": traffic,
|
|
144
|
+
"agentTriggers": agent_triggers,
|
|
145
|
+
"interactionDescription": interaction_description,
|
|
146
|
+
"isConversational": is_conversational,
|
|
147
|
+
"ctaLanguage": cta_language,
|
|
148
|
+
"demoTrigger": demo_trigger
|
|
96
149
|
}.reject do |_k, v|
|
|
97
150
|
v == OMIT
|
|
98
151
|
end
|
|
@@ -118,8 +171,6 @@ module Pinnacle
|
|
|
118
171
|
brand = parsed_json["brand"].to_json
|
|
119
172
|
brand = Pinnacle::Types::ExtendedBrand.from_json(json_object: brand)
|
|
120
173
|
end
|
|
121
|
-
brand_verification_url = parsed_json["brandVerificationUrl"]
|
|
122
|
-
brand_attestation = parsed_json["brandAttestation"]
|
|
123
174
|
campaign_id = parsed_json["campaignId"]
|
|
124
175
|
expected_agent_responses = parsed_json["expectedAgentResponses"]
|
|
125
176
|
if parsed_json["links"].nil?
|
|
@@ -129,37 +180,51 @@ module Pinnacle
|
|
|
129
180
|
links = Pinnacle::Types::RcsCampaignSchemaExtraLinks.from_json(json_object: links)
|
|
130
181
|
end
|
|
131
182
|
status = parsed_json["status"]
|
|
132
|
-
if parsed_json["optIn"].nil?
|
|
133
|
-
opt_in = nil
|
|
134
|
-
else
|
|
135
|
-
opt_in = parsed_json["optIn"].to_json
|
|
136
|
-
opt_in = Pinnacle::Types::RcsCampaignSchemaExtraOptIn.from_json(json_object: opt_in)
|
|
137
|
-
end
|
|
138
|
-
if parsed_json["optOut"].nil?
|
|
139
|
-
opt_out = nil
|
|
140
|
-
else
|
|
141
|
-
opt_out = parsed_json["optOut"].to_json
|
|
142
|
-
opt_out = Pinnacle::Types::RcsCampaignSchemaExtraOptOut.from_json(json_object: opt_out)
|
|
143
|
-
end
|
|
144
183
|
if parsed_json["useCase"].nil?
|
|
145
184
|
use_case = nil
|
|
146
185
|
else
|
|
147
186
|
use_case = parsed_json["useCase"].to_json
|
|
148
187
|
use_case = Pinnacle::Types::RcsCampaignSchemaExtraUseCase.from_json(json_object: use_case)
|
|
149
188
|
end
|
|
189
|
+
opt_in_terms_and_conditions = parsed_json["optInTermsAndConditions"]
|
|
190
|
+
messaging_type = parsed_json["messagingType"]
|
|
191
|
+
carrier_description = parsed_json["carrierDescription"]
|
|
192
|
+
if parsed_json["keywords"].nil?
|
|
193
|
+
keywords = nil
|
|
194
|
+
else
|
|
195
|
+
keywords = parsed_json["keywords"].to_json
|
|
196
|
+
keywords = Pinnacle::Types::RcsCampaignSchemaExtraKeywords.from_json(json_object: keywords)
|
|
197
|
+
end
|
|
198
|
+
if parsed_json["traffic"].nil?
|
|
199
|
+
traffic = nil
|
|
200
|
+
else
|
|
201
|
+
traffic = parsed_json["traffic"].to_json
|
|
202
|
+
traffic = Pinnacle::Types::RcsCampaignSchemaExtraTraffic.from_json(json_object: traffic)
|
|
203
|
+
end
|
|
204
|
+
agent_triggers = parsed_json["agentTriggers"]
|
|
205
|
+
interaction_description = parsed_json["interactionDescription"]
|
|
206
|
+
is_conversational = parsed_json["isConversational"]
|
|
207
|
+
cta_language = parsed_json["ctaLanguage"]
|
|
208
|
+
demo_trigger = parsed_json["demoTrigger"]
|
|
150
209
|
new(
|
|
151
210
|
agent: agent,
|
|
152
211
|
agent_id: agent_id,
|
|
153
212
|
brand: brand,
|
|
154
|
-
brand_verification_url: brand_verification_url,
|
|
155
|
-
brand_attestation: brand_attestation,
|
|
156
213
|
campaign_id: campaign_id,
|
|
157
214
|
expected_agent_responses: expected_agent_responses,
|
|
158
215
|
links: links,
|
|
159
216
|
status: status,
|
|
160
|
-
opt_in: opt_in,
|
|
161
|
-
opt_out: opt_out,
|
|
162
217
|
use_case: use_case,
|
|
218
|
+
opt_in_terms_and_conditions: opt_in_terms_and_conditions,
|
|
219
|
+
messaging_type: messaging_type,
|
|
220
|
+
carrier_description: carrier_description,
|
|
221
|
+
keywords: keywords,
|
|
222
|
+
traffic: traffic,
|
|
223
|
+
agent_triggers: agent_triggers,
|
|
224
|
+
interaction_description: interaction_description,
|
|
225
|
+
is_conversational: is_conversational,
|
|
226
|
+
cta_language: cta_language,
|
|
227
|
+
demo_trigger: demo_trigger,
|
|
163
228
|
additional_properties: struct
|
|
164
229
|
)
|
|
165
230
|
end
|
|
@@ -181,15 +246,21 @@ module Pinnacle
|
|
|
181
246
|
Pinnacle::Types::RcsCampaignSchemaExtraAgent.validate_raw(obj: obj.agent)
|
|
182
247
|
obj.agent_id.is_a?(String) != false || raise("Passed value for field obj.agent_id is not the expected type, validation failed.")
|
|
183
248
|
Pinnacle::Types::ExtendedBrand.validate_raw(obj: obj.brand)
|
|
184
|
-
obj.brand_verification_url&.is_a?(String) != false || raise("Passed value for field obj.brand_verification_url is not the expected type, validation failed.")
|
|
185
|
-
obj.brand_attestation.is_a?(Boolean) != false || raise("Passed value for field obj.brand_attestation is not the expected type, validation failed.")
|
|
186
249
|
obj.campaign_id&.is_a?(String) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
|
|
187
250
|
obj.expected_agent_responses&.is_a?(Array) != false || raise("Passed value for field obj.expected_agent_responses is not the expected type, validation failed.")
|
|
188
251
|
obj.links.nil? || Pinnacle::Types::RcsCampaignSchemaExtraLinks.validate_raw(obj: obj.links)
|
|
189
252
|
obj.status.is_a?(Pinnacle::Types::ProfileStatusEnum) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
|
190
|
-
obj.opt_in.nil? || Pinnacle::Types::RcsCampaignSchemaExtraOptIn.validate_raw(obj: obj.opt_in)
|
|
191
|
-
obj.opt_out.nil? || Pinnacle::Types::RcsCampaignSchemaExtraOptOut.validate_raw(obj: obj.opt_out)
|
|
192
253
|
obj.use_case.nil? || Pinnacle::Types::RcsCampaignSchemaExtraUseCase.validate_raw(obj: obj.use_case)
|
|
254
|
+
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.")
|
|
255
|
+
obj.messaging_type&.is_a?(Pinnacle::Types::RcsMessagingTypeEnum) != false || raise("Passed value for field obj.messaging_type is not the expected type, validation failed.")
|
|
256
|
+
obj.carrier_description&.is_a?(String) != false || raise("Passed value for field obj.carrier_description is not the expected type, validation failed.")
|
|
257
|
+
obj.keywords.nil? || Pinnacle::Types::RcsCampaignSchemaExtraKeywords.validate_raw(obj: obj.keywords)
|
|
258
|
+
obj.traffic.nil? || Pinnacle::Types::RcsCampaignSchemaExtraTraffic.validate_raw(obj: obj.traffic)
|
|
259
|
+
obj.agent_triggers&.is_a?(String) != false || raise("Passed value for field obj.agent_triggers is not the expected type, validation failed.")
|
|
260
|
+
obj.interaction_description&.is_a?(String) != false || raise("Passed value for field obj.interaction_description is not the expected type, validation failed.")
|
|
261
|
+
obj.is_conversational&.is_a?(Boolean) != false || raise("Passed value for field obj.is_conversational is not the expected type, validation failed.")
|
|
262
|
+
obj.cta_language&.is_a?(String) != false || raise("Passed value for field obj.cta_language is not the expected type, validation failed.")
|
|
263
|
+
obj.demo_trigger&.is_a?(String) != false || raise("Passed value for field obj.demo_trigger is not the expected type, validation failed.")
|
|
193
264
|
end
|
|
194
265
|
end
|
|
195
266
|
end
|
|
@@ -7,16 +7,30 @@ module Pinnacle
|
|
|
7
7
|
module Types
|
|
8
8
|
# Define when and how your message should be sent.
|
|
9
9
|
class MessageSchedule
|
|
10
|
-
# @return [String]
|
|
11
|
-
|
|
12
|
-
#
|
|
10
|
+
# @return [String] The date and time you want your message to be sent.
|
|
11
|
+
# - Use [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601), for example:
|
|
12
|
+
# `2024-12-17T14:30:00Z`. Format: `YYYY-MM-DDThh:mm` (e.g., `2024-12-25T14:30`).
|
|
13
|
+
# - This time must be at least 5 minutes in the future.
|
|
14
|
+
# - The message will be scheduled based on the `timezone` you provide.
|
|
15
|
+
# - If you set a `recurrence` schedule, this is the start date and time for the
|
|
16
|
+
# recurring schedule.
|
|
17
|
+
attr_reader :send_at
|
|
18
|
+
# @return [String] AWS cron expression for recurring schedules (6 fields). <br>
|
|
13
19
|
# [Learn more about cron
|
|
14
20
|
# ocs.aws.amazon.com/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html).
|
|
21
|
+
# <br>
|
|
22
|
+
# **Examples:**
|
|
23
|
+
# - `0 10 * * ? *` - Every day at 10:00 AM
|
|
24
|
+
# - `0/30 * * * ? *` - Every 30 minutes
|
|
25
|
+
# - `0 9 ? * MON-FRI *` - Every weekday at 9:00 AM
|
|
26
|
+
# - `0 12 1 * ? *` - First day of every month at noon
|
|
15
27
|
attr_reader :recurrence
|
|
16
|
-
# @return [String]
|
|
17
|
-
|
|
18
|
-
# @return [String] Timezone for your scheduled message, using an IANA identifier.
|
|
28
|
+
# @return [String] IANA timezone identifier (e.g., `America/New_York`, `UTC`). <br>
|
|
29
|
+
# Defaults to `UTC` if not specified.
|
|
19
30
|
attr_reader :timezone
|
|
31
|
+
# @return [String] Date and time when recurring messages should stop. <br>
|
|
32
|
+
# Format: `YYYY-MM-DDThh:mm`. Required if `recurrence` is set.
|
|
33
|
+
attr_reader :end_date
|
|
20
34
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
21
35
|
attr_reader :additional_properties
|
|
22
36
|
# @return [Object]
|
|
@@ -25,25 +39,39 @@ module Pinnacle
|
|
|
25
39
|
|
|
26
40
|
OMIT = Object.new
|
|
27
41
|
|
|
28
|
-
# @param
|
|
29
|
-
#
|
|
42
|
+
# @param send_at [String] The date and time you want your message to be sent.
|
|
43
|
+
# - Use [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601), for example:
|
|
44
|
+
# `2024-12-17T14:30:00Z`. Format: `YYYY-MM-DDThh:mm` (e.g., `2024-12-25T14:30`).
|
|
45
|
+
# - This time must be at least 5 minutes in the future.
|
|
46
|
+
# - The message will be scheduled based on the `timezone` you provide.
|
|
47
|
+
# - If you set a `recurrence` schedule, this is the start date and time for the
|
|
48
|
+
# recurring schedule.
|
|
49
|
+
# @param recurrence [String] AWS cron expression for recurring schedules (6 fields). <br>
|
|
30
50
|
# [Learn more about cron
|
|
31
51
|
# ocs.aws.amazon.com/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html).
|
|
32
|
-
#
|
|
33
|
-
#
|
|
52
|
+
# <br>
|
|
53
|
+
# **Examples:**
|
|
54
|
+
# - `0 10 * * ? *` - Every day at 10:00 AM
|
|
55
|
+
# - `0/30 * * * ? *` - Every 30 minutes
|
|
56
|
+
# - `0 9 ? * MON-FRI *` - Every weekday at 9:00 AM
|
|
57
|
+
# - `0 12 1 * ? *` - First day of every month at noon
|
|
58
|
+
# @param timezone [String] IANA timezone identifier (e.g., `America/New_York`, `UTC`). <br>
|
|
59
|
+
# Defaults to `UTC` if not specified.
|
|
60
|
+
# @param end_date [String] Date and time when recurring messages should stop. <br>
|
|
61
|
+
# Format: `YYYY-MM-DDThh:mm`. Required if `recurrence` is set.
|
|
34
62
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
35
63
|
# @return [Pinnacle::Types::MessageSchedule]
|
|
36
|
-
def initialize(send_at:, timezone
|
|
37
|
-
@end_date = end_date if end_date != OMIT
|
|
38
|
-
@recurrence = recurrence if recurrence != OMIT
|
|
64
|
+
def initialize(send_at:, recurrence: OMIT, timezone: OMIT, end_date: OMIT, additional_properties: nil)
|
|
39
65
|
@send_at = send_at
|
|
40
|
-
@
|
|
66
|
+
@recurrence = recurrence if recurrence != OMIT
|
|
67
|
+
@timezone = timezone if timezone != OMIT
|
|
68
|
+
@end_date = end_date if end_date != OMIT
|
|
41
69
|
@additional_properties = additional_properties
|
|
42
70
|
@_field_set = {
|
|
43
|
-
"endDate": end_date,
|
|
44
|
-
"recurrence": recurrence,
|
|
45
71
|
"sendAt": send_at,
|
|
46
|
-
"
|
|
72
|
+
"recurrence": recurrence,
|
|
73
|
+
"timezone": timezone,
|
|
74
|
+
"endDate": end_date
|
|
47
75
|
}.reject do |_k, v|
|
|
48
76
|
v == OMIT
|
|
49
77
|
end
|
|
@@ -56,15 +84,15 @@ module Pinnacle
|
|
|
56
84
|
def self.from_json(json_object:)
|
|
57
85
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
58
86
|
parsed_json = JSON.parse(json_object)
|
|
59
|
-
end_date = parsed_json["endDate"]
|
|
60
|
-
recurrence = parsed_json["recurrence"]
|
|
61
87
|
send_at = parsed_json["sendAt"]
|
|
88
|
+
recurrence = parsed_json["recurrence"]
|
|
62
89
|
timezone = parsed_json["timezone"]
|
|
90
|
+
end_date = parsed_json["endDate"]
|
|
63
91
|
new(
|
|
64
|
-
end_date: end_date,
|
|
65
|
-
recurrence: recurrence,
|
|
66
92
|
send_at: send_at,
|
|
93
|
+
recurrence: recurrence,
|
|
67
94
|
timezone: timezone,
|
|
95
|
+
end_date: end_date,
|
|
68
96
|
additional_properties: struct
|
|
69
97
|
)
|
|
70
98
|
end
|
|
@@ -83,10 +111,10 @@ module Pinnacle
|
|
|
83
111
|
# @param obj [Object]
|
|
84
112
|
# @return [Void]
|
|
85
113
|
def self.validate_raw(obj:)
|
|
86
|
-
obj.end_date&.is_a?(String) != false || raise("Passed value for field obj.end_date is not the expected type, validation failed.")
|
|
87
|
-
obj.recurrence&.is_a?(String) != false || raise("Passed value for field obj.recurrence is not the expected type, validation failed.")
|
|
88
114
|
obj.send_at.is_a?(String) != false || raise("Passed value for field obj.send_at is not the expected type, validation failed.")
|
|
89
|
-
obj.
|
|
115
|
+
obj.recurrence&.is_a?(String) != false || raise("Passed value for field obj.recurrence is not the expected type, validation failed.")
|
|
116
|
+
obj.timezone&.is_a?(String) != false || raise("Passed value for field obj.timezone is not the expected type, validation failed.")
|
|
117
|
+
obj.end_date&.is_a?(String) != false || raise("Passed value for field obj.end_date is not the expected type, validation failed.")
|
|
90
118
|
end
|
|
91
119
|
end
|
|
92
120
|
end
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
require_relative "optional_contacts"
|
|
4
4
|
require_relative "company_sector_enum"
|
|
5
5
|
require_relative "company_type_enum"
|
|
6
|
+
require_relative "company_entity_type_enum"
|
|
6
7
|
require "ostruct"
|
|
7
8
|
require "json"
|
|
8
9
|
|
|
@@ -27,6 +28,8 @@ module Pinnacle
|
|
|
27
28
|
attr_reader :sector
|
|
28
29
|
# @return [Pinnacle::Types::CompanyTypeEnum]
|
|
29
30
|
attr_reader :type
|
|
31
|
+
# @return [Pinnacle::Types::CompanyEntityTypeEnum] Legal entity type of the brand.
|
|
32
|
+
attr_reader :entity_type
|
|
30
33
|
# @return [String] Brand website URL.
|
|
31
34
|
attr_reader :website
|
|
32
35
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
@@ -46,11 +49,12 @@ module Pinnacle
|
|
|
46
49
|
# @param name [String] Legal name of the brand as registered.
|
|
47
50
|
# @param sector [Pinnacle::Types::CompanySectorEnum]
|
|
48
51
|
# @param type [Pinnacle::Types::CompanyTypeEnum]
|
|
52
|
+
# @param entity_type [Pinnacle::Types::CompanyEntityTypeEnum] Legal entity type of the brand.
|
|
49
53
|
# @param website [String] Brand website URL.
|
|
50
54
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
51
55
|
# @return [Pinnacle::Types::OptionalBrandInfo]
|
|
52
56
|
def initialize(address: OMIT, contact: OMIT, dba: OMIT, description: OMIT, ein: OMIT, email: OMIT, name: OMIT,
|
|
53
|
-
sector: OMIT, type: OMIT, website: OMIT, additional_properties: nil)
|
|
57
|
+
sector: OMIT, type: OMIT, entity_type: OMIT, website: OMIT, additional_properties: nil)
|
|
54
58
|
@address = address if address != OMIT
|
|
55
59
|
@contact = contact if contact != OMIT
|
|
56
60
|
@dba = dba if dba != OMIT
|
|
@@ -60,6 +64,7 @@ module Pinnacle
|
|
|
60
64
|
@name = name if name != OMIT
|
|
61
65
|
@sector = sector if sector != OMIT
|
|
62
66
|
@type = type if type != OMIT
|
|
67
|
+
@entity_type = entity_type if entity_type != OMIT
|
|
63
68
|
@website = website if website != OMIT
|
|
64
69
|
@additional_properties = additional_properties
|
|
65
70
|
@_field_set = {
|
|
@@ -72,6 +77,7 @@ module Pinnacle
|
|
|
72
77
|
"name": name,
|
|
73
78
|
"sector": sector,
|
|
74
79
|
"type": type,
|
|
80
|
+
"entityType": entity_type,
|
|
75
81
|
"website": website
|
|
76
82
|
}.reject do |_k, v|
|
|
77
83
|
v == OMIT
|
|
@@ -99,6 +105,7 @@ module Pinnacle
|
|
|
99
105
|
name = parsed_json["name"]
|
|
100
106
|
sector = parsed_json["sector"]
|
|
101
107
|
type = parsed_json["type"]
|
|
108
|
+
entity_type = parsed_json["entityType"]
|
|
102
109
|
website = parsed_json["website"]
|
|
103
110
|
new(
|
|
104
111
|
address: address,
|
|
@@ -110,6 +117,7 @@ module Pinnacle
|
|
|
110
117
|
name: name,
|
|
111
118
|
sector: sector,
|
|
112
119
|
type: type,
|
|
120
|
+
entity_type: entity_type,
|
|
113
121
|
website: website,
|
|
114
122
|
additional_properties: struct
|
|
115
123
|
)
|
|
@@ -138,6 +146,7 @@ module Pinnacle
|
|
|
138
146
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
|
139
147
|
obj.sector&.is_a?(Pinnacle::Types::CompanySectorEnum) != false || raise("Passed value for field obj.sector is not the expected type, validation failed.")
|
|
140
148
|
obj.type&.is_a?(Pinnacle::Types::CompanyTypeEnum) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
|
149
|
+
obj.entity_type&.is_a?(Pinnacle::Types::CompanyEntityTypeEnum) != false || raise("Passed value for field obj.entity_type is not the expected type, validation failed.")
|
|
141
150
|
obj.website&.is_a?(String) != false || raise("Passed value for field obj.website is not the expected type, validation failed.")
|
|
142
151
|
end
|
|
143
152
|
end
|