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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "rcs_cards_cards_item"
3
+ require_relative "rich_card"
4
4
  require_relative "rich_button"
5
5
  require "ostruct"
6
6
  require "json"
@@ -11,8 +11,8 @@ module Pinnacle
11
11
  # Quick replies can also be added. <br>
12
12
  # See (supported file
13
13
  # types)[https://app.pinnacle.sh/supported-file-types?type=RCS-CARD].
14
- class RcsCards
15
- # @return [Array<Pinnacle::Types::RcsCardsCardsItem>] Collection of cards attached to the message.
14
+ class RichCards
15
+ # @return [Array<Pinnacle::Types::RichCard>] Collection of cards attached to the message.
16
16
  attr_reader :cards
17
17
  # @return [Array<Pinnacle::Types::RichButton>] List of interactive quick reply buttons in the message.
18
18
  attr_reader :quick_replies
@@ -24,10 +24,10 @@ module Pinnacle
24
24
 
25
25
  OMIT = Object.new
26
26
 
27
- # @param cards [Array<Pinnacle::Types::RcsCardsCardsItem>] Collection of cards attached to the message.
27
+ # @param cards [Array<Pinnacle::Types::RichCard>] Collection of cards attached to the message.
28
28
  # @param quick_replies [Array<Pinnacle::Types::RichButton>] List of interactive quick reply buttons in the message.
29
29
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
30
- # @return [Pinnacle::Types::RcsCards]
30
+ # @return [Pinnacle::Types::RichCards]
31
31
  def initialize(cards:, quick_replies:, additional_properties: nil)
32
32
  @cards = cards
33
33
  @quick_replies = quick_replies
@@ -35,16 +35,16 @@ module Pinnacle
35
35
  @_field_set = { "cards": cards, "quickReplies": quick_replies }
36
36
  end
37
37
 
38
- # Deserialize a JSON object to an instance of RcsCards
38
+ # Deserialize a JSON object to an instance of RichCards
39
39
  #
40
40
  # @param json_object [String]
41
- # @return [Pinnacle::Types::RcsCards]
41
+ # @return [Pinnacle::Types::RichCards]
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)
45
45
  cards = parsed_json["cards"]&.map do |item|
46
46
  item = item.to_json
47
- Pinnacle::Types::RcsCardsCardsItem.from_json(json_object: item)
47
+ Pinnacle::Types::RichCard.from_json(json_object: item)
48
48
  end
49
49
  quick_replies = parsed_json["quickReplies"]&.map do |item|
50
50
  item = item.to_json
@@ -57,7 +57,7 @@ module Pinnacle
57
57
  )
58
58
  end
59
59
 
60
- # Serialize an instance of RcsCards to a JSON object
60
+ # Serialize an instance of RichCards to a JSON object
61
61
  #
62
62
  # @return [String]
63
63
  def to_json(*_args)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "send_rcs_card_options"
4
- require_relative "rcs_cards_cards_item"
3
+ require_relative "send_rich_cards_options"
4
+ require_relative "rich_card"
5
5
  require_relative "rich_button"
6
6
  require "ostruct"
7
7
  require "json"
@@ -9,13 +9,13 @@ require "json"
9
9
  module Pinnacle
10
10
  module Types
11
11
  class RichCardsMessage
12
- # @return [Pinnacle::Types::SendRcsCardOptions]
12
+ # @return [Pinnacle::Types::SendRichCardsOptions]
13
13
  attr_reader :options
14
14
  # @return [String] Your RCS agent ID which must be prefixed with 'agent_'.
15
15
  attr_reader :from
16
16
  # @return [String] Recipient's phone number in E.164 format.
17
17
  attr_reader :to
18
- # @return [Array<Pinnacle::Types::RcsCardsCardsItem>] Collection of cards attached to the message.
18
+ # @return [Array<Pinnacle::Types::RichCard>] Collection of cards attached to the message.
19
19
  attr_reader :cards
20
20
  # @return [Array<Pinnacle::Types::RichButton>] List of interactive quick reply buttons in the message.
