rcs 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rcs/brands/client.rb +19 -6
  3. data/lib/rcs/campaigns/dlc/client.rb +12 -12
  4. data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_help_keywords.rb → dlc_campaign_help_keywords.rb} +5 -5
  5. data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_keywords.rb → dlc_campaign_keywords.rb} +20 -20
  6. data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_links.rb → dlc_campaign_links.rb} +5 -5
  7. data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_opt_in_keywords.rb → dlc_campaign_opt_in_keywords.rb} +5 -5
  8. data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_opt_out_keywords.rb → dlc_campaign_opt_out_keywords.rb} +5 -5
  9. data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_options.rb → dlc_campaign_options.rb} +5 -5
  10. data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_use_case.rb → dlc_campaign_use_case.rb} +5 -5
  11. data/lib/rcs/campaigns/rcs/client.rb +144 -51
  12. data/lib/rcs/campaigns/rcs/types/{upsert_rcs_agent.rb → rcs_agent.rb} +15 -9
  13. data/lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb +122 -43
  14. data/lib/rcs/campaigns/rcs/types/{upsert_rcs_opt_out.rb → rcs_campaign_help_keywords.rb} +20 -19
  15. data/lib/rcs/campaigns/rcs/types/rcs_campaign_keywords.rb +98 -0
  16. data/lib/rcs/campaigns/rcs/types/rcs_campaign_opt_in_keywords.rb +87 -0
  17. data/lib/rcs/campaigns/rcs/types/rcs_campaign_opt_out_keywords.rb +83 -0
  18. data/lib/rcs/campaigns/rcs/types/rcs_campaign_traffic.rb +76 -0
  19. data/lib/rcs/campaigns/rcs/types/{upsert_rcs_links.rb → rcs_links.rb} +5 -5
  20. data/lib/rcs/campaigns/rcs/types/{upsert_rcs_use_case.rb → rcs_use_case.rb} +7 -7
  21. data/lib/rcs/campaigns/toll_free/client.rb +53 -10
  22. data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +54 -12
  23. data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_help_keywords.rb +66 -0
  24. data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_keywords.rb +86 -0
  25. data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_links.rb +74 -0
  26. data/lib/rcs/campaigns/toll_free/types/{upsert_toll_free_schema_opt_in.rb → toll_free_campaign_opt_in.rb} +5 -5
  27. data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_opt_in_keywords.rb +78 -0
  28. data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_options.rb +64 -0
  29. data/lib/rcs/campaigns/toll_free/types/{upsert_toll_free_schema_use_case.rb → toll_free_campaign_use_case.rb} +5 -5
  30. data/lib/rcs/messages/blast/client.rb +419 -0
  31. data/lib/rcs/messages/blast/types/blast_mms_options.rb +82 -0
  32. data/lib/rcs/messages/blast/types/blast_mms_response.rb +60 -0
  33. data/lib/rcs/messages/blast/types/blast_rcs_options.rb +118 -0
  34. data/lib/rcs/messages/blast/types/blast_rcs_request_options_standalone_card.rb +82 -0
  35. data/lib/rcs/messages/blast/types/blast_rcs_request_options_standalone_card_image_alignment.rb +16 -0
  36. data/lib/rcs/messages/blast/types/blast_rcs_request_options_standalone_card_orientation.rb +15 -0
  37. data/lib/rcs/messages/blast/types/blast_rcs_response.rb +60 -0
  38. data/lib/rcs/messages/blast/types/blast_sms_options.rb +70 -0
  39. data/lib/rcs/messages/blast/types/blast_sms_response.rb +60 -0
  40. data/lib/rcs/messages/mms/client.rb +6 -6
  41. data/lib/rcs/messages/mms/types/mms_send_response.rb +4 -4
  42. data/lib/rcs/messages/rcs/client.rb +7 -7
  43. data/lib/rcs/messages/rcs/types/{rcs_send_response.rb → send_rich_message_response.rb} +11 -11
  44. data/lib/rcs/messages/schedule/client.rb +103 -0
  45. data/lib/rcs/messages/sms/client.rb +6 -6
  46. data/lib/rcs/messages/sms/types/sms_send_response.rb +4 -4
  47. data/lib/rcs/types/{rcs_base.rb → base_rich_message.rb} +10 -10
  48. data/lib/rcs/types/blast_details.rb +110 -0
  49. data/lib/rcs/types/company_entity_type_enum.rb +14 -0
  50. data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +30 -2
  51. data/lib/rcs/types/dlc_with_extended_brand_and_status_mno_brand_tier.rb +15 -0
  52. data/lib/rcs/types/dlc_with_extended_brand_and_status_mno_tcr_tier.rb +22 -0
  53. data/lib/rcs/types/extended_brand.rb +10 -1
  54. data/lib/rcs/types/extended_brand_with_vetting.rb +10 -1
  55. data/lib/rcs/types/extended_rcs_campaign.rb +122 -51
  56. data/lib/rcs/types/message_schedule.rb +52 -24
  57. data/lib/rcs/types/message_status_enum.rb +1 -0
  58. data/lib/rcs/types/optional_brand_info.rb +10 -1
  59. data/lib/rcs/types/rcs_campaign.rb +122 -43
  60. data/lib/rcs/types/rcs_campaign_schema_extra_keywords.rb +94 -0
  61. data/lib/rcs/types/{rcs_campaign_schema_extra_opt_out.rb → rcs_campaign_schema_extra_keywords_help.rb} +18 -17
  62. data/lib/rcs/types/rcs_campaign_schema_extra_keywords_opt_in.rb +73 -0
  63. data/lib/rcs/types/rcs_campaign_schema_extra_keywords_opt_out.rb +73 -0
  64. data/lib/rcs/types/rcs_campaign_schema_extra_traffic.rb +72 -0
  65. data/lib/rcs/types/rcs_campaign_schema_extra_use_case.rb +2 -2
  66. data/lib/rcs/types/rcs_campaign_schema_keywords.rb +94 -0
  67. data/lib/rcs/types/{rcs_campaign_schema_opt_out.rb → rcs_campaign_schema_keywords_help.rb} +18 -17
  68. data/lib/rcs/types/rcs_campaign_schema_keywords_opt_in.rb +73 -0
  69. data/lib/rcs/types/rcs_campaign_schema_keywords_opt_out.rb +73 -0
  70. data/lib/rcs/types/rcs_campaign_schema_traffic.rb +72 -0
  71. data/lib/rcs/types/rcs_campaign_schema_use_case.rb +2 -2
  72. data/lib/rcs/types/rcs_cards_content_cards_item.rb +4 -2
  73. data/lib/rcs/types/rcs_content.rb +4 -4
  74. data/lib/rcs/types/rcs_messaging_type_enum.rb +17 -0
  75. data/lib/rcs/types/rcs_validate_content.rb +8 -8
  76. data/lib/rcs/types/rcs_validation_result.rb +9 -2
  77. data/lib/rcs/types/{rcs_cards_cards_item.rb → rich_card.rb} +9 -7
  78. data/lib/rcs/types/{rcs_cards.rb → rich_cards.rb} +9 -9
  79. data/lib/rcs/types/rich_cards_message.rb +9 -9
  80. data/lib/rcs/types/rich_media_message.rb +5 -5
  81. data/lib/rcs/types/{send_rcs_card_options_standalone_card.rb → rich_standalone_card_options.rb} +9 -7
  82. data/lib/rcs/types/{rcs_text_content.rb → rich_text.rb} +5 -5
  83. data/lib/rcs/types/rich_text_message.rb +5 -5
  84. data/lib/rcs/types/schedule_cancel_result.rb +58 -0
  85. data/lib/rcs/types/scheduled_blast_details.rb +76 -0
  86. data/lib/rcs/types/scheduled_blast_response_config.rb +89 -0
  87. data/lib/rcs/types/{scheduled_messaage.rb → scheduled_message.rb} +5 -5
  88. data/lib/rcs/types/{send_rcs_card_options.rb → send_rich_cards_options.rb} +18 -14
  89. data/lib/rcs/types/{options.rb → send_rich_message_options.rb} +5 -5
  90. data/lib/rcs/types/{sent_rcs_details.rb → sent_rich_message.rb} +5 -5
  91. data/lib/rcs/types/toll_free_campaign.rb +54 -12
  92. data/lib/rcs/types/toll_free_campaign_schema_keywords.rb +82 -0
  93. data/lib/rcs/types/toll_free_campaign_schema_keywords_help.rb +62 -0
  94. data/lib/rcs/types/toll_free_campaign_schema_keywords_opt_in.rb +74 -0
  95. data/lib/rcs/types/toll_free_campaign_schema_links.rb +70 -0
  96. data/lib/rcs/types/{upsert_toll_free_campaign_opt_in.rb → toll_free_campaign_schema_opt_in.rb} +5 -5
  97. data/lib/rcs/types/toll_free_campaign_schema_options.rb +60 -0
  98. data/lib/rcs/types/{upsert_toll_free_campaign_use_case.rb → toll_free_campaign_schema_use_case.rb} +5 -5
  99. data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +54 -12
  100. data/lib/requests.rb +2 -2
  101. data/lib/types_export.rb +66 -32
  102. metadata +70 -34
  103. data/lib/rcs/campaigns/rcs/types/upsert_rcs_opt_in.rb +0 -75
  104. data/lib/rcs/types/rcs_base_options.rb +0 -111
  105. data/lib/rcs/types/rcs_campaign_opt_in_method_enum.rb +0 -15
  106. data/lib/rcs/types/rcs_campaign_schema_extra_opt_in.rb +0 -71
  107. data/lib/rcs/types/rcs_campaign_schema_opt_in.rb +0 -71
