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
|
@@ -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
|
|
@@ -0,0 +1,76 @@
|
|
|
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 RcsCampaignTraffic
|
|
11
|
+
# @return [Integer] Estimated monthly website visitors.
|
|
12
|
+
attr_reader :monthly_website
|
|
13
|
+
# @return [Integer] Estimated monthly RCS messages sent.
|
|
14
|
+
attr_reader :monthly_rcs_estimate
|
|
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 monthly_website [Integer] Estimated monthly website visitors.
|
|
24
|
+
# @param monthly_rcs_estimate [Integer] Estimated monthly RCS messages sent.
|
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
26
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsCampaignTraffic]
|
|
27
|
+
def initialize(monthly_website: OMIT, monthly_rcs_estimate: OMIT, additional_properties: nil)
|
|
28
|
+
@monthly_website = monthly_website if monthly_website != OMIT
|
|
29
|
+
@monthly_rcs_estimate = monthly_rcs_estimate if monthly_rcs_estimate != OMIT
|
|
30
|
+
@additional_properties = additional_properties
|
|
31
|
+
@_field_set = {
|
|
32
|
+
"monthlyWebsite": monthly_website,
|
|
33
|
+
"monthlyRcsEstimate": monthly_rcs_estimate
|
|
34
|
+
}.reject do |_k, v|
|
|
35
|
+
v == OMIT
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Deserialize a JSON object to an instance of RcsCampaignTraffic
|
|
40
|
+
#
|
|
41
|
+
# @param json_object [String]
|
|
42
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsCampaignTraffic]
|
|
43
|
+
def self.from_json(json_object:)
|
|
44
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
45
|
+
parsed_json = JSON.parse(json_object)
|
|
46
|
+
monthly_website = parsed_json["monthlyWebsite"]
|
|
47
|
+
monthly_rcs_estimate = parsed_json["monthlyRcsEstimate"]
|
|
48
|
+
new(
|
|
49
|
+
monthly_website: monthly_website,
|
|
50
|
+
monthly_rcs_estimate: monthly_rcs_estimate,
|
|
51
|
+
additional_properties: struct
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Serialize an instance of RcsCampaignTraffic to a JSON object
|
|
56
|
+
#
|
|
57
|
+
# @return [String]
|
|
58
|
+
def to_json(*_args)
|
|
59
|
+
@_field_set&.to_json
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
63
|
+
# hash and check each fields type against the current object's property
|
|
64
|
+
# definitions.
|
|
65
|
+
#
|
|
66
|
+
# @param obj [Object]
|
|
67
|
+
# @return [Void]
|
|
68
|
+
def self.validate_raw(obj:)
|
|
69
|
+
obj.monthly_website&.is_a?(Integer) != false || raise("Passed value for field obj.monthly_website is not the expected type, validation failed.")
|
|
70
|
+
obj.monthly_rcs_estimate&.is_a?(Integer) != false || raise("Passed value for field obj.monthly_rcs_estimate is not the expected type, validation failed.")
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -8,7 +8,7 @@ module Pinnacle
|
|
|
8
8
|
module Rcs
|
|
9
9
|
module Types
|
|
10
10
|
# Legal documentation links.
|
|
11
|
-
class
|
|
11
|
+
class RcsLinks
|
|
12
12
|
# @return [String] Privacy policy URL.
|
|
13
13
|
attr_reader :privacy_policy
|
|
14
14
|
# @return [String] Terms of service URL.
|
|
@@ -24,7 +24,7 @@ module Pinnacle
|
|
|
24
24
|
# @param privacy_policy [String] Privacy policy URL.
|
|
25
25
|
# @param terms_of_service [String] Terms of service URL.
|
|
26
26
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
27
|
-
# @return [Pinnacle::Campaigns::Rcs::Types::
|
|
27
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsLinks]
|
|
28
28
|
def initialize(privacy_policy: OMIT, terms_of_service: OMIT, additional_properties: nil)
|
|
29
29
|
@privacy_policy = privacy_policy if privacy_policy != OMIT
|
|
30
30
|
@terms_of_service = terms_of_service if terms_of_service != OMIT
|
|
@@ -34,10 +34,10 @@ module Pinnacle
|
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
# Deserialize a JSON object to an instance of
|
|
37
|
+
# Deserialize a JSON object to an instance of RcsLinks
|
|
38
38
|
#
|
|
39
39
|
# @param json_object [String]
|
|
40
|
-
# @return [Pinnacle::Campaigns::Rcs::Types::
|
|
40
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsLinks]
|
|
41
41
|
def self.from_json(json_object:)
|
|
42
42
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
43
43
|
parsed_json = JSON.parse(json_object)
|
|
@@ -50,7 +50,7 @@ module Pinnacle
|
|
|
50
50
|
)
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
-
# Serialize an instance of
|
|
53
|
+
# Serialize an instance of RcsLinks to a JSON object
|
|
54
54
|
#
|
|
55
55
|
# @return [String]
|
|
56
56
|
def to_json(*_args)
|
|
@@ -9,8 +9,8 @@ module Pinnacle
|
|
|
9
9
|
module Rcs
|
|
10
10
|
module Types
|
|
11
11
|
# Use case classification for the campaign.
|
|
12
|
-
class
|
|
13
|
-
# @return [String]
|
|
12
|
+
class RcsUseCase
|
|
13
|
+
# @return [String] Detailed summary of what the brand is and how this agent will be used.
|
|
14
14
|
attr_reader :behavior
|
|
15
15
|
# @return [Pinnacle::Types::RcsCampaignUseCaseEnum]
|
|
16
16
|
attr_reader :value
|
|
@@ -22,10 +22,10 @@ module Pinnacle
|
|
|
22
22
|
|
|
23
23
|
OMIT = Object.new
|
|
24
24
|
|
|
25
|
-
# @param behavior [String]
|
|
25
|
+
# @param behavior [String] Detailed summary of what the brand is and how this agent will be used.
|
|
26
26
|
# @param value [Pinnacle::Types::RcsCampaignUseCaseEnum]
|
|
27
27
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
28
|
-
# @return [Pinnacle::Campaigns::Rcs::Types::
|
|
28
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsUseCase]
|
|
29
29
|
def initialize(behavior: OMIT, value: OMIT, additional_properties: nil)
|
|
30
30
|
@behavior = behavior if behavior != OMIT
|
|
31
31
|
@value = value if value != OMIT
|
|
@@ -35,10 +35,10 @@ module Pinnacle
|
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
# Deserialize a JSON object to an instance of
|
|
38
|
+
# Deserialize a JSON object to an instance of RcsUseCase
|
|
39
39
|
#
|
|
40
40
|
# @param json_object [String]
|
|
41
|
-
# @return [Pinnacle::Campaigns::Rcs::Types::
|
|
41
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::RcsUseCase]
|
|
42
42
|
def self.from_json(json_object:)
|
|
43
43
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
44
44
|
parsed_json = JSON.parse(json_object)
|
|
@@ -51,7 +51,7 @@ module Pinnacle
|
|
|
51
51
|
)
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
-
# Serialize an instance of
|
|
54
|
+
# Serialize an instance of RcsUseCase to a JSON object
|
|
55
55
|
#
|
|
56
56
|
# @return [String]
|
|
57
57
|
def to_json(*_args)
|
|
@@ -5,9 +5,12 @@ require_relative "../../types/autofill_campaign_params"
|
|
|
5
5
|
require_relative "types/toll_free_autofill_response"
|
|
6
6
|
require_relative "../../types/toll_free_campaign_with_extended_brand_and_status"
|
|
7
7
|
require_relative "../../types/campaign_submission_result"
|
|
8
|
+
require_relative "types/toll_free_campaign_keywords"
|
|
9
|
+
require_relative "types/toll_free_campaign_links"
|
|
8
10
|
require_relative "../../types/message_volume_enum"
|
|
9
|
-
require_relative "types/
|
|
10
|
-
require_relative "types/
|
|
11
|
+
require_relative "types/toll_free_campaign_opt_in"
|
|
12
|
+
require_relative "types/toll_free_campaign_options"
|
|
13
|
+
require_relative "types/toll_free_campaign_use_case"
|
|
11
14
|
require_relative "../../types/validate_campaign_params"
|
|
12
15
|
require_relative "../../types/campaign_validation_result"
|
|
13
16
|
require "async"
|
|
@@ -129,14 +132,25 @@ module Pinnacle
|
|
|
129
132
|
# for example: `b_1234567890`.
|
|
130
133
|
# @param campaign_id [String] Unique identifier for the campaign. This identifier is a string that always
|
|
131
134
|
# begins with the prefix `tf_`, for example: `tf_1234567890`.
|
|
135
|
+
# @param keywords [Hash] Keyword response configuration.Request of type Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignKeywords, as a Hash
|
|
136
|
+
# * :help (Hash)
|
|
137
|
+
# * :message (String)
|
|
138
|
+
# * :opt_in (Hash)
|
|
139
|
+
# * :message (String)
|
|
140
|
+
# * :keywords (Array<String>)
|
|
141
|
+
# @param links [Hash] Legal documentation links.Request of type Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignLinks, as a Hash
|
|
142
|
+
# * :privacy_policy (String)
|
|
143
|
+
# * :terms_of_service (String)
|
|
132
144
|
# @param monthly_volume [Pinnacle::Types::MessageVolumeEnum]
|
|
133
145
|
# @param name [String] Display name of the campaign.
|
|
134
|
-
# @param opt_in [Hash] Opt-in keyword settings.Request of type Pinnacle::Campaigns::TollFree::Types::
|
|
146
|
+
# @param opt_in [Hash] Opt-in keyword settings.Request of type Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignOptIn, as a Hash
|
|
135
147
|
# * :method_ (Pinnacle::Types::OptInMethodEnum)
|
|
136
148
|
# * :url (String)
|
|
137
149
|
# * :workflow_description (String)
|
|
150
|
+
# @param options [Hash] Campaign configuration options.Request of type Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignOptions, as a Hash
|
|
151
|
+
# * :age_gated (Boolean)
|
|
138
152
|
# @param production_message_content [String] Explain message that would be sent.
|
|
139
|
-
# @param use_case [Hash] Use case classification for the campaign.Request of type Pinnacle::Campaigns::TollFree::Types::
|
|
153
|
+
# @param use_case [Hash] Use case classification for the campaign.Request of type Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignUseCase, as a Hash
|
|
140
154
|
# * :summary (String)
|
|
141
155
|
# * :value (Pinnacle::Types::TollFreeCampaignUseCaseEnum)
|
|
142
156
|
# @param request_options [Pinnacle::RequestOptions]
|
|
@@ -150,14 +164,20 @@ module Pinnacle
|
|
|
150
164
|
# api.campaigns.toll_free.upsert(
|
|
151
165
|
# brand: "b_1234567890",
|
|
152
166
|
# campaign_id: "tf_1234567890",
|
|
167
|
+
# keywords: { help: { message: "Email founders@trypinnacle.app for support." }, opt_in: { message: "Welcome back to Pinnacle!<br>
|
|
168
|
+
# 🔔 You're now subscribed to Pinnacle and will continue receiving important updates and news. Feel free to contact this us at any time for help.<br>
|
|
169
|
+
# Reply STOP to opt out and HELP for support. Message & rates may apply.
|
|
170
|
+
# ", keywords: ["START", "SUBSCRIBE"] } },
|
|
171
|
+
# links: { privacy_policy: "https://www.pinnacle.sh/privacy", terms_of_service: "https://www.pinnacle.sh/terms" },
|
|
153
172
|
# monthly_volume: ONE_000,
|
|
154
173
|
# name: "Pinnacle",
|
|
155
174
|
# opt_in: { method_: DIGITAL, url: "https://www.pinnacle.sh/", workflow_description: "Visit https://www.pinnacle.sh/" },
|
|
175
|
+
# options: { age_gated: false },
|
|
156
176
|
# production_message_content: "Join the Pinnacle workshop tomorrow and send your first RCS!",
|
|
157
177
|
# use_case: { summary: "Alerts clients about any Pinnacle hosted workshops.", value: WORKSHOP_ALERTS }
|
|
158
178
|
# )
|
|
159
|
-
def upsert(brand: nil, campaign_id: nil, monthly_volume: nil, name: nil, opt_in: nil,
|
|
160
|
-
production_message_content: nil, use_case: nil, request_options: nil)
|
|
179
|
+
def upsert(brand: nil, campaign_id: nil, keywords: nil, links: nil, monthly_volume: nil, name: nil, opt_in: nil,
|
|
180
|
+
options: nil, production_message_content: nil, use_case: nil, request_options: nil)
|
|
161
181
|
response = @request_client.conn.post do |req|
|
|
162
182
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
163
183
|
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
@@ -173,9 +193,12 @@ module Pinnacle
|
|
|
173
193
|
**(request_options&.additional_body_parameters || {}),
|
|
174
194
|
brand: brand,
|
|
175
195
|
campaignId: campaign_id,
|
|
196
|
+
keywords: keywords,
|
|
197
|
+
links: links,
|
|
176
198
|
monthlyVolume: monthly_volume,
|
|
177
199
|
name: name,
|
|
178
200
|
optIn: opt_in,
|
|
201
|
+
options: options,
|
|
179
202
|
productionMessageContent: production_message_content,
|
|
180
203
|
useCase: use_case
|
|
181
204
|
}.compact
|
|
@@ -339,14 +362,25 @@ module Pinnacle
|
|
|
339
362
|
# for example: `b_1234567890`.
|
|
340
363
|
# @param campaign_id [String] Unique identifier for the campaign. This identifier is a string that always
|
|
341
364
|
# begins with the prefix `tf_`, for example: `tf_1234567890`.
|
|
365
|
+
# @param keywords [Hash] Keyword response configuration.Request of type Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignKeywords, as a Hash
|
|
366
|
+
# * :help (Hash)
|
|
367
|
+
# * :message (String)
|
|
368
|
+
# * :opt_in (Hash)
|
|
369
|
+
# * :message (String)
|
|
370
|
+
# * :keywords (Array<String>)
|
|
371
|
+
# @param links [Hash] Legal documentation links.Request of type Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignLinks, as a Hash
|
|
372
|
+
# * :privacy_policy (String)
|
|
373
|
+
# * :terms_of_service (String)
|
|
342
374
|
# @param monthly_volume [Pinnacle::Types::MessageVolumeEnum]
|
|
343
375
|
# @param name [String] Display name of the campaign.
|
|
344
|
-
# @param opt_in [Hash] Opt-in keyword settings.Request of type Pinnacle::Campaigns::TollFree::Types::
|
|
376
|
+
# @param opt_in [Hash] Opt-in keyword settings.Request of type Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignOptIn, as a Hash
|
|
345
377
|
# * :method_ (Pinnacle::Types::OptInMethodEnum)
|
|
346
378
|
# * :url (String)
|
|
347
379
|
# * :workflow_description (String)
|
|
380
|
+
# @param options [Hash] Campaign configuration options.Request of type Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignOptions, as a Hash
|
|
381
|
+
# * :age_gated (Boolean)
|
|
348
382
|
# @param production_message_content [String] Explain message that would be sent.
|
|
349
|
-
# @param use_case [Hash] Use case classification for the campaign.Request of type Pinnacle::Campaigns::TollFree::Types::
|
|
383
|
+
# @param use_case [Hash] Use case classification for the campaign.Request of type Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignUseCase, as a Hash
|
|
350
384
|
# * :summary (String)
|
|
351
385
|
# * :value (Pinnacle::Types::TollFreeCampaignUseCaseEnum)
|
|
352
386
|
# @param request_options [Pinnacle::RequestOptions]
|
|
@@ -360,14 +394,20 @@ module Pinnacle
|
|
|
360
394
|
# api.campaigns.toll_free.upsert(
|
|
361
395
|
# brand: "b_1234567890",
|
|
362
396
|
# campaign_id: "tf_1234567890",
|
|
397
|
+
# keywords: { help: { message: "Email founders@trypinnacle.app for support." }, opt_in: { message: "Welcome back to Pinnacle!<br>
|
|
398
|
+
# 🔔 You're now subscribed to Pinnacle and will continue receiving important updates and news. Feel free to contact this us at any time for help.<br>
|
|
399
|
+
# Reply STOP to opt out and HELP for support. Message & rates may apply.
|
|
400
|
+
# ", keywords: ["START", "SUBSCRIBE"] } },
|
|
401
|
+
# links: { privacy_policy: "https://www.pinnacle.sh/privacy", terms_of_service: "https://www.pinnacle.sh/terms" },
|
|
363
402
|
# monthly_volume: ONE_000,
|
|
364
403
|
# name: "Pinnacle",
|
|
365
404
|
# opt_in: { method_: DIGITAL, url: "https://www.pinnacle.sh/", workflow_description: "Visit https://www.pinnacle.sh/" },
|
|
405
|
+
# options: { age_gated: false },
|
|
366
406
|
# production_message_content: "Join the Pinnacle workshop tomorrow and send your first RCS!",
|
|
367
407
|
# use_case: { summary: "Alerts clients about any Pinnacle hosted workshops.", value: WORKSHOP_ALERTS }
|
|
368
408
|
# )
|
|
369
|
-
def upsert(brand: nil, campaign_id: nil, monthly_volume: nil, name: nil, opt_in: nil,
|
|
370
|
-
production_message_content: nil, use_case: nil, request_options: nil)
|
|
409
|
+
def upsert(brand: nil, campaign_id: nil, keywords: nil, links: nil, monthly_volume: nil, name: nil, opt_in: nil,
|
|
410
|
+
options: nil, production_message_content: nil, use_case: nil, request_options: nil)
|
|
371
411
|
Async do
|
|
372
412
|
response = @request_client.conn.post do |req|
|
|
373
413
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
@@ -384,9 +424,12 @@ module Pinnacle
|
|
|
384
424
|
**(request_options&.additional_body_parameters || {}),
|
|
385
425
|
brand: brand,
|
|
386
426
|
campaignId: campaign_id,
|
|
427
|
+
keywords: keywords,
|
|
428
|
+
links: links,
|
|
387
429
|
monthlyVolume: monthly_volume,
|
|
388
430
|
name: name,
|
|
389
431
|
optIn: opt_in,
|
|
432
|
+
options: options,
|
|
390
433
|
productionMessageContent: production_message_content,
|
|
391
434
|
useCase: use_case
|
|
392
435
|
}.compact
|