rcs 2.0.0.pre.rc.1 → 2.0.0.pre.rc.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 +6 -6
- data/lib/rcs/brands/types/{autofill_brand_schema_options.rb → autofill_brand_options.rb} +5 -5
- data/lib/rcs/campaigns/dlc/client.rb +12 -12
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_schema_keywords_help.rb → upsert_dlc_campaign_help_keywords.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_schema_keywords.rb → upsert_dlc_campaign_keywords.rb} +20 -20
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_schema_links.rb → upsert_dlc_campaign_links.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_schema_keywords_opt_in.rb → upsert_dlc_campaign_opt_in_keywords.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_schema_keywords_opt_out.rb → upsert_dlc_campaign_opt_out_keywords.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_schema_options.rb → upsert_dlc_campaign_options.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_schema_use_case.rb → upsert_dlc_campaign_use_case.rb} +5 -5
- data/lib/rcs/campaigns/rcs/client.rb +25 -25
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_agent_emails_item.rb → rcs_agent_email.rb} +5 -5
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_agent_phones_item.rb → rcs_agent_phone.rb} +5 -5
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_agent_websites_item.rb → rcs_agent_website.rb} +5 -5
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_agent.rb → upsert_rcs_agent.rb} +17 -17
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_links.rb → upsert_rcs_links.rb} +5 -5
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_opt_in.rb → upsert_rcs_opt_in.rb} +13 -13
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_opt_out.rb → upsert_rcs_opt_out.rb} +5 -5
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_use_case.rb → upsert_rcs_use_case.rb} +5 -5
- data/lib/rcs/campaigns/toll_free/client.rb +4 -4
- data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +10 -10
- data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_opt_in.rb +8 -8
- data/lib/rcs/conversations/client.rb +2 -2
- data/lib/rcs/messages/client.rb +24 -3
- data/lib/rcs/messages/mms/client.rb +118 -0
- data/lib/rcs/messages/{send/types/send_mms_response.rb → mms/types/mms_send_response.rb} +4 -4
- data/lib/rcs/messages/{send/types/send_mms_schema_options.rb → mms/types/send_mms_options.rb} +6 -6
- data/lib/rcs/messages/rcs/client.rb +68 -0
- data/lib/rcs/messages/{send/types/send_rcs_response.rb → rcs/types/rcs_send_response.rb} +4 -4
- data/lib/rcs/messages/sms/client.rb +198 -0
- data/lib/rcs/messages/{send/types/send_sms_schema_options.rb → sms/types/send_sms_options.rb} +6 -6
- data/lib/rcs/messages/{send/types/send_sms_response.rb → sms/types/sms_send_response.rb} +4 -4
- data/lib/rcs/messages/types/{message_reaction_schema_options.rb → react_message_options.rb} +5 -5
- data/lib/rcs/phone_numbers/client.rb +32 -18
- data/lib/rcs/phone_numbers/types/{phone_details_schema_options_enhanced_contact_info.rb → enhanced_contact_info.rb} +5 -7
- data/lib/rcs/phone_numbers/types/{phone_details_schema_options.rb → retrieve_phone_number_details_options.rb} +10 -10
- data/lib/rcs/phone_numbers/types/{search_schema_number.rb → search_phone_number_by_digits.rb} +5 -5
- data/lib/rcs/phone_numbers/types/{search_schema_location.rb → search_phone_number_by_location.rb} +5 -5
- data/lib/rcs/phone_numbers/types/{search_schema_options.rb → search_phone_number_options.rb} +5 -5
- data/lib/rcs/phone_numbers/webhook/client.rb +2 -2
- data/lib/rcs/tools/file/client.rb +3 -3
- data/lib/rcs/tools/file/types/{file_upload_schema_options_download.rb → download_options.rb} +5 -5
- data/lib/rcs/tools/file/types/{file_upload_schema_options.rb → upload_file_options.rb} +10 -10
- data/lib/rcs/types/{attach_webhook_schema_webhook_id.rb → attach_webhook_by_id_params.rb} +5 -5
- data/lib/rcs/types/attach_webhook_params.rb +8 -8
- data/lib/rcs/types/{get_conversation_request_id.rb → conversation_by_id_params.rb} +5 -5
- data/lib/rcs/types/{get_conversation_request_recipient.rb → conversation_by_participants_params.rb} +5 -5
- data/lib/rcs/types/{attach_webhook_schema_name.rb → create_and_attach_webhook_by_url_params.rb} +5 -5
- data/lib/rcs/types/get_conversation_params.rb +8 -8
- data/lib/rcs/types/link_click_event.rb +8 -8
- data/lib/rcs/types/message.rb +8 -8
- data/lib/rcs/types/rcs.rb +12 -12
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_in.rb +8 -8
- data/lib/rcs/types/rcs_campaign_schema_opt_in.rb +8 -8
- data/lib/rcs/types/rcs_cards.rb +4 -4
- data/lib/rcs/types/rcs_cards_cards_item.rb +4 -4
- data/lib/rcs/types/rcs_cards_content.rb +4 -4
- data/lib/rcs/types/rcs_cards_content_cards_item.rb +4 -4
- data/lib/rcs/types/rcs_media_content.rb +4 -4
- data/lib/rcs/types/rcs_text_content.rb +4 -4
- data/lib/rcs/types/{rcs_button_content.rb → rich_button.rb} +10 -10
- data/lib/rcs/types/{rcs_card.rb → rich_cards_message.rb} +9 -9
- data/lib/rcs/types/{rcs_media.rb → rich_media_message.rb} +9 -9
- data/lib/rcs/types/{rcs_text.rb → rich_text_message.rb} +9 -9
- data/lib/rcs/types/toll_free_campaign.rb +10 -10
- data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +10 -10
- data/lib/rcs/types/{nullable_contact.rb → upsert_contact.rb} +5 -5
- data/lib/rcs/types/{toll_free_campaign_schema_opt_in.rb → upsert_toll_free_campaign_opt_in.rb} +13 -13
- data/lib/rcs/types/{toll_free_campaign_schema_use_case.rb → upsert_toll_free_campaign_use_case.rb} +5 -5
- data/lib/rcs.rb +0 -7
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +40 -40
- metadata +43 -45
- data/lib/rcs/message/client.rb +0 -30
- data/lib/rcs/message/sms/client.rb +0 -96
- data/lib/rcs/messages/send/client.rb +0 -318
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "
|
3
|
+
require_relative "rich_button"
|
4
4
|
require_relative "rcs_media_details_content"
|
5
5
|
require "ostruct"
|
6
6
|
require "json"
|
@@ -9,7 +9,7 @@ module Pinnacle
|
|
9
9
|
module Types
|
10
10
|
# Individual card containing title, optional media, and action buttons.
|
11
11
|
class RcsCardsContentCardsItem
|
12
|
-
# @return [Array<Pinnacle::Types::
|
12
|
+
# @return [Array<Pinnacle::Types::RichButton>] Action buttons attached to the card.
|
13
13
|
attr_reader :buttons
|
14
14
|
# @return [Pinnacle::Types::RcsMediaDetailsContent]
|
15
15
|
attr_reader :media
|
@@ -25,7 +25,7 @@ module Pinnacle
|
|
25
25
|
|
26
26
|
OMIT = Object.new
|
27
27
|
|
28
|
-
# @param buttons [Array<Pinnacle::Types::
|
28
|
+
# @param buttons [Array<Pinnacle::Types::RichButton>] Action buttons attached to the card.
|
29
29
|
# @param media [Pinnacle::Types::RcsMediaDetailsContent]
|
30
30
|
# @param subtitle [String] Secondary text displayed below the title for additional context.
|
31
31
|
# @param title [String] Title displayed on the card.
|
@@ -51,7 +51,7 @@ module Pinnacle
|
|
51
51
|
parsed_json = JSON.parse(json_object)
|
52
52
|
buttons = parsed_json["buttons"]&.map do |item|
|
53
53
|
item = item.to_json
|
54
|
-
Pinnacle::Types::
|
54
|
+
Pinnacle::Types::RichButton.from_json(json_object: item)
|
55
55
|
end
|
56
56
|
if parsed_json["media"].nil?
|
57
57
|
media = nil
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "rcs_media_details_content"
|
4
|
-
require_relative "
|
4
|
+
require_relative "rich_button"
|
5
5
|
require "ostruct"
|
6
6
|
require "json"
|
7
7
|
|
@@ -14,7 +14,7 @@ module Pinnacle
|
|
14
14
|
class RcsMediaContent
|
15
15
|
# @return [Pinnacle::Types::RcsMediaDetailsContent]
|
16
16
|
attr_reader :media
|
17
|
-
# @return [Array<Pinnacle::Types::
|
17
|
+
# @return [Array<Pinnacle::Types::RichButton>] List of interactive quick reply buttons in the message.
|
18
18
|
attr_reader :quick_replies
|
19
19
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
20
20
|
attr_reader :additional_properties
|
@@ -25,7 +25,7 @@ module Pinnacle
|
|
25
25
|
OMIT = Object.new
|
26
26
|
|
27
27
|
# @param media [Pinnacle::Types::RcsMediaDetailsContent]
|
28
|
-
# @param quick_replies [Array<Pinnacle::Types::
|
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
30
|
# @return [Pinnacle::Types::RcsMediaContent]
|
31
31
|
def initialize(media:, quick_replies:, additional_properties: nil)
|
@@ -50,7 +50,7 @@ module Pinnacle
|
|
50
50
|
end
|
51
51
|
quick_replies = parsed_json["quickReplies"]&.map do |item|
|
52
52
|
item = item.to_json
|
53
|
-
Pinnacle::Types::
|
53
|
+
Pinnacle::Types::RichButton.from_json(json_object: item)
|
54
54
|
end
|
55
55
|
new(
|
56
56
|
media: media,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "
|
3
|
+
require_relative "rich_button"
|
4
4
|
require "ostruct"
|
5
5
|
require "json"
|
6
6
|
|
@@ -8,7 +8,7 @@ module Pinnacle
|
|
8
8
|
module Types
|
9
9
|
# Message containing longer text content with optional quick reply buttons.
|
10
10
|
class RcsTextContent
|
11
|
-
# @return [Array<Pinnacle::Types::
|
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.
|
14
14
|
attr_reader :text
|
@@ -20,7 +20,7 @@ module Pinnacle
|
|
20
20
|
|
21
21
|
OMIT = Object.new
|
22
22
|
|
23
|
-
# @param quick_replies [Array<Pinnacle::Types::
|
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
26
|
# @return [Pinnacle::Types::RcsTextContent]
|
@@ -40,7 +40,7 @@ module Pinnacle
|
|
40
40
|
parsed_json = JSON.parse(json_object)
|
41
41
|
quick_replies = parsed_json["quickReplies"]&.map do |item|
|
42
42
|
item = item.to_json
|
43
|
-
Pinnacle::Types::
|
43
|
+
Pinnacle::Types::RichButton.from_json(json_object: item)
|
44
44
|
end
|
45
45
|
text = parsed_json["text"]
|
46
46
|
new(
|
@@ -10,7 +10,7 @@ require_relative "rcs_button_send_location"
|
|
10
10
|
|
11
11
|
module Pinnacle
|
12
12
|
module Types
|
13
|
-
class
|
13
|
+
class RichButton
|
14
14
|
# @return [Object]
|
15
15
|
attr_reader :member
|
16
16
|
# @return [String]
|
@@ -21,16 +21,16 @@ module Pinnacle
|
|
21
21
|
|
22
22
|
# @param member [Object]
|
23
23
|
# @param discriminant [String]
|
24
|
-
# @return [Pinnacle::Types::
|
24
|
+
# @return [Pinnacle::Types::RichButton]
|
25
25
|
def initialize(member:, discriminant:)
|
26
26
|
@member = member
|
27
27
|
@discriminant = discriminant
|
28
28
|
end
|
29
29
|
|
30
|
-
# Deserialize a JSON object to an instance of
|
30
|
+
# Deserialize a JSON object to an instance of RichButton
|
31
31
|
#
|
32
32
|
# @param json_object [String]
|
33
|
-
# @return [Pinnacle::Types::
|
33
|
+
# @return [Pinnacle::Types::RichButton]
|
34
34
|
def self.from_json(json_object:)
|
35
35
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
36
36
|
member = case struct.type
|
@@ -109,37 +109,37 @@ module Pinnacle
|
|
109
109
|
end
|
110
110
|
|
111
111
|
# @param member [Pinnacle::Types::RcsButtonOpenUrl]
|
112
|
-
# @return [Pinnacle::Types::
|
112
|
+
# @return [Pinnacle::Types::RichButton]
|
113
113
|
def self.open_url(member:)
|
114
114
|
new(member: member, discriminant: "openUrl")
|
115
115
|
end
|
116
116
|
|
117
117
|
# @param member [Pinnacle::Types::RcsButtonCall]
|
118
|
-
# @return [Pinnacle::Types::
|
118
|
+
# @return [Pinnacle::Types::RichButton]
|
119
119
|
def self.call(member:)
|
120
120
|
new(member: member, discriminant: "call")
|
121
121
|
end
|
122
122
|
|
123
123
|
# @param member [Pinnacle::Types::RcsButtonTrigger]
|
124
|
-
# @return [Pinnacle::Types::
|
124
|
+
# @return [Pinnacle::Types::RichButton]
|
125
125
|
def self.trigger(member:)
|
126
126
|
new(member: member, discriminant: "trigger")
|
127
127
|
end
|
128
128
|
|
129
129
|
# @param member [Pinnacle::Types::RcsButtonRequestUserLocation]
|
130
|
-
# @return [Pinnacle::Types::
|
130
|
+
# @return [Pinnacle::Types::RichButton]
|
131
131
|
def self.request_user_location(member:)
|
132
132
|
new(member: member, discriminant: "requestUserLocation")
|
133
133
|
end
|
134
134
|
|
135
135
|
# @param member [Pinnacle::Types::RcsButtonScheduleEvent]
|
136
|
-
# @return [Pinnacle::Types::
|
136
|
+
# @return [Pinnacle::Types::RichButton]
|
137
137
|
def self.schedule_event(member:)
|
138
138
|
new(member: member, discriminant: "scheduleEvent")
|
139
139
|
end
|
140
140
|
|
141
141
|
# @param member [Pinnacle::Types::RcsButtonSendLocation]
|
142
|
-
# @return [Pinnacle::Types::
|
142
|
+
# @return [Pinnacle::Types::RichButton]
|
143
143
|
def self.send_location(member:)
|
144
144
|
new(member: member, discriminant: "sendLocation")
|
145
145
|
end
|
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
require_relative "rcs_base_options"
|
4
4
|
require_relative "rcs_cards_cards_item"
|
5
|
-
require_relative "
|
5
|
+
require_relative "rich_button"
|
6
6
|
require "ostruct"
|
7
7
|
require "json"
|
8
8
|
|
9
9
|
module Pinnacle
|
10
10
|
module Types
|
11
|
-
class
|
11
|
+
class RichCardsMessage
|
12
12
|
# @return [String] Your RCS agent ID which must be prefixed with 'agent_'.
|
13
13
|
attr_reader :from
|
14
14
|
# @return [Pinnacle::Types::RcsBaseOptions] Configure how your RCS message is sent and tracked.
|
@@ -17,7 +17,7 @@ module Pinnacle
|
|
17
17
|
attr_reader :to
|
18
18
|
# @return [Array<Pinnacle::Types::RcsCardsCardsItem>] Collection of cards attached to the message.
|
19
19
|
attr_reader :cards
|
20
|
-
# @return [Array<Pinnacle::Types::
|
20
|
+
# @return [Array<Pinnacle::Types::RichButton>] List of interactive quick reply buttons in the message.
|
21
21
|
attr_reader :quick_replies
|
22
22
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
23
23
|
attr_reader :additional_properties
|
@@ -31,9 +31,9 @@ module Pinnacle
|
|
31
31
|
# @param options [Pinnacle::Types::RcsBaseOptions] Configure how your RCS message is sent and tracked.
|
32
32
|
# @param to [String] Recipient's phone number in E.164 format.
|
33
33
|
# @param cards [Array<Pinnacle::Types::RcsCardsCardsItem>] Collection of cards attached to the message.
|
34
|
-
# @param quick_replies [Array<Pinnacle::Types::
|
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
|
-
# @return [Pinnacle::Types::
|
36
|
+
# @return [Pinnacle::Types::RichCardsMessage]
|
37
37
|
def initialize(from:, to:, cards:, quick_replies:, options: OMIT, additional_properties: nil)
|
38
38
|
@from = from
|
39
39
|
@options = options if options != OMIT
|
@@ -52,10 +52,10 @@ module Pinnacle
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
-
# Deserialize a JSON object to an instance of
|
55
|
+
# Deserialize a JSON object to an instance of RichCardsMessage
|
56
56
|
#
|
57
57
|
# @param json_object [String]
|
58
|
-
# @return [Pinnacle::Types::
|
58
|
+
# @return [Pinnacle::Types::RichCardsMessage]
|
59
59
|
def self.from_json(json_object:)
|
60
60
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
61
61
|
parsed_json = JSON.parse(json_object)
|
@@ -73,7 +73,7 @@ module Pinnacle
|
|
73
73
|
end
|
74
74
|
quick_replies = parsed_json["quickReplies"]&.map do |item|
|
75
75
|
item = item.to_json
|
76
|
-
Pinnacle::Types::
|
76
|
+
Pinnacle::Types::RichButton.from_json(json_object: item)
|
77
77
|
end
|
78
78
|
new(
|
79
79
|
from: from,
|
@@ -85,7 +85,7 @@ module Pinnacle
|
|
85
85
|
)
|
86
86
|
end
|
87
87
|
|
88
|
-
# Serialize an instance of
|
88
|
+
# Serialize an instance of RichCardsMessage to a JSON object
|
89
89
|
#
|
90
90
|
# @return [String]
|
91
91
|
def to_json(*_args)
|
@@ -1,18 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "
|
3
|
+
require_relative "rich_button"
|
4
4
|
require_relative "rcs_base_options"
|
5
5
|
require "ostruct"
|
6
6
|
require "json"
|
7
7
|
|
8
8
|
module Pinnacle
|
9
9
|
module Types
|
10
|
-
class
|
10
|
+
class RichMediaMessage
|
11
11
|
# @return [String] Media file URLs to send. <br>
|
12
12
|
# See [supported media
|
13
13
|
# types](https://app.pinnacle.sh/supported-file-types?type=RCS-MEDIA).
|
14
14
|
attr_reader :media
|
15
|
-
# @return [Array<Pinnacle::Types::
|
15
|
+
# @return [Array<Pinnacle::Types::RichButton>] List of interactive quick reply buttons in the message.
|
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
|
@@ -31,12 +31,12 @@ module Pinnacle
|
|
31
31
|
# @param media [String] Media file URLs to send. <br>
|
32
32
|
# See [supported media
|
33
33
|
# types](https://app.pinnacle.sh/supported-file-types?type=RCS-MEDIA).
|
34
|
-
# @param quick_replies [Array<Pinnacle::Types::
|
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
36
|
# @param options [Pinnacle::Types::RcsBaseOptions] 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
|
-
# @return [Pinnacle::Types::
|
39
|
+
# @return [Pinnacle::Types::RichMediaMessage]
|
40
40
|
def initialize(media:, quick_replies:, from:, to:, options: OMIT, additional_properties: nil)
|
41
41
|
@media = media
|
42
42
|
@quick_replies = quick_replies
|
@@ -55,17 +55,17 @@ module Pinnacle
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
# Deserialize a JSON object to an instance of
|
58
|
+
# Deserialize a JSON object to an instance of RichMediaMessage
|
59
59
|
#
|
60
60
|
# @param json_object [String]
|
61
|
-
# @return [Pinnacle::Types::
|
61
|
+
# @return [Pinnacle::Types::RichMediaMessage]
|
62
62
|
def self.from_json(json_object:)
|
63
63
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
64
64
|
parsed_json = JSON.parse(json_object)
|
65
65
|
media = parsed_json["media"]
|
66
66
|
quick_replies = parsed_json["quickReplies"]&.map do |item|
|
67
67
|
item = item.to_json
|
68
|
-
Pinnacle::Types::
|
68
|
+
Pinnacle::Types::RichButton.from_json(json_object: item)
|
69
69
|
end
|
70
70
|
from = parsed_json["from"]
|
71
71
|
if parsed_json["options"].nil?
|
@@ -85,7 +85,7 @@ module Pinnacle
|
|
85
85
|
)
|
86
86
|
end
|
87
87
|
|
88
|
-
# Serialize an instance of
|
88
|
+
# Serialize an instance of RichMediaMessage to a JSON object
|
89
89
|
#
|
90
90
|
# @return [String]
|
91
91
|
def to_json(*_args)
|
@@ -1,20 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "rcs_base_options"
|
4
|
-
require_relative "
|
4
|
+
require_relative "rich_button"
|
5
5
|
require "ostruct"
|
6
6
|
require "json"
|
7
7
|
|
8
8
|
module Pinnacle
|
9
9
|
module Types
|
10
|
-
class
|
10
|
+
class RichTextMessage
|
11
11
|
# @return [String] Your RCS agent ID which must be prefixed with 'agent_'.
|
12
12
|
attr_reader :from
|
13
13
|
# @return [Pinnacle::Types::RcsBaseOptions] 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
|
17
|
-
# @return [Array<Pinnacle::Types::
|
17
|
+
# @return [Array<Pinnacle::Types::RichButton>] List of interactive quick reply buttons in the message.
|
18
18
|
attr_reader :quick_replies
|
19
19
|
# @return [String] Text content of the RCS message.
|
20
20
|
attr_reader :text
|
@@ -29,10 +29,10 @@ module Pinnacle
|
|
29
29
|
# @param from [String] Your RCS agent ID which must be prefixed with 'agent_'.
|
30
30
|
# @param options [Pinnacle::Types::RcsBaseOptions] Configure how your RCS message is sent and tracked.
|
31
31
|
# @param to [String] Recipient's phone number in E.164 format.
|
32
|
-
# @param quick_replies [Array<Pinnacle::Types::
|
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.
|
34
34
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
35
|
-
# @return [Pinnacle::Types::
|
35
|
+
# @return [Pinnacle::Types::RichTextMessage]
|
36
36
|
def initialize(from:, to:, quick_replies:, text:, options: OMIT, additional_properties: nil)
|
37
37
|
@from = from
|
38
38
|
@options = options if options != OMIT
|
@@ -51,10 +51,10 @@ module Pinnacle
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
-
# Deserialize a JSON object to an instance of
|
54
|
+
# Deserialize a JSON object to an instance of RichTextMessage
|
55
55
|
#
|
56
56
|
# @param json_object [String]
|
57
|
-
# @return [Pinnacle::Types::
|
57
|
+
# @return [Pinnacle::Types::RichTextMessage]
|
58
58
|
def self.from_json(json_object:)
|
59
59
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
60
60
|
parsed_json = JSON.parse(json_object)
|
@@ -68,7 +68,7 @@ module Pinnacle
|
|
68
68
|
to = parsed_json["to"]
|
69
69
|
quick_replies = parsed_json["quickReplies"]&.map do |item|
|
70
70
|
item = item.to_json
|
71
|
-
Pinnacle::Types::
|
71
|
+
Pinnacle::Types::RichButton.from_json(json_object: item)
|
72
72
|
end
|
73
73
|
text = parsed_json["text"]
|
74
74
|
new(
|
@@ -81,7 +81,7 @@ module Pinnacle
|
|
81
81
|
)
|
82
82
|
end
|
83
83
|
|
84
|
-
# Serialize an instance of
|
84
|
+
# Serialize an instance of RichTextMessage to a JSON object
|
85
85
|
#
|
86
86
|
# @return [String]
|
87
87
|
def to_json(*_args)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "message_volume_enum"
|
4
|
-
require_relative "
|
5
|
-
require_relative "
|
4
|
+
require_relative "upsert_toll_free_campaign_opt_in"
|
5
|
+
require_relative "upsert_toll_free_campaign_use_case"
|
6
6
|
require "ostruct"
|
7
7
|
require "json"
|
8
8
|
|
@@ -15,11 +15,11 @@ module Pinnacle
|
|
15
15
|
attr_reader :monthly_volume
|
16
16
|
# @return [String] Display name of the campaign.
|
17
17
|
attr_reader :name
|
18
|
-
# @return [Pinnacle::Types::
|
18
|
+
# @return [Pinnacle::Types::UpsertTollFreeCampaignOptIn] Opt-in keyword settings.
|
19
19
|
attr_reader :opt_in
|
20
20
|
# @return [String] Explain message that would be sent.
|
21
21
|
attr_reader :production_message_content
|
22
|
-
# @return [Pinnacle::Types::
|
22
|
+
# @return [Pinnacle::Types::UpsertTollFreeCampaignUseCase] Use case classification for the campaign.
|
23
23
|
attr_reader :use_case
|
24
24
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
25
25
|
attr_reader :additional_properties
|
@@ -32,9 +32,9 @@ module Pinnacle
|
|
32
32
|
# @param campaign_id [Integer] Unique identifier for the campaign.
|
33
33
|
# @param monthly_volume [Pinnacle::Types::MessageVolumeEnum]
|
34
34
|
# @param name [String] Display name of the campaign.
|
35
|
-
# @param opt_in [Pinnacle::Types::
|
35
|
+
# @param opt_in [Pinnacle::Types::UpsertTollFreeCampaignOptIn] Opt-in keyword settings.
|
36
36
|
# @param production_message_content [String] Explain message that would be sent.
|
37
|
-
# @param use_case [Pinnacle::Types::
|
37
|
+
# @param use_case [Pinnacle::Types::UpsertTollFreeCampaignUseCase] Use case classification for the campaign.
|
38
38
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
39
39
|
# @return [Pinnacle::Types::TollFreeCampaign]
|
40
40
|
def initialize(campaign_id: OMIT, monthly_volume: OMIT, name: OMIT, opt_in: OMIT,
|
@@ -72,14 +72,14 @@ module Pinnacle
|
|
72
72
|
opt_in = nil
|
73
73
|
else
|
74
74
|
opt_in = parsed_json["optIn"].to_json
|
75
|
-
opt_in = Pinnacle::Types::
|
75
|
+
opt_in = Pinnacle::Types::UpsertTollFreeCampaignOptIn.from_json(json_object: opt_in)
|
76
76
|
end
|
77
77
|
production_message_content = parsed_json["productionMessageContent"]
|
78
78
|
if parsed_json["useCase"].nil?
|
79
79
|
use_case = nil
|
80
80
|
else
|
81
81
|
use_case = parsed_json["useCase"].to_json
|
82
|
-
use_case = Pinnacle::Types::
|
82
|
+
use_case = Pinnacle::Types::UpsertTollFreeCampaignUseCase.from_json(json_object: use_case)
|
83
83
|
end
|
84
84
|
new(
|
85
85
|
campaign_id: campaign_id,
|
@@ -109,9 +109,9 @@ module Pinnacle
|
|
109
109
|
obj.campaign_id&.is_a?(Integer) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
|
110
110
|
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
111
|
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::
|
112
|
+
obj.opt_in.nil? || Pinnacle::Types::UpsertTollFreeCampaignOptIn.validate_raw(obj: obj.opt_in)
|
113
113
|
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::
|
114
|
+
obj.use_case.nil? || Pinnacle::Types::UpsertTollFreeCampaignUseCase.validate_raw(obj: obj.use_case)
|
115
115
|
end
|
116
116
|
end
|
117
117
|
end
|
@@ -3,8 +3,8 @@
|
|
3
3
|
require_relative "extended_brand"
|
4
4
|
require_relative "profile_status_enum"
|
5
5
|
require_relative "message_volume_enum"
|
6
|
-
require_relative "
|
7
|
-
require_relative "
|
6
|
+
require_relative "upsert_toll_free_campaign_opt_in"
|
7
|
+
require_relative "upsert_toll_free_campaign_use_case"
|
8
8
|
require "ostruct"
|
9
9
|
require "json"
|
10
10
|
|
@@ -27,11 +27,11 @@ module Pinnacle
|
|
27
27
|
attr_reader :monthly_volume
|
28
28
|
# @return [String] Display name of the campaign.
|
29
29
|
attr_reader :name
|
30
|
-
# @return [Pinnacle::Types::
|
30
|
+
# @return [Pinnacle::Types::UpsertTollFreeCampaignOptIn] Opt-in keyword settings.
|
31
31
|
attr_reader :opt_in
|
32
32
|
# @return [String] Explain message that would be sent.
|
33
33
|
attr_reader :production_message_content
|
34
|
-
# @return [Pinnacle::Types::
|
34
|
+
# @return [Pinnacle::Types::UpsertTollFreeCampaignUseCase] Use case classification for the campaign.
|
35
35
|
attr_reader :use_case
|
36
36
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
37
37
|
attr_reader :additional_properties
|
@@ -52,9 +52,9 @@ module Pinnacle
|
|
52
52
|
# @param campaign_id [Integer] Unique identifier for the campaign.
|
53
53
|
# @param monthly_volume [Pinnacle::Types::MessageVolumeEnum]
|
54
54
|
# @param name [String] Display name of the campaign.
|
55
|
-
# @param opt_in [Pinnacle::Types::
|
55
|
+
# @param opt_in [Pinnacle::Types::UpsertTollFreeCampaignOptIn] Opt-in keyword settings.
|
56
56
|
# @param production_message_content [String] Explain message that would be sent.
|
57
|
-
# @param use_case [Pinnacle::Types::
|
57
|
+
# @param use_case [Pinnacle::Types::UpsertTollFreeCampaignUseCase] Use case classification for the campaign.
|
58
58
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
59
59
|
# @return [Pinnacle::Types::TollFreeCampaignWithExtendedBrandAndStatus]
|
60
60
|
def initialize(brand:, status:, campaign_id: OMIT, monthly_volume: OMIT, name: OMIT, opt_in: OMIT,
|
@@ -104,14 +104,14 @@ module Pinnacle
|
|
104
104
|
opt_in = nil
|
105
105
|
else
|
106
106
|
opt_in = parsed_json["optIn"].to_json
|
107
|
-
opt_in = Pinnacle::Types::
|
107
|
+
opt_in = Pinnacle::Types::UpsertTollFreeCampaignOptIn.from_json(json_object: opt_in)
|
108
108
|
end
|
109
109
|
production_message_content = parsed_json["productionMessageContent"]
|
110
110
|
if parsed_json["useCase"].nil?
|
111
111
|
use_case = nil
|
112
112
|
else
|
113
113
|
use_case = parsed_json["useCase"].to_json
|
114
|
-
use_case = Pinnacle::Types::
|
114
|
+
use_case = Pinnacle::Types::UpsertTollFreeCampaignUseCase.from_json(json_object: use_case)
|
115
115
|
end
|
116
116
|
new(
|
117
117
|
brand: brand,
|
@@ -146,9 +146,9 @@ module Pinnacle
|
|
146
146
|
obj.campaign_id&.is_a?(Integer) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
|
147
147
|
obj.monthly_volume&.is_a?(Pinnacle::Types::MessageVolumeEnum) != false || raise("Passed value for field obj.monthly_volume is not the expected type, validation failed.")
|
148
148
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
149
|
-
obj.opt_in.nil? || Pinnacle::Types::
|
149
|
+
obj.opt_in.nil? || Pinnacle::Types::UpsertTollFreeCampaignOptIn.validate_raw(obj: obj.opt_in)
|
150
150
|
obj.production_message_content&.is_a?(String) != false || raise("Passed value for field obj.production_message_content is not the expected type, validation failed.")
|
151
|
-
obj.use_case.nil? || Pinnacle::Types::
|
151
|
+
obj.use_case.nil? || Pinnacle::Types::UpsertTollFreeCampaignUseCase.validate_raw(obj: obj.use_case)
|
152
152
|
end
|
153
153
|
end
|
154
154
|
end
|
@@ -6,7 +6,7 @@ require "json"
|
|
6
6
|
module Pinnacle
|
7
7
|
module Types
|
8
8
|
# Contact information for the brand.
|
9
|
-
class
|
9
|
+
class UpsertContact
|
10
10
|
# @return [String] Email address of the contact person.
|
11
11
|
attr_reader :email
|
12
12
|
# @return [String] Full name of the contact person.
|
@@ -28,7 +28,7 @@ module Pinnacle
|
|
28
28
|
# @param phone [String] Phone number of the contact person in E.164 format.
|
29
29
|
# @param title [String] Job title of the contact person.
|
30
30
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
31
|
-
# @return [Pinnacle::Types::
|
31
|
+
# @return [Pinnacle::Types::UpsertContact]
|
32
32
|
def initialize(email: OMIT, name: OMIT, phone: OMIT, title: OMIT, additional_properties: nil)
|
33
33
|
@email = email if email != OMIT
|
34
34
|
@name = name if name != OMIT
|
@@ -40,10 +40,10 @@ module Pinnacle
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
# Deserialize a JSON object to an instance of
|
43
|
+
# Deserialize a JSON object to an instance of UpsertContact
|
44
44
|
#
|
45
45
|
# @param json_object [String]
|
46
|
-
# @return [Pinnacle::Types::
|
46
|
+
# @return [Pinnacle::Types::UpsertContact]
|
47
47
|
def self.from_json(json_object:)
|
48
48
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
49
49
|
parsed_json = JSON.parse(json_object)
|
@@ -60,7 +60,7 @@ module Pinnacle
|
|
60
60
|
)
|
61
61
|
end
|
62
62
|
|
63
|
-
# Serialize an instance of
|
63
|
+
# Serialize an instance of UpsertContact to a JSON object
|
64
64
|
#
|
65
65
|
# @return [String]
|
66
66
|
def to_json(*_args)
|
data/lib/rcs/types/{toll_free_campaign_schema_opt_in.rb → upsert_toll_free_campaign_opt_in.rb}
RENAMED
@@ -7,9 +7,9 @@ require "json"
|
|
7
7
|
module Pinnacle
|
8
8
|
module Types
|
9
9
|
# Opt-in keyword settings.
|
10
|
-
class
|
10
|
+
class UpsertTollFreeCampaignOptIn
|
11
11
|
# @return [Pinnacle::Types::OptInMethodEnum]
|
12
|
-
attr_reader :
|
12
|
+
attr_reader :method_
|
13
13
|
# @return [String] Url to opt in.
|
14
14
|
attr_reader :url
|
15
15
|
# @return [String] Explain how users find the opt-in.
|
@@ -22,40 +22,40 @@ module Pinnacle
|
|
22
22
|
|
23
23
|
OMIT = Object.new
|
24
24
|
|
25
|
-
# @param
|
25
|
+
# @param method_ [Pinnacle::Types::OptInMethodEnum]
|
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::
|
30
|
-
def initialize(
|
31
|
-
@
|
29
|
+
# @return [Pinnacle::Types::UpsertTollFreeCampaignOptIn]
|
30
|
+
def initialize(method_: OMIT, url: OMIT, workflow_description: OMIT, additional_properties: nil)
|
31
|
+
@method_ = method_ if method_ != OMIT
|
32
32
|
@url = url if url != OMIT
|
33
33
|
@workflow_description = workflow_description if workflow_description != OMIT
|
34
34
|
@additional_properties = additional_properties
|
35
|
-
@_field_set = { "method":
|
35
|
+
@_field_set = { "method": method_, "url": url, "workflowDescription": workflow_description }.reject do |_k, v|
|
36
36
|
v == OMIT
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
# Deserialize a JSON object to an instance of
|
40
|
+
# Deserialize a JSON object to an instance of UpsertTollFreeCampaignOptIn
|
41
41
|
#
|
42
42
|
# @param json_object [String]
|
43
|
-
# @return [Pinnacle::Types::
|
43
|
+
# @return [Pinnacle::Types::UpsertTollFreeCampaignOptIn]
|
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)
|
47
|
-
|
47
|
+
method_ = parsed_json["method"]
|
48
48
|
url = parsed_json["url"]
|
49
49
|
workflow_description = parsed_json["workflowDescription"]
|
50
50
|
new(
|
51
|
-
|
51
|
+
method_: method_,
|
52
52
|
url: url,
|
53
53
|
workflow_description: workflow_description,
|
54
54
|
additional_properties: struct
|
55
55
|
)
|
56
56
|
end
|
57
57
|
|
58
|
-
# Serialize an instance of
|
58
|
+
# Serialize an instance of UpsertTollFreeCampaignOptIn to a JSON object
|
59
59
|
#
|
60
60
|
# @return [String]
|
61
61
|
def to_json(*_args)
|
@@ -69,7 +69,7 @@ module Pinnacle
|
|
69
69
|
# @param obj [Object]
|
70
70
|
# @return [Void]
|
71
71
|
def self.validate_raw(obj:)
|
72
|
-
obj.
|
72
|
+
obj.method_&.is_a?(Pinnacle::Types::OptInMethodEnum) != false || raise("Passed value for field obj.method_ is not the expected type, validation failed.")
|
73
73
|
obj.url&.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
|
74
74
|
obj.workflow_description&.is_a?(String) != false || raise("Passed value for field obj.workflow_description is not the expected type, validation failed.")
|
75
75
|
end
|