@@ -8,7 +8,7 @@ require "json"
8
8
  module Pinnacle
9
9
  module Types
10
10
  # Configure how your RCS message is sent and tracked.
11
- class Options
11
+ class SendRichMessageOptions
12
12
  # @return [Pinnacle::Types::MessageSchedule]
13
13
  attr_reader :schedule
14
14
  # @return [Boolean] Send via the test agent to whitelisted test devices. Useful for development and
@@ -39,7 +39,7 @@ module Pinnacle
39
39
  # @param validate [Boolean] Validate your message for any unsupported files. <br>
40
40
  # If failed, errors will be thrown and the message will not send.
41
41
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
42
- # @return [Pinnacle::Types::Options]
42
+ # @return [Pinnacle::Types::SendRichMessageOptions]
43
43
  def initialize(schedule: OMIT, test_mode: OMIT, tracking: OMIT, transcode: OMIT, validate: OMIT,
44
44
  additional_properties: nil)
45
45
  @schedule = schedule if schedule != OMIT
@@ -59,10 +59,10 @@ module Pinnacle
59
59
  end
60
60
  end
61
61
 
62
- # Deserialize a JSON object to an instance of Options
62
+ # Deserialize a JSON object to an instance of SendRichMessageOptions
63
63
  #
64
64
  # @param json_object [String]