21
21
  attr_reader :quick_replies
@@ -27,10 +27,10 @@ module Pinnacle
27
27
 
28
28
  OMIT = Object.new
29
29
 
30
- # @param options [Pinnacle::Types::SendRcsCardOptions]
30
+ # @param options [Pinnacle::Types::SendRichCardsOptions]
31
31
  # @param from [String] Your RCS agent ID which must be prefixed with 'agent_'.
32
32
  # @param to [String] Recipient's phone number in E.164 format.
33
- # @param cards [Array<Pinnacle::Types::RcsCardsCardsItem>] Collection of cards attached to the message.
33
+ # @param cards [Array<Pinnacle::Types::RichCard>] Collection of cards attached to the message.
34
34
  # @param quick_replies [Array<Pinnacle::Types::RichButton>] List of interactive quick reply buttons in the message.
35
35
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
36
36
  # @return [Pinnacle::Types::RichCardsMessage]
@@ -63,13 +63,13 @@ module Pinnacle
63
63
  options = nil
64
64
  else
65
65
  options = parsed_json["options"].to_json
66
- options = Pinnacle::Types::SendRcsCardOptions.from_json(json_object: options)
66
+ options = Pinnacle::Types::SendRichCardsOptions.from_json(json_object: options)
67
67
  end
68
68
  from = parsed_json["from"]
69
69
  to = parsed_json["to"]
70
70
  cards = parsed_json["cards"]&.map do |item|
71
71
  item = item.to_json
72
- Pinnacle::Types::RcsCardsCardsItem.from_json(json_object: item)
72
+ Pinnacle::Types::RichCard.from_json(json_object: item)
73
73
  end
74
74
  quick_replies = parsed_json["quickReplies"]&.map do |item|
75
75
  item = item.to_json
@@ -99,7 +99,7 @@ module Pinnacle
99
99
  # @param obj [Object]
100
100
  # @return [Void]
101
101
  def self.validate_raw(obj:)
102
- obj.options.nil? || Pinnacle::Types::SendRcsCardOptions.validate_raw(obj: obj.options)
102
+ obj.options.nil? || Pinnacle::Types::SendRichCardsOptions.validate_raw(obj: obj.options)
103
103
  obj.from.is_a?(String) != false || raise("Passed value for field obj.from is not the expected type, validation failed.")
104
104
  obj.to.is_a?(String) != false || raise("Passed value for field obj.to is not the expected type, validation failed.")
105
105
  obj.cards.is_a?(Array) != false || raise("Passed value for field obj.cards is not the expected type, validation failed.")
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "rich_button"
4
- require_relative "rcs_base_options"
4
+ require_relative "send_rich_message_options"
5
5
  require "ostruct"
6
6
  require "json"
7
7
 
@@ -16,7 +16,7 @@ module Pinnacle
16
16
  attr_reader :quick_replies
17
17
  # @return [String] Your RCS agent ID which must be prefixed with 'agent_'.
18
18
  attr_reader :from
19
- # @return [Pinnacle::Types::RcsBaseOptions] Configure how your RCS message is sent and tracked.
19
+ # @return [Pinnacle::Types::SendRichMessageOptions] Configure how your RCS message is sent and tracked.
20
20
  attr_reader :options
21
21
  # @return [String] Recipient's phone number in E.164 format.
22
22
  attr_reader :to
@@ -33,7 +33,7 @@ module Pinnacle
33
33
  # types](https://app.pinnacle.sh/supported-file-types?type=RCS-MEDIA).
34
34
  # @param quick_replies [Array<Pinnacle::Types::RichButton>] List of interactive quick reply buttons in the message.
35
35
  # @param from [String] Your RCS agent ID which must be prefixed with 'agent_'.
36
- # @param options [Pinnacle::Types::RcsBaseOptions] Configure how your RCS message is sent and tracked.
36
+ # @param options [Pinnacle::Types::SendRichMessageOptions] Configure how your RCS message is sent and tracked.
37
37
  # @param to [String] Recipient's phone number in E.164 format.
