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
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "user_event_conversation"
|
|
4
|
+
require "ostruct"
|
|
5
|
+
require "json"
|
|
6
|
+
|
|
7
|
+
module Pinnacle
|
|
8
|
+
module Types
|
|
9
|
+
# Represents an event triggered by a user such as when they start typing.
|
|
10
|
+
class UserEvent
|
|
11
|
+
# @return [String] Type of user event.
|
|
12
|
+
attr_reader :type
|
|
13
|
+
# @return [String] Timestamp when the user event started in ISO 8601 format.
|
|
14
|
+
attr_reader :started_at
|
|
15
|
+
# @return [Pinnacle::Types::UserEventConversation] Conversation metadata containing the conversation ID, sender, and recipient
|
|
16
|
+
# information.
|
|
17
|
+
attr_reader :conversation
|
|
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 type [String] Type of user event.
|
|
27
|
+
# @param started_at [String] Timestamp when the user event started in ISO 8601 format.
|
|
28
|
+
# @param conversation [Pinnacle::Types::UserEventConversation] Conversation metadata containing the conversation ID, sender, and recipient
|
|
29
|
+
# information.
|
|
30
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
31
|
+
# @return [Pinnacle::Types::UserEvent]
|
|
32
|
+
def initialize(type:, started_at:, conversation:, additional_properties: nil)
|
|
33
|
+
@type = type
|
|
34
|
+
@started_at = started_at
|
|
35
|
+
@conversation = conversation
|
|
36
|
+
@additional_properties = additional_properties
|
|
37
|
+
@_field_set = { "type": type, "startedAt": started_at, "conversation": conversation }
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Deserialize a JSON object to an instance of UserEvent
|
|
41
|
+
#
|
|
42
|
+
# @param json_object [String]
|
|
43
|
+
# @return [Pinnacle::Types::UserEvent]
|
|
44
|
+
def self.from_json(json_object:)
|
|
45
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
46
|
+
parsed_json = JSON.parse(json_object)
|
|
47
|
+
type = parsed_json["type"]
|
|
48
|
+
started_at = parsed_json["startedAt"]
|
|
49
|
+
if parsed_json["conversation"].nil?
|
|
50
|
+
conversation = nil
|
|
51
|
+
else
|
|
52
|
+
conversation = parsed_json["conversation"].to_json
|
|
53
|
+
conversation = Pinnacle::Types::UserEventConversation.from_json(json_object: conversation)
|
|
54
|
+
end
|
|
55
|
+
new(
|
|
56
|
+
type: type,
|
|
57
|
+
started_at: started_at,
|
|
58
|
+
conversation: conversation,
|
|
59
|
+
additional_properties: struct
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Serialize an instance of UserEvent 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
|
+
obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
|
78
|
+
obj.started_at.is_a?(String) != false || raise("Passed value for field obj.started_at is not the expected type, validation failed.")
|
|
79
|
+
Pinnacle::Types::UserEventConversation.validate_raw(obj: obj.conversation)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ostruct"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
6
|
+
module Pinnacle
|
|
7
|
+
module Types
|
|
8
|
+
# Conversation metadata containing the conversation ID, sender, and recipient
|
|
9
|
+
# information.
|
|
10
|
+
class UserEventConversation
|
|
11
|
+
# @return [Integer] Unique identifier for the conversation. To get more conversation details, use
|
|
12
|
+
# the [POST /conversations/get](/api-reference/conversations/get) endpoint.
|
|
13
|
+
attr_reader :id
|
|
14
|
+
# @return [String] Phone number of the user who triggered the event.
|
|
15
|
+
attr_reader :from
|
|
16
|
+
# @return [String] Agent ID that the user is interacting with.
|
|
17
|
+
attr_reader :to
|
|
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 id [Integer] Unique identifier for the conversation. To get more conversation details, use
|
|
27
|
+
# the [POST /conversations/get](/api-reference/conversations/get) endpoint.
|
|
28
|
+
# @param from [String] Phone number of the user who triggered the event.
|
|
29
|
+
# @param to [String] Agent ID that the user is interacting with.
|
|
30
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
31
|
+
# @return [Pinnacle::Types::UserEventConversation]
|
|
32
|
+
def initialize(id:, from:, to:, additional_properties: nil)
|
|
33
|
+
@id = id
|
|
34
|
+
@from = from
|
|
35
|
+
@to = to
|
|
36
|
+
@additional_properties = additional_properties
|
|
37
|
+
@_field_set = { "id": id, "from": from, "to": to }
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Deserialize a JSON object to an instance of UserEventConversation
|
|
41
|
+
#
|
|
42
|
+
# @param json_object [String]
|
|
43
|
+
# @return [Pinnacle::Types::UserEventConversation]
|
|
44
|
+
def self.from_json(json_object:)
|
|
45
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
46
|
+
parsed_json = JSON.parse(json_object)
|
|
47
|
+
id = parsed_json["id"]
|
|
48
|
+
from = parsed_json["from"]
|
|
49
|
+
to = parsed_json["to"]
|
|
50
|
+
new(
|
|
51
|
+
id: id,
|
|
52
|
+
from: from,
|
|
53
|
+
to: to,
|
|
54
|
+
additional_properties: struct
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Serialize an instance of UserEventConversation to a JSON object
|
|
59
|
+
#
|
|
60
|
+
# @return [String]
|
|
61
|
+
def to_json(*_args)
|
|
62
|
+
@_field_set&.to_json
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
66
|
+
# hash and check each fields type against the current object's property
|
|
67
|
+
# definitions.
|
|
68
|
+
#
|
|
69
|
+
# @param obj [Object]
|
|
70
|
+
# @return [Void]
|
|
71
|
+
def self.validate_raw(obj:)
|
|
72
|
+
obj.id.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
|
73
|
+
obj.from.is_a?(String) != false || raise("Passed value for field obj.from is not the expected type, validation failed.")
|
|
74
|
+
obj.to.is_a?(String) != false || raise("Passed value for field obj.to is not the expected type, validation failed.")
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -17,7 +17,8 @@ module Pinnacle
|
|
|
17
17
|
attr_reader :file
|
|
18
18
|
# @return [String] ISO 8601 timestamp of last vCard update.
|
|
19
19
|
attr_reader :revision
|
|
20
|
-
# @return [
|
|
20
|
+
# @return [String] The unique identifier of the contact. This identifier is a string that always
|
|
21
|
+
# begins with the prefix `cc_`, for example: `cc_1234567890`.
|
|
21
22
|
attr_reader :id
|
|
22
23
|
# @return [String] Full display name for the vCard.
|
|
23
24
|
attr_reader :formatted_name
|
|
@@ -59,7 +60,8 @@ module Pinnacle
|
|
|
59
60
|
|
|
60
61
|
# @param file [Pinnacle::Types::VCardDataFile] File associated to the contact.
|
|
61
62
|
# @param revision [String] ISO 8601 timestamp of last vCard update.
|
|
62
|
-
# @param id [
|
|
63
|
+
# @param id [String] The unique identifier of the contact. This identifier is a string that always
|
|
64
|
+
# begins with the prefix `cc_`, for example: `cc_1234567890`.
|
|
63
65
|
# @param formatted_name [String] Full display name for the vCard.
|
|
64
66
|
# @param name [Pinnacle::Types::VCardName] Structured name components.
|
|
65
67
|
# @param nickname [Array<String>] Nicknames or aliases.
|
|
@@ -215,7 +217,7 @@ module Pinnacle
|
|
|
215
217
|
def self.validate_raw(obj:)
|
|
216
218
|
Pinnacle::Types::VCardDataFile.validate_raw(obj: obj.file)
|
|
217
219
|
obj.revision&.is_a?(String) != false || raise("Passed value for field obj.revision is not the expected type, validation failed.")
|
|
218
|
-
obj.id&.is_a?(
|
|
220
|
+
obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
|
219
221
|
obj.formatted_name&.is_a?(String) != false || raise("Passed value for field obj.formatted_name is not the expected type, validation failed.")
|
|
220
222
|
obj.name.nil? || Pinnacle::Types::VCardName.validate_raw(obj: obj.name)
|
|
221
223
|
obj.nickname&.is_a?(Array) != false || raise("Passed value for field obj.nickname is not the expected type, validation failed.")
|
|
@@ -8,7 +8,13 @@ module Pinnacle
|
|
|
8
8
|
class ValidateCampaignParams
|
|
9
9
|
# @return [String] Any additional information you want to provide.
|
|
10
10
|
attr_reader :additional_info
|
|
11
|
-
# @return [
|
|
11
|
+
# @return [String] Unique identifier for the campaign.
|
|
12
|
+
# - When validating 10DLC campaigns, it must begin with the prefix `dlc_` (e.g.,
|
|
13
|
+
# `dlc_1234567890`)
|
|
14
|
+
# - When validating toll-free campaigns, it must begin with the prefix `tf_`
|
|
15
|
+
# (e.g., `tf_1234567890`)
|
|
16
|
+
# - When validating RCS campaigns, it must begin with the prefix `rcs_` (e.g.,
|
|
17
|
+
# `rcs_1234567890`)
|
|
12
18
|
attr_reader :campaign_id
|
|
13
19
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
14
20
|
attr_reader :additional_properties
|
|
@@ -19,7 +25,13 @@ module Pinnacle
|
|
|
19
25
|
OMIT = Object.new
|
|
20
26
|
|
|
21
27
|
# @param additional_info [String] Any additional information you want to provide.
|
|
22
|
-
# @param campaign_id [
|
|
28
|
+
# @param campaign_id [String] Unique identifier for the campaign.
|
|
29
|
+
# - When validating 10DLC campaigns, it must begin with the prefix `dlc_` (e.g.,
|
|
30
|
+
# `dlc_1234567890`)
|
|
31
|
+
# - When validating toll-free campaigns, it must begin with the prefix `tf_`
|
|
32
|
+
# (e.g., `tf_1234567890`)
|
|
33
|
+
# - When validating RCS campaigns, it must begin with the prefix `rcs_` (e.g.,
|
|
34
|
+
# `rcs_1234567890`)
|
|
23
35
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
24
36
|
# @return [Pinnacle::Types::ValidateCampaignParams]
|
|
25
37
|
def initialize(campaign_id:, additional_info: OMIT, additional_properties: nil)
|
|
@@ -62,7 +74,7 @@ module Pinnacle
|
|
|
62
74
|
# @return [Void]
|
|
63
75
|
def self.validate_raw(obj:)
|
|
64
76
|
obj.additional_info&.is_a?(String) != false || raise("Passed value for field obj.additional_info is not the expected type, validation failed.")
|
|
65
|
-
obj.campaign_id.is_a?(
|
|
77
|
+
obj.campaign_id.is_a?(String) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
|
|
66
78
|
end
|
|
67
79
|
end
|
|
68
80
|
end
|
data/lib/rcs/types/vcard.rb
CHANGED
|
@@ -12,7 +12,8 @@ require "json"
|
|
|
12
12
|
module Pinnacle
|
|
13
13
|
module Types
|
|
14
14
|
class Vcard
|
|
15
|
-
# @return [
|
|
15
|
+
# @return [String] The unique identifier of the contact. This identifier is a string that always
|
|
16
|
+
# begins with the prefix `cc_`, for example: `cc_1234567890`.
|
|
16
17
|
attr_reader :id
|
|
17
18
|
# @return [String] Full display name for the vCard.
|
|
18
19
|
attr_reader :formatted_name
|
|
@@ -52,7 +53,8 @@ module Pinnacle
|
|
|
52
53
|
|
|
53
54
|
OMIT = Object.new
|
|
54
55
|
|
|
55
|
-
# @param id [
|
|
56
|
+
# @param id [String] The unique identifier of the contact. This identifier is a string that always
|
|
57
|
+
# begins with the prefix `cc_`, for example: `cc_1234567890`.
|
|
56
58
|
# @param formatted_name [String] Full display name for the vCard.
|
|
57
59
|
# @param name [Pinnacle::Types::VCardName] Structured name components.
|
|
58
60
|
# @param nickname [Array<String>] Nicknames or aliases.
|
|
@@ -193,7 +195,7 @@ module Pinnacle
|
|
|
193
195
|
# @param obj [Object]
|
|
194
196
|
# @return [Void]
|
|
195
197
|
def self.validate_raw(obj:)
|
|
196
|
-
obj.id&.is_a?(
|
|
198
|
+
obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
|
197
199
|
obj.formatted_name&.is_a?(String) != false || raise("Passed value for field obj.formatted_name is not the expected type, validation failed.")
|
|
198
200
|
obj.name.nil? || Pinnacle::Types::VCardName.validate_raw(obj: obj.name)
|
|
199
201
|
obj.nickname&.is_a?(Array) != false || raise("Passed value for field obj.nickname is not the expected type, validation failed.")
|
|
@@ -14,7 +14,8 @@ module Pinnacle
|
|
|
14
14
|
class VcardContent
|
|
15
15
|
# @return [String] ISO 8601 timestamp of last vCard update.
|
|
16
16
|
attr_reader :revision
|
|
17
|
-
# @return [
|
|
17
|
+
# @return [String] The unique identifier of the contact. This identifier is a string that always
|
|
18
|
+
# begins with the prefix `cc_`, for example: `cc_1234567890`.
|
|
18
19
|
attr_reader :id
|
|
19
20
|
# @return [String] Full display name for the vCard.
|
|
20
21
|
attr_reader :formatted_name
|
|
@@ -55,7 +56,8 @@ module Pinnacle
|
|
|
55
56
|
OMIT = Object.new
|
|
56
57
|
|
|
57
58
|
# @param revision [String] ISO 8601 timestamp of last vCard update.
|
|
58
|
-
# @param id [
|
|
59
|
+
# @param id [String] The unique identifier of the contact. This identifier is a string that always
|
|
60
|
+
# begins with the prefix `cc_`, for example: `cc_1234567890`.
|
|
59
61
|
# @param formatted_name [String] Full display name for the vCard.
|
|
60
62
|
# @param name [Pinnacle::Types::VCardName] Structured name components.
|
|
61
63
|
# @param nickname [Array<String>] Nicknames or aliases.
|
|
@@ -201,7 +203,7 @@ module Pinnacle
|
|
|
201
203
|
# @return [Void]
|
|
202
204
|
def self.validate_raw(obj:)
|
|
203
205
|
obj.revision&.is_a?(String) != false || raise("Passed value for field obj.revision is not the expected type, validation failed.")
|
|
204
|
-
obj.id&.is_a?(
|
|
206
|
+
obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
|
205
207
|
obj.formatted_name&.is_a?(String) != false || raise("Passed value for field obj.formatted_name is not the expected type, validation failed.")
|
|
206
208
|
obj.name.nil? || Pinnacle::Types::VCardName.validate_raw(obj: obj.name)
|
|
207
209
|
obj.nickname&.is_a?(Array) != false || raise("Passed value for field obj.nickname is not the expected type, validation failed.")
|
|
@@ -6,7 +6,8 @@ require "json"
|
|
|
6
6
|
module Pinnacle
|
|
7
7
|
module Types
|
|
8
8
|
class VcardResource
|
|
9
|
-
# @return [
|
|
9
|
+
# @return [String] The unique identifier of the contact. This identifier is a string that always
|
|
10
|
+
# begins with the prefix `cc_`, for example: `cc_1234567890`.
|
|
10
11
|
attr_reader :id
|
|
11
12
|
# @return [String] Presigned download url to download vCard data. <br>
|
|
12
13
|
# This link will expire in one hour.
|
|
@@ -19,7 +20,8 @@ module Pinnacle
|
|
|
19
20
|
|
|
20
21
|
OMIT = Object.new
|
|
21
22
|
|
|
22
|
-
# @param id [
|
|
23
|
+
# @param id [String] The unique identifier of the contact. This identifier is a string that always
|
|
24
|
+
# begins with the prefix `cc_`, for example: `cc_1234567890`.
|
|
23
25
|
# @param download_url [String] Presigned download url to download vCard data. <br>
|
|
24
26
|
# This link will expire in one hour.
|
|
25
27
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
@@ -63,7 +65,7 @@ module Pinnacle
|
|
|
63
65
|
# @param obj [Object]
|
|
64
66
|
# @return [Void]
|
|
65
67
|
def self.validate_raw(obj:)
|
|
66
|
-
obj.id&.is_a?(
|
|
68
|
+
obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
|
67
69
|
obj.download_url&.is_a?(String) != false || raise("Passed value for field obj.download_url is not the expected type, validation failed.")
|
|
68
70
|
end
|
|
69
71
|
end
|
|
@@ -5,6 +5,7 @@ module Pinnacle
|
|
|
5
5
|
# Types of events that can trigger webhook notifications for phone numbers.
|
|
6
6
|
# Subscribe to specific events to receive real-time updates about your phone
|
|
7
7
|
# number activity.
|
|
8
|
+
# Use `null` to listen to all events.
|
|
8
9
|
class WebhookEventEnum
|
|
9
10
|
MESSAGE_STATUS = "MESSAGE.STATUS"
|
|
10
11
|
MESSAGE_RECEIVED = "MESSAGE.RECEIVED"
|
data/lib/rcs/types/webhooks.rb
CHANGED
|
@@ -9,7 +9,8 @@ module Pinnacle
|
|
|
9
9
|
class Webhooks
|
|
10
10
|
# @return [String] URL where webhook events are delivered.
|
|
11
11
|
attr_reader :endpoint
|
|
12
|
-
# @return [
|
|
12
|
+
# @return [String] The unique identifier of the webhook. This identifier is a string that always
|
|
13
|
+
# begins with the prefix `wh_`, for example: `wh_1234567890`.
|
|
13
14
|
attr_reader :id
|
|
14
15
|
# @return [String] Name of the webhook.
|
|
15
16
|
attr_reader :name
|
|
@@ -22,7 +23,8 @@ module Pinnacle
|
|
|
22
23
|
OMIT = Object.new
|
|
23
24
|
|
|
24
25
|
# @param endpoint [String] URL where webhook events are delivered.
|
|
25
|
-
# @param id [
|
|
26
|
+
# @param id [String] The unique identifier of the webhook. This identifier is a string that always
|
|
27
|
+
# begins with the prefix `wh_`, for example: `wh_1234567890`.
|
|
26
28
|
# @param name [String] Name of the webhook.
|
|
27
29
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
28
30
|
# @return [Pinnacle::Types::Webhooks]
|
|
@@ -67,7 +69,7 @@ module Pinnacle
|
|
|
67
69
|
# @return [Void]
|
|
68
70
|
def self.validate_raw(obj:)
|
|
69
71
|
obj.endpoint.is_a?(String) != false || raise("Passed value for field obj.endpoint is not the expected type, validation failed.")
|
|
70
|
-
obj.id.is_a?(
|
|
72
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
|
71
73
|
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
|
72
74
|
end
|
|
73
75
|
end
|
data/lib/requests.rb
CHANGED
|
@@ -43,7 +43,7 @@ module Pinnacle
|
|
|
43
43
|
|
|
44
44
|
# @return [Hash{String => String}]
|
|
45
45
|
def get_headers
|
|
46
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "2.0.0
|
|
46
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "2.0.0" }
|
|
47
47
|
headers["PINNACLE-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
|
|
48
48
|
headers
|
|
49
49
|
end
|
|
@@ -87,7 +87,7 @@ module Pinnacle
|
|
|
87
87
|
|
|
88
88
|
# @return [Hash{String => String}]
|
|
89
89
|
def get_headers
|
|
90
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "2.0.0
|
|
90
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "2.0.0" }
|
|
91
91
|
headers["PINNACLE-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
|
|
92
92
|
headers
|
|
93
93
|
end
|
data/lib/types_export.rb
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
require_relative "rcs/brands/types/autofill_brand_options"
|
|
4
4
|
require_relative "rcs/brands/types/brand_contact"
|
|
5
|
+
require_relative "rcs/conversations/types/conversations_list_messages_request_sort_order"
|
|
6
|
+
require_relative "rcs/conversations/types/conversations_list_messages_request_direction"
|
|
7
|
+
require_relative "rcs/conversations/types/conversations_list_messages_request_status"
|
|
8
|
+
require_relative "rcs/conversations/types/conversations_list_messages_request_type"
|
|
5
9
|
require_relative "rcs/messages/types/react_message_options"
|
|
6
10
|
require_relative "rcs/phone_numbers/types/search_phone_number_by_location"
|
|
7
11
|
require_relative "rcs/phone_numbers/types/search_phone_number_by_digits"
|
|
@@ -46,6 +50,7 @@ require_relative "rcs/tools/contact_card/types/get_v_card_schema_options"
|
|
|
46
50
|
require_relative "rcs/types/zod_error"
|
|
47
51
|
require_relative "rcs/types/error"
|
|
48
52
|
require_relative "rcs/types/bad_request_error_body"
|
|
53
|
+
require_relative "rcs/types/not_found_error_body"
|
|
49
54
|
require_relative "rcs/types/optional_contacts"
|
|
50
55
|
require_relative "rcs/types/company_sector_enum"
|
|
51
56
|
require_relative "rcs/types/company_type_enum"
|
|
@@ -127,8 +132,6 @@ require_relative "rcs/types/phone"
|
|
|
127
132
|
require_relative "rcs/types/agent"
|
|
128
133
|
require_relative "rcs/types/conversation_sender"
|
|
129
134
|
require_relative "rcs/types/conversation"
|
|
130
|
-
require_relative "rcs/types/error_response"
|
|
131
|
-
require_relative "rcs/types/retrieved_conversations"
|
|
132
135
|
require_relative "rcs/types/conversation_list"
|
|
133
136
|
require_relative "rcs/types/successful_conversation_update"
|
|
134
137
|
require_relative "rcs/types/sms_content"
|
|
@@ -147,17 +150,21 @@ require_relative "rcs/types/rcs_media_content"
|
|
|
147
150
|
require_relative "rcs/types/rcs_cards_content_cards_item"
|
|
148
151
|
require_relative "rcs/types/rcs_cards_content"
|
|
149
152
|
require_relative "rcs/types/rcs_content"
|
|
150
|
-
require_relative "rcs/types/
|
|
151
|
-
require_relative "rcs/types/
|
|
152
|
-
require_relative "rcs/types/
|
|
153
|
+
require_relative "rcs/types/button_clicked_data_button_type"
|
|
154
|
+
require_relative "rcs/types/button_clicked_data_button_raw"
|
|
155
|
+
require_relative "rcs/types/button_clicked_data_button"
|
|
156
|
+
require_relative "rcs/types/button_clicked_data"
|
|
153
157
|
require_relative "rcs/types/location_share_action_data"
|
|
154
158
|
require_relative "rcs/types/location_share_action"
|
|
155
|
-
require_relative "rcs/types/
|
|
159
|
+
require_relative "rcs/types/button_clicked"
|
|
156
160
|
require_relative "rcs/types/message_content"
|
|
157
161
|
require_relative "rcs/types/message_method_enum"
|
|
158
162
|
require_relative "rcs/types/message_status_enum"
|
|
159
163
|
require_relative "rcs/types/message_protocol_enum"
|
|
160
164
|
require_relative "rcs/types/message"
|
|
165
|
+
require_relative "rcs/types/message_with_reaction_direction"
|
|
166
|
+
require_relative "rcs/types/message_with_reaction"
|
|
167
|
+
require_relative "rcs/types/message_list"
|
|
161
168
|
require_relative "rcs/types/reaction_result"
|
|
162
169
|
require_relative "rcs/types/message_schedule"
|
|
163
170
|
require_relative "rcs/types/tracking"
|
|
@@ -171,7 +178,7 @@ require_relative "rcs/types/rich_media_message"
|
|
|
171
178
|
require_relative "rcs/types/rcs_cards_cards_item"
|
|
172
179
|
require_relative "rcs/types/rcs_cards"
|
|
173
180
|
require_relative "rcs/types/rich_cards_message"
|
|
174
|
-
require_relative "rcs/types/
|
|
181
|
+
require_relative "rcs/types/rich_message"
|
|
175
182
|
require_relative "rcs/types/sms_validation_response_segments_gsm_7"
|
|
176
183
|
require_relative "rcs/types/sms_validation_response_segments_utf_16"
|
|
177
184
|
require_relative "rcs/types/sms_validation_response_segments"
|
|
@@ -244,6 +251,7 @@ require_relative "rcs/types/link_click_event"
|
|
|
244
251
|
require_relative "rcs/types/shortened_url_with_click_data"
|
|
245
252
|
require_relative "rcs/types/pinnacle_file_upload_metadata"
|
|
246
253
|
require_relative "rcs/types/upload_results"
|
|
254
|
+
require_relative "rcs/types/refreshed_file"
|
|
247
255
|
require_relative "rcs/types/v_card_address_schema_type_item"
|
|
248
256
|
require_relative "rcs/types/vcard_address"
|
|
249
257
|
require_relative "rcs/types/v_card_phone_schema_type_item"
|
|
@@ -261,3 +269,17 @@ require_relative "rcs/types/v_card_data"
|
|
|
261
269
|
require_relative "rcs/types/vcard_resource"
|
|
262
270
|
require_relative "rcs/types/webhooks"
|
|
263
271
|
require_relative "rcs/types/webhook_result"
|
|
272
|
+
require_relative "rcs/types/message_event_sms_content"
|
|
273
|
+
require_relative "rcs/types/message_event_mms_content"
|
|
274
|
+
require_relative "rcs/types/message_event_rcs_text_content"
|
|
275
|
+
require_relative "rcs/types/message_event_rcs_media_content"
|
|
276
|
+
require_relative "rcs/types/message_event_rcs_cards_content_cards_item"
|
|
277
|
+
require_relative "rcs/types/message_event_rcs_cards_content"
|
|
278
|
+
require_relative "rcs/types/message_event_rcs_button_data"
|
|
279
|
+
require_relative "rcs/types/message_event_rcs_location_data"
|
|
280
|
+
require_relative "rcs/types/message_event_content"
|
|
281
|
+
require_relative "rcs/types/message_event_conversation"
|
|
282
|
+
require_relative "rcs/types/message_event_direction"
|
|
283
|
+
require_relative "rcs/types/message_event"
|
|
284
|
+
require_relative "rcs/types/user_event_conversation"
|
|
285
|
+
require_relative "rcs/types/user_event"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rcs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.0
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-11-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: async-http-faraday
|
|
@@ -127,6 +127,10 @@ files:
|
|
|
127
127
|
- lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_use_case.rb
|
|
128
128
|
- lib/rcs/contacts/client.rb
|
|
129
129
|
- lib/rcs/conversations/client.rb
|
|
130
|
+
- lib/rcs/conversations/types/conversations_list_messages_request_direction.rb
|
|
131
|
+
- lib/rcs/conversations/types/conversations_list_messages_request_sort_order.rb
|
|
132
|
+
- lib/rcs/conversations/types/conversations_list_messages_request_status.rb
|
|
133
|
+
- lib/rcs/conversations/types/conversations_list_messages_request_type.rb
|
|
130
134
|
- lib/rcs/messages/client.rb
|
|
131
135
|
- lib/rcs/messages/mms/client.rb
|
|
132
136
|
- lib/rcs/messages/mms/types/mms_send_response.rb
|
|
@@ -186,15 +190,17 @@ files:
|
|
|
186
190
|
- lib/rcs/types/basic_phone_information_location_country.rb
|
|
187
191
|
- lib/rcs/types/brand_status.rb
|
|
188
192
|
- lib/rcs/types/brand_status_enum.rb
|
|
193
|
+
- lib/rcs/types/button_clicked.rb
|
|
194
|
+
- lib/rcs/types/button_clicked_data.rb
|
|
195
|
+
- lib/rcs/types/button_clicked_data_button.rb
|
|
196
|
+
- lib/rcs/types/button_clicked_data_button_raw.rb
|
|
197
|
+
- lib/rcs/types/button_clicked_data_button_type.rb
|
|
189
198
|
- lib/rcs/types/buy_response_capabilities.rb
|
|
190
199
|
- lib/rcs/types/campaign_enum.rb
|
|
191
200
|
- lib/rcs/types/campaign_query.rb
|
|
192
201
|
- lib/rcs/types/campaign_submission_result.rb
|
|
193
202
|
- lib/rcs/types/campaign_validation_response_errors_item.rb
|
|
194
203
|
- lib/rcs/types/campaign_validation_result.rb
|
|
195
|
-
- lib/rcs/types/click_action.rb
|
|
196
|
-
- lib/rcs/types/click_action_data.rb
|
|
197
|
-
- lib/rcs/types/click_action_data_metadata.rb
|
|
198
204
|
- lib/rcs/types/company_sector_enum.rb
|
|
199
205
|
- lib/rcs/types/company_type_enum.rb
|
|
200
206
|
- lib/rcs/types/configured_webhook.rb
|
|
@@ -225,29 +231,43 @@ files:
|
|
|
225
231
|
- lib/rcs/types/enhanced_contact.rb
|
|
226
232
|
- lib/rcs/types/enhanced_contact_item.rb
|
|
227
233
|
- lib/rcs/types/error.rb
|
|
228
|
-
- lib/rcs/types/error_response.rb
|
|
229
234
|
- lib/rcs/types/extended_brand.rb
|
|
230
235
|
- lib/rcs/types/extended_brand_with_vetting.rb
|
|
231
236
|
- lib/rcs/types/extended_rcs_campaign.rb
|
|
232
237
|
- lib/rcs/types/get_conversation_params.rb
|
|
233
238
|
- lib/rcs/types/get_dlc_campaign_status_response_updates.rb
|
|
234
239
|
- lib/rcs/types/get_toll_free_campaign_status_response_updates.rb
|
|
235
|
-
- lib/rcs/types/inbound_button.rb
|
|
236
240
|
- lib/rcs/types/link_click_event.rb
|
|
237
241
|
- lib/rcs/types/location_share_action.rb
|
|
238
242
|
- lib/rcs/types/location_share_action_data.rb
|
|
239
243
|
- lib/rcs/types/message.rb
|
|
240
244
|
- lib/rcs/types/message_content.rb
|
|
245
|
+
- lib/rcs/types/message_event.rb
|
|
246
|
+
- lib/rcs/types/message_event_content.rb
|
|
247
|
+
- lib/rcs/types/message_event_conversation.rb
|
|
248
|
+
- lib/rcs/types/message_event_direction.rb
|
|
249
|
+
- lib/rcs/types/message_event_mms_content.rb
|
|
250
|
+
- lib/rcs/types/message_event_rcs_button_data.rb
|
|
251
|
+
- lib/rcs/types/message_event_rcs_cards_content.rb
|
|
252
|
+
- lib/rcs/types/message_event_rcs_cards_content_cards_item.rb
|
|
253
|
+
- lib/rcs/types/message_event_rcs_location_data.rb
|
|
254
|
+
- lib/rcs/types/message_event_rcs_media_content.rb
|
|
255
|
+
- lib/rcs/types/message_event_rcs_text_content.rb
|
|
256
|
+
- lib/rcs/types/message_event_sms_content.rb
|
|
257
|
+
- lib/rcs/types/message_list.rb
|
|
241
258
|
- lib/rcs/types/message_method_enum.rb
|
|
242
259
|
- lib/rcs/types/message_protocol_enum.rb
|
|
243
260
|
- lib/rcs/types/message_schedule.rb
|
|
244
261
|
- lib/rcs/types/message_status_enum.rb
|
|
245
262
|
- lib/rcs/types/message_volume_enum.rb
|
|
263
|
+
- lib/rcs/types/message_with_reaction.rb
|
|
264
|
+
- lib/rcs/types/message_with_reaction_direction.rb
|
|
246
265
|
- lib/rcs/types/messaging_profile_enum.rb
|
|
247
266
|
- lib/rcs/types/mms_content.rb
|
|
248
267
|
- lib/rcs/types/mms_validation_response_segments.rb
|
|
249
268
|
- lib/rcs/types/mms_validation_response_segments_value_item.rb
|
|
250
269
|
- lib/rcs/types/mms_validation_result.rb
|
|
270
|
+
- lib/rcs/types/not_found_error_body.rb
|
|
251
271
|
- lib/rcs/types/number_format.rb
|
|
252
272
|
- lib/rcs/types/opt_in_method_enum.rb
|
|
253
273
|
- lib/rcs/types/optional_brand_info.rb
|
|
@@ -273,7 +293,6 @@ files:
|
|
|
273
293
|
- lib/rcs/types/pinnacle_url_config.rb
|
|
274
294
|
- lib/rcs/types/profile_status_enum.rb
|
|
275
295
|
- lib/rcs/types/purchased_number.rb
|
|
276
|
-
- lib/rcs/types/rcs.rb
|
|
277
296
|
- lib/rcs/types/rcs_base.rb
|
|
278
297
|
- lib/rcs/types/rcs_base_options.rb
|
|
279
298
|
- lib/rcs/types/rcs_button_call.rb
|
|
@@ -321,10 +340,11 @@ files:
|
|
|
321
340
|
- lib/rcs/types/rcs_validation_result.rb
|
|
322
341
|
- lib/rcs/types/rcs_whitelist_response.rb
|
|
323
342
|
- lib/rcs/types/reaction_result.rb
|
|
324
|
-
- lib/rcs/types/
|
|
343
|
+
- lib/rcs/types/refreshed_file.rb
|
|
325
344
|
- lib/rcs/types/rich_button.rb
|
|
326
345
|
- lib/rcs/types/rich_cards_message.rb
|
|
327
346
|
- lib/rcs/types/rich_media_message.rb
|
|
347
|
+
- lib/rcs/types/rich_message.rb
|
|
328
348
|
- lib/rcs/types/rich_text_message.rb
|
|
329
349
|
- lib/rcs/types/scheduled_messaage.rb
|
|
330
350
|
- lib/rcs/types/scheduled_send_response_config.rb
|
|
@@ -355,6 +375,8 @@ files:
|
|
|
355
375
|
- lib/rcs/types/upsert_contact.rb
|
|
356
376
|
- lib/rcs/types/upsert_toll_free_campaign_opt_in.rb
|
|
357
377
|
- lib/rcs/types/upsert_toll_free_campaign_use_case.rb
|
|
378
|
+
- lib/rcs/types/user_event.rb
|
|
379
|
+
- lib/rcs/types/user_event_conversation.rb
|
|
358
380
|
- lib/rcs/types/v_card_address_schema_type_item.rb
|
|
359
381
|
- lib/rcs/types/v_card_data.rb
|
|
360
382
|
- lib/rcs/types/v_card_data_file.rb
|
|
@@ -401,9 +423,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
401
423
|
version: 2.7.0
|
|
402
424
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
403
425
|
requirements:
|
|
404
|
-
- - "
|
|
426
|
+
- - ">="
|
|
405
427
|
- !ruby/object:Gem::Version
|
|
406
|
-
version:
|
|
428
|
+
version: '0'
|
|
407
429
|
requirements: []
|
|
408
430
|
rubygems_version: 3.1.6
|
|
409
431
|
signing_key:
|