65
- # @return [Pinnacle::Types::Options]
65
+ # @return [Pinnacle::Types::SendRichMessageOptions]
66
66
  def self.from_json(json_object:)
67
67
  struct = JSON.parse(json_object, object_class: OpenStruct)
68
68
  parsed_json = JSON.parse(json_object)
@@ -86,7 +86,7 @@ module Pinnacle
86
86
  )
87
87
  end
88
88
 
89
- # Serialize an instance of Options to a JSON object
89
+ # Serialize an instance of SendRichMessageOptions to a JSON object
90
90
  #
91
91
  # @return [String]
92
92
  def to_json(*_args)
@@ -5,7 +5,7 @@ require "json"
5
5
 
6
6
  module Pinnacle
7
7
  module Types
8
- class SentRcsDetails
8
+ class SentRichMessage
9
9
  # @return [String] Unique identifier for the sent RCS message. This identifier is a string that
10
10
  # always begins with the prefix `msg_`, for example: `msg_1234567890`.
11
11
  attr_reader :message_id
@@ -35,7 +35,7 @@ module Pinnacle
35
35
  # @param recipient [String] Recipient's phone number in E.164 format.
36
36
  # @param status [String] Current status of the message.
37
37
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
38
- # @return [Pinnacle::Types::SentRcsDetails]
38
+ # @return [Pinnacle::Types::SentRichMessage]
39
39
  def initialize(message_id:, segments:, total_cost:, sender:, recipient:, status:, additional_properties: nil)
40
40
  @message_id = message_id
41
41
  @segments = segments
@@ -54,10 +54,10 @@ module Pinnacle
54
54
  }
55
55
  end
56
56
 
57
- # Deserialize a JSON object to an instance of SentRcsDetails
57
+ # Deserialize a JSON object to an instance of SentRichMessage
58
58
  #
59
59
  # @param json_object [String]
60
- # @return [Pinnacle::Types::SentRcsDetails]
60
+ # @return [Pinnacle::Types::SentRichMessage]
61
61
  def self.from_json(json_object:)
62
62
  struct = JSON.parse(json_object, object_class: OpenStruct)
63
63
  parsed_json = JSON.parse(json_object)
@@ -78,7 +78,7 @@ module Pinnacle
78
78
  )
79
79
  end
80
80
 
81
- # Serialize an instance of SentRcsDetails to a JSON object
81
+ # Serialize an instance of SentRichMessage to a JSON object
82
82
  #
83
83
  # @return [String]
84
84
  def to_json(*_args)
@@ -1,8 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative "toll_free_campaign_schema_keywords"
4
+ require_relative "toll_free_campaign_schema_links"
3
5
  require_relative "message_volume_enum"
4
- require_relative "upsert_toll_free_campaign_opt_in"
5
- require_relative "upsert_toll_free_campaign_use_case"
6
+ require_relative "toll_free_campaign_schema_opt_in"
7
+ require_relative "toll_free_campaign_schema_options"
8
+ require_relative "toll_free_campaign_schema_use_case"
6
9
  require "ostruct"
