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
|
@@ -10,6 +10,8 @@ module Pinnacle
|
|
|
10
10
|
class RcsButtonSendLocation
|
|
11
11
|
# @return [Pinnacle::Types::RcsButtonSendLocationLatLong] Geographic coordinates of the location to share.
|
|
12
12
|
attr_reader :lat_long
|
|
13
|
+
# @return [String] Optional additional data to attach to this button.
|
|
14
|
+
attr_reader :metadata
|
|
13
15
|
# @return [String] Display text for the button.
|
|
14
16
|
attr_reader :title
|
|
15
17
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
@@ -21,14 +23,18 @@ module Pinnacle
|
|
|
21
23
|
OMIT = Object.new
|
|
22
24
|
|
|
23
25
|
# @param lat_long [Pinnacle::Types::RcsButtonSendLocationLatLong] Geographic coordinates of the location to share.
|
|
26
|
+
# @param metadata [String] Optional additional data to attach to this button.
|
|
24
27
|
# @param title [String] Display text for the button.
|
|
25
28
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
26
29
|
# @return [Pinnacle::Types::RcsButtonSendLocation]
|
|
27
|
-
def initialize(lat_long:, title:, additional_properties: nil)
|
|
30
|
+
def initialize(lat_long:, title:, metadata: OMIT, additional_properties: nil)
|
|
28
31
|
@lat_long = lat_long
|
|
32
|
+
@metadata = metadata if metadata != OMIT
|
|
29
33
|
@title = title
|
|
30
34
|
@additional_properties = additional_properties
|
|
31
|
-
@_field_set = { "latLong": lat_long, "title": title }
|
|
35
|
+
@_field_set = { "latLong": lat_long, "metadata": metadata, "title": title }.reject do |_k, v|
|
|
36
|
+
v == OMIT
|
|
37
|
+
end
|
|
32
38
|
end
|
|
33
39
|
|
|
34
40
|
# Deserialize a JSON object to an instance of RcsButtonSendLocation
|
|
@@ -44,9 +50,11 @@ module Pinnacle
|
|
|
44
50
|
lat_long = parsed_json["latLong"].to_json
|
|
45
51
|
lat_long = Pinnacle::Types::RcsButtonSendLocationLatLong.from_json(json_object: lat_long)
|
|
46
52
|
end
|
|
53
|
+
metadata = parsed_json["metadata"]
|
|
47
54
|
title = parsed_json["title"]
|
|
48
55
|
new(
|
|
49
56
|
lat_long: lat_long,
|
|
57
|
+
metadata: metadata,
|
|
50
58
|
title: title,
|
|
51
59
|
additional_properties: struct
|
|
52
60
|
)
|
|
@@ -67,6 +75,7 @@ module Pinnacle
|
|
|
67
75
|
# @return [Void]
|
|
68
76
|
def self.validate_raw(obj:)
|
|
69
77
|
Pinnacle::Types::RcsButtonSendLocationLatLong.validate_raw(obj: obj.lat_long)
|
|
78
|
+
obj.metadata&.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
|
|
70
79
|
obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
|
71
80
|
end
|
|
72
81
|
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
|
|
@@ -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
|
|
@@ -7,7 +7,8 @@ require "json"
|
|
|
7
7
|
module Pinnacle
|
|
8
8
|
module Types
|
|
9
9
|
class ScheduledMessaage
|
|
10
|
-
# @return [
|
|
10
|
+
# @return [String] Unique identifier for the scheduled send. This identifier is a string that
|
|
11
|
+
# always begins with the prefix `msg_sched_`, for example: `msg_sched_1234567890`.
|
|
11
12
|
attr_reader :schedule_id
|
|
12
13
|
# @return [Pinnacle::Types::ScheduledSendResponseConfig] Configuration for the scheduled message.
|
|
13
14
|
attr_reader :config
|
|
@@ -19,7 +20,8 @@ module Pinnacle
|
|
|
19
20
|
|
|
20
21
|
OMIT = Object.new
|
|
21
22
|
|
|
22
|
-
# @param schedule_id [
|
|
23
|
+
# @param schedule_id [String] Unique identifier for the scheduled send. This identifier is a string that
|
|
24
|
+
# always begins with the prefix `msg_sched_`, for example: `msg_sched_1234567890`.
|
|
23
25
|
# @param config [Pinnacle::Types::ScheduledSendResponseConfig] Configuration for the scheduled message.
|
|
24
26
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
25
27
|
# @return [Pinnacle::Types::ScheduledMessaage]
|
|
@@ -65,7 +67,7 @@ module Pinnacle
|
|
|
65
67
|
# @param obj [Object]
|
|
66
68
|
# @return [Void]
|
|
67
69
|
def self.validate_raw(obj:)
|
|
68
|
-
obj.schedule_id.is_a?(
|
|
70
|
+
obj.schedule_id.is_a?(String) != false || raise("Passed value for field obj.schedule_id is not the expected type, validation failed.")
|
|
69
71
|
Pinnacle::Types::ScheduledSendResponseConfig.validate_raw(obj: obj.config)
|
|
70
72
|
end
|
|
71
73
|
end
|
|
@@ -6,7 +6,8 @@ require "json"
|
|
|
6
6
|
module Pinnacle
|
|
7
7
|
module Types
|
|
8
8
|
class SentMmsDetails
|
|
9
|
-
# @return [Array<
|
|
9
|
+
# @return [Array<String>] Array of unique identifiers for the sent MMS messages. This identifiers are
|
|
10
|
+
# strings that always begin with the prefix `msg_`, for example: `msg_1234567890`.
|
|
10
11
|
attr_reader :message_ids
|
|
11
12
|
# @return [Float] Total number of segments used across the message.
|
|
12
13
|
attr_reader :segments
|
|
@@ -26,7 +27,8 @@ module Pinnacle
|
|
|
26
27
|
|
|
27
28
|
OMIT = Object.new
|
|
28
29
|
|
|
29
|
-
# @param message_ids [Array<
|
|
30
|
+
# @param message_ids [Array<String>] Array of unique identifiers for the sent MMS messages. This identifiers are
|
|
31
|
+
# strings that always begin with the prefix `msg_`, for example: `msg_1234567890`.
|
|
30
32
|
# @param segments [Float] Total number of segments used across the message.
|
|
31
33
|
# @param total_cost [Float] Total cost of sending the message.
|
|
32
34
|
# @param sender [String] Sender's phone number in E.164 format.
|
|
@@ -6,8 +6,9 @@ require "json"
|
|
|
6
6
|
module Pinnacle
|
|
7
7
|
module Types
|
|
8
8
|
class SentRcsDetails
|
|
9
|
-
# @return [
|
|
10
|
-
|
|
9
|
+
# @return [String] Unique identifier for the sent RCS message. This identifier is a string that
|
|
10
|
+
# always begins with the prefix `msg_`, for example: `msg_1234567890`.
|
|
11
|
+
attr_reader :message_id
|
|
11
12
|
# @return [Integer] Total number of segments used across the message.
|
|
12
13
|
attr_reader :segments
|
|
13
14
|
# @return [Float] Total cost of sending the message.
|
|
@@ -26,7 +27,8 @@ module Pinnacle
|
|
|
26
27
|
|
|
27
28
|
OMIT = Object.new
|
|
28
29
|
|
|
29
|
-
# @param
|
|
30
|
+
# @param message_id [String] Unique identifier for the sent RCS message. This identifier is a string that
|
|
31
|
+
# always begins with the prefix `msg_`, for example: `msg_1234567890`.
|
|
30
32
|
# @param segments [Integer] Total number of segments used across the message.
|
|
31
33
|
# @param total_cost [Float] Total cost of sending the message.
|
|
32
34
|
# @param sender [String] Sender's phone number in E.164 format.
|
|
@@ -34,9 +36,8 @@ module Pinnacle
|
|
|
34
36
|
# @param status [String] Current status of the message.
|
|
35
37
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
36
38
|
# @return [Pinnacle::Types::SentRcsDetails]
|
|
37
|
-
def initialize(segments:, total_cost:, sender:, recipient:, status:,
|
|
38
|
-
|
|
39
|
-
@message_ids = message_ids if message_ids != OMIT
|
|
39
|
+
def initialize(message_id:, segments:, total_cost:, sender:, recipient:, status:, additional_properties: nil)
|
|
40
|
+
@message_id = message_id
|
|
40
41
|
@segments = segments
|
|
41
42
|
@total_cost = total_cost
|
|
42
43
|
@sender = sender
|
|
@@ -44,15 +45,13 @@ module Pinnacle
|
|
|
44
45
|
@status = status
|
|
45
46
|
@additional_properties = additional_properties
|
|
46
47
|
@_field_set = {
|
|
47
|
-
"
|
|
48
|
+
"messageId": message_id,
|
|
48
49
|
"segments": segments,
|
|
49
50
|
"totalCost": total_cost,
|
|
50
51
|
"sender": sender,
|
|
51
52
|
"recipient": recipient,
|
|
52
53
|
"status": status
|
|
53
|
-
}
|
|
54
|
-
v == OMIT
|
|
55
|
-
end
|
|
54
|
+
}
|
|
56
55
|
end
|
|
57
56
|
|
|
58
57
|
# Deserialize a JSON object to an instance of SentRcsDetails
|
|
@@ -62,14 +61,14 @@ module Pinnacle
|
|
|
62
61
|
def self.from_json(json_object:)
|
|
63
62
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
64
63
|
parsed_json = JSON.parse(json_object)
|
|
65
|
-
|
|
64
|
+
message_id = parsed_json["messageId"]
|
|
66
65
|
segments = parsed_json["segments"]
|
|
67
66
|
total_cost = parsed_json["totalCost"]
|
|
68
67
|
sender = parsed_json["sender"]
|
|
69
68
|
recipient = parsed_json["recipient"]
|
|
70
69
|
status = parsed_json["status"]
|
|
71
70
|
new(
|
|
72
|
-
|
|
71
|
+
message_id: message_id,
|
|
73
72
|
segments: segments,
|
|
74
73
|
total_cost: total_cost,
|
|
75
74
|
sender: sender,
|
|
@@ -93,7 +92,7 @@ module Pinnacle
|
|
|
93
92
|
# @param obj [Object]
|
|
94
93
|
# @return [Void]
|
|
95
94
|
def self.validate_raw(obj:)
|
|
96
|
-
obj.
|
|
95
|
+
obj.message_id.is_a?(String) != false || raise("Passed value for field obj.message_id is not the expected type, validation failed.")
|
|
97
96
|
obj.segments.is_a?(Integer) != false || raise("Passed value for field obj.segments is not the expected type, validation failed.")
|
|
98
97
|
obj.total_cost.is_a?(Float) != false || raise("Passed value for field obj.total_cost is not the expected type, validation failed.")
|
|
99
98
|
obj.sender.is_a?(String) != false || raise("Passed value for field obj.sender is not the expected type, validation failed.")
|
|
@@ -7,7 +7,8 @@ require "json"
|
|
|
7
7
|
module Pinnacle
|
|
8
8
|
module Types
|
|
9
9
|
class SentSmsDetails
|
|
10
|
-
# @return [
|
|
10
|
+
# @return [String] Unique identifier for the sent message. This identifier is a string that always
|
|
11
|
+
# begins with the prefix `msg_`, for example: `msg_1234567890`.
|
|
11
12
|
attr_reader :message_id
|
|
12
13
|
# @return [Pinnacle::Types::SendSmsResponseSegments] Details about how the message was segmented for sending.
|
|
13
14
|
attr_reader :segments
|
|
@@ -27,7 +28,8 @@ module Pinnacle
|
|
|
27
28
|
|
|
28
29
|
OMIT = Object.new
|
|
29
30
|
|
|
30
|
-
# @param message_id [
|
|
31
|
+
# @param message_id [String] Unique identifier for the sent message. This identifier is a string that always
|
|
32
|
+
# begins with the prefix `msg_`, for example: `msg_1234567890`.
|
|
31
33
|
# @param segments [Pinnacle::Types::SendSmsResponseSegments] Details about how the message was segmented for sending.
|
|
32
34
|
# @param total_cost [Float] Total cost of sending the message.
|
|
33
35
|
# @param sender [String] Sender's phone number in E.164 format.
|
|
@@ -96,7 +98,7 @@ module Pinnacle
|
|
|
96
98
|
# @param obj [Object]
|
|
97
99
|
# @return [Void]
|
|
98
100
|
def self.validate_raw(obj:)
|
|
99
|
-
obj.message_id.is_a?(
|
|
101
|
+
obj.message_id.is_a?(String) != false || raise("Passed value for field obj.message_id is not the expected type, validation failed.")
|
|
100
102
|
Pinnacle::Types::SendSmsResponseSegments.validate_raw(obj: obj.segments)
|
|
101
103
|
obj.total_cost.is_a?(Float) != false || raise("Passed value for field obj.total_cost is not the expected type, validation failed.")
|
|
102
104
|
obj.sender.is_a?(String) != false || raise("Passed value for field obj.sender is not the expected type, validation failed.")
|
|
@@ -9,7 +9,7 @@ require "json"
|
|
|
9
9
|
module Pinnacle
|
|
10
10
|
module Types
|
|
11
11
|
class TollFreeCampaign
|
|
12
|
-
# @return [
|
|
12
|
+
# @return [String] Unique identifier for the campaign. Must begin with the prefix `tf_`.
|
|
13
13
|
attr_reader :campaign_id
|
|
14
14
|
# @return [Pinnacle::Types::MessageVolumeEnum]
|
|
15
15
|
attr_reader :monthly_volume
|
|
@@ -29,7 +29,7 @@ module Pinnacle
|
|
|
29
29
|
|
|
30
30
|
OMIT = Object.new
|
|
31
31
|
|
|
32
|
-
# @param campaign_id [
|
|
32
|
+
# @param campaign_id [String] Unique identifier for the campaign. Must begin with the prefix `tf_`.
|
|
33
33
|
# @param monthly_volume [Pinnacle::Types::MessageVolumeEnum]
|
|
34
34
|
# @param name [String] Display name of the campaign.
|
|
35
35
|
# @param opt_in [Pinnacle::Types::UpsertTollFreeCampaignOptIn] Opt-in keyword settings.
|
|
@@ -106,7 +106,7 @@ module Pinnacle
|
|
|
106
106
|
# @param obj [Object]
|
|
107
107
|
# @return [Void]
|
|
108
108
|
def self.validate_raw(obj:)
|
|
109
|
-
obj.campaign_id&.is_a?(
|
|
109
|
+
obj.campaign_id&.is_a?(String) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
|
|
110
110
|
obj.monthly_volume&.is_a?(Pinnacle::Types::MessageVolumeEnum) != false || raise("Passed value for field obj.monthly_volume is not the expected type, validation failed.")
|
|
111
111
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
|
112
112
|
obj.opt_in.nil? || Pinnacle::Types::UpsertTollFreeCampaignOptIn.validate_raw(obj: obj.opt_in)
|
|
@@ -12,7 +12,8 @@ module Pinnacle
|
|
|
12
12
|
# These errors may request additional information or point out erroneous and/or
|
|
13
13
|
# missing fields.
|
|
14
14
|
attr_reader :error
|
|
15
|
-
# @return [
|
|
15
|
+
# @return [String] The unique identifier of the toll-free campaign. This identifier is a string
|
|
16
|
+
# that always begins with the prefix `tf_`, for example: `tf_1234567890`.
|
|
16
17
|
attr_reader :id
|
|
17
18
|
# @return [Pinnacle::Types::GetTollFreeCampaignStatusResponseUpdates] Status of phone numbers that are being attached to this campaign. <br>
|
|
18
19
|
# Note that phone numbers can only be attached to `VERIFIED` campaigns via the
|
|
@@ -29,7 +30,8 @@ module Pinnacle
|
|
|
29
30
|
# @param error [String] Summary of errors related to the verification process. <br>
|
|
30
31
|
# These errors may request additional information or point out erroneous and/or
|
|
31
32
|
# missing fields.
|
|
32
|
-
# @param id [
|
|
33
|
+
# @param id [String] The unique identifier of the toll-free campaign. This identifier is a string
|
|
34
|
+
# that always begins with the prefix `tf_`, for example: `tf_1234567890`.
|
|
33
35
|
# @param updates [Pinnacle::Types::GetTollFreeCampaignStatusResponseUpdates] Status of phone numbers that are being attached to this campaign. <br>
|
|
34
36
|
# Note that phone numbers can only be attached to `VERIFIED` campaigns via the
|
|
35
37
|
# [attach campaign endpoint](../phone-numbers/attach-campaign).
|
|
@@ -83,7 +85,7 @@ module Pinnacle
|
|
|
83
85
|
# @return [Void]
|
|
84
86
|
def self.validate_raw(obj:)
|
|
85
87
|
obj.error&.is_a?(String) != false || raise("Passed value for field obj.error is not the expected type, validation failed.")
|
|
86
|
-
obj.id.is_a?(
|
|
88
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
|
87
89
|
Pinnacle::Types::GetTollFreeCampaignStatusResponseUpdates.validate_raw(obj: obj.updates)
|
|
88
90
|
end
|
|
89
91
|
end
|
|
@@ -17,11 +17,10 @@ module Pinnacle
|
|
|
17
17
|
# `INCOMPLETE`: Has not been submitted.<br>
|
|
18
18
|
# `PENDING`: Currently being reviewed.<br>
|
|
19
19
|
# `VERIFIED`: Verified and good to go.<br>
|
|
20
|
-
# `UNVERIFIED`: No longer verified due to an update in the brand details.<br>
|
|
21
20
|
# `VETTED`: Brand has been vetted by an external provider and has received vetting
|
|
22
21
|
# scores.
|
|
23
22
|
attr_reader :status
|
|
24
|
-
# @return [
|
|
23
|
+
# @return [String] Unique identifier for the campaign. Must begin with the prefix `tf_`.
|
|
25
24
|
attr_reader :campaign_id
|
|
26
25
|
# @return [Pinnacle::Types::MessageVolumeEnum]
|
|
27
26
|
attr_reader :monthly_volume
|
|
@@ -46,10 +45,9 @@ module Pinnacle
|
|
|
46
45
|
# `INCOMPLETE`: Has not been submitted.<br>
|
|
47
46
|
# `PENDING`: Currently being reviewed.<br>
|
|
48
47
|
# `VERIFIED`: Verified and good to go.<br>
|
|
49
|
-
# `UNVERIFIED`: No longer verified due to an update in the brand details.<br>
|
|
50
48
|
# `VETTED`: Brand has been vetted by an external provider and has received vetting
|
|
51
49
|
# scores.
|
|
52
|
-
# @param campaign_id [
|
|
50
|
+
# @param campaign_id [String] Unique identifier for the campaign. Must begin with the prefix `tf_`.
|
|
53
51
|
# @param monthly_volume [Pinnacle::Types::MessageVolumeEnum]
|
|
54
52
|
# @param name [String] Display name of the campaign.
|
|
55
53
|
# @param opt_in [Pinnacle::Types::UpsertTollFreeCampaignOptIn] Opt-in keyword settings.
|
|
@@ -143,7 +141,7 @@ module Pinnacle
|
|
|
143
141
|
def self.validate_raw(obj:)
|
|
144
142
|
Pinnacle::Types::ExtendedBrand.validate_raw(obj: obj.brand)
|
|
145
143
|
obj.status.is_a?(Pinnacle::Types::ProfileStatusEnum) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
|
146
|
-
obj.campaign_id&.is_a?(
|
|
144
|
+
obj.campaign_id&.is_a?(String) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
|
|
147
145
|
obj.monthly_volume&.is_a?(Pinnacle::Types::MessageVolumeEnum) != false || raise("Passed value for field obj.monthly_volume is not the expected type, validation failed.")
|
|
148
146
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
|
149
147
|
obj.opt_in.nil? || Pinnacle::Types::UpsertTollFreeCampaignOptIn.validate_raw(obj: obj.opt_in)
|
|
@@ -6,7 +6,8 @@ require "json"
|
|
|
6
6
|
module Pinnacle
|
|
7
7
|
module Types
|
|
8
8
|
class UpdatedContactId
|
|
9
|
-
# @return [
|
|
9
|
+
# @return [String] Unique ID of the updated contact. This identifier is a string that always begins
|
|
10
|
+
# with the prefix `co_`, for example: `co_1234567890`.
|
|
10
11
|
attr_reader :id
|
|
11
12
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
12
13
|
attr_reader :additional_properties
|
|
@@ -16,7 +17,8 @@ module Pinnacle
|
|
|
16
17
|
|
|
17
18
|
OMIT = Object.new
|
|
18
19
|
|
|
19
|
-
# @param id [
|
|
20
|
+
# @param id [String] Unique ID of the updated contact. This identifier is a string that always begins
|
|
21
|
+
# with the prefix `co_`, for example: `co_1234567890`.
|
|
20
22
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
21
23
|
# @return [Pinnacle::Types::UpdatedContactId]
|
|
22
24
|
def initialize(id:, additional_properties: nil)
|
|
@@ -50,7 +52,7 @@ module Pinnacle
|
|
|
50
52
|
# @param obj [Object]
|
|
51
53
|
# @return [Void]
|
|
52
54
|
def self.validate_raw(obj:)
|
|
53
|
-
obj.id.is_a?(
|
|
55
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
|
54
56
|
end
|
|
55
57
|
end
|
|
56
58
|
end
|