rcs 2.0.0.pre.rc.5 → 2.0.1
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 +36 -24
- data/lib/rcs/campaigns/dlc/client.rb +36 -26
- data/lib/rcs/campaigns/rcs/client.rb +26 -22
- data/lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb +6 -6
- data/lib/rcs/campaigns/toll_free/client.rb +32 -26
- data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +6 -6
- data/lib/rcs/contacts/client.rb +10 -8
- data/lib/rcs/conversations/client.rb +144 -16
- data/lib/rcs/conversations/types/conversations_list_messages_request_direction.rb +12 -0
- data/lib/rcs/conversations/types/conversations_list_messages_request_sort_order.rb +12 -0
- data/lib/rcs/conversations/types/conversations_list_messages_request_status.rb +17 -0
- data/lib/rcs/conversations/types/conversations_list_messages_request_type.rb +13 -0
- data/lib/rcs/messages/client.rb +12 -29
- data/lib/rcs/messages/rcs/client.rb +125 -1
- data/lib/rcs/messages/rcs/types/send_typing_indicator_schema_options.rb +66 -0
- data/lib/rcs/phone_numbers/campaign/client.rb +20 -6
- data/lib/rcs/phone_numbers/client.rb +0 -14
- data/lib/rcs/phone_numbers/webhook/client.rb +12 -10
- data/lib/rcs/rcs/client.rb +32 -18
- data/lib/rcs/status/get/client.rb +32 -16
- data/lib/rcs/tools/contact_card/client.rb +18 -8
- data/lib/rcs/tools/file/client.rb +92 -2
- data/lib/rcs/tools/file/types/upload_file_options.rb +21 -3
- data/lib/rcs/tools/url/client.rb +4 -2
- data/lib/rcs/types/attach_webhook_by_id_params.rb +5 -5
- data/lib/rcs/types/attach_webhook_response_webhook.rb +5 -3
- data/lib/rcs/types/autofill_campaign_params.rb +15 -3
- data/lib/rcs/types/autofill_dlc_campaign_response.rb +10 -6
- data/lib/rcs/types/autofill_dlc_response_keywords.rb +8 -10
- data/lib/rcs/types/autofill_dlc_response_keywords_help.rb +3 -3
- data/lib/rcs/types/autofill_dlc_response_keywords_opt_in.rb +6 -4
- data/lib/rcs/types/autofill_dlc_response_keywords_opt_out.rb +3 -3
- data/lib/rcs/types/autofill_dlc_response_options.rb +12 -12
- data/lib/rcs/types/brand_status.rb +5 -3
- data/lib/rcs/types/{inbound_button.rb → button_clicked.rb} +7 -7
- data/lib/rcs/types/button_clicked_data.rb +80 -0
- data/lib/rcs/types/button_clicked_data_button.rb +118 -0
- data/lib/rcs/types/{click_action_data.rb → button_clicked_data_button_raw.rb} +10 -8
- data/lib/rcs/types/button_clicked_data_button_type.rb +15 -0
- data/lib/rcs/types/campaign_query.rb +10 -2
- data/lib/rcs/types/contact.rb +5 -3
- data/lib/rcs/types/contact_id.rb +5 -3
- data/lib/rcs/types/conversation.rb +16 -8
- data/lib/rcs/types/conversation_by_id_params.rb +7 -3
- data/lib/rcs/types/conversation_contact.rb +5 -3
- data/lib/rcs/types/conversation_list.rb +50 -28
- data/lib/rcs/types/create_url_options.rb +4 -2
- data/lib/rcs/types/detached_webhook_info.rb +5 -3
- data/lib/rcs/types/dlc_campaign_status.rb +5 -3
- data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +21 -19
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_help.rb +3 -3
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_opt_in.rb +6 -4
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_opt_out.rb +6 -4
- data/lib/rcs/types/extended_brand.rb +25 -13
- data/lib/rcs/types/extended_brand_with_vetting.rb +25 -13
- data/lib/rcs/types/extended_rcs_campaign.rb +25 -14
- data/lib/rcs/types/link_click_event.rb +1 -17
- data/lib/rcs/types/message.rb +5 -3
- data/lib/rcs/types/message_content.rb +4 -4
- data/lib/rcs/types/message_event.rb +143 -0
- data/lib/rcs/types/message_event_content.rb +127 -0
- data/lib/rcs/types/message_event_conversation.rb +82 -0
- data/lib/rcs/types/message_event_direction.rb +11 -0
- data/lib/rcs/types/message_event_mms_content.rb +94 -0
- data/lib/rcs/types/message_event_rcs_button_data.rb +104 -0
- data/lib/rcs/types/message_event_rcs_cards_content.rb +99 -0
- data/lib/rcs/types/message_event_rcs_cards_content_cards_item.rb +94 -0
- data/lib/rcs/types/message_event_rcs_location_data.rb +91 -0
- data/lib/rcs/types/message_event_rcs_media_content.rb +94 -0
- data/lib/rcs/types/message_event_rcs_text_content.rb +92 -0
- data/lib/rcs/types/message_event_sms_content.rb +81 -0
- data/lib/rcs/types/{retrieved_conversations.rb → message_list.rb} +26 -25
- data/lib/rcs/types/message_with_reaction.rb +197 -0
- data/lib/rcs/types/message_with_reaction_direction.rb +11 -0
- data/lib/rcs/types/{error_response.rb → not_found_error_body.rb} +7 -7
- data/lib/rcs/types/options.rb +111 -0
- data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item_campaign.rb +7 -3
- data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item_campaign.rb +7 -3
- data/lib/rcs/types/pinnacle_file_upload_metadata.rb +18 -2
- data/lib/rcs/types/profile_status_enum.rb +4 -4
- data/lib/rcs/types/rcs_base_options.rb +12 -1
- data/lib/rcs/types/rcs_button_call.rb +11 -2
- data/lib/rcs/types/rcs_button_open_url.rb +38 -2
- data/lib/rcs/types/rcs_button_open_url_webview_mode.rb +19 -0
- data/lib/rcs/types/rcs_button_request_user_location.rb +15 -3
- data/lib/rcs/types/rcs_button_schedule_event.rb +9 -1
- data/lib/rcs/types/rcs_button_send_location.rb +22 -2
- data/lib/rcs/types/rcs_button_trigger.rb +8 -6
- data/lib/rcs/types/rcs_campaign.rb +3 -3
- data/lib/rcs/types/rcs_campaign_schema_extra_agent.rb +8 -8
- data/lib/rcs/types/rcs_campaign_status.rb +5 -3
- data/lib/rcs/types/reaction_result.rb +10 -6
- data/lib/rcs/types/refreshed_file.rb +67 -0
- data/lib/rcs/types/rich_cards_message.rb +10 -10
- data/lib/rcs/types/{rcs.rb → rich_message.rb} +3 -3
- data/lib/rcs/types/scheduled_messaage.rb +5 -3
- data/lib/rcs/types/send_rcs_card_options.rb +132 -0
- data/lib/rcs/types/send_rcs_card_options_standalone_card.rb +78 -0
- data/lib/rcs/types/send_rcs_card_options_standalone_card_image_alignment.rb +12 -0
- data/lib/rcs/types/send_rcs_card_options_standalone_card_orientation.rb +11 -0
- data/lib/rcs/types/send_typing_indicator_response.rb +100 -0
- data/lib/rcs/types/sent_mms_details.rb +4 -2
- data/lib/rcs/types/sent_rcs_details.rb +12 -13
- data/lib/rcs/types/sent_sms_details.rb +5 -3
- data/lib/rcs/types/toll_free_campaign.rb +3 -3
- data/lib/rcs/types/toll_free_campaign_status.rb +5 -3
- data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +3 -5
- data/lib/rcs/types/updated_contact_id.rb +5 -3
- data/lib/rcs/types/user_event.rb +83 -0
- data/lib/rcs/types/user_event_conversation.rb +78 -0
- data/lib/rcs/types/v_card_data.rb +5 -3
- data/lib/rcs/types/validate_campaign_params.rb +15 -3
- data/lib/rcs/types/vcard.rb +5 -3
- data/lib/rcs/types/vcard_content.rb +5 -3
- data/lib/rcs/types/vcard_resource.rb +5 -3
- data/lib/rcs/types/webhook_event_enum.rb +1 -0
- data/lib/rcs/types/webhooks.rb +5 -3
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +37 -7
- metadata +41 -11
- data/lib/rcs/types/click_action.rb +0 -73
- data/lib/rcs/types/click_action_data_metadata.rb +0 -69
|
@@ -7,6 +7,8 @@ module Pinnacle
|
|
|
7
7
|
module Types
|
|
8
8
|
# Button that initiates a phone call when tapped by the recipient.
|
|
9
9
|
class RcsButtonCall
|
|
10
|
+
# @return [String] Optional additional data to attach to this button.
|
|
11
|
+
attr_reader :metadata
|
|
10
12
|
# @return [String] Phone number to call in E.164 format
|
|
11
13
|
attr_reader :payload
|
|
12
14
|
# @return [String] Display text for the button.
|
|
@@ -19,15 +21,19 @@ module Pinnacle
|
|
|
19
21
|
|
|
20
22
|
OMIT = Object.new
|
|
21
23
|
|
|
24
|
+
# @param metadata [String] Optional additional data to attach to this button.
|
|
22
25
|
# @param payload [String] Phone number to call in E.164 format
|
|
23
26
|
# @param title [String] Display text for the button.
|
|
24
27
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
25
28
|
# @return [Pinnacle::Types::RcsButtonCall]
|
|
26
|
-
def initialize(payload:, title:, additional_properties: nil)
|
|
29
|
+
def initialize(payload:, title:, metadata: OMIT, additional_properties: nil)
|
|
30
|
+
@metadata = metadata if metadata != OMIT
|
|
27
31
|
@payload = payload
|
|
28
32
|
@title = title
|
|
29
33
|
@additional_properties = additional_properties
|
|
30
|
-
@_field_set = { "payload": payload, "title": title }
|
|
34
|
+
@_field_set = { "metadata": metadata, "payload": payload, "title": title }.reject do |_k, v|
|
|
35
|
+
v == OMIT
|
|
36
|
+
end
|
|
31
37
|
end
|
|
32
38
|
|
|
33
39
|
# Deserialize a JSON object to an instance of RcsButtonCall
|
|
@@ -37,9 +43,11 @@ module Pinnacle
|
|
|
37
43
|
def self.from_json(json_object:)
|
|
38
44
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
39
45
|
parsed_json = JSON.parse(json_object)
|
|
46
|
+
metadata = parsed_json["metadata"]
|
|
40
47
|
payload = parsed_json["payload"]
|
|
41
48
|
title = parsed_json["title"]
|
|
42
49
|
new(
|
|
50
|
+
metadata: metadata,
|
|
43
51
|
payload: payload,
|
|
44
52
|
title: title,
|
|
45
53
|
additional_properties: struct
|
|
@@ -60,6 +68,7 @@ module Pinnacle
|
|
|
60
68
|
# @param obj [Object]
|
|
61
69
|
# @return [Void]
|
|
62
70
|
def self.validate_raw(obj:)
|
|
71
|
+
obj.metadata&.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
|
|
63
72
|
obj.payload.is_a?(String) != false || raise("Passed value for field obj.payload is not the expected type, validation failed.")
|
|
64
73
|
obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
|
65
74
|
end
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require_relative "rcs_button_open_url_webview_mode"
|
|
3
4
|
require "ostruct"
|
|
4
5
|
require "json"
|
|
5
6
|
|
|
@@ -7,10 +8,21 @@ module Pinnacle
|
|
|
7
8
|
module Types
|
|
8
9
|
# Button that opens a URL when tapped by the recipient.
|
|
9
10
|
class RcsButtonOpenUrl
|
|
11
|
+
# @return [Pinnacle::Types::RcsButtonOpenUrlWebviewMode] Controls how the URL is displayed when the button is tapped.
|
|
12
|
+
# **Default behavior:** If not specified, the URL opens in the device's default
|
|
13
|
+
# browser. If you're sending deeplinks, you should use this mode as it will open
|
|
14
|
+
# the deeplink in the native app if it is installed.
|
|
15
|
+
# **Available modes in order of size:**
|
|
16
|
+
# - `HALF` — Half-screen webview overlay
|
|
17
|
+
# - `TALL` — Tall webview overlay
|
|
18
|
+
# - `FULL` — Full-screen webview
|
|
19
|
+
attr_reader :webview_mode
|
|
10
20
|
# @return [String] The URL to open when the button is tapped. Must be a valid HTTP or HTTPS URL.
|
|
11
21
|
attr_reader :payload
|
|
12
22
|
# @return [String] Display text for the button.
|
|
13
23
|
attr_reader :title
|
|
24
|
+
# @return [String] Optional additional data to attach to this button.
|
|
25
|
+
attr_reader :metadata
|
|
14
26
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
15
27
|
attr_reader :additional_properties
|
|
16
28
|
# @return [Object]
|
|
@@ -19,15 +31,33 @@ module Pinnacle
|
|
|
19
31
|
|
|
20
32
|
OMIT = Object.new
|
|
21
33
|
|
|
34
|
+
# @param webview_mode [Pinnacle::Types::RcsButtonOpenUrlWebviewMode] Controls how the URL is displayed when the button is tapped.
|
|
35
|
+
# **Default behavior:** If not specified, the URL opens in the device's default
|
|
36
|
+
# browser. If you're sending deeplinks, you should use this mode as it will open
|
|
37
|
+
# the deeplink in the native app if it is installed.
|
|
38
|
+
# **Available modes in order of size:**
|
|
39
|
+
# - `HALF` — Half-screen webview overlay
|
|
40
|
+
# - `TALL` — Tall webview overlay
|
|
41
|
+
# - `FULL` — Full-screen webview
|
|
22
42
|
# @param payload [String] The URL to open when the button is tapped. Must be a valid HTTP or HTTPS URL.
|
|
23
43
|
# @param title [String] Display text for the button.
|
|
44
|
+
# @param metadata [String] Optional additional data to attach to this button.
|
|
24
45
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
25
46
|
# @return [Pinnacle::Types::RcsButtonOpenUrl]
|
|
26
|
-
def initialize(payload:, title:, additional_properties: nil)
|
|
47
|
+
def initialize(payload:, title:, webview_mode: OMIT, metadata: OMIT, additional_properties: nil)
|
|
48
|
+
@webview_mode = webview_mode if webview_mode != OMIT
|
|
27
49
|
@payload = payload
|
|
28
50
|
@title = title
|
|
51
|
+
@metadata = metadata if metadata != OMIT
|
|
29
52
|
@additional_properties = additional_properties
|
|
30
|
-
@_field_set = {
|
|
53
|
+
@_field_set = {
|
|
54
|
+
"webviewMode": webview_mode,
|
|
55
|
+
"payload": payload,
|
|
56
|
+
"title": title,
|
|
57
|
+
"metadata": metadata
|
|
58
|
+
}.reject do |_k, v|
|
|
59
|
+
v == OMIT
|
|
60
|
+
end
|
|
31
61
|
end
|
|
32
62
|
|
|
33
63
|
# Deserialize a JSON object to an instance of RcsButtonOpenUrl
|
|
@@ -37,11 +67,15 @@ module Pinnacle
|
|
|
37
67
|
def self.from_json(json_object:)
|
|
38
68
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
39
69
|
parsed_json = JSON.parse(json_object)
|
|
70
|
+
webview_mode = parsed_json["webviewMode"]
|
|
40
71
|
payload = parsed_json["payload"]
|
|
41
72
|
title = parsed_json["title"]
|
|
73
|
+
metadata = parsed_json["metadata"]
|
|
42
74
|
new(
|
|
75
|
+
webview_mode: webview_mode,
|
|
43
76
|
payload: payload,
|
|
44
77
|
title: title,
|
|
78
|
+
metadata: metadata,
|
|
45
79
|
additional_properties: struct
|
|
46
80
|
)
|
|
47
81
|
end
|
|
@@ -60,8 +94,10 @@ module Pinnacle
|
|
|
60
94
|
# @param obj [Object]
|
|
61
95
|
# @return [Void]
|
|
62
96
|
def self.validate_raw(obj:)
|
|
97
|
+
obj.webview_mode&.is_a?(Pinnacle::Types::RcsButtonOpenUrlWebviewMode) != false || raise("Passed value for field obj.webview_mode is not the expected type, validation failed.")
|
|
63
98
|
obj.payload.is_a?(String) != false || raise("Passed value for field obj.payload is not the expected type, validation failed.")
|
|
64
99
|
obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
|
100
|
+
obj.metadata&.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
|
|
65
101
|
end
|
|
66
102
|
end
|
|
67
103
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Controls how the URL is displayed when the button is tapped.
|
|
6
|
+
# **Default behavior:** If not specified, the URL opens in the device's default
|
|
7
|
+
# browser. If you're sending deeplinks, you should use this mode as it will open
|
|
8
|
+
# the deeplink in the native app if it is installed.
|
|
9
|
+
# **Available modes in order of size:**
|
|
10
|
+
# - `HALF` — Half-screen webview overlay
|
|
11
|
+
# - `TALL` — Tall webview overlay
|
|
12
|
+
# - `FULL` — Full-screen webview
|
|
13
|
+
class RcsButtonOpenUrlWebviewMode
|
|
14
|
+
HALF = "HALF"
|
|
15
|
+
TALL = "TALL"
|
|
16
|
+
FULL = "FULL"
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -7,6 +7,8 @@ module Pinnacle
|
|
|
7
7
|
module Types
|
|
8
8
|
# Button that prompts the recipient to share their current location.
|
|
9
9
|
class RcsButtonRequestUserLocation
|
|
10
|
+
# @return [String] Optional additional data to attach to this button.
|
|
11
|
+
attr_reader :metadata
|
|
10
12
|
# @return [String] Display text for the button.
|
|
11
13
|
attr_reader :title
|
|
12
14
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
@@ -17,13 +19,17 @@ module Pinnacle
|
|
|
17
19
|
|
|
18
20
|
OMIT = Object.new
|
|
19
21
|
|
|
22
|
+
# @param metadata [String] Optional additional data to attach to this button.
|
|
20
23
|
# @param title [String] Display text for the button.
|
|
21
24
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
22
25
|
# @return [Pinnacle::Types::RcsButtonRequestUserLocation]
|
|
23
|
-
def initialize(title:, additional_properties: nil)
|
|
26
|
+
def initialize(title:, metadata: OMIT, additional_properties: nil)
|
|
27
|
+
@metadata = metadata if metadata != OMIT
|
|
24
28
|
@title = title
|
|
25
29
|
@additional_properties = additional_properties
|
|
26
|
-
@_field_set = { "title": title }
|
|
30
|
+
@_field_set = { "metadata": metadata, "title": title }.reject do |_k, v|
|
|
31
|
+
v == OMIT
|
|
32
|
+
end
|
|
27
33
|
end
|
|
28
34
|
|
|
29
35
|
# Deserialize a JSON object to an instance of RcsButtonRequestUserLocation
|
|
@@ -33,8 +39,13 @@ module Pinnacle
|
|
|
33
39
|
def self.from_json(json_object:)
|
|
34
40
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
35
41
|
parsed_json = JSON.parse(json_object)
|
|
42
|
+
metadata = parsed_json["metadata"]
|
|
36
43
|
title = parsed_json["title"]
|
|
37
|
-
new(
|
|
44
|
+
new(
|
|
45
|
+
metadata: metadata,
|
|
46
|
+
title: title,
|
|
47
|
+
additional_properties: struct
|
|
48
|
+
)
|
|
38
49
|
end
|
|
39
50
|
|
|
40
51
|
# Serialize an instance of RcsButtonRequestUserLocation to a JSON object
|
|
@@ -51,6 +62,7 @@ module Pinnacle
|
|
|
51
62
|
# @param obj [Object]
|
|
52
63
|
# @return [Void]
|
|
53
64
|
def self.validate_raw(obj:)
|
|
65
|
+
obj.metadata&.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
|
|
54
66
|
obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
|
55
67
|
end
|
|
56
68
|
end
|
|
@@ -15,6 +15,8 @@ module Pinnacle
|
|
|
15
15
|
attr_reader :event_start_time
|
|
16
16
|
# @return [String] Title of the event.
|
|
17
17
|
attr_reader :event_title
|
|
18
|
+
# @return [String] Optional additional data to attach to this button.
|
|
19
|
+
attr_reader :metadata
|
|
18
20
|
# @return [String] Display text for the button.
|
|
19
21
|
attr_reader :title
|
|
20
22
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
@@ -29,15 +31,17 @@ module Pinnacle
|
|
|
29
31
|
# @param event_end_time [String] End time in ISO 8601 format.
|
|
30
32
|
# @param event_start_time [String] Starting time in ISO 8601 format.
|
|
31
33
|
# @param event_title [String] Title of the event.
|
|
34
|
+
# @param metadata [String] Optional additional data to attach to this button.
|
|
32
35
|
# @param title [String] Display text for the button.
|
|
33
36
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
34
37
|
# @return [Pinnacle::Types::RcsButtonScheduleEvent]
|
|
35
|
-
def initialize(event_end_time:, event_start_time:, event_title:, title:, event_description: OMIT,
|
|
38
|
+
def initialize(event_end_time:, event_start_time:, event_title:, title:, event_description: OMIT, metadata: OMIT,
|
|
36
39
|
additional_properties: nil)
|
|
37
40
|
@event_description = event_description if event_description != OMIT
|
|
38
41
|
@event_end_time = event_end_time
|
|
39
42
|
@event_start_time = event_start_time
|
|
40
43
|
@event_title = event_title
|
|
44
|
+
@metadata = metadata if metadata != OMIT
|
|
41
45
|
@title = title
|
|
42
46
|
@additional_properties = additional_properties
|
|
43
47
|
@_field_set = {
|
|
@@ -45,6 +49,7 @@ module Pinnacle
|
|
|
45
49
|
"eventEndTime": event_end_time,
|
|
46
50
|
"eventStartTime": event_start_time,
|
|
47
51
|
"eventTitle": event_title,
|
|
52
|
+
"metadata": metadata,
|
|
48
53
|
"title": title
|
|
49
54
|
}.reject do |_k, v|
|
|
50
55
|
v == OMIT
|
|
@@ -62,12 +67,14 @@ module Pinnacle
|
|
|
62
67
|
event_end_time = parsed_json["eventEndTime"]
|
|
63
68
|
event_start_time = parsed_json["eventStartTime"]
|
|
64
69
|
event_title = parsed_json["eventTitle"]
|
|
70
|
+
metadata = parsed_json["metadata"]
|
|
65
71
|
title = parsed_json["title"]
|
|
66
72
|
new(
|
|
67
73
|
event_description: event_description,
|
|
68
74
|
event_end_time: event_end_time,
|
|
69
75
|
event_start_time: event_start_time,
|
|
70
76
|
event_title: event_title,
|
|
77
|
+
metadata: metadata,
|
|
71
78
|
title: title,
|
|
72
79
|
additional_properties: struct
|
|
73
80
|
)
|
|
@@ -91,6 +98,7 @@ module Pinnacle
|
|
|
91
98
|
obj.event_end_time.is_a?(String) != false || raise("Passed value for field obj.event_end_time is not the expected type, validation failed.")
|
|
92
99
|
obj.event_start_time.is_a?(String) != false || raise("Passed value for field obj.event_start_time is not the expected type, validation failed.")
|
|
93
100
|
obj.event_title.is_a?(String) != false || raise("Passed value for field obj.event_title is not the expected type, validation failed.")
|
|
101
|
+
obj.metadata&.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
|
|
94
102
|
obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
|
95
103
|
end
|
|
96
104
|
end
|
|
@@ -8,10 +8,16 @@ module Pinnacle
|
|
|
8
8
|
module Types
|
|
9
9
|
# Button that shares a specific location with the recipient when tapped.
|
|
10
10
|
class RcsButtonSendLocation
|
|
11
|
+
# @return [String] Optional name or label for the location that will be displayed in the map app
|
|
12
|
+
# (e.g., "Central Park", "Home Office").
|
|
13
|
+
# If not provided, the button title will be used as the location name.
|
|
14
|
+
attr_reader :name
|
|
11
15
|
# @return [Pinnacle::Types::RcsButtonSendLocationLatLong] Geographic coordinates of the location to share.
|
|
12
16
|
attr_reader :lat_long
|
|
13
17
|
# @return [String] Display text for the button.
|
|
14
18
|
attr_reader :title
|
|
19
|
+
# @return [String] Optional additional data to attach to this button.
|
|
20
|
+
attr_reader :metadata
|
|
15
21
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
16
22
|
attr_reader :additional_properties
|
|
17
23
|
# @return [Object]
|
|
@@ -20,15 +26,23 @@ module Pinnacle
|
|
|
20
26
|
|
|
21
27
|
OMIT = Object.new
|
|
22
28
|
|
|
29
|
+
# @param name [String] Optional name or label for the location that will be displayed in the map app
|
|
30
|
+
# (e.g., "Central Park", "Home Office").
|
|
31
|
+
# If not provided, the button title will be used as the location name.
|
|
23
32
|
# @param lat_long [Pinnacle::Types::RcsButtonSendLocationLatLong] Geographic coordinates of the location to share.
|
|
24
33
|
# @param title [String] Display text for the button.
|
|
34
|
+
# @param metadata [String] Optional additional data to attach to this button.
|
|
25
35
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
26
36
|
# @return [Pinnacle::Types::RcsButtonSendLocation]
|
|
27
|
-
def initialize(lat_long:, title:, additional_properties: nil)
|
|
37
|
+
def initialize(lat_long:, title:, name: OMIT, metadata: OMIT, additional_properties: nil)
|
|
38
|
+
@name = name if name != OMIT
|
|
28
39
|
@lat_long = lat_long
|
|
29
40
|
@title = title
|
|
41
|
+
@metadata = metadata if metadata != OMIT
|
|
30
42
|
@additional_properties = additional_properties
|
|
31
|
-
@_field_set = { "latLong": lat_long, "title": title }
|
|
43
|
+
@_field_set = { "name": name, "latLong": lat_long, "title": title, "metadata": metadata }.reject do |_k, v|
|
|
44
|
+
v == OMIT
|
|
45
|
+
end
|
|
32
46
|
end
|
|
33
47
|
|
|
34
48
|
# Deserialize a JSON object to an instance of RcsButtonSendLocation
|
|
@@ -38,6 +52,7 @@ module Pinnacle
|
|
|
38
52
|
def self.from_json(json_object:)
|
|
39
53
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
40
54
|
parsed_json = JSON.parse(json_object)
|
|
55
|
+
name = parsed_json["name"]
|
|
41
56
|
if parsed_json["latLong"].nil?
|
|
42
57
|
lat_long = nil
|
|
43
58
|
else
|
|
@@ -45,9 +60,12 @@ module Pinnacle
|
|
|
45
60
|
lat_long = Pinnacle::Types::RcsButtonSendLocationLatLong.from_json(json_object: lat_long)
|
|
46
61
|
end
|
|
47
62
|
title = parsed_json["title"]
|
|
63
|
+
metadata = parsed_json["metadata"]
|
|
48
64
|
new(
|
|
65
|
+
name: name,
|
|
49
66
|
lat_long: lat_long,
|
|
50
67
|
title: title,
|
|
68
|
+
metadata: metadata,
|
|
51
69
|
additional_properties: struct
|
|
52
70
|
)
|
|
53
71
|
end
|
|
@@ -66,8 +84,10 @@ module Pinnacle
|
|
|
66
84
|
# @param obj [Object]
|
|
67
85
|
# @return [Void]
|
|
68
86
|
def self.validate_raw(obj:)
|
|
87
|
+
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
|
69
88
|
Pinnacle::Types::RcsButtonSendLocationLatLong.validate_raw(obj: obj.lat_long)
|
|
70
89
|
obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
|
90
|
+
obj.metadata&.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
|
|
71
91
|
end
|
|
72
92
|
end
|
|
73
93
|
end
|
|
@@ -8,7 +8,7 @@ module Pinnacle
|
|
|
8
8
|
# Button that sends custom data back to your application when tapped by the
|
|
9
9
|
# recipient.
|
|
10
10
|
class RcsButtonTrigger
|
|
11
|
-
# @return [String]
|
|
11
|
+
# @return [String] Optional additional data to attach to this button.
|
|
12
12
|
attr_reader :metadata
|
|
13
13
|
# @return [String] Custom data sent to your webhook when the button is tapped. Use this to identify
|
|
14
14
|
# the user's choice.
|
|
@@ -23,18 +23,20 @@ module Pinnacle
|
|
|
23
23
|
|
|
24
24
|
OMIT = Object.new
|
|
25
25
|
|
|
26
|
-
# @param metadata [String]
|
|
26
|
+
# @param metadata [String] Optional additional data to attach to this button.
|
|
27
27
|
# @param payload [String] Custom data sent to your webhook when the button is tapped. Use this to identify
|
|
28
28
|
# the user's choice.
|
|
29
29
|
# @param title [String] Display text for the button.
|
|
30
30
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
31
31
|
# @return [Pinnacle::Types::RcsButtonTrigger]
|
|
32
|
-
def initialize(
|
|
33
|
-
@metadata = metadata
|
|
32
|
+
def initialize(payload:, title:, metadata: OMIT, additional_properties: nil)
|
|
33
|
+
@metadata = metadata if metadata != OMIT
|
|
34
34
|
@payload = payload
|
|
35
35
|
@title = title
|
|
36
36
|
@additional_properties = additional_properties
|
|
37
|
-
@_field_set = { "metadata": metadata, "payload": payload, "title": title }
|
|
37
|
+
@_field_set = { "metadata": metadata, "payload": payload, "title": title }.reject do |_k, v|
|
|
38
|
+
v == OMIT
|
|
39
|
+
end
|
|
38
40
|
end
|
|
39
41
|
|
|
40
42
|
# Deserialize a JSON object to an instance of RcsButtonTrigger
|
|
@@ -69,7 +71,7 @@ module Pinnacle
|
|
|
69
71
|
# @param obj [Object]
|
|
70
72
|
# @return [Void]
|
|
71
73
|
def self.validate_raw(obj:)
|
|
72
|
-
obj.metadata
|
|
74
|
+
obj.metadata&.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
|
|
73
75
|
obj.payload.is_a?(String) != false || raise("Passed value for field obj.payload is not the expected type, validation failed.")
|
|
74
76
|
obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
|
75
77
|
end
|
|
@@ -13,7 +13,7 @@ module Pinnacle
|
|
|
13
13
|
class RcsCampaign
|
|
14
14
|
# @return [Pinnacle::Types::RcsCampaignSchemaAgent] Agent configured to the campaign.
|
|
15
15
|
attr_reader :agent
|
|
16
|
-
# @return [
|
|
16
|
+
# @return [String] Unique identifier for the campaign.
|
|
17
17
|
attr_reader :campaign_id
|
|
18
18
|
# @return [String] Link to document verifying the brand's name. This may be the certificate of
|
|
19
19
|
# incorporation, business license, or other relevant document. You can typically
|
|
@@ -38,7 +38,7 @@ module Pinnacle
|
|
|
38
38
|
OMIT = Object.new
|
|
39
39
|
|
|
40
40
|
# @param agent [Pinnacle::Types::RcsCampaignSchemaAgent] Agent configured to the campaign.
|
|
41
|
-
# @param campaign_id [
|
|
41
|
+
# @param campaign_id [String] Unique identifier for the campaign.
|
|
42
42
|
# @param brand_verification_url [String] Link to document verifying the brand's name. This may be the certificate of
|
|
43
43
|
# incorporation, business license, or other relevant document. You can typically
|
|
44
44
|
# find this on the Secretary of State website.
|
|
@@ -142,7 +142,7 @@ module Pinnacle
|
|
|
142
142
|
# @return [Void]
|
|
143
143
|
def self.validate_raw(obj:)
|
|
144
144
|
obj.agent.nil? || Pinnacle::Types::RcsCampaignSchemaAgent.validate_raw(obj: obj.agent)
|
|
145
|
-
obj.campaign_id&.is_a?(
|
|
145
|
+
obj.campaign_id&.is_a?(String) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
|
|
146
146
|
obj.brand_verification_url&.is_a?(String) != false || raise("Passed value for field obj.brand_verification_url is not the expected type, validation failed.")
|
|
147
147
|
obj.expected_agent_responses&.is_a?(Array) != false || raise("Passed value for field obj.expected_agent_responses is not the expected type, validation failed.")
|
|
148
148
|
obj.links.nil? || Pinnacle::Types::RcsCampaignSchemaLinks.validate_raw(obj: obj.links)
|
|
@@ -44,16 +44,16 @@ module Pinnacle
|
|
|
44
44
|
# @param websites [Array<Pinnacle::Types::RcsCampaignSchemaExtraAgentWebsitesItem>] List of urls.
|
|
45
45
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
46
46
|
# @return [Pinnacle::Types::RcsCampaignSchemaExtraAgent]
|
|
47
|
-
def initialize(color: OMIT, description: OMIT,
|
|
48
|
-
|
|
47
|
+
def initialize(emails:, phones:, websites:, color: OMIT, description: OMIT, hero_url: OMIT, icon_url: OMIT,
|
|
48
|
+
name: OMIT, additional_properties: nil)
|
|
49
49
|
@color = color if color != OMIT
|
|
50
50
|
@description = description if description != OMIT
|
|
51
|
-
@emails = emails
|
|
51
|
+
@emails = emails
|
|
52
52
|
@hero_url = hero_url if hero_url != OMIT
|
|
53
53
|
@icon_url = icon_url if icon_url != OMIT
|
|
54
54
|
@name = name if name != OMIT
|
|
55
|
-
@phones = phones
|
|
56
|
-
@websites = websites
|
|
55
|
+
@phones = phones
|
|
56
|
+
@websites = websites
|
|
57
57
|
@additional_properties = additional_properties
|
|
58
58
|
@_field_set = {
|
|
59
59
|
"color": color,
|
|
@@ -122,12 +122,12 @@ module Pinnacle
|
|
|
122
122
|
def self.validate_raw(obj:)
|
|
123
123
|
obj.color&.is_a?(String) != false || raise("Passed value for field obj.color is not the expected type, validation failed.")
|
|
124
124
|
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
|
125
|
-
obj.emails
|
|
125
|
+
obj.emails.is_a?(Array) != false || raise("Passed value for field obj.emails is not the expected type, validation failed.")
|
|
126
126
|
obj.hero_url&.is_a?(String) != false || raise("Passed value for field obj.hero_url is not the expected type, validation failed.")
|
|
127
127
|
obj.icon_url&.is_a?(String) != false || raise("Passed value for field obj.icon_url is not the expected type, validation failed.")
|
|
128
128
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
|
129
|
-
obj.phones
|
|
130
|
-
obj.websites
|
|
129
|
+
obj.phones.is_a?(Array) != false || raise("Passed value for field obj.phones is not the expected type, validation failed.")
|
|
130
|
+
obj.websites.is_a?(Array) != false || raise("Passed value for field obj.websites is not the expected type, validation failed.")
|
|
131
131
|
end
|
|
132
132
|
end
|
|
133
133
|
end
|
|
@@ -10,7 +10,8 @@ module Pinnacle
|
|
|
10
10
|
class RcsCampaignStatus
|
|
11
11
|
# @return [Array<String>] List of errors that occured.
|
|
12
12
|
attr_reader :errors
|
|
13
|
-
# @return [
|
|
13
|
+
# @return [String] The unique identifier of the RCS campaign. This identifier is a string that
|
|
14
|
+
# always begins with the prefix `rcs_`, for example: `rcs_1234567890`.
|
|
14
15
|
attr_reader :id
|
|
15
16
|
# @return [Pinnacle::Types::ProfileStatusEnum] Current review status of the RCS campaign. <br>
|
|
16
17
|
# `INCOMPLETE`: Not submitted.<br>
|
|
@@ -28,7 +29,8 @@ module Pinnacle
|
|
|
28
29
|
OMIT = Object.new
|
|
29
30
|
|
|
30
31
|
# @param errors [Array<String>] List of errors that occured.
|
|
31
|
-
# @param id [
|
|
32
|
+
# @param id [String] The unique identifier of the RCS campaign. This identifier is a string that
|
|
33
|
+
# always begins with the prefix `rcs_`, for example: `rcs_1234567890`.
|
|
32
34
|
# @param status [Pinnacle::Types::ProfileStatusEnum] Current review status of the RCS campaign. <br>
|
|
33
35
|
# `INCOMPLETE`: Not submitted.<br>
|
|
34
36
|
# `IN REVIEW`: Being reviewed by carriers.<br>
|
|
@@ -78,7 +80,7 @@ module Pinnacle
|
|
|
78
80
|
# @return [Void]
|
|
79
81
|
def self.validate_raw(obj:)
|
|
80
82
|
obj.errors.is_a?(Array) != false || raise("Passed value for field obj.errors is not the expected type, validation failed.")
|
|
81
|
-
obj.id.is_a?(
|
|
83
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
|
82
84
|
obj.status.is_a?(Pinnacle::Types::ProfileStatusEnum) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
|
83
85
|
end
|
|
84
86
|
end
|
|
@@ -6,9 +6,11 @@ require "json"
|
|
|
6
6
|
module Pinnacle
|
|
7
7
|
module Types
|
|
8
8
|
class ReactionResult
|
|
9
|
-
# @return [
|
|
9
|
+
# @return [String] Unique identifier of the message. This identifier is a string that always begins
|
|
10
|
+
# with the prefix `msg_`, for example: `msg_1234567890`.
|
|
10
11
|
attr_reader :message_id
|
|
11
|
-
# @return [
|
|
12
|
+
# @return [String] Unique identifier of the message with the reaction. This identifier is a string
|
|
13
|
+
# that always begins with the prefix `msg_`, for example: `msg_1234567890`.
|
|
12
14
|
attr_reader :reaction_message_id
|
|
13
15
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
14
16
|
attr_reader :additional_properties
|
|
@@ -18,8 +20,10 @@ module Pinnacle
|
|
|
18
20
|
|
|
19
21
|
OMIT = Object.new
|
|
20
22
|
|
|
21
|
-
# @param message_id [
|
|
22
|
-
#
|
|
23
|
+
# @param message_id [String] Unique identifier of the message. This identifier is a string that always begins
|
|
24
|
+
# with the prefix `msg_`, for example: `msg_1234567890`.
|
|
25
|
+
# @param reaction_message_id [String] Unique identifier of the message with the reaction. This identifier is a string
|
|
26
|
+
# that always begins with the prefix `msg_`, for example: `msg_1234567890`.
|
|
23
27
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
24
28
|
# @return [Pinnacle::Types::ReactionResult]
|
|
25
29
|
def initialize(message_id:, reaction_message_id:, additional_properties: nil)
|
|
@@ -59,8 +63,8 @@ module Pinnacle
|
|
|
59
63
|
# @param obj [Object]
|
|
60
64
|
# @return [Void]
|
|
61
65
|
def self.validate_raw(obj:)
|
|
62
|
-
obj.message_id.is_a?(
|
|
63
|
-
obj.reaction_message_id.is_a?(
|
|
66
|
+
obj.message_id.is_a?(String) != false || raise("Passed value for field obj.message_id is not the expected type, validation failed.")
|
|
67
|
+
obj.reaction_message_id.is_a?(String) != false || raise("Passed value for field obj.reaction_message_id is not the expected type, validation failed.")
|
|
64
68
|
end
|
|
65
69
|
end
|
|
66
70
|
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ostruct"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
6
|
+
module Pinnacle
|
|
7
|
+
module Types
|
|
8
|
+
class RefreshedFile
|
|
9
|
+
# @return [String] The original file URI that was provided in the request.
|
|
10
|
+
attr_reader :original
|
|
11
|
+
# @return [String] The new refreshed presigned URL that expires in one hour.
|
|
12
|
+
attr_reader :refreshed
|
|
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 original [String] The original file URI that was provided in the request.
|
|
22
|
+
# @param refreshed [String] The new refreshed presigned URL that expires in one hour.
|
|
23
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
24
|
+
# @return [Pinnacle::Types::RefreshedFile]
|
|
25
|
+
def initialize(original:, refreshed:, additional_properties: nil)
|
|
26
|
+
@original = original
|
|
27
|
+
@refreshed = refreshed
|
|
28
|
+
@additional_properties = additional_properties
|
|
29
|
+
@_field_set = { "original": original, "refreshed": refreshed }
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Deserialize a JSON object to an instance of RefreshedFile
|
|
33
|
+
#
|
|
34
|
+
# @param json_object [String]
|
|
35
|
+
# @return [Pinnacle::Types::RefreshedFile]
|
|
36
|
+
def self.from_json(json_object:)
|
|
37
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
38
|
+
parsed_json = JSON.parse(json_object)
|
|
39
|
+
original = parsed_json["original"]
|
|
40
|
+
refreshed = parsed_json["refreshed"]
|
|
41
|
+
new(
|
|
42
|
+
original: original,
|
|
43
|
+
refreshed: refreshed,
|
|
44
|
+
additional_properties: struct
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Serialize an instance of RefreshedFile to a JSON object
|
|
49
|
+
#
|
|
50
|
+
# @return [String]
|
|
51
|
+
def to_json(*_args)
|
|
52
|
+
@_field_set&.to_json
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
56
|
+
# hash and check each fields type against the current object's property
|
|
57
|
+
# definitions.
|
|
58
|
+
#
|
|
59
|
+
# @param obj [Object]
|
|
60
|
+
# @return [Void]
|
|
61
|
+
def self.validate_raw(obj:)
|
|
62
|
+
obj.original.is_a?(String) != false || raise("Passed value for field obj.original is not the expected type, validation failed.")
|
|
63
|
+
obj.refreshed.is_a?(String) != false || raise("Passed value for field obj.refreshed is not the expected type, validation failed.")
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|