7
10
  require "json"
8
11
 
@@ -11,15 +14,21 @@ module Pinnacle
11
14
  class TollFreeCampaign
12
15
  # @return [String] Unique identifier for the campaign. Must begin with the prefix `tf_`.
13
16
  attr_reader :campaign_id
17
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaKeywords] Keyword response configuration.
18
+ attr_reader :keywords
19
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaLinks] Legal documentation links.
20
+ attr_reader :links
14
21
  # @return [Pinnacle::Types::MessageVolumeEnum]
15
22
  attr_reader :monthly_volume
16
23
  # @return [String] Display name of the campaign.
17
24
  attr_reader :name
18
- # @return [Pinnacle::Types::UpsertTollFreeCampaignOptIn] Opt-in keyword settings.
25
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaOptIn] Opt-in keyword settings.
19
26
  attr_reader :opt_in
27
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaOptions] Campaign configuration options.
28
+ attr_reader :options
20
29
  # @return [String] Explain message that would be sent.
21
30
  attr_reader :production_message_content
22
- # @return [Pinnacle::Types::UpsertTollFreeCampaignUseCase] Use case classification for the campaign.
31
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaUseCase] Use case classification for the campaign.
23
32
  attr_reader :use_case
24
33
  # @return [OpenStruct] Additional properties unmapped to the current class definition
25
34
  attr_reader :additional_properties
@@ -30,27 +39,36 @@ module Pinnacle
30
39
  OMIT = Object.new
31
40
 
32
41
  # @param campaign_id [String] Unique identifier for the campaign. Must begin with the prefix `tf_`.
42
+ # @param keywords [Pinnacle::Types::TollFreeCampaignSchemaKeywords] Keyword response configuration.
43
+ # @param links [Pinnacle::Types::TollFreeCampaignSchemaLinks] Legal documentation links.
33
44
  # @param monthly_volume [Pinnacle::Types::MessageVolumeEnum]
34
45
  # @param name [String] Display name of the campaign.
35
- # @param opt_in [Pinnacle::Types::UpsertTollFreeCampaignOptIn] Opt-in keyword settings.
46
+ # @param opt_in [Pinnacle::Types::TollFreeCampaignSchemaOptIn] Opt-in keyword settings.
47
+ # @param options [Pinnacle::Types::TollFreeCampaignSchemaOptions] Campaign configuration options.
36
48
  # @param production_message_content [String] Explain message that would be sent.
37
- # @param use_case [Pinnacle::Types::UpsertTollFreeCampaignUseCase] Use case classification for the campaign.
49
+ # @param use_case [Pinnacle::Types::TollFreeCampaignSchemaUseCase] Use case classification for the campaign.
38
50
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
39
51
  # @return [Pinnacle::Types::TollFreeCampaign]
40
- def initialize(campaign_id: OMIT, monthly_volume: OMIT, name: OMIT, opt_in: OMIT,
41
- production_message_content: OMIT, use_case: OMIT, additional_properties: nil)
52
+ def initialize(campaign_id: OMIT, keywords: OMIT, links: OMIT, monthly_volume: OMIT, name: OMIT, opt_in: OMIT,
53
+ options: OMIT, production_message_content: OMIT, use_case: OMIT, additional_properties: nil)
42
54
  @campaign_id = campaign_id if campaign_id != OMIT
55
+ @keywords = keywords if keywords != OMIT
56
+ @links = links if links != OMIT
43
57
  @monthly_volume = monthly_volume if monthly_volume != OMIT
44
58
  @name = name if name != OMIT
45
59
  @opt_in = opt_in if opt_in != OMIT
60
+ @options = options if options != OMIT
46
61
  @production_message_content = production_message_content if production_message_content != OMIT
47
62
  @use_case = use_case if use_case != OMIT
48
63
  @additional_properties = additional_properties
49
64
  @_field_set = {
50
65
  "campaignId": campaign_id,
66
+ "keywords": keywords,
67
+ "links": links,
51
68
  "monthlyVolume": monthly_volume,
52
69
  "name": name,
53
70
  "optIn": opt_in,
71
+ "options": options,
54
72
  "productionMessageContent": production_message_content,
55
73
  "useCase": use_case
56
74
  }.reject do |_k, v|
@@ -66,26 +84,47 @@ module Pinnacle
66
84
  struct = JSON.parse(json_object, object_class: OpenStruct)
67
85
  parsed_json = JSON.parse(json_object)
68
86
  campaign_id = parsed_json["campaignId"]