38
38
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
39
39
  # @return [Pinnacle::Types::RichMediaMessage]
@@ -72,7 +72,7 @@ module Pinnacle
72
72
  options = nil
73
73
  else
74
74
  options = parsed_json["options"].to_json
75
- options = Pinnacle::Types::RcsBaseOptions.from_json(json_object: options)
75
+ options = Pinnacle::Types::SendRichMessageOptions.from_json(json_object: options)
76
76
  end
77
77
  to = parsed_json["to"]
78
78
  new(
@@ -102,7 +102,7 @@ module Pinnacle
102
102
  obj.media.is_a?(String) != false || raise("Passed value for field obj.media is not the expected type, validation failed.")
103
103
  obj.quick_replies.is_a?(Array) != false || raise("Passed value for field obj.quick_replies is not the expected type, validation failed.")
104
104
  obj.from.is_a?(String) != false || raise("Passed value for field obj.from is not the expected type, validation failed.")
105
- obj.options.nil? || Pinnacle::Types::RcsBaseOptions.validate_raw(obj: obj.options)
105
+ obj.options.nil? || Pinnacle::Types::SendRichMessageOptions.validate_raw(obj: obj.options)
106
106
  obj.to.is_a?(String) != false || raise("Passed value for field obj.to is not the expected type, validation failed.")
107
107
  end
108
108
  end
@@ -10,9 +10,11 @@ module Pinnacle
10
10
  # Configure standalone card layout options for enhanced visual presentation.
11
11
  # > **⚠️ Important Restriction**
12
12
  # >
13
- # > This option is **only valid for single card messages**. Using it with multiple
14
- # cards will cause the request to fail with a validation error.
15
- class SendRcsCardOptionsStandaloneCard
13
+ # > This option is **only valid for single card messages** with static media.
14
+ # Using it with multiple cards will cause the request to fail with a validation
15
+ # error.
16
+ # > GIFs and videos are not supported and will be rendered as vertical cards.
17
+ class RichStandaloneCardOptions
16
18
  # @return [Pinnacle::Types::SendRcsCardOptionsStandaloneCardOrientation] The orientation of the standalone card.
17
19
  attr_reader :orientation
18
20
  # @return [Pinnacle::Types::SendRcsCardOptionsStandaloneCardImageAlignment] The alignment of the image in the standalone card. This field is ignored if
@@ -30,7 +32,7 @@ module Pinnacle
30
32
  # @param image_alignment [Pinnacle::Types::SendRcsCardOptionsStandaloneCardImageAlignment] The alignment of the image in the standalone card. This field is ignored if
31
33
  # orientation is VERTICAL.
32
34
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
33
- # @return [Pinnacle::Types::SendRcsCardOptionsStandaloneCard]
35
+ # @return [Pinnacle::Types::RichStandaloneCardOptions]
34
36
  def initialize(orientation: OMIT, image_alignment: OMIT, additional_properties: nil)
35
37
  @orientation = orientation if orientation != OMIT
36
38
  @image_alignment = image_alignment if image_alignment != OMIT
@@ -40,10 +42,10 @@ module Pinnacle
40
42
  end
41
43
  end
42
44
 
43
- # Deserialize a JSON object to an instance of SendRcsCardOptionsStandaloneCard
45
+ # Deserialize a JSON object to an instance of RichStandaloneCardOptions
44
46
  #
45
47
  # @param json_object [String]
46
- # @return [Pinnacle::Types::SendRcsCardOptionsStandaloneCard]
48
+ # @return [Pinnacle::Types::RichStandaloneCardOptions]
47
49
  def self.from_json(json_object:)
48
50
  struct = JSON.parse(json_object, object_class: OpenStruct)
49
51
  parsed_json = JSON.parse(json_object)
@@ -56,7 +58,7 @@ module Pinnacle
56
58
  )
57
59
  end
58
60
 
