rcs 2.0.0.pre.rc.4 → 2.0.0
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 +44 -34
- 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/rcs/types/upsert_rcs_agent.rb +4 -4
- 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 +142 -14
- 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/mms/client.rb +2 -2
- data/lib/rcs/messages/rcs/client.rb +1 -1
- data/lib/rcs/messages/sms/client.rb +2 -2
- 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 +330 -0
- data/lib/rcs/status/get/client.rb +34 -18
- 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/create_url_options.rb +4 -2
- data/lib/rcs/types/detached_webhook_info.rb +5 -3
- data/lib/rcs/types/dlc_campaign_status.rb +7 -5
- 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/get_dlc_campaign_status_response_updates.rb +1 -1
- 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/message_list.rb +79 -0
- data/lib/rcs/types/message_schedule.rb +4 -5
- 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/not_found_error_body.rb +59 -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 +11 -2
- 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 +11 -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_agent.rb +4 -4
- data/lib/rcs/types/rcs_campaign_schema_extra_agent.rb +12 -12
- data/lib/rcs/types/rcs_campaign_status.rb +5 -3
- data/lib/rcs/types/rcs_capabilities_result.rb +7 -0
- data/lib/rcs/types/rcs_capability.rb +82 -0
- data/lib/rcs/types/rcs_capability_actions.rb +105 -0
- data/lib/rcs/types/rcs_capability_cards.rb +67 -0
- data/lib/rcs/types/rcs_link_result.rb +75 -0
- data/lib/rcs/types/rcs_validate_content_media.rb +17 -3
- data/lib/rcs/types/rcs_whitelist_response.rb +58 -0
- data/lib/rcs/types/reaction_result.rb +10 -6
- data/lib/rcs/types/refreshed_file.rb +67 -0
- data/lib/rcs/types/{rcs.rb → rich_message.rb} +3 -3
- data/lib/rcs/types/scheduled_messaage.rb +5 -3
- 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/rcs.rb +7 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +35 -5
- metadata +40 -9
- data/lib/rcs/types/click_action.rb +0 -73
- data/lib/rcs/types/click_action_data_metadata.rb +0 -69
|
@@ -16,9 +16,9 @@ module Pinnacle
|
|
|
16
16
|
attr_reader :description
|
|
17
17
|
# @return [Array<Pinnacle::Types::RcsCampaignSchemaExtraAgentEmailsItem>] List of emails.
|
|
18
18
|
attr_reader :emails
|
|
19
|
-
# @return [String] Link to the agent's hero.
|
|
19
|
+
# @return [String] Link to the agent's hero. Hero must be an image file with dimensions 1440x448px.
|
|
20
20
|
attr_reader :hero_url
|
|
21
|
-
# @return [String] Link to the agent's icon.
|
|
21
|
+
# @return [String] Link to the agent's icon. Icon must be an image file with dimensions 224x224px.
|
|
22
22
|
attr_reader :icon_url
|
|
23
23
|
# @return [String] Name of the agent.
|
|
24
24
|
attr_reader :name
|
|
@@ -37,23 +37,23 @@ module Pinnacle
|
|
|
37
37
|
# @param color [String] Color of the agent's buttons.
|
|
38
38
|
# @param description [String] Description of the agent.
|
|
39
39
|
# @param emails [Array<Pinnacle::Types::RcsCampaignSchemaExtraAgentEmailsItem>] List of emails.
|
|
40
|
-
# @param hero_url [String] Link to the agent's hero.
|
|
41
|
-
# @param icon_url [String] Link to the agent's icon.
|
|
40
|
+
# @param hero_url [String] Link to the agent's hero. Hero must be an image file with dimensions 1440x448px.
|
|
41
|
+
# @param icon_url [String] Link to the agent's icon. Icon must be an image file with dimensions 224x224px.
|
|
42
42
|
# @param name [String] Name of the agent.
|
|
43
43
|
# @param phones [Array<Pinnacle::Types::RcsCampaignSchemaExtraAgentPhonesItem>] List of phone numbers.
|
|
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
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "rcs_capability_cards"
|
|
4
|
+
require_relative "rcs_capability_actions"
|
|
5
|
+
require "ostruct"
|
|
6
|
+
require "json"
|
|
7
|
+
|
|
8
|
+
module Pinnacle
|
|
9
|
+
module Types
|
|
10
|
+
# RCS capabilities for a phone number
|
|
11
|
+
class RcsCapability
|
|
12
|
+
# @return [Pinnacle::Types::RcsCapabilityCards]
|
|
13
|
+
attr_reader :cards
|
|
14
|
+
# @return [Pinnacle::Types::RcsCapabilityActions] Supported button action types inside the rich cards or quick replies. Each key
|
|
15
|
+
# is a button action type that defines a specific button type in the Pinnacle API.
|
|
16
|
+
attr_reader :actions
|
|
17
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
18
|
+
attr_reader :additional_properties
|
|
19
|
+
# @return [Object]
|
|
20
|
+
attr_reader :_field_set
|
|
21
|
+
protected :_field_set
|
|
22
|
+
|
|
23
|
+
OMIT = Object.new
|
|
24
|
+
|
|
25
|
+
# @param cards [Pinnacle::Types::RcsCapabilityCards]
|
|
26
|
+
# @param actions [Pinnacle::Types::RcsCapabilityActions] Supported button action types inside the rich cards or quick replies. Each key
|
|
27
|
+
# is a button action type that defines a specific button type in the Pinnacle API.
|
|
28
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
29
|
+
# @return [Pinnacle::Types::RcsCapability]
|
|
30
|
+
def initialize(cards:, actions:, additional_properties: nil)
|
|
31
|
+
@cards = cards
|
|
32
|
+
@actions = actions
|
|
33
|
+
@additional_properties = additional_properties
|
|
34
|
+
@_field_set = { "cards": cards, "actions": actions }
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Deserialize a JSON object to an instance of RcsCapability
|
|
38
|
+
#
|
|
39
|
+
# @param json_object [String]
|
|
40
|
+
# @return [Pinnacle::Types::RcsCapability]
|
|
41
|
+
def self.from_json(json_object:)
|
|
42
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
43
|
+
parsed_json = JSON.parse(json_object)
|
|
44
|
+
if parsed_json["cards"].nil?
|
|
45
|
+
cards = nil
|
|
46
|
+
else
|
|
47
|
+
cards = parsed_json["cards"].to_json
|
|
48
|
+
cards = Pinnacle::Types::RcsCapabilityCards.from_json(json_object: cards)
|
|
49
|
+
end
|
|
50
|
+
if parsed_json["actions"].nil?
|
|
51
|
+
actions = nil
|
|
52
|
+
else
|
|
53
|
+
actions = parsed_json["actions"].to_json
|
|
54
|
+
actions = Pinnacle::Types::RcsCapabilityActions.from_json(json_object: actions)
|
|
55
|
+
end
|
|
56
|
+
new(
|
|
57
|
+
cards: cards,
|
|
58
|
+
actions: actions,
|
|
59
|
+
additional_properties: struct
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Serialize an instance of RcsCapability to a JSON object
|
|
64
|
+
#
|
|
65
|
+
# @return [String]
|
|
66
|
+
def to_json(*_args)
|
|
67
|
+
@_field_set&.to_json
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
71
|
+
# hash and check each fields type against the current object's property
|
|
72
|
+
# definitions.
|
|
73
|
+
#
|
|
74
|
+
# @param obj [Object]
|
|
75
|
+
# @return [Void]
|
|
76
|
+
def self.validate_raw(obj:)
|
|
77
|
+
Pinnacle::Types::RcsCapabilityCards.validate_raw(obj: obj.cards)
|
|
78
|
+
Pinnacle::Types::RcsCapabilityActions.validate_raw(obj: obj.actions)
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ostruct"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
6
|
+
module Pinnacle
|
|
7
|
+
module Types
|
|
8
|
+
# Supported button action types inside the rich cards or quick replies. Each key
|
|
9
|
+
# is a button action type that defines a specific button type in the Pinnacle API.
|
|
10
|
+
class RcsCapabilityActions
|
|
11
|
+
# @return [Boolean] Buttons that open URLs are supported
|
|
12
|
+
attr_reader :open_url
|
|
13
|
+
# @return [Boolean] Buttons that make phone calls are supported
|
|
14
|
+
attr_reader :call
|
|
15
|
+
# @return [Boolean] Buttons that trigger actions are supported
|
|
16
|
+
attr_reader :trigger
|
|
17
|
+
# @return [Boolean] Buttons that request user location are supported
|
|
18
|
+
attr_reader :request_user_location
|
|
19
|
+
# @return [Boolean] Buttons are supported
|
|
20
|
+
attr_reader :schedule_event
|
|
21
|
+
# @return [Boolean] Buttons that send location are supported
|
|
22
|
+
attr_reader :send_location
|
|
23
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
24
|
+
attr_reader :additional_properties
|
|
25
|
+
# @return [Object]
|
|
26
|
+
attr_reader :_field_set
|
|
27
|
+
protected :_field_set
|
|
28
|
+
|
|
29
|
+
OMIT = Object.new
|
|
30
|
+
|
|
31
|
+
# @param open_url [Boolean] Buttons that open URLs are supported
|
|
32
|
+
# @param call [Boolean] Buttons that make phone calls are supported
|
|
33
|
+
# @param trigger [Boolean] Buttons that trigger actions are supported
|
|
34
|
+
# @param request_user_location [Boolean] Buttons that request user location are supported
|
|
35
|
+
# @param schedule_event [Boolean] Buttons are supported
|
|
36
|
+
# @param send_location [Boolean] Buttons that send location are supported
|
|
37
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
38
|
+
# @return [Pinnacle::Types::RcsCapabilityActions]
|
|
39
|
+
def initialize(open_url:, call:, trigger:, request_user_location:, schedule_event:, send_location:,
|
|
40
|
+
additional_properties: nil)
|
|
41
|
+
@open_url = open_url
|
|
42
|
+
@call = call
|
|
43
|
+
@trigger = trigger
|
|
44
|
+
@request_user_location = request_user_location
|
|
45
|
+
@schedule_event = schedule_event
|
|
46
|
+
@send_location = send_location
|
|
47
|
+
@additional_properties = additional_properties
|
|
48
|
+
@_field_set = {
|
|
49
|
+
"openUrl": open_url,
|
|
50
|
+
"call": call,
|
|
51
|
+
"trigger": trigger,
|
|
52
|
+
"requestUserLocation": request_user_location,
|
|
53
|
+
"scheduleEvent": schedule_event,
|
|
54
|
+
"sendLocation": send_location
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Deserialize a JSON object to an instance of RcsCapabilityActions
|
|
59
|
+
#
|
|
60
|
+
# @param json_object [String]
|
|
61
|
+
# @return [Pinnacle::Types::RcsCapabilityActions]
|
|
62
|
+
def self.from_json(json_object:)
|
|
63
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
64
|
+
parsed_json = JSON.parse(json_object)
|
|
65
|
+
open_url = parsed_json["openUrl"]
|
|
66
|
+
call = parsed_json["call"]
|
|
67
|
+
trigger = parsed_json["trigger"]
|
|
68
|
+
request_user_location = parsed_json["requestUserLocation"]
|
|
69
|
+
schedule_event = parsed_json["scheduleEvent"]
|
|
70
|
+
send_location = parsed_json["sendLocation"]
|
|
71
|
+
new(
|
|
72
|
+
open_url: open_url,
|
|
73
|
+
call: call,
|
|
74
|
+
trigger: trigger,
|
|
75
|
+
request_user_location: request_user_location,
|
|
76
|
+
schedule_event: schedule_event,
|
|
77
|
+
send_location: send_location,
|
|
78
|
+
additional_properties: struct
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Serialize an instance of RcsCapabilityActions to a JSON object
|
|
83
|
+
#
|
|
84
|
+
# @return [String]
|
|
85
|
+
def to_json(*_args)
|
|
86
|
+
@_field_set&.to_json
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
90
|
+
# hash and check each fields type against the current object's property
|
|
91
|
+
# definitions.
|
|
92
|
+
#
|
|
93
|
+
# @param obj [Object]
|
|
94
|
+
# @return [Void]
|
|
95
|
+
def self.validate_raw(obj:)
|
|
96
|
+
obj.open_url.is_a?(Boolean) != false || raise("Passed value for field obj.open_url is not the expected type, validation failed.")
|
|
97
|
+
obj.call.is_a?(Boolean) != false || raise("Passed value for field obj.call is not the expected type, validation failed.")
|
|
98
|
+
obj.trigger.is_a?(Boolean) != false || raise("Passed value for field obj.trigger is not the expected type, validation failed.")
|
|
99
|
+
obj.request_user_location.is_a?(Boolean) != false || raise("Passed value for field obj.request_user_location is not the expected type, validation failed.")
|
|
100
|
+
obj.schedule_event.is_a?(Boolean) != false || raise("Passed value for field obj.schedule_event is not the expected type, validation failed.")
|
|
101
|
+
obj.send_location.is_a?(Boolean) != false || raise("Passed value for field obj.send_location is not the expected type, validation failed.")
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
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 RcsCapabilityCards
|
|
9
|
+
# @return [Boolean] Whether the phone number supports standalone rich cards (`cards.length == 1`)
|
|
10
|
+
attr_reader :standalone
|
|
11
|
+
# @return [Boolean] Whether the phone number supports carousel rich cards
|
|
12
|
+
attr_reader :carousel
|
|
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 standalone [Boolean] Whether the phone number supports standalone rich cards (`cards.length == 1`)
|
|
22
|
+
# @param carousel [Boolean] Whether the phone number supports carousel rich cards
|
|
23
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
24
|
+
# @return [Pinnacle::Types::RcsCapabilityCards]
|
|
25
|
+
def initialize(standalone:, carousel:, additional_properties: nil)
|
|
26
|
+
@standalone = standalone
|
|
27
|
+
@carousel = carousel
|
|
28
|
+
@additional_properties = additional_properties
|
|
29
|
+
@_field_set = { "standalone": standalone, "carousel": carousel }
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Deserialize a JSON object to an instance of RcsCapabilityCards
|
|
33
|
+
#
|
|
34
|
+
# @param json_object [String]
|
|
35
|
+
# @return [Pinnacle::Types::RcsCapabilityCards]
|
|
36
|
+
def self.from_json(json_object:)
|
|
37
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
38
|
+
parsed_json = JSON.parse(json_object)
|
|
39
|
+
standalone = parsed_json["standalone"]
|
|
40
|
+
carousel = parsed_json["carousel"]
|
|
41
|
+
new(
|
|
42
|
+
standalone: standalone,
|
|
43
|
+
carousel: carousel,
|
|
44
|
+
additional_properties: struct
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Serialize an instance of RcsCapabilityCards 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.standalone.is_a?(Boolean) != false || raise("Passed value for field obj.standalone is not the expected type, validation failed.")
|
|
63
|
+
obj.carousel.is_a?(Boolean) != false || raise("Passed value for field obj.carousel is not the expected type, validation failed.")
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ostruct"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
6
|
+
module Pinnacle
|
|
7
|
+
module Types
|
|
8
|
+
# Response containing the generated RCS service id and/or url. You can always
|
|
9
|
+
# create a link with the service id that is returned.
|
|
10
|
+
# To create a link follow the format:
|
|
11
|
+
# sms://{PHONE_NUMBER}?service_id={SERVICE_ID}&body={URL_ENCODED_BODY}
|
|
12
|
+
class RcsLinkResult
|
|
13
|
+
# @return [String] The generated RCS link URL. If no phone number is provided, no url will be
|
|
14
|
+
# generated.
|
|
15
|
+
attr_reader :url
|
|
16
|
+
# @return [String] The service ID used for the link
|
|
17
|
+
attr_reader :service_id
|
|
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 url [String] The generated RCS link URL. If no phone number is provided, no url will be
|
|
27
|
+
# generated.
|
|
28
|
+
# @param service_id [String] The service ID used for the link
|
|
29
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
30
|
+
# @return [Pinnacle::Types::RcsLinkResult]
|
|
31
|
+
def initialize(service_id:, url: OMIT, additional_properties: nil)
|
|
32
|
+
@url = url if url != OMIT
|
|
33
|
+
@service_id = service_id
|
|
34
|
+
@additional_properties = additional_properties
|
|
35
|
+
@_field_set = { "url": url, "serviceId": service_id }.reject do |_k, v|
|
|
36
|
+
v == OMIT
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Deserialize a JSON object to an instance of RcsLinkResult
|
|
41
|
+
#
|
|
42
|
+
# @param json_object [String]
|
|
43
|
+
# @return [Pinnacle::Types::RcsLinkResult]
|
|
44
|
+
def self.from_json(json_object:)
|
|
45
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
46
|
+
parsed_json = JSON.parse(json_object)
|
|
47
|
+
url = parsed_json["url"]
|
|
48
|
+
service_id = parsed_json["serviceId"]
|
|
49
|
+
new(
|
|
50
|
+
url: url,
|
|
51
|
+
service_id: service_id,
|
|
52
|
+
additional_properties: struct
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Serialize an instance of RcsLinkResult to a JSON object
|
|
57
|
+
#
|
|
58
|
+
# @return [String]
|
|
59
|
+
def to_json(*_args)
|
|
60
|
+
@_field_set&.to_json
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
64
|
+
# hash and check each fields type against the current object's property
|
|
65
|
+
# definitions.
|
|
66
|
+
#
|
|
67
|
+
# @param obj [Object]
|
|
68
|
+
# @return [Void]
|
|
69
|
+
def self.validate_raw(obj:)
|
|
70
|
+
obj.url&.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
|
|
71
|
+
obj.service_id.is_a?(String) != false || raise("Passed value for field obj.service_id is not the expected type, validation failed.")
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require_relative "rich_button"
|
|
3
4
|
require "ostruct"
|
|
4
5
|
require "json"
|
|
5
6
|
|
|
@@ -12,6 +13,8 @@ module Pinnacle
|
|
|
12
13
|
class RcsValidateContentMedia
|
|
13
14
|
# @return [String] Media file URLs to send.
|
|
14
15
|
attr_reader :media
|
|
16
|
+
# @return [Array<Pinnacle::Types::RichButton>]
|
|
17
|
+
attr_reader :quick_replies
|
|
15
18
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
16
19
|
attr_reader :additional_properties
|
|
17
20
|
# @return [Object]
|
|
@@ -21,12 +24,14 @@ module Pinnacle
|
|
|
21
24
|
OMIT = Object.new
|
|
22
25
|
|
|
23
26
|
# @param media [String] Media file URLs to send.
|
|
27
|
+
# @param quick_replies [Array<Pinnacle::Types::RichButton>]
|
|
24
28
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
25
29
|
# @return [Pinnacle::Types::RcsValidateContentMedia]
|
|
26
|
-
def initialize(media:, additional_properties: nil)
|
|
30
|
+
def initialize(media:, quick_replies:, additional_properties: nil)
|
|
27
31
|
@media = media
|
|
32
|
+
@quick_replies = quick_replies
|
|
28
33
|
@additional_properties = additional_properties
|
|
29
|
-
@_field_set = { "media": media }
|
|
34
|
+
@_field_set = { "media": media, "quickReplies": quick_replies }
|
|
30
35
|
end
|
|
31
36
|
|
|
32
37
|
# Deserialize a JSON object to an instance of RcsValidateContentMedia
|
|
@@ -37,7 +42,15 @@ module Pinnacle
|
|
|
37
42
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
38
43
|
parsed_json = JSON.parse(json_object)
|
|
39
44
|
media = parsed_json["media"]
|
|
40
|
-
|
|
45
|
+
quick_replies = parsed_json["quickReplies"]&.map do |item|
|
|
46
|
+
item = item.to_json
|
|
47
|
+
Pinnacle::Types::RichButton.from_json(json_object: item)
|
|
48
|
+
end
|
|
49
|
+
new(
|
|
50
|
+
media: media,
|
|
51
|
+
quick_replies: quick_replies,
|
|
52
|
+
additional_properties: struct
|
|
53
|
+
)
|
|
41
54
|
end
|
|
42
55
|
|
|
43
56
|
# Serialize an instance of RcsValidateContentMedia to a JSON object
|
|
@@ -55,6 +68,7 @@ module Pinnacle
|
|
|
55
68
|
# @return [Void]
|
|
56
69
|
def self.validate_raw(obj:)
|
|
57
70
|
obj.media.is_a?(String) != false || raise("Passed value for field obj.media is not the expected type, validation failed.")
|
|
71
|
+
obj.quick_replies.is_a?(Array) != false || raise("Passed value for field obj.quick_replies is not the expected type, validation failed.")
|
|
58
72
|
end
|
|
59
73
|
end
|
|
60
74
|
end
|
|
@@ -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 indicating success of whitelisting operation
|
|
9
|
+
class RcsWhitelistResponse
|
|
10
|
+
# @return [Boolean] Whether the whitelisting operation was successful
|
|
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] Whether the whitelisting operation was successful
|
|
21
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
22
|
+
# @return [Pinnacle::Types::RcsWhitelistResponse]
|
|
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 RcsWhitelistResponse
|
|
30
|
+
#
|
|
31
|
+
# @param json_object [String]
|
|
32
|
+
# @return [Pinnacle::Types::RcsWhitelistResponse]
|
|
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 RcsWhitelistResponse 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
|
|
@@ -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
|
|
@@ -7,11 +7,11 @@ require_relative "rich_cards_message"
|
|
|
7
7
|
|
|
8
8
|
module Pinnacle
|
|
9
9
|
module Types
|
|
10
|
-
class
|
|
11
|
-
# Deserialize a JSON object to an instance of
|
|
10
|
+
class RichMessage
|
|
11
|
+
# Deserialize a JSON object to an instance of RichMessage
|
|
12
12
|
#
|
|
13
13
|
# @param json_object [String]
|
|
14
|
-
# @return [Pinnacle::Types::
|
|
14
|
+
# @return [Pinnacle::Types::RichMessage]
|
|
15
15
|
def self.from_json(json_object:)
|
|
16
16
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
17
17
|
begin
|