87
+ if parsed_json["keywords"].nil?
88
+ keywords = nil
89
+ else
90
+ keywords = parsed_json["keywords"].to_json
91
+ keywords = Pinnacle::Types::TollFreeCampaignSchemaKeywords.from_json(json_object: keywords)
92
+ end
93
+ if parsed_json["links"].nil?
94
+ links = nil
95
+ else
96
+ links = parsed_json["links"].to_json
97
+ links = Pinnacle::Types::TollFreeCampaignSchemaLinks.from_json(json_object: links)
98
+ end
69
99
  monthly_volume = parsed_json["monthlyVolume"]
70
100
  name = parsed_json["name"]
71
101
  if parsed_json["optIn"].nil?
72
102
  opt_in = nil
73
103
  else
74
104
  opt_in = parsed_json["optIn"].to_json
75
- opt_in = Pinnacle::Types::UpsertTollFreeCampaignOptIn.from_json(json_object: opt_in)
105
+ opt_in = Pinnacle::Types::TollFreeCampaignSchemaOptIn.from_json(json_object: opt_in)
106
+ end
107
+ if parsed_json["options"].nil?
108
+ options = nil
109
+ else
110
+ options = parsed_json["options"].to_json
111
+ options = Pinnacle::Types::TollFreeCampaignSchemaOptions.from_json(json_object: options)
76
112
  end
77
113
  production_message_content = parsed_json["productionMessageContent"]
78
114
  if parsed_json["useCase"].nil?
79
115
  use_case = nil
80
116
  else
81
117
  use_case = parsed_json["useCase"].to_json
82
- use_case = Pinnacle::Types::UpsertTollFreeCampaignUseCase.from_json(json_object: use_case)
118
+ use_case = Pinnacle::Types::TollFreeCampaignSchemaUseCase.from_json(json_object: use_case)
83
119
  end