59
- # Serialize an instance of SendRcsCardOptionsStandaloneCard to a JSON object
61
+ # Serialize an instance of RichStandaloneCardOptions to a JSON object
60
62
  #
61
63
  # @return [String]
62
64
  def to_json(*_args)
@@ -7,7 +7,7 @@ require "json"
7
7
  module Pinnacle
8
8
  module Types
9
9
  # Message containing longer text content with optional quick reply buttons.
10
- class RcsTextContent
10
+ class RichText
11
11
  # @return [Array<Pinnacle::Types::RichButton>] List of interactive quick reply buttons in the message.
12
12
  attr_reader :quick_replies
13
13
  # @return [String] Text content of the RCS message.
@@ -23,7 +23,7 @@ module Pinnacle
23
23
  # @param quick_replies [Array<Pinnacle::Types::RichButton>] List of interactive quick reply buttons in the message.
24
24
  # @param text [String] Text content of the RCS message.
25
25
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
26
- # @return [Pinnacle::Types::RcsTextContent]
26
+ # @return [Pinnacle::Types::RichText]
27
27
  def initialize(quick_replies:, text:, additional_properties: nil)
28
28
  @quick_replies = quick_replies
29
29
  @text = text
@@ -31,10 +31,10 @@ module Pinnacle
31
31
  @_field_set = { "quickReplies": quick_replies, "text": text }
32
32
  end
33
33
 
34
- # Deserialize a JSON object to an instance of RcsTextContent
34
+ # Deserialize a JSON object to an instance of RichText
35
35
  #
36
36
  # @param json_object [String]
37
- # @return [Pinnacle::Types::RcsTextContent]
37
+ # @return [Pinnacle::Types::RichText]
38
38
  def self.from_json(json_object:)
39
39
  struct = JSON.parse(json_object, object_class: OpenStruct)
40
40
  parsed_json = JSON.parse(json_object)
@@ -50,7 +50,7 @@ module Pinnacle
50
50
  )
51
51
  end
52
52
 
53
- # Serialize an instance of RcsTextContent to a JSON object
53
+ # Serialize an instance of RichText to a JSON object
54
54
  #
55
55
  # @return [String]
56
56
  def to_json(*_args)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "rcs_base_options"
3
+ require_relative "send_rich_message_options"
4
4
  require_relative "rich_button"
5
5
  require "ostruct"
6
6
  require "json"
@@ -10,7 +10,7 @@ module Pinnacle
10
10
  class RichTextMessage
11
11
  # @return [String] Your RCS agent ID which must be prefixed with 'agent_'.
12
12
  attr_reader :from
13
- # @return [Pinnacle::Types::RcsBaseOptions] Configure how your RCS message is sent and tracked.
13
+ # @return [Pinnacle::Types::SendRichMessageOptions] Configure how your RCS message is sent and tracked.
14
14
  attr_reader :options
15
15
  # @return [String] Recipient's phone number in E.164 format.
16
16
  attr_reader :to
@@ -27,7 +27,7 @@ module Pinnacle
27
27
  OMIT = Object.new
28
28
 
29
29
  # @param from [String] Your RCS agent ID which must be prefixed with 'agent_'.
30
- # @param options [Pinnacle::Types::RcsBaseOptions] Configure how your RCS message is sent and tracked.
30
+ # @param options [Pinnacle::Types::SendRichMessageOptions] Configure how your RCS message is sent and tracked.
31
31
  # @param to [String] Recipient's phone number in E.164 format.
32
32
  # @param quick_replies [Array<Pinnacle::Types::RichButton>] List of interactive quick reply buttons in the message.
33
33
  # @param text [String] Text content of the RCS message.
@@ -63,7 +63,7 @@ module Pinnacle
63
63
  options = nil
64
64
  else
65
65
  options = parsed_json["options"].to_json
66
- options = Pinnacle::Types::RcsBaseOptions.from_json(json_object: options)
66
+ options = Pinnacle::Types::SendRichMessageOptions.from_json(json_object: options)
67
67
  end
