rcs 2.0.0.pre.rc.5 → 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 +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 +1 -1
- 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/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_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/{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/requests.rb +2 -2
- data/lib/types_export.rb +29 -7
- metadata +33 -11
- data/lib/rcs/types/click_action.rb +0 -73
- data/lib/rcs/types/click_action_data_metadata.rb +0 -69
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "click_action_data"
|
|
4
|
-
require "ostruct"
|
|
5
|
-
require "json"
|
|
6
|
-
|
|
7
|
-
module Pinnacle
|
|
8
|
-
module Types
|
|
9
|
-
class ClickAction
|
|
10
|
-
# @return [String] Title of the button or quick reply that was clicked on.
|
|
11
|
-
attr_reader :button
|
|
12
|
-
# @return [Pinnacle::Types::ClickActionData] Payload received from the button interaction.
|
|
13
|
-
attr_reader :data
|
|
14
|
-
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
15
|
-
attr_reader :additional_properties
|
|
16
|
-
# @return [Object]
|
|
17
|
-
attr_reader :_field_set
|
|
18
|
-
protected :_field_set
|
|
19
|
-
|
|
20
|
-
OMIT = Object.new
|
|
21
|
-
|
|
22
|
-
# @param button [String] Title of the button or quick reply that was clicked on.
|
|
23
|
-
# @param data [Pinnacle::Types::ClickActionData] Payload received from the button interaction.
|
|
24
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
25
|
-
# @return [Pinnacle::Types::ClickAction]
|
|
26
|
-
def initialize(button:, data:, additional_properties: nil)
|
|
27
|
-
@button = button
|
|
28
|
-
@data = data
|
|
29
|
-
@additional_properties = additional_properties
|
|
30
|
-
@_field_set = { "button": button, "data": data }
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# Deserialize a JSON object to an instance of ClickAction
|
|
34
|
-
#
|
|
35
|
-
# @param json_object [String]
|
|
36
|
-
# @return [Pinnacle::Types::ClickAction]
|
|
37
|
-
def self.from_json(json_object:)
|
|
38
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
39
|
-
parsed_json = JSON.parse(json_object)
|
|
40
|
-
button = parsed_json["button"]
|
|
41
|
-
if parsed_json["data"].nil?
|
|
42
|
-
data = nil
|
|
43
|
-
else
|
|
44
|
-
data = parsed_json["data"].to_json
|
|
45
|
-
data = Pinnacle::Types::ClickActionData.from_json(json_object: data)
|
|
46
|
-
end
|
|
47
|
-
new(
|
|
48
|
-
button: button,
|
|
49
|
-
data: data,
|
|
50
|
-
additional_properties: struct
|
|
51
|
-
)
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
# Serialize an instance of ClickAction to a JSON object
|
|
55
|
-
#
|
|
56
|
-
# @return [String]
|
|
57
|
-
def to_json(*_args)
|
|
58
|
-
@_field_set&.to_json
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
62
|
-
# hash and check each fields type against the current object's property
|
|
63
|
-
# definitions.
|
|
64
|
-
#
|
|
65
|
-
# @param obj [Object]
|
|
66
|
-
# @return [Void]
|
|
67
|
-
def self.validate_raw(obj:)
|
|
68
|
-
obj.button.is_a?(String) != false || raise("Passed value for field obj.button is not the expected type, validation failed.")
|
|
69
|
-
Pinnacle::Types::ClickActionData.validate_raw(obj: obj.data)
|
|
70
|
-
end
|
|
71
|
-
end
|
|
72
|
-
end
|
|
73
|
-
end
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "ostruct"
|
|
4
|
-
require "json"
|
|
5
|
-
|
|
6
|
-
module Pinnacle
|
|
7
|
-
module Types
|
|
8
|
-
# Data that is attached to the button. <br>
|
|
9
|
-
# This is only returned when `trigger` buttons are pressed.
|
|
10
|
-
class ClickActionDataMetadata
|
|
11
|
-
# @return [String] Additional metadata attached to the interaction.
|
|
12
|
-
attr_reader :metadata
|
|
13
|
-
# @return [String] Payload associated with the button.
|
|
14
|
-
attr_reader :payload
|
|
15
|
-
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
16
|
-
attr_reader :additional_properties
|
|
17
|
-
# @return [Object]
|
|
18
|
-
attr_reader :_field_set
|
|
19
|
-
protected :_field_set
|
|
20
|
-
|
|
21
|
-
OMIT = Object.new
|
|
22
|
-
|
|
23
|
-
# @param metadata [String] Additional metadata attached to the interaction.
|
|
24
|
-
# @param payload [String] Payload associated with the button.
|
|
25
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
26
|
-
# @return [Pinnacle::Types::ClickActionDataMetadata]
|
|
27
|
-
def initialize(metadata:, payload:, additional_properties: nil)
|
|
28
|
-
@metadata = metadata
|
|
29
|
-
@payload = payload
|
|
30
|
-
@additional_properties = additional_properties
|
|
31
|
-
@_field_set = { "metadata": metadata, "payload": payload }
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
# Deserialize a JSON object to an instance of ClickActionDataMetadata
|
|
35
|
-
#
|
|
36
|
-
# @param json_object [String]
|
|
37
|
-
# @return [Pinnacle::Types::ClickActionDataMetadata]
|
|
38
|
-
def self.from_json(json_object:)
|
|
39
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
40
|
-
parsed_json = JSON.parse(json_object)
|
|
41
|
-
metadata = parsed_json["metadata"]
|
|
42
|
-
payload = parsed_json["payload"]
|
|
43
|
-
new(
|
|
44
|
-
metadata: metadata,
|
|
45
|
-
payload: payload,
|
|
46
|
-
additional_properties: struct
|
|
47
|
-
)
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# Serialize an instance of ClickActionDataMetadata to a JSON object
|
|
51
|
-
#
|
|
52
|
-
# @return [String]
|
|
53
|
-
def to_json(*_args)
|
|
54
|
-
@_field_set&.to_json
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
58
|
-
# hash and check each fields type against the current object's property
|
|
59
|
-
# definitions.
|
|
60
|
-
#
|
|
61
|
-
# @param obj [Object]
|
|
62
|
-
# @return [Void]
|
|
63
|
-
def self.validate_raw(obj:)
|
|
64
|
-
obj.metadata.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
|
|
65
|
-
obj.payload.is_a?(String) != false || raise("Passed value for field obj.payload is not the expected type, validation failed.")
|
|
66
|
-
end
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
end
|