84
120
  new(
85
121
  campaign_id: campaign_id,
122
+ keywords: keywords,
123
+ links: links,
86
124
  monthly_volume: monthly_volume,
87
125
  name: name,
88
126
  opt_in: opt_in,
127
+ options: options,
89
128
  production_message_content: production_message_content,
90
129
  use_case: use_case,
91
130
  additional_properties: struct
@@ -107,11 +146,14 @@ module Pinnacle
107
146
  # @return [Void]
108
147
  def self.validate_raw(obj:)
109
148
  obj.campaign_id&.is_a?(String) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
149
+ obj.keywords.nil? || Pinnacle::Types::TollFreeCampaignSchemaKeywords.validate_raw(obj: obj.keywords)
150
+ obj.links.nil? || Pinnacle::Types::TollFreeCampaignSchemaLinks.validate_raw(obj: obj.links)
110
151
  obj.monthly_volume&.is_a?(Pinnacle::Types::MessageVolumeEnum) != false || raise("Passed value for field obj.monthly_volume is not the expected type, validation failed.")
111
152
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
112
- obj.opt_in.nil? || Pinnacle::Types::UpsertTollFreeCampaignOptIn.validate_raw(obj: obj.opt_in)
153
+ obj.opt_in.nil? || Pinnacle::Types::TollFreeCampaignSchemaOptIn.validate_raw(obj: obj.opt_in)
154
+ obj.options.nil? || Pinnacle::Types::TollFreeCampaignSchemaOptions.validate_raw(obj: obj.options)
113
155
  obj.production_message_content&.is_a?(String) != false || raise("Passed value for field obj.production_message_content is not the expected type, validation failed.")
114
- obj.use_case.nil? || Pinnacle::Types::UpsertTollFreeCampaignUseCase.validate_raw(obj: obj.use_case)
156
+ obj.use_case.nil? || Pinnacle::Types::TollFreeCampaignSchemaUseCase.validate_raw(obj: obj.use_case)
115
157
  end
116
158
  end
117
159
  end
@@ -0,0 +1,82 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "toll_free_campaign_schema_keywords_help"
4
+ require_relative "toll_free_campaign_schema_keywords_opt_in"
5
+ require "ostruct"
6
+ require "json"
7
+
8
+ module Pinnacle
9
+ module Types
10
+ # Keyword response configuration.
11
+ class TollFreeCampaignSchemaKeywords
12
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaKeywordsHelp] Help keyword settings.
13
+ attr_reader :help
14
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaKeywordsOptIn] Opt-in keyword settings.
15
+ attr_reader :opt_in
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 help [Pinnacle::Types::TollFreeCampaignSchemaKeywordsHelp] Help keyword settings.
25
+ # @param opt_in [Pinnacle::Types::TollFreeCampaignSchemaKeywordsOptIn] Opt-in keyword settings.
26
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
27
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaKeywords]
28
+ def initialize(help: OMIT, opt_in: OMIT, additional_properties: nil)
29
+ @help = help if help != OMIT
30
+ @opt_in = opt_in if opt_in != OMIT
31
+ @additional_properties = additional_properties
32
+ @_field_set = { "HELP": help, "OPT_IN": opt_in }.reject do |_k, v|
33
+ v == OMIT
34
+ end
35
+ end
36
+
37
+ # Deserialize a JSON object to an instance of TollFreeCampaignSchemaKeywords
38
+ #
39
+ # @param json_object [String]
40
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaKeywords]
41
+ def self.from_json(json_object:)
42
+ struct = JSON.parse(json_object, object_class: OpenStruct)
43
+ parsed_json = JSON.parse(json_object)
44
+ if parsed_json["HELP"].nil?
45
+ help = nil
46
+ else
47
+ help = parsed_json["HELP"].to_json
48
+ help = Pinnacle::Types::TollFreeCampaignSchemaKeywordsHelp.from_json(json_object: help)
49
+ end
50
+ if parsed_json["OPT_IN"].nil?
51
+ opt_in = nil
52
+ else
53
+ opt_in = parsed_json["OPT_IN"].to_json
54
+ opt_in = Pinnacle::Types::TollFreeCampaignSchemaKeywordsOptIn.from_json(json_object: opt_in)
55
+ end
56
+ new(
57
+ help: help,
58
+ opt_in: opt_in,
59
+ additional_properties: struct
60
+ )
61
+ end
62
+
63
+ # Serialize an instance of TollFreeCampaignSchemaKeywords to a JSON object
64
+ #
65
+ # @return [String]
66
+ def to_json(*_args)
67
+ @_field_set&.to_json
68
+ end
69
+
70
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
71
+ # hash and check each fields type against the current object's property
72
+ # definitions.
73
+ #
74
+ # @param obj [Object]
75
+ # @return [Void]
76
+ def self.validate_raw(obj:)
77
+ obj.help.nil? || Pinnacle::Types::TollFreeCampaignSchemaKeywordsHelp.validate_raw(obj: obj.help)
78
+ obj.opt_in.nil? || Pinnacle::Types::TollFreeCampaignSchemaKeywordsOptIn.validate_raw(obj: obj.opt_in)
79
+ end
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Pinnacle
7
+ module Types
8
+ # Help keyword settings.
9
+ class TollFreeCampaignSchemaKeywordsHelp
10
+ # @return [String] Message sent when a user sends HELP. Must include at least one support contact
11
+ # method (phone, email, or website).
12
+ attr_reader :message
13
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
14
+ attr_reader :additional_properties
15
+ # @return [Object]
16
+ attr_reader :_field_set
17
+ protected :_field_set
18
+
19
+ OMIT = Object.new
20
+
21
+ # @param message [String] Message sent when a user sends HELP. Must include at least one support contact
22
+ # method (phone, email, or website).
23
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
24
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaKeywordsHelp]
25
+ def initialize(message: OMIT, additional_properties: nil)
26
+ @message = message if message != OMIT
27
+ @additional_properties = additional_properties
28
+ @_field_set = { "message": message }.reject do |_k, v|
29
+ v == OMIT
30
+ end
31
+ end
32
+
33
+ # Deserialize a JSON object to an instance of TollFreeCampaignSchemaKeywordsHelp
34
+ #
35
+ # @param json_object [String]
36
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaKeywordsHelp]
37
+ def self.from_json(json_object:)
38
+ struct = JSON.parse(json_object, object_class: OpenStruct)
39
+ parsed_json = JSON.parse(json_object)
40
+ message = parsed_json["message"]
41
+ new(message: message, additional_properties: struct)
42
+ end
43
+
44
+ # Serialize an instance of TollFreeCampaignSchemaKeywordsHelp 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.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Pinnacle
7
+ module Types
8
+ # Opt-in keyword settings.
9
+ class TollFreeCampaignSchemaKeywordsOptIn
10
+ # @return [String] Message sent when a user opt-in. Must include brand name, confirmation of
11
+ # subscription, and disclosures (STOP and HELP instructions, message and data
12
+ # rates).
13
+ attr_reader :message
14
+ # @return [Array<String>] Keywords that trigger opt-in response.
15
+ attr_reader :keywords
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 message [String] Message sent when a user opt-in. Must include brand name, confirmation of
25
+ # subscription, and disclosures (STOP and HELP instructions, message and data
26
+ # rates).
27
+ # @param keywords [Array<String>] Keywords that trigger opt-in response.
28
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
29
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaKeywordsOptIn]
30
+ def initialize(message: OMIT, keywords: OMIT, additional_properties: nil)
31
+ @message = message if message != OMIT
32
+ @keywords = keywords if keywords != OMIT
33
+ @additional_properties = additional_properties
34
+ @_field_set = { "message": message, "keywords": keywords }.reject do |_k, v|
35
+ v == OMIT
36
+ end
37
+ end
38
+
39
+ # Deserialize a JSON object to an instance of TollFreeCampaignSchemaKeywordsOptIn
40
+ #
41
+ # @param json_object [String]
42
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaKeywordsOptIn]
43
+ def self.from_json(json_object:)
44
+ struct = JSON.parse(json_object, object_class: OpenStruct)
45
+ parsed_json = JSON.parse(json_object)
46
+ message = parsed_json["message"]
47
+ keywords = parsed_json["keywords"]
48
+ new(
49
+ message: message,
50
+ keywords: keywords,
51
+ additional_properties: struct
52
+ )
53
+ end
54
+
55
+ # Serialize an instance of TollFreeCampaignSchemaKeywordsOptIn 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.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
70
+ obj.keywords&.is_a?(Array) != false || raise("Passed value for field obj.keywords is not the expected type, validation failed.")
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Pinnacle
7
+ module Types
8
+ # Legal documentation links.
9
+ class TollFreeCampaignSchemaLinks
10
+ # @return [String] Privacy policy URL.
11
+ attr_reader :privacy_policy
12
+ # @return [String] Terms of service URL.
13
+ attr_reader :terms_of_service
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 privacy_policy [String] Privacy policy URL.
23
+ # @param terms_of_service [String] Terms of service URL.
24
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
25
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaLinks]
26
+ def initialize(privacy_policy: OMIT, terms_of_service: OMIT, additional_properties: nil)
27
+ @privacy_policy = privacy_policy if privacy_policy != OMIT
28
+ @terms_of_service = terms_of_service if terms_of_service != OMIT
29
+ @additional_properties = additional_properties
30
+ @_field_set = { "privacyPolicy": privacy_policy, "termsOfService": terms_of_service }.reject do |_k, v|
31
+ v == OMIT
32
+ end
33
+ end
34
+
35
+ # Deserialize a JSON object to an instance of TollFreeCampaignSchemaLinks
36
+ #
37
+ # @param json_object [String]
38
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaLinks]
39
+ def self.from_json(json_object:)
40
+ struct = JSON.parse(json_object, object_class: OpenStruct)
41
+ parsed_json = JSON.parse(json_object)
42
+ privacy_policy = parsed_json["privacyPolicy"]
43
+ terms_of_service = parsed_json["termsOfService"]
44
+ new(
45
+ privacy_policy: privacy_policy,
46
+ terms_of_service: terms_of_service,
47
+ additional_properties: struct
48
+ )
49
+ end
50
+
51
+ # Serialize an instance of TollFreeCampaignSchemaLinks to a JSON object
52
+ #
53
+ # @return [String]
54
+ def to_json(*_args)
55
+ @_field_set&.to_json
56
+ end
57
+
58
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
59
+ # hash and check each fields type against the current object's property
60
+ # definitions.
61
+ #
62
+ # @param obj [Object]
63
+ # @return [Void]
64
+ def self.validate_raw(obj:)
65
+ obj.privacy_policy&.is_a?(String) != false || raise("Passed value for field obj.privacy_policy is not the expected type, validation failed.")
66
+ obj.terms_of_service&.is_a?(String) != false || raise("Passed value for field obj.terms_of_service is not the expected type, validation failed.")
67
+ end
68
+ end
69
+ end
70
+ end
@@ -7,7 +7,7 @@ require "json"
7
7
  module Pinnacle