68
68
  to = parsed_json["to"]
69
69
  quick_replies = parsed_json["quickReplies"]&.map do |item|
@@ -96,7 +96,7 @@ module Pinnacle
96
96
  # @return [Void]
97
97
  def self.validate_raw(obj:)
98
98
  obj.from.is_a?(String) != false || raise("Passed value for field obj.from is not the expected type, validation failed.")
99
- obj.options.nil? || Pinnacle::Types::RcsBaseOptions.validate_raw(obj: obj.options)
99
+ obj.options.nil? || Pinnacle::Types::SendRichMessageOptions.validate_raw(obj: obj.options)
100
100
  obj.to.is_a?(String) != false || raise("Passed value for field obj.to is not the expected type, validation failed.")
101
101
  obj.quick_replies.is_a?(Array) != false || raise("Passed value for field obj.quick_replies is not the expected type, validation failed.")
102
102
  obj.text.is_a?(String) != false || raise("Passed value for field obj.text is not the expected type, validation failed.")
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Pinnacle
7
+ module Types
8
+ # Response returned when a scheduled message or blast is cancelled.
9
+ class ScheduleCancelResult
10
+ # @return [Boolean] Indicates whether the schedule was successfully cancelled.
11
+ attr_reader :success
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 success [Boolean] Indicates whether the schedule was successfully cancelled.
21
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
22
+ # @return [Pinnacle::Types::ScheduleCancelResult]
23
+ def initialize(success:, additional_properties: nil)
24
+ @success = success
25
+ @additional_properties = additional_properties
26
+ @_field_set = { "success": success }
27
+ end
28
+
29
+ # Deserialize a JSON object to an instance of ScheduleCancelResult
30
+ #
31
+ # @param json_object [String]
32
+ # @return [Pinnacle::Types::ScheduleCancelResult]
33
+ def self.from_json(json_object:)
34
+ struct = JSON.parse(json_object, object_class: OpenStruct)
35
+ parsed_json = JSON.parse(json_object)
36
+ success = parsed_json["success"]
37
+ new(success: success, additional_properties: struct)
38
+ end
39
+
40
+ # Serialize an instance of ScheduleCancelResult to a JSON object
41
+ #
42
+ # @return [String]
43
+ def to_json(*_args)
44
+ @_field_set&.to_json
45
+ end
46
+
47
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
48
+ # hash and check each fields type against the current object's property
49
+ # definitions.
50
+ #
51
+ # @param obj [Object]
52
+ # @return [Void]
53
+ def self.validate_raw(obj:)
54
+ obj.success.is_a?(Boolean) != false || raise("Passed value for field obj.success is not the expected type, validation failed.")
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "scheduled_blast_response_config"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Pinnacle
8
+ module Types
9
+ # Response returned when a blast is scheduled for future delivery.
10
+ class ScheduledBlastDetails
11
+ # @return [String] Unique identifier for the scheduled blast. This identifier is a string that
12
+ # always begins with the prefix `msg_sched_`, for example: `msg_sched_xxxxx`.
13
+ attr_reader :schedule_id
14
+ # @return [Pinnacle::Types::ScheduledBlastResponseConfig] The schedule configuration for the blast.
15
+ attr_reader :config
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 schedule_id [String] Unique identifier for the scheduled blast. This identifier is a string that
25
+ # always begins with the prefix `msg_sched_`, for example: `msg_sched_xxxxx`.
26
+ # @param config [Pinnacle::Types::ScheduledBlastResponseConfig] The schedule configuration for the blast.
27
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
28
+ # @return [Pinnacle::Types::ScheduledBlastDetails]
29
+ def initialize(schedule_id:, config:, additional_properties: nil)
30
+ @schedule_id = schedule_id
31
+ @config = config
32
+ @additional_properties = additional_properties
33
+ @_field_set = { "scheduleId": schedule_id, "config": config }
34
+ end
35
+
36
+ # Deserialize a JSON object to an instance of ScheduledBlastDetails
37
+ #
38
+ # @param json_object [String]
39
+ # @return [Pinnacle::Types::ScheduledBlastDetails]
40
+ def self.from_json(json_object:)
41
+ struct = JSON.parse(json_object, object_class: OpenStruct)
42
+ parsed_json = JSON.parse(json_object)
43
+ schedule_id = parsed_json["scheduleId"]
44
+ if parsed_json["config"].nil?
45
+ config = nil
46
+ else
47
+ config = parsed_json["config"].to_json
48
+ config = Pinnacle::Types::ScheduledBlastResponseConfig.from_json(json_object: config)
49
+ end
50
+ new(
51
+ schedule_id: schedule_id,
52
+ config: config,
53
+ additional_properties: struct
54
+ )
55
+ end
56
+
57
+ # Serialize an instance of ScheduledBlastDetails 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.schedule_id.is_a?(String) != false || raise("Passed value for field obj.schedule_id is not the expected type, validation failed.")
72
+ Pinnacle::Types::ScheduledBlastResponseConfig.validate_raw(obj: obj.config)
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,89 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Pinnacle
7
+ module Types
8
+ # The schedule configuration for the blast.
9
+ class ScheduledBlastResponseConfig
10
+ # @return [String] When the first message will be sent.
11
+ attr_reader :send_at
12
+ # @return [String] AWS cron expression for recurring schedules.
13
+ attr_reader :recurrence
14
+ # @return [String] IANA timezone identifier.
15
+ attr_reader :timezone
16
+ # @return [String] When recurring schedules will stop.
17
+ attr_reader :end_date
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 send_at [String] When the first message will be sent.
27
+ # @param recurrence [String] AWS cron expression for recurring schedules.
28
+ # @param timezone [String] IANA timezone identifier.
29
+ # @param end_date [String] When recurring schedules will stop.
30
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
31
+ # @return [Pinnacle::Types::ScheduledBlastResponseConfig]
32
+ def initialize(send_at: OMIT, recurrence: OMIT, timezone: OMIT, end_date: OMIT, additional_properties: nil)
33
+ @send_at = send_at if send_at != OMIT
34
+ @recurrence = recurrence if recurrence != OMIT
35
+ @timezone = timezone if timezone != OMIT
36
+ @end_date = end_date if end_date != OMIT
37
+ @additional_properties = additional_properties
38
+ @_field_set = {
39
+ "sendAt": send_at,
40
+ "recurrence": recurrence,
41
+ "timezone": timezone,
42
+ "endDate": end_date
43
+ }.reject do |_k, v|
44
+ v == OMIT
45
+ end
46
+ end
47
+
48
+ # Deserialize a JSON object to an instance of ScheduledBlastResponseConfig
49
+ #
50
+ # @param json_object [String]
51
+ # @return [Pinnacle::Types::ScheduledBlastResponseConfig]
52
+ def self.from_json(json_object:)
53
+ struct = JSON.parse(json_object, object_class: OpenStruct)
54
+ parsed_json = JSON.parse(json_object)
55
+ send_at = parsed_json["sendAt"]
56
+ recurrence = parsed_json["recurrence"]
57
+ timezone = parsed_json["timezone"]
58
+ end_date = parsed_json["endDate"]
59
+ new(
60
+ send_at: send_at,
61
+ recurrence: recurrence,
62
+ timezone: timezone,
63
+ end_date: end_date,
64
+ additional_properties: struct
65
+ )
66
+ end
67
+
68
+ # Serialize an instance of ScheduledBlastResponseConfig to a JSON object
69
+ #
70
+ # @return [String]
71
+ def to_json(*_args)
72
+ @_field_set&.to_json
73
+ end
74
+
75
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
76
+ # hash and check each fields type against the current object's property
77
+ # definitions.
78
+ #
79
+ # @param obj [Object]
80
+ # @return [Void]
81
+ def self.validate_raw(obj:)
82
+ obj.send_at&.is_a?(String) != false || raise("Passed value for field obj.send_at is not the expected type, validation failed.")
83
+ obj.recurrence&.is_a?(String) != false || raise("Passed value for field obj.recurrence is not the expected type, validation failed.")
84
+ obj.timezone&.is_a?(String) != false || raise("Passed value for field obj.timezone is not the expected type, validation failed.")
85
+ obj.end_date&.is_a?(String) != false || raise("Passed value for field obj.end_date is not the expected type, validation failed.")
86
+ end
87
+ end
88
+ end
89
+ end
@@ -6,7 +6,7 @@ require "json"
6
6
 
