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
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require_relative "../../../types/toll_free_campaign_schema_keywords"
|
|
4
|
+
require_relative "../../../types/toll_free_campaign_schema_links"
|
|
3
5
|
require_relative "../../../types/message_volume_enum"
|
|
4
|
-
require_relative "../../../types/
|
|
5
|
-
require_relative "../../../types/
|
|
6
|
+
require_relative "../../../types/toll_free_campaign_schema_opt_in"
|
|
7
|
+
require_relative "../../../types/toll_free_campaign_schema_options"
|
|
8
|
+
require_relative "../../../types/toll_free_campaign_schema_use_case"
|
|
6
9
|
require "ostruct"
|
|
7
10
|
require "json"
|
|
8
11
|
|
|
@@ -15,15 +18,21 @@ module Pinnacle
|
|
|
15
18
|
attr_reader :brand
|
|
16
19
|
# @return [String] Unique identifier for the campaign. Must begin with the prefix `tf_`.
|
|
17
20
|
attr_reader :campaign_id
|
|
21
|
+
# @return [Pinnacle::Types::TollFreeCampaignSchemaKeywords] Keyword response configuration.
|
|
22
|
+
attr_reader :keywords
|
|
23
|
+
# @return [Pinnacle::Types::TollFreeCampaignSchemaLinks] Legal documentation links.
|
|
24
|
+
attr_reader :links
|
|
18
25
|
# @return [Pinnacle::Types::MessageVolumeEnum]
|
|
19
26
|
attr_reader :monthly_volume
|
|
20
27
|
# @return [String] Display name of the campaign.
|
|
21
28
|
attr_reader :name
|
|
22
|
-
# @return [Pinnacle::Types::
|
|
29
|
+
# @return [Pinnacle::Types::TollFreeCampaignSchemaOptIn] Opt-in keyword settings.
|
|
23
30
|
attr_reader :opt_in
|
|
31
|
+
# @return [Pinnacle::Types::TollFreeCampaignSchemaOptions] Campaign configuration options.
|
|
32
|
+
attr_reader :options
|
|
24
33
|
# @return [String] Explain message that would be sent.
|
|
25
34
|
attr_reader :production_message_content
|
|
26
|
-
# @return [Pinnacle::Types::
|
|
35
|
+
# @return [Pinnacle::Types::TollFreeCampaignSchemaUseCase] Use case classification for the campaign.
|
|
27
36
|
attr_reader :use_case
|
|
28
37
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
29
38
|
attr_reader :additional_properties
|
|
@@ -35,29 +44,38 @@ module Pinnacle
|
|
|
35
44
|
|
|
36
45
|
# @param brand [String]
|
|
37
46
|
# @param campaign_id [String] Unique identifier for the campaign. Must begin with the prefix `tf_`.
|
|
47
|
+
# @param keywords [Pinnacle::Types::TollFreeCampaignSchemaKeywords] Keyword response configuration.
|
|
48
|
+
# @param links [Pinnacle::Types::TollFreeCampaignSchemaLinks] Legal documentation links.
|
|
38
49
|
# @param monthly_volume [Pinnacle::Types::MessageVolumeEnum]
|
|
39
50
|
# @param name [String] Display name of the campaign.
|
|
40
|
-
# @param opt_in [Pinnacle::Types::
|
|
51
|
+
# @param opt_in [Pinnacle::Types::TollFreeCampaignSchemaOptIn] Opt-in keyword settings.
|
|
52
|
+
# @param options [Pinnacle::Types::TollFreeCampaignSchemaOptions] Campaign configuration options.
|
|
41
53
|
# @param production_message_content [String] Explain message that would be sent.
|
|
42
|
-
# @param use_case [Pinnacle::Types::
|
|
54
|
+
# @param use_case [Pinnacle::Types::TollFreeCampaignSchemaUseCase] Use case classification for the campaign.
|
|
43
55
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
44
56
|
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeAutofillResponse]
|
|
45
|
-
def initialize(brand: OMIT, campaign_id: OMIT,
|
|
46
|
-
production_message_content: OMIT, use_case: OMIT, additional_properties: nil)
|
|
57
|
+
def initialize(brand: OMIT, campaign_id: OMIT, keywords: OMIT, links: OMIT, monthly_volume: OMIT, name: OMIT,
|
|
58
|
+
opt_in: OMIT, options: OMIT, production_message_content: OMIT, use_case: OMIT, additional_properties: nil)
|
|
47
59
|
@brand = brand if brand != OMIT
|
|
48
60
|
@campaign_id = campaign_id if campaign_id != OMIT
|
|
61
|
+
@keywords = keywords if keywords != OMIT
|
|
62
|
+
@links = links if links != OMIT
|
|
49
63
|
@monthly_volume = monthly_volume if monthly_volume != OMIT
|
|
50
64
|
@name = name if name != OMIT
|
|
51
65
|
@opt_in = opt_in if opt_in != OMIT
|
|
66
|
+
@options = options if options != OMIT
|
|
52
67
|
@production_message_content = production_message_content if production_message_content != OMIT
|
|
53
68
|
@use_case = use_case if use_case != OMIT
|
|
54
69
|
@additional_properties = additional_properties
|
|
55
70
|
@_field_set = {
|
|
56
71
|
"brand": brand,
|
|
57
72
|
"campaignId": campaign_id,
|
|
73
|
+
"keywords": keywords,
|
|
74
|
+
"links": links,
|
|
58
75
|
"monthlyVolume": monthly_volume,
|
|
59
76
|
"name": name,
|
|
60
77
|
"optIn": opt_in,
|
|
78
|
+
"options": options,
|
|
61
79
|
"productionMessageContent": production_message_content,
|
|
62
80
|
"useCase": use_case
|
|
63
81
|
}.reject do |_k, v|
|
|
@@ -74,27 +92,48 @@ module Pinnacle
|
|
|
74
92
|
parsed_json = JSON.parse(json_object)
|
|
75
93
|
brand = parsed_json["brand"]
|
|
76
94
|
campaign_id = parsed_json["campaignId"]
|
|
95
|
+
if parsed_json["keywords"].nil?
|
|
96
|
+
keywords = nil
|
|
97
|
+
else
|
|
98
|
+
keywords = parsed_json["keywords"].to_json
|
|
99
|
+
keywords = Pinnacle::Types::TollFreeCampaignSchemaKeywords.from_json(json_object: keywords)
|
|
100
|
+
end
|
|
101
|
+
if parsed_json["links"].nil?
|
|
102
|
+
links = nil
|
|
103
|
+
else
|
|
104
|
+
links = parsed_json["links"].to_json
|
|
105
|
+
links = Pinnacle::Types::TollFreeCampaignSchemaLinks.from_json(json_object: links)
|
|
106
|
+
end
|
|
77
107
|
monthly_volume = parsed_json["monthlyVolume"]
|
|
78
108
|
name = parsed_json["name"]
|
|
79
109
|
if parsed_json["optIn"].nil?
|
|
80
110
|
opt_in = nil
|
|
81
111
|
else
|
|
82
112
|
opt_in = parsed_json["optIn"].to_json
|
|
83
|
-
opt_in = Pinnacle::Types::
|
|
113
|
+
opt_in = Pinnacle::Types::TollFreeCampaignSchemaOptIn.from_json(json_object: opt_in)
|
|
114
|
+
end
|
|
115
|
+
if parsed_json["options"].nil?
|
|
116
|
+
options = nil
|
|
117
|
+
else
|
|
118
|
+
options = parsed_json["options"].to_json
|
|
119
|
+
options = Pinnacle::Types::TollFreeCampaignSchemaOptions.from_json(json_object: options)
|
|
84
120
|
end
|
|
85
121
|
production_message_content = parsed_json["productionMessageContent"]
|
|
86
122
|
if parsed_json["useCase"].nil?
|
|
87
123
|
use_case = nil
|
|
88
124
|
else
|
|
89
125
|
use_case = parsed_json["useCase"].to_json
|
|
90
|
-
use_case = Pinnacle::Types::
|
|
126
|
+
use_case = Pinnacle::Types::TollFreeCampaignSchemaUseCase.from_json(json_object: use_case)
|
|
91
127
|
end
|
|
92
128
|
new(
|
|
93
129
|
brand: brand,
|
|
94
130
|
campaign_id: campaign_id,
|
|
131
|
+
keywords: keywords,
|
|
132
|
+
links: links,
|
|
95
133
|
monthly_volume: monthly_volume,
|
|
96
134
|
name: name,
|
|
97
135
|
opt_in: opt_in,
|
|
136
|
+
options: options,
|
|
98
137
|
production_message_content: production_message_content,
|
|
99
138
|
use_case: use_case,
|
|
100
139
|
additional_properties: struct
|
|
@@ -117,11 +156,14 @@ module Pinnacle
|
|
|
117
156
|
def self.validate_raw(obj:)
|
|
118
157
|
obj.brand&.is_a?(String) != false || raise("Passed value for field obj.brand is not the expected type, validation failed.")
|
|
119
158
|
obj.campaign_id&.is_a?(String) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
|
|
159
|
+
obj.keywords.nil? || Pinnacle::Types::TollFreeCampaignSchemaKeywords.validate_raw(obj: obj.keywords)
|
|
160
|
+
obj.links.nil? || Pinnacle::Types::TollFreeCampaignSchemaLinks.validate_raw(obj: obj.links)
|
|
120
161
|
obj.monthly_volume&.is_a?(Pinnacle::Types::MessageVolumeEnum) != false || raise("Passed value for field obj.monthly_volume is not the expected type, validation failed.")
|
|
121
162
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
|
122
|
-
obj.opt_in.nil? || Pinnacle::Types::
|
|
163
|
+
obj.opt_in.nil? || Pinnacle::Types::TollFreeCampaignSchemaOptIn.validate_raw(obj: obj.opt_in)
|
|
164
|
+
obj.options.nil? || Pinnacle::Types::TollFreeCampaignSchemaOptions.validate_raw(obj: obj.options)
|
|
123
165
|
obj.production_message_content&.is_a?(String) != false || raise("Passed value for field obj.production_message_content is not the expected type, validation failed.")
|
|
124
|
-
obj.use_case.nil? || Pinnacle::Types::
|
|
166
|
+
obj.use_case.nil? || Pinnacle::Types::TollFreeCampaignSchemaUseCase.validate_raw(obj: obj.use_case)
|
|
125
167
|
end
|
|
126
168
|
end
|
|
127
169
|
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ostruct"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
6
|
+
module Pinnacle
|
|
7
|
+
module Campaigns
|
|
8
|
+
module TollFree
|
|
9
|
+
module Types
|
|
10
|
+
# Help keyword settings.
|
|
11
|
+
class TollFreeCampaignHelpKeywords
|
|
12
|
+
# @return [String] Message sent when a user sends HELP. Must include at least one support contact
|
|
13
|
+
# method (phone, email, or website).
|
|
14
|
+
attr_reader :message
|
|
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 sends HELP. Must include at least one support contact
|
|
24
|
+
# method (phone, email, or website).
|
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
26
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignHelpKeywords]
|
|
27
|
+
def initialize(message: OMIT, additional_properties: nil)
|
|
28
|
+
@message = message if message != OMIT
|
|
29
|
+
@additional_properties = additional_properties
|
|
30
|
+
@_field_set = { "message": message }.reject do |_k, v|
|
|
31
|
+
v == OMIT
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Deserialize a JSON object to an instance of TollFreeCampaignHelpKeywords
|
|
36
|
+
#
|
|
37
|
+
# @param json_object [String]
|
|
38
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignHelpKeywords]
|
|
39
|
+
def self.from_json(json_object:)
|
|
40
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
41
|
+
parsed_json = JSON.parse(json_object)
|
|
42
|
+
message = parsed_json["message"]
|
|
43
|
+
new(message: message, additional_properties: struct)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Serialize an instance of TollFreeCampaignHelpKeywords to a JSON object
|
|
47
|
+
#
|
|
48
|
+
# @return [String]
|
|
49
|
+
def to_json(*_args)
|
|
50
|
+
@_field_set&.to_json
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
54
|
+
# hash and check each fields type against the current object's property
|
|
55
|
+
# definitions.
|
|
56
|
+
#
|
|
57
|
+
# @param obj [Object]
|
|
58
|
+
# @return [Void]
|
|
59
|
+
def self.validate_raw(obj:)
|
|
60
|
+
obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "toll_free_campaign_help_keywords"
|
|
4
|
+
require_relative "toll_free_campaign_opt_in_keywords"
|
|
5
|
+
require "ostruct"
|
|
6
|
+
require "json"
|
|
7
|
+
|
|
8
|
+
module Pinnacle
|
|
9
|
+
module Campaigns
|
|
10
|
+
module TollFree
|
|
11
|
+
module Types
|
|
12
|
+
# Keyword response configuration.
|
|
13
|
+
class TollFreeCampaignKeywords
|
|
14
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignHelpKeywords] Help keyword settings.
|
|
15
|
+
attr_reader :help
|
|
16
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignOptInKeywords] Opt-in keyword settings.
|
|
17
|
+
attr_reader :opt_in
|
|
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::Campaigns::TollFree::Types::TollFreeCampaignHelpKeywords] Help keyword settings.
|
|
27
|
+
# @param opt_in [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignOptInKeywords] Opt-in keyword settings.
|
|
28
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
29
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignKeywords]
|
|
30
|
+
def initialize(help: OMIT, opt_in: OMIT, additional_properties: nil)
|
|
31
|
+
@help = help if help != OMIT
|
|
32
|
+
@opt_in = opt_in if opt_in != OMIT
|
|
33
|
+
@additional_properties = additional_properties
|
|
34
|
+
@_field_set = { "HELP": help, "OPT_IN": opt_in }.reject do |_k, v|
|
|
35
|
+
v == OMIT
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Deserialize a JSON object to an instance of TollFreeCampaignKeywords
|
|
40
|
+
#
|
|
41
|
+
# @param json_object [String]
|
|
42
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignKeywords]
|
|
43
|
+
def self.from_json(json_object:)
|
|
44
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
45
|
+
parsed_json = JSON.parse(json_object)
|
|
46
|
+
if parsed_json["HELP"].nil?
|
|
47
|
+
help = nil
|
|
48
|
+
else
|
|
49
|
+
help = parsed_json["HELP"].to_json
|
|
50
|
+
help = Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignHelpKeywords.from_json(json_object: help)
|
|
51
|
+
end
|
|
52
|
+
if parsed_json["OPT_IN"].nil?
|
|
53
|
+
opt_in = nil
|
|
54
|
+
else
|
|
55
|
+
opt_in = parsed_json["OPT_IN"].to_json
|
|
56
|
+
opt_in = Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignOptInKeywords.from_json(json_object: opt_in)
|
|
57
|
+
end
|
|
58
|
+
new(
|
|
59
|
+
help: help,
|
|
60
|
+
opt_in: opt_in,
|
|
61
|
+
additional_properties: struct
|
|
62
|
+
)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Serialize an instance of TollFreeCampaignKeywords to a JSON object
|
|
66
|
+
#
|
|
67
|
+
# @return [String]
|
|
68
|
+
def to_json(*_args)
|
|
69
|
+
@_field_set&.to_json
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
73
|
+
# hash and check each fields type against the current object's property
|
|
74
|
+
# definitions.
|
|
75
|
+
#
|
|
76
|
+
# @param obj [Object]
|
|
77
|
+
# @return [Void]
|
|
78
|
+
def self.validate_raw(obj:)
|
|
79
|
+
obj.help.nil? || Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignHelpKeywords.validate_raw(obj: obj.help)
|
|
80
|
+
obj.opt_in.nil? || Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignOptInKeywords.validate_raw(obj: obj.opt_in)
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ostruct"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
6
|
+
module Pinnacle
|
|
7
|
+
module Campaigns
|
|
8
|
+
module TollFree
|
|
9
|
+
module Types
|
|
10
|
+
# Legal documentation links.
|
|
11
|
+
class TollFreeCampaignLinks
|
|
12
|
+
# @return [String] Privacy policy URL.
|
|
13
|
+
attr_reader :privacy_policy
|
|
14
|
+
# @return [String] Terms of service URL.
|
|
15
|
+
attr_reader :terms_of_service
|
|
16
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
17
|
+
attr_reader :additional_properties
|
|
18
|
+
# @return [Object]
|
|
19
|
+
attr_reader :_field_set
|
|
20
|
+
protected :_field_set
|
|
21
|
+
|
|
22
|
+
OMIT = Object.new
|
|
23
|
+
|
|
24
|
+
# @param privacy_policy [String] Privacy policy URL.
|
|
25
|
+
# @param terms_of_service [String] Terms of service URL.
|
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
27
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignLinks]
|
|
28
|
+
def initialize(privacy_policy: OMIT, terms_of_service: OMIT, additional_properties: nil)
|
|
29
|
+
@privacy_policy = privacy_policy if privacy_policy != OMIT
|
|
30
|
+
@terms_of_service = terms_of_service if terms_of_service != OMIT
|
|
31
|
+
@additional_properties = additional_properties
|
|
32
|
+
@_field_set = { "privacyPolicy": privacy_policy, "termsOfService": terms_of_service }.reject do |_k, v|
|
|
33
|
+
v == OMIT
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Deserialize a JSON object to an instance of TollFreeCampaignLinks
|
|
38
|
+
#
|
|
39
|
+
# @param json_object [String]
|
|
40
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignLinks]
|
|
41
|
+
def self.from_json(json_object:)
|
|
42
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
43
|
+
parsed_json = JSON.parse(json_object)
|
|
44
|
+
privacy_policy = parsed_json["privacyPolicy"]
|
|
45
|
+
terms_of_service = parsed_json["termsOfService"]
|
|
46
|
+
new(
|
|
47
|
+
privacy_policy: privacy_policy,
|
|
48
|
+
terms_of_service: terms_of_service,
|
|
49
|
+
additional_properties: struct
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Serialize an instance of TollFreeCampaignLinks 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.privacy_policy&.is_a?(String) != false || raise("Passed value for field obj.privacy_policy is not the expected type, validation failed.")
|
|
68
|
+
obj.terms_of_service&.is_a?(String) != false || raise("Passed value for field obj.terms_of_service is not the expected type, validation failed.")
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -9,7 +9,7 @@ module Pinnacle
|
|
|
9
9
|
module TollFree
|
|
10
10
|
module Types
|
|
11
11
|
# Opt-in keyword settings.
|
|
12
|
-
class
|
|
12
|
+
class TollFreeCampaignOptIn
|
|
13
13
|
# @return [Pinnacle::Types::OptInMethodEnum]
|
|
14
14
|
attr_reader :method_
|
|
15
15
|
# @return [String] Url to opt in.
|
|
@@ -28,7 +28,7 @@ module Pinnacle
|
|
|
28
28
|
# @param url [String] Url to opt in.
|
|
29
29
|
# @param workflow_description [String] Explain how users find the opt-in.
|
|
30
30
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
31
|
-
# @return [Pinnacle::Campaigns::TollFree::Types::
|
|
31
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignOptIn]
|
|
32
32
|
def initialize(method_: OMIT, url: OMIT, workflow_description: OMIT, additional_properties: nil)
|
|
33
33
|
@method_ = method_ if method_ != OMIT
|
|
34
34
|
@url = url if url != OMIT
|
|
@@ -43,10 +43,10 @@ module Pinnacle
|
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
# Deserialize a JSON object to an instance of
|
|
46
|
+
# Deserialize a JSON object to an instance of TollFreeCampaignOptIn
|
|
47
47
|
#
|
|
48
48
|
# @param json_object [String]
|
|
49
|
-
# @return [Pinnacle::Campaigns::TollFree::Types::
|
|
49
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignOptIn]
|
|
50
50
|
def self.from_json(json_object:)
|
|
51
51
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
52
52
|
parsed_json = JSON.parse(json_object)
|
|
@@ -61,7 +61,7 @@ module Pinnacle
|
|
|
61
61
|
)
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
-
# Serialize an instance of
|
|
64
|
+
# Serialize an instance of TollFreeCampaignOptIn to a JSON object
|
|
65
65
|
#
|
|
66
66
|
# @return [String]
|
|
67
67
|
def to_json(*_args)
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ostruct"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
6
|
+
module Pinnacle
|
|
7
|
+
module Campaigns
|
|
8
|
+
module TollFree
|
|
9
|
+
module Types
|
|
10
|
+
# Opt-in keyword settings.
|
|
11
|
+
class TollFreeCampaignOptInKeywords
|
|
12
|
+
# @return [String] Message sent when a user opt-in. Must include brand name, confirmation of
|
|
13
|
+
# subscription, and disclosures (STOP and HELP instructions, message and data
|
|
14
|
+
# rates).
|
|
15
|
+
attr_reader :message
|
|
16
|
+
# @return [Array<String>] Keywords that trigger opt-in response.
|
|
17
|
+
attr_reader :keywords
|
|
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 message [String] Message sent when a user opt-in. Must include brand name, confirmation of
|
|
27
|
+
# subscription, and disclosures (STOP and HELP instructions, message and data
|
|
28
|
+
# rates).
|
|
29
|
+
# @param keywords [Array<String>] Keywords that trigger opt-in response.
|
|
30
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
31
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignOptInKeywords]
|
|
32
|
+
def initialize(message: OMIT, keywords: OMIT, additional_properties: nil)
|
|
33
|
+
@message = message if message != OMIT
|
|
34
|
+
@keywords = keywords if keywords != OMIT
|
|
35
|
+
@additional_properties = additional_properties
|
|
36
|
+
@_field_set = { "message": message, "keywords": keywords }.reject do |_k, v|
|
|
37
|
+
v == OMIT
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Deserialize a JSON object to an instance of TollFreeCampaignOptInKeywords
|
|
42
|
+
#
|
|
43
|
+
# @param json_object [String]
|
|
44
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignOptInKeywords]
|
|
45
|
+
def self.from_json(json_object:)
|
|
46
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
47
|
+
parsed_json = JSON.parse(json_object)
|
|
48
|
+
message = parsed_json["message"]
|
|
49
|
+
keywords = parsed_json["keywords"]
|
|
50
|
+
new(
|
|
51
|
+
message: message,
|
|
52
|
+
keywords: keywords,
|
|
53
|
+
additional_properties: struct
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Serialize an instance of TollFreeCampaignOptInKeywords to a JSON object
|
|
58
|
+
#
|
|
59
|
+
# @return [String]
|
|
60
|
+
def to_json(*_args)
|
|
61
|
+
@_field_set&.to_json
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
65
|
+
# hash and check each fields type against the current object's property
|
|
66
|
+
# definitions.
|
|
67
|
+
#
|
|
68
|
+
# @param obj [Object]
|
|
69
|
+
# @return [Void]
|
|
70
|
+
def self.validate_raw(obj:)
|
|
71
|
+
obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
|
72
|
+
obj.keywords&.is_a?(Array) != false || raise("Passed value for field obj.keywords is not the expected type, validation failed.")
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ostruct"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
6
|
+
module Pinnacle
|
|
7
|
+
module Campaigns
|
|
8
|
+
module TollFree
|
|
9
|
+
module Types
|
|
10
|
+
# Campaign configuration options.
|
|
11
|
+
class TollFreeCampaignOptions
|
|
12
|
+
# @return [Boolean] Whether the campaign is age-gated.
|
|
13
|
+
attr_reader :age_gated
|
|
14
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
15
|
+
attr_reader :additional_properties
|
|
16
|
+
# @return [Object]
|
|
17
|
+
attr_reader :_field_set
|
|
18
|
+
protected :_field_set
|
|
19
|
+
|
|
20
|
+
OMIT = Object.new
|
|
21
|
+
|
|
22
|
+
# @param age_gated [Boolean] Whether the campaign is age-gated.
|
|
23
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
24
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignOptions]
|
|
25
|
+
def initialize(age_gated: OMIT, additional_properties: nil)
|
|
26
|
+
@age_gated = age_gated if age_gated != OMIT
|
|
27
|
+
@additional_properties = additional_properties
|
|
28
|
+
@_field_set = { "ageGated": age_gated }.reject do |_k, v|
|
|
29
|
+
v == OMIT
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Deserialize a JSON object to an instance of TollFreeCampaignOptions
|
|
34
|
+
#
|
|
35
|
+
# @param json_object [String]
|
|
36
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignOptions]
|
|
37
|
+
def self.from_json(json_object:)
|
|
38
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
39
|
+
parsed_json = JSON.parse(json_object)
|
|
40
|
+
age_gated = parsed_json["ageGated"]
|
|
41
|
+
new(age_gated: age_gated, additional_properties: struct)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Serialize an instance of TollFreeCampaignOptions to a JSON object
|
|
45
|
+
#
|
|
46
|
+
# @return [String]
|
|
47
|
+
def to_json(*_args)
|
|
48
|
+
@_field_set&.to_json
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
52
|
+
# hash and check each fields type against the current object's property
|
|
53
|
+
# definitions.
|
|
54
|
+
#
|
|
55
|
+
# @param obj [Object]
|
|
56
|
+
# @return [Void]
|
|
57
|
+
def self.validate_raw(obj:)
|
|
58
|
+
obj.age_gated&.is_a?(Boolean) != false || raise("Passed value for field obj.age_gated is not the expected type, validation failed.")
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -9,7 +9,7 @@ module Pinnacle
|
|
|
9
9
|
module TollFree
|
|
10
10
|
module Types
|
|
11
11
|
# Use case classification for the campaign.
|
|
12
|
-
class
|
|
12
|
+
class TollFreeCampaignUseCase
|
|
13
13
|
# @return [String] Summary of the use case.
|
|
14
14
|
attr_reader :summary
|
|
15
15
|
# @return [Pinnacle::Types::TollFreeCampaignUseCaseEnum]
|
|
@@ -25,7 +25,7 @@ module Pinnacle
|
|
|
25
25
|
# @param summary [String] Summary of the use case.
|
|
26
26
|
# @param value [Pinnacle::Types::TollFreeCampaignUseCaseEnum]
|
|
27
27
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
28
|
-
# @return [Pinnacle::Campaigns::TollFree::Types::
|
|
28
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignUseCase]
|
|
29
29
|
def initialize(summary: OMIT, value: OMIT, additional_properties: nil)
|
|
30
30
|
@summary = summary if summary != 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 TollFreeCampaignUseCase
|
|
39
39
|
#
|
|
40
40
|
# @param json_object [String]
|
|
41
|
-
# @return [Pinnacle::Campaigns::TollFree::Types::
|
|
41
|
+
# @return [Pinnacle::Campaigns::TollFree::Types::TollFreeCampaignUseCase]
|
|
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 TollFreeCampaignUseCase to a JSON object
|
|
55
55
|
#
|
|
56
56
|
# @return [String]
|
|
57
57
|
def to_json(*_args)
|