8
8
  module Types
9
9
  # Opt-in keyword settings.
10
- class UpsertTollFreeCampaignOptIn
10
+ class TollFreeCampaignSchemaOptIn
11
11
  # @return [Pinnacle::Types::OptInMethodEnum]
12
12
  attr_reader :method_
13
13
  # @return [String] Url to opt in.
@@ -26,7 +26,7 @@ module Pinnacle
26
26
  # @param url [String] Url to opt in.
27
27
  # @param workflow_description [String] Explain how users find the opt-in.
28
28
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
29
- # @return [Pinnacle::Types::UpsertTollFreeCampaignOptIn]
29
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaOptIn]
30
30
  def initialize(method_: OMIT, url: OMIT, workflow_description: OMIT, additional_properties: nil)
31
31
  @method_ = method_ if method_ != OMIT
32
32
  @url = url if url != OMIT
@@ -37,10 +37,10 @@ module Pinnacle
37
37
  end
38
38
  end
39
39
 
40
- # Deserialize a JSON object to an instance of UpsertTollFreeCampaignOptIn
40
+ # Deserialize a JSON object to an instance of TollFreeCampaignSchemaOptIn
41
41
  #
42
42
  # @param json_object [String]
43
- # @return [Pinnacle::Types::UpsertTollFreeCampaignOptIn]
43
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaOptIn]
44
44
  def self.from_json(json_object:)