7
7
  module Pinnacle
8
8
  module Types
9
- class ScheduledMessaage
9
+ class ScheduledMessage
10
10
  # @return [String] Unique identifier for the scheduled send. This identifier is a string that
11
11
  # always begins with the prefix `msg_sched_`, for example: `msg_sched_1234567890`.
12
12
  attr_reader :schedule_id
@@ -24,7 +24,7 @@ module Pinnacle
24
24
  # always begins with the prefix `msg_sched_`, for example: `msg_sched_1234567890`.
25
25
  # @param config [Pinnacle::Types::ScheduledSendResponseConfig] Configuration for the scheduled message.
26
26
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
27
- # @return [Pinnacle::Types::ScheduledMessaage]
27
+ # @return [Pinnacle::Types::ScheduledMessage]
28
28
  def initialize(schedule_id:, config:, additional_properties: nil)
29
29
  @schedule_id = schedule_id
30
30
  @config = config
@@ -32,10 +32,10 @@ module Pinnacle
32
32
  @_field_set = { "scheduleId": schedule_id, "config": config }
33
33
  end
34
34
 
35
- # Deserialize a JSON object to an instance of ScheduledMessaage
35
+ # Deserialize a JSON object to an instance of ScheduledMessage
36
36
  #
37
37
  # @param json_object [String]