45
45
  struct = JSON.parse(json_object, object_class: OpenStruct)
46
46
  parsed_json = JSON.parse(json_object)
@@ -55,7 +55,7 @@ module Pinnacle
55
55
  )
56
56
  end
57
57
 
58
- # Serialize an instance of UpsertTollFreeCampaignOptIn to a JSON object
58
+ # Serialize an instance of TollFreeCampaignSchemaOptIn to a JSON object
59
59
  #
60
60
  # @return [String]
61
61
  def to_json(*_args)
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Pinnacle
7
+ module Types
8
+ # Campaign configuration options.
9
+ class TollFreeCampaignSchemaOptions
10
+ # @return [Boolean] Whether the campaign is age-gated.
11
+ attr_reader :age_gated
12
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
13
+ attr_reader :additional_properties
14
+ # @return [Object]
15
+ attr_reader :_field_set
16
+ protected :_field_set
17
+
18
+ OMIT = Object.new
19
+
20
+ # @param age_gated [Boolean] Whether the campaign is age-gated.
21
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
22
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaOptions]
23
+ def initialize(age_gated: OMIT, additional_properties: nil)
24
+ @age_gated = age_gated if age_gated != OMIT
25
+ @additional_properties = additional_properties
26
+ @_field_set = { "ageGated": age_gated }.reject do |_k, v|
27
+ v == OMIT
28
+ end
29
+ end
30
+
31
+ # Deserialize a JSON object to an instance of TollFreeCampaignSchemaOptions
32
+ #
33
+ # @param json_object [String]
34
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaOptions]
35
+ def self.from_json(json_object:)
36
+ struct = JSON.parse(json_object, object_class: OpenStruct)
37
+ parsed_json = JSON.parse(json_object)
38
+ age_gated = parsed_json["ageGated"]
39
+ new(age_gated: age_gated, additional_properties: struct)
40
+ end
41
+
42
+ # Serialize an instance of TollFreeCampaignSchemaOptions to a JSON object
43
+ #
44
+ # @return [String]
45
+ def to_json(*_args)
46
+ @_field_set&.to_json
47
+ end
48
+
49
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
50
+ # hash and check each fields type against the current object's property
51
+ # definitions.
52
+ #
53
+ # @param obj [Object]
54
+ # @return [Void]
55
+ def self.validate_raw(obj:)
56
+ obj.age_gated&.is_a?(Boolean) != false || raise("Passed value for field obj.age_gated is not the expected type, validation failed.")
57
+ end
58
+ end
59
+ end
60
+ end
@@ -7,7 +7,7 @@ require "json"
7
7
  module Pinnacle
8
8
  module Types
9
9
  # Use case classification for the campaign.
10
- class UpsertTollFreeCampaignUseCase
10
+ class TollFreeCampaignSchemaUseCase
11
11
  # @return [String] Summary of the use case.
12
12
  attr_reader :summary
13
13
  # @return [Pinnacle::Types::TollFreeCampaignUseCaseEnum]
@@ -23,7 +23,7 @@ module Pinnacle
23
23
  # @param summary [String] Summary of the use case.
24
24
  # @param value [Pinnacle::Types::TollFreeCampaignUseCaseEnum]
25
25
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
26
- # @return [Pinnacle::Types::UpsertTollFreeCampaignUseCase]
26
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaUseCase]
27
27
  def initialize(summary: OMIT, value: OMIT, additional_properties: nil)
28
28
  @summary = summary if summary != OMIT
29
29
  @value = value if value != OMIT
@@ -33,10 +33,10 @@ module Pinnacle
33
33
  end
34
34
  end
35
35
 
36
- # Deserialize a JSON object to an instance of UpsertTollFreeCampaignUseCase
36
+ # Deserialize a JSON object to an instance of TollFreeCampaignSchemaUseCase
37
37
  #
38
38
  # @param json_object [String]
39
- # @return [Pinnacle::Types::UpsertTollFreeCampaignUseCase]
39
+ # @return [Pinnacle::Types::TollFreeCampaignSchemaUseCase]
40
40
  def self.from_json(json_object:)
41
41
  struct = JSON.parse(json_object, object_class: OpenStruct)
42
42
  parsed_json = JSON.parse(json_object)
@@ -49,7 +49,7 @@ module Pinnacle
49
49
  )
50
50
  end
51
51
 
52
- # Serialize an instance of UpsertTollFreeCampaignUseCase to a JSON object
52
+ # Serialize an instance of TollFreeCampaignSchemaUseCase to a JSON object
53
53
  #
54
54
  # @return [String]
55
55
  def to_json(*_args)