38
- # @return [Pinnacle::Types::ScheduledMessaage]
38
+ # @return [Pinnacle::Types::ScheduledMessage]
39
39
  def self.from_json(json_object:)
40
40
  struct = JSON.parse(json_object, object_class: OpenStruct)
41
41
  parsed_json = JSON.parse(json_object)
@@ -53,7 +53,7 @@ module Pinnacle
53
53
  )
54
54
  end
55
55
 
56
- # Serialize an instance of ScheduledMessaage to a JSON object
56
+ # Serialize an instance of ScheduledMessage to a JSON object
57
57
  #
58
58
  # @return [String]
59
59
  def to_json(*_args)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "send_rcs_card_options_standalone_card"
3
+ require_relative "rich_standalone_card_options"
4
4
  require_relative "message_schedule"
5
5
  require_relative "tracking"
6
6
  require "ostruct"
@@ -8,12 +8,14 @@ require "json"
8
8
 
9
9
  module Pinnacle
10
10
  module Types
11
- class SendRcsCardOptions
12
- # @return [Pinnacle::Types::SendRcsCardOptionsStandaloneCard] Configure standalone card layout options for enhanced visual presentation.
11
+ class SendRichCardsOptions
12
+ # @return [Pinnacle::Types::RichStandaloneCardOptions] Configure standalone card layout options for enhanced visual presentation.
13
13
  # > **⚠️ Important Restriction**
14
14
  # >
15
- # > This option is **only valid for single card messages**. Using it with multiple
16
- # cards will cause the request to fail with a validation error.
15
+ # > This option is **only valid for single card messages** with static media.
16
+ # Using it with multiple cards will cause the request to fail with a validation
17
+ # error.
18
+ # > GIFs and videos are not supported and will be rendered as vertical cards.
17
19
  attr_reader :standalone_card
18
20
  # @return [Pinnacle::Types::MessageSchedule]
19
21
  attr_reader :schedule
@@ -36,11 +38,13 @@ module Pinnacle
36
38
 
37
39
  OMIT = Object.new
38
40
 
39
- # @param standalone_card [Pinnacle::Types::SendRcsCardOptionsStandaloneCard] Configure standalone card layout options for enhanced visual presentation.
41
+ # @param standalone_card [Pinnacle::Types::RichStandaloneCardOptions] Configure standalone card layout options for enhanced visual presentation.
40
42
  # > **⚠️ Important Restriction**
41
43
  # >
42
- # > This option is **only valid for single card messages**. Using it with multiple
43
- # cards will cause the request to fail with a validation error.
44
+ # > This option is **only valid for single card messages** with static media.
45
+ # Using it with multiple cards will cause the request to fail with a validation
46
+ # error.
47
+ # > GIFs and videos are not supported and will be rendered as vertical cards.
44
48
  # @param schedule [Pinnacle::Types::MessageSchedule]
45
49
  # @param test_mode [Boolean] Send via the test agent to whitelisted test devices. Useful for development and
46
50
  # debugging.
@@ -50,7 +54,7 @@ module Pinnacle
50
54
  # @param validate [Boolean] Validate your message for any unsupported files. <br>
51
55
  # If failed, errors will be thrown and the message will not send.
52
56
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
53
- # @return [Pinnacle::Types::SendRcsCardOptions]
57
+ # @return [Pinnacle::Types::SendRichCardsOptions]
54
58
  def initialize(standalone_card: OMIT, schedule: OMIT, test_mode: OMIT, tracking: OMIT, transcode: OMIT,
55
59
  validate: OMIT, additional_properties: nil)
56
60
  @standalone_card = standalone_card if standalone_card != OMIT
@@ -72,10 +76,10 @@ module Pinnacle
72
76
  end
73
77
  end
74
78
 
75
- # Deserialize a JSON object to an instance of SendRcsCardOptions
79
+ # Deserialize a JSON object to an instance of SendRichCardsOptions
76
80
  #
77
81
  # @param json_object [String]
78
- # @return [Pinnacle::Types::SendRcsCardOptions]
82
+ # @return [Pinnacle::Types::SendRichCardsOptions]
79
83
  def self.from_json(json_object:)
80
84
  struct = JSON.parse(json_object, object_class: OpenStruct)
81
85
  parsed_json = JSON.parse(json_object)
@@ -83,7 +87,7 @@ module Pinnacle
83
87
  standalone_card = nil
84
88
  else
85
89
  standalone_card = parsed_json["standalone_card"].to_json
86
- standalone_card = Pinnacle::Types::SendRcsCardOptionsStandaloneCard.from_json(json_object: standalone_card)
90
+ standalone_card = Pinnacle::Types::RichStandaloneCardOptions.from_json(json_object: standalone_card)
87
91
  end
88
92
  if parsed_json["schedule"].nil?
89
93
  schedule = nil
@@ -106,7 +110,7 @@ module Pinnacle
106
110
  )
107
111
  end
108
112
 
109
- # Serialize an instance of SendRcsCardOptions to a JSON object
113
+ # Serialize an instance of SendRichCardsOptions to a JSON object
110
114
  #
111
115
  # @return [String]
112
116
  def to_json(*_args)
@@ -120,7 +124,7 @@ module Pinnacle
120
124
  # @param obj [Object]
121
125
  # @return [Void]
122
126
  def self.validate_raw(obj:)
123
- obj.standalone_card.nil? || Pinnacle::Types::SendRcsCardOptionsStandaloneCard.validate_raw(obj: obj.standalone_card)
127
+ obj.standalone_card.nil? || Pinnacle::Types::RichStandaloneCardOptions.validate_raw(obj: obj.standalone_card)
124
128
  obj.schedule.nil? || Pinnacle::Types::MessageSchedule.validate_raw(obj: obj.schedule)
125
129
  obj.test_mode&.is_a?(Boolean) != false || raise("Passed value for field obj.test_mode is not the expected type, validation failed.")
126
130
  obj.tracking&.is_a?(Pinnacle::Types::Tracking) != false || raise("Passed value for field obj.tracking is not the expected type, validation failed.")