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
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
require_relative "../../../requests"
|
|
4
4
|
require_relative "types/upload_file_options"
|
|
5
5
|
require_relative "../../types/upload_results"
|
|
6
|
+
require_relative "../../types/refreshed_file"
|
|
7
|
+
require "json"
|
|
6
8
|
require "async"
|
|
7
9
|
|
|
8
10
|
module Pinnacle
|
|
@@ -29,6 +31,7 @@ module Pinnacle
|
|
|
29
31
|
# @param size [Integer] Size of your file in bytes. Should be less than 100 MB.
|
|
30
32
|
# @param name [String] Name of your file.
|
|
31
33
|
# @param options [Hash] Additional configurations for your file.Request of type Pinnacle::Tools::File::Types::UploadFileOptions, as a Hash
|
|
34
|
+
# * :delete_at (String)
|
|
32
35
|
# * :download (Hash)
|
|
33
36
|
# * :expires_at (String)
|
|
34
37
|
# @param request_options [Pinnacle::RequestOptions]
|
|
@@ -43,7 +46,7 @@ module Pinnacle
|
|
|
43
46
|
# content_type: "image/jpeg",
|
|
44
47
|
# size: 1024,
|
|
45
48
|
# name: "test.jpg",
|
|
46
|
-
# options: { download: { expires_at: "2025-06-30T12:00:00.000Z" } }
|
|
49
|
+
# options: { delete_at: "2025-12-31T23:59:59Z", download: { expires_at: "2025-06-30T12:00:00.000Z" } }
|
|
47
50
|
# )
|
|
48
51
|
def upload(content_type:, size:, name: nil, options: nil, request_options: nil)
|
|
49
52
|
response = @request_client.conn.post do |req|
|
|
@@ -68,6 +71,48 @@ module Pinnacle
|
|
|
68
71
|
end
|
|
69
72
|
Pinnacle::Types::UploadResults.from_json(json_object: response.body)
|
|
70
73
|
end
|
|
74
|
+
|
|
75
|
+
# Refresh expiring presigned URLs for Pinnacle-hosted files to extend their access
|
|
76
|
+
# time.
|
|
77
|
+
# <Callout type="info">
|
|
78
|
+
# This only works for presigned download URLs. At this moment, you cannot
|
|
79
|
+
# refresh a presigned upload URL, generate a new one instead.
|
|
80
|
+
# </Callout>
|
|
81
|
+
#
|
|
82
|
+
# @param urls [Array<String>] Array of file URLs to refresh for extended access. Provided URLs must be
|
|
83
|
+
# presigned URLs (i.e.
|
|
84
|
+
# `https://server.trypinnacle.app/storage/v1/object/sign/...`). Invalid or
|
|
85
|
+
# external URLs will be returned unchanged in the response.
|
|
86
|
+
# @param request_options [Pinnacle::RequestOptions]
|
|
87
|
+
# @return [Array<Pinnacle::Types::RefreshedFile>]
|
|
88
|
+
# @example
|
|
89
|
+
# api = Pinnacle::Client.new(
|
|
90
|
+
# base_url: "https://api.example.com",
|
|
91
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
|
92
|
+
# api_key: "YOUR_API_KEY"
|
|
93
|
+
# )
|
|
94
|
+
# api.tools.file.refresh(urls: ["https://server.trypinnacle.app/storage/v1/object/sign/vault/3/test.jpg?token=oldtoken", "https://server.trypinnacle.app/storage/v1/object/sign/vault/3/document.pdf?token=oldtoken2", "invalid/url", "https://google.com"])
|
|
95
|
+
def refresh(urls:, request_options: nil)
|
|
96
|
+
response = @request_client.conn.post do |req|
|
|
97
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
98
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
99
|
+
req.headers = {
|
|
100
|
+
**(req.headers || {}),
|
|
101
|
+
**@request_client.get_headers,
|
|
102
|
+
**(request_options&.additional_headers || {})
|
|
103
|
+
}.compact
|
|
104
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
|
105
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
|
106
|
+
end
|
|
107
|
+
req.body = { **(request_options&.additional_body_parameters || {}), urls: urls }.compact
|
|
108
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/tools/files/refresh"
|
|
109
|
+
end
|
|
110
|
+
parsed_json = JSON.parse(response.body)
|
|
111
|
+
parsed_json&.map do |item|
|
|
112
|
+
item = item.to_json
|
|
113
|
+
Pinnacle::Types::RefreshedFile.from_json(json_object: item)
|
|
114
|
+
end
|
|
115
|
+
end
|
|
71
116
|
end
|
|
72
117
|
|
|
73
118
|
class AsyncFileClient
|
|
@@ -92,6 +137,7 @@ module Pinnacle
|
|
|
92
137
|
# @param size [Integer] Size of your file in bytes. Should be less than 100 MB.
|
|
93
138
|
# @param name [String] Name of your file.
|
|
94
139
|
# @param options [Hash] Additional configurations for your file.Request of type Pinnacle::Tools::File::Types::UploadFileOptions, as a Hash
|
|
140
|
+
# * :delete_at (String)
|
|
95
141
|
# * :download (Hash)
|
|
96
142
|
# * :expires_at (String)
|
|
97
143
|
# @param request_options [Pinnacle::RequestOptions]
|
|
@@ -106,7 +152,7 @@ module Pinnacle
|
|
|
106
152
|
# content_type: "image/jpeg",
|
|
107
153
|
# size: 1024,
|
|
108
154
|
# name: "test.jpg",
|
|
109
|
-
# options: { download: { expires_at: "2025-06-30T12:00:00.000Z" } }
|
|
155
|
+
# options: { delete_at: "2025-12-31T23:59:59Z", download: { expires_at: "2025-06-30T12:00:00.000Z" } }
|
|
110
156
|
# )
|
|
111
157
|
def upload(content_type:, size:, name: nil, options: nil, request_options: nil)
|
|
112
158
|
Async do
|
|
@@ -133,6 +179,50 @@ module Pinnacle
|
|
|
133
179
|
Pinnacle::Types::UploadResults.from_json(json_object: response.body)
|
|
134
180
|
end
|
|
135
181
|
end
|
|
182
|
+
|
|
183
|
+
# Refresh expiring presigned URLs for Pinnacle-hosted files to extend their access
|
|
184
|
+
# time.
|
|
185
|
+
# <Callout type="info">
|
|
186
|
+
# This only works for presigned download URLs. At this moment, you cannot
|
|
187
|
+
# refresh a presigned upload URL, generate a new one instead.
|
|
188
|
+
# </Callout>
|
|
189
|
+
#
|
|
190
|
+
# @param urls [Array<String>] Array of file URLs to refresh for extended access. Provided URLs must be
|
|
191
|
+
# presigned URLs (i.e.
|
|
192
|
+
# `https://server.trypinnacle.app/storage/v1/object/sign/...`). Invalid or
|
|
193
|
+
# external URLs will be returned unchanged in the response.
|
|
194
|
+
# @param request_options [Pinnacle::RequestOptions]
|
|
195
|
+
# @return [Array<Pinnacle::Types::RefreshedFile>]
|
|
196
|
+
# @example
|
|
197
|
+
# api = Pinnacle::Client.new(
|
|
198
|
+
# base_url: "https://api.example.com",
|
|
199
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
|
200
|
+
# api_key: "YOUR_API_KEY"
|
|
201
|
+
# )
|
|
202
|
+
# api.tools.file.refresh(urls: ["https://server.trypinnacle.app/storage/v1/object/sign/vault/3/test.jpg?token=oldtoken", "https://server.trypinnacle.app/storage/v1/object/sign/vault/3/document.pdf?token=oldtoken2", "invalid/url", "https://google.com"])
|
|
203
|
+
def refresh(urls:, request_options: nil)
|
|
204
|
+
Async do
|
|
205
|
+
response = @request_client.conn.post do |req|
|
|
206
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
207
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
208
|
+
req.headers = {
|
|
209
|
+
**(req.headers || {}),
|
|
210
|
+
**@request_client.get_headers,
|
|
211
|
+
**(request_options&.additional_headers || {})
|
|
212
|
+
}.compact
|
|
213
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
|
214
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
|
215
|
+
end
|
|
216
|
+
req.body = { **(request_options&.additional_body_parameters || {}), urls: urls }.compact
|
|
217
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/tools/files/refresh"
|
|
218
|
+
end
|
|
219
|
+
parsed_json = JSON.parse(response.body)
|
|
220
|
+
parsed_json&.map do |item|
|
|
221
|
+
item = item.to_json
|
|
222
|
+
Pinnacle::Types::RefreshedFile.from_json(json_object: item)
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
end
|
|
136
226
|
end
|
|
137
227
|
end
|
|
138
228
|
end
|
|
@@ -10,6 +10,12 @@ module Pinnacle
|
|
|
10
10
|
module Types
|
|
11
11
|
# Additional configurations for your file.
|
|
12
12
|
class UploadFileOptions
|
|
13
|
+
# @return [String] Set a deletion date for your file in ISO 8601 format. After this date, the file
|
|
14
|
+
# will be automatically deleted from our storage.<br>
|
|
15
|
+
# If this field is not provided, the file will not be deleted. You can still
|
|
16
|
+
# schedule deletion or delete the file manually in the Storage page in the
|
|
17
|
+
# dashboard.
|
|
18
|
+
attr_reader :delete_at
|
|
13
19
|
# @return [Pinnacle::Tools::File::Types::DownloadOptions] Configure download settings for your uploaded file.
|
|
14
20
|
attr_reader :download
|
|
15
21
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
@@ -20,13 +26,19 @@ module Pinnacle
|
|
|
20
26
|
|
|
21
27
|
OMIT = Object.new
|
|
22
28
|
|
|
29
|
+
# @param delete_at [String] Set a deletion date for your file in ISO 8601 format. After this date, the file
|
|
30
|
+
# will be automatically deleted from our storage.<br>
|
|
31
|
+
# If this field is not provided, the file will not be deleted. You can still
|
|
32
|
+
# schedule deletion or delete the file manually in the Storage page in the
|
|
33
|
+
# dashboard.
|
|
23
34
|
# @param download [Pinnacle::Tools::File::Types::DownloadOptions] Configure download settings for your uploaded file.
|
|
24
35
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
25
36
|
# @return [Pinnacle::Tools::File::Types::UploadFileOptions]
|
|
26
|
-
def initialize(download: OMIT, additional_properties: nil)
|
|
37
|
+
def initialize(delete_at: OMIT, download: OMIT, additional_properties: nil)
|
|
38
|
+
@delete_at = delete_at if delete_at != OMIT
|
|
27
39
|
@download = download if download != OMIT
|
|
28
40
|
@additional_properties = additional_properties
|
|
29
|
-
@_field_set = { "download": download }.reject do |_k, v|
|
|
41
|
+
@_field_set = { "deleteAt": delete_at, "download": download }.reject do |_k, v|
|
|
30
42
|
v == OMIT
|
|
31
43
|
end
|
|
32
44
|
end
|
|
@@ -38,13 +50,18 @@ module Pinnacle
|
|
|
38
50
|
def self.from_json(json_object:)
|
|
39
51
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
40
52
|
parsed_json = JSON.parse(json_object)
|
|
53
|
+
delete_at = parsed_json["deleteAt"]
|
|
41
54
|
if parsed_json["download"].nil?
|
|
42
55
|
download = nil
|
|
43
56
|
else
|
|
44
57
|
download = parsed_json["download"].to_json
|
|
45
58
|
download = Pinnacle::Tools::File::Types::DownloadOptions.from_json(json_object: download)
|
|
46
59
|
end
|
|
47
|
-
new(
|
|
60
|
+
new(
|
|
61
|
+
delete_at: delete_at,
|
|
62
|
+
download: download,
|
|
63
|
+
additional_properties: struct
|
|
64
|
+
)
|
|
48
65
|
end
|
|
49
66
|
|
|
50
67
|
# Serialize an instance of UploadFileOptions to a JSON object
|
|
@@ -61,6 +78,7 @@ module Pinnacle
|
|
|
61
78
|
# @param obj [Object]
|
|
62
79
|
# @return [Void]
|
|
63
80
|
def self.validate_raw(obj:)
|
|
81
|
+
obj.delete_at&.is_a?(String) != false || raise("Passed value for field obj.delete_at is not the expected type, validation failed.")
|
|
64
82
|
obj.download.nil? || Pinnacle::Tools::File::Types::DownloadOptions.validate_raw(obj: obj.download)
|
|
65
83
|
end
|
|
66
84
|
end
|
data/lib/rcs/tools/url/client.rb
CHANGED
|
@@ -86,7 +86,8 @@ module Pinnacle
|
|
|
86
86
|
Pinnacle::Types::ShortenedUrlWithClickData.from_json(json_object: response.body)
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
-
# Update the destination or
|
|
89
|
+
# Update the destination or expiration date of an existing shortened URL. Expiring
|
|
90
|
+
# links cannot be updated into a permalink.
|
|
90
91
|
#
|
|
91
92
|
# @param link_id [String] Unique identifier from your shortened URL. For example, for
|
|
92
93
|
# `https://pncl.to/ePzVxILF`, the `linkId` is `ePzVxILF`. <br>
|
|
@@ -204,7 +205,8 @@ module Pinnacle
|
|
|
204
205
|
end
|
|
205
206
|
end
|
|
206
207
|
|
|
207
|
-
# Update the destination or
|
|
208
|
+
# Update the destination or expiration date of an existing shortened URL. Expiring
|
|
209
|
+
# links cannot be updated into a permalink.
|
|
208
210
|
#
|
|
209
211
|
# @param link_id [String] Unique identifier from your shortened URL. For example, for
|
|
210
212
|
# `https://pncl.to/ePzVxILF`, the `linkId` is `ePzVxILF`. <br>
|
|
@@ -8,8 +8,8 @@ module Pinnacle
|
|
|
8
8
|
module Types
|
|
9
9
|
# Attach a webhook you’ve already created in your account to this phone number.
|
|
10
10
|
class AttachWebhookByIdParams
|
|
11
|
-
# @return [
|
|
12
|
-
#
|
|
11
|
+
# @return [String] The unique ID of the webhook you want to attach. This identifier is a string
|
|
12
|
+
# that always begins with the prefix `wh_`, for example: `wh_1234567890`.
|
|
13
13
|
attr_reader :webhook_id
|
|
14
14
|
# @return [Pinnacle::Types::WebhookEventEnum] Select the event type that will trigger this webhook. <br>
|
|
15
15
|
# Set to null if you want to listen to all event types for this phone number. <br>
|
|
@@ -23,8 +23,8 @@ module Pinnacle
|
|
|
23
23
|
|
|
24
24
|
OMIT = Object.new
|
|
25
25
|
|
|
26
|
-
# @param webhook_id [
|
|
27
|
-
#
|
|
26
|
+
# @param webhook_id [String] The unique ID of the webhook you want to attach. This identifier is a string
|
|
27
|
+
# that always begins with the prefix `wh_`, for example: `wh_1234567890`.
|
|
28
28
|
# @param event [Pinnacle::Types::WebhookEventEnum] Select the event type that will trigger this webhook. <br>
|
|
29
29
|
# Set to null if you want to listen to all event types for this phone number. <br>
|
|
30
30
|
# Defaults to null.
|
|
@@ -69,7 +69,7 @@ module Pinnacle
|
|
|
69
69
|
# @param obj [Object]
|
|
70
70
|
# @return [Void]
|
|
71
71
|
def self.validate_raw(obj:)
|
|
72
|
-
obj.webhook_id.is_a?(
|
|
72
|
+
obj.webhook_id.is_a?(String) != false || raise("Passed value for field obj.webhook_id is not the expected type, validation failed.")
|
|
73
73
|
obj.event&.is_a?(Pinnacle::Types::WebhookEventEnum) != false || raise("Passed value for field obj.event is not the expected type, validation failed.")
|
|
74
74
|
end
|
|
75
75
|
end
|
|
@@ -7,7 +7,8 @@ module Pinnacle
|
|
|
7
7
|
module Types
|
|
8
8
|
# Detailed information about the attached webhook.
|
|
9
9
|
class AttachWebhookResponseWebhook
|
|
10
|
-
# @return [
|
|
10
|
+
# @return [String] Unique identifier of the webhook within the account. This identifier is a string
|
|
11
|
+
# that always begins with the prefix `wh_`, for example: `wh_1234567890`.
|
|
11
12
|
attr_reader :id
|
|
12
13
|
# @return [String] Name of the webhook.
|
|
13
14
|
attr_reader :name
|
|
@@ -24,7 +25,8 @@ module Pinnacle
|
|
|
24
25
|
|
|
25
26
|
OMIT = Object.new
|
|
26
27
|
|
|
27
|
-
# @param id [
|
|
28
|
+
# @param id [String] Unique identifier of the webhook within the account. This identifier is a string
|
|
29
|
+
# that always begins with the prefix `wh_`, for example: `wh_1234567890`.
|
|
28
30
|
# @param name [String] Name of the webhook.
|
|
29
31
|
# @param url [String] The HTTPS endpoint URL where webhook events will be sent as HTTP POST requests.
|
|
30
32
|
# @param secret [String] Secret key used to verify the authenticity of incoming webhook requests. <br>
|
|
@@ -76,7 +78,7 @@ module Pinnacle
|
|
|
76
78
|
# @param obj [Object]
|
|
77
79
|
# @return [Void]
|
|
78
80
|
def self.validate_raw(obj:)
|
|
79
|
-
obj.id.is_a?(
|
|
81
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
|
80
82
|
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
|
81
83
|
obj.url.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
|
|
82
84
|
obj.secret&.is_a?(String) != false || raise("Passed value for field obj.secret is not the expected type, validation failed.")
|
|
@@ -8,7 +8,13 @@ module Pinnacle
|
|
|
8
8
|
class AutofillCampaignParams
|
|
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 autofilling 10DLC campaigns, it must begin with the prefix `dlc_` (e.g.,
|
|
13
|
+
# `dlc_1234567890`)
|
|
14
|
+
# - When autofilling Toll-Free campaigns, it must begin with the prefix `tf_`
|
|
15
|
+
# (e.g., `tf_1234567890`)
|
|
16
|
+
# - When autofilling 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 autofilling 10DLC campaigns, it must begin with the prefix `dlc_` (e.g.,
|
|
30
|
+
# `dlc_1234567890`)
|
|
31
|
+
# - When autofilling Toll-Free campaigns, it must begin with the prefix `tf_`
|
|
32
|
+
# (e.g., `tf_1234567890`)
|
|
33
|
+
# - When autofilling 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::AutofillCampaignParams]
|
|
25
37
|
def initialize(additional_info: OMIT, campaign_id: 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
|
|
@@ -12,9 +12,11 @@ module Pinnacle
|
|
|
12
12
|
class AutofillDlcCampaignResponse
|
|
13
13
|
# @return [Boolean] Whether the campaign renews automatically.
|
|
14
14
|
attr_reader :auto_renew
|
|
15
|
-
# @return [
|
|
15
|
+
# @return [String] Brand id. This identifier is a string that always begins with the prefix `b_`,
|
|
16
|
+
# for example: `b_1234567890`.
|
|
16
17
|
attr_reader :brand
|
|
17
|
-
# @return [
|
|
18
|
+
# @return [String] Unique identifier for the campaign. This identifier is a string that always
|
|
19
|
+
# begins with the prefix `dlc_`, for example: `dlc_1234567890`.
|
|
18
20
|
attr_reader :campaign_id
|
|
19
21
|
# @return [String] Description of the campaign.
|
|
20
22
|
attr_reader :description
|
|
@@ -41,8 +43,10 @@ module Pinnacle
|
|
|
41
43
|
OMIT = Object.new
|
|
42
44
|
|
|
43
45
|
# @param auto_renew [Boolean] Whether the campaign renews automatically.
|
|
44
|
-
# @param brand [
|
|
45
|
-
#
|
|
46
|
+
# @param brand [String] Brand id. This identifier is a string that always begins with the prefix `b_`,
|
|
47
|
+
# for example: `b_1234567890`.
|
|
48
|
+
# @param campaign_id [String] Unique identifier for the campaign. This identifier is a string that always
|
|
49
|
+
# begins with the prefix `dlc_`, for example: `dlc_1234567890`.
|
|
46
50
|
# @param description [String] Description of the campaign.
|
|
47
51
|
# @param keywords [Pinnacle::Types::AutofillDlcResponseKeywords] Keyword response configuration.
|
|
48
52
|
# @param links [Pinnacle::Types::AutofillDlcResponseLinks] Legal documentation links.
|
|
@@ -153,8 +157,8 @@ module Pinnacle
|
|
|
153
157
|
# @return [Void]
|
|
154
158
|
def self.validate_raw(obj:)
|
|
155
159
|
obj.auto_renew.is_a?(Boolean) != false || raise("Passed value for field obj.auto_renew is not the expected type, validation failed.")
|
|
156
|
-
obj.brand&.is_a?(
|
|
157
|
-
obj.campaign_id&.is_a?(
|
|
160
|
+
obj.brand&.is_a?(String) != false || raise("Passed value for field obj.brand is not the expected type, validation failed.")
|
|
161
|
+
obj.campaign_id&.is_a?(String) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
|
|
158
162
|
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
|
159
163
|
obj.keywords.nil? || Pinnacle::Types::AutofillDlcResponseKeywords.validate_raw(obj: obj.keywords)
|
|
160
164
|
obj.links.nil? || Pinnacle::Types::AutofillDlcResponseLinks.validate_raw(obj: obj.links)
|
|
@@ -29,14 +29,12 @@ module Pinnacle
|
|
|
29
29
|
# @param opt_out [Pinnacle::Types::AutofillDlcResponseKeywordsOptOut] Opt-out keyword settings.
|
|
30
30
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
31
31
|
# @return [Pinnacle::Types::AutofillDlcResponseKeywords]
|
|
32
|
-
def initialize(help
|
|
33
|
-
@help = help
|
|
34
|
-
@opt_in = opt_in
|
|
35
|
-
@opt_out = opt_out
|
|
32
|
+
def initialize(help:, opt_in:, opt_out:, additional_properties: nil)
|
|
33
|
+
@help = help
|
|
34
|
+
@opt_in = opt_in
|
|
35
|
+
@opt_out = opt_out
|
|
36
36
|
@additional_properties = additional_properties
|
|
37
|
-
@_field_set = { "HELP": help, "OPT_IN": opt_in, "OPT_OUT": opt_out }
|
|
38
|
-
v == OMIT
|
|
39
|
-
end
|
|
37
|
+
@_field_set = { "HELP": help, "OPT_IN": opt_in, "OPT_OUT": opt_out }
|
|
40
38
|
end
|
|
41
39
|
|
|
42
40
|
# Deserialize a JSON object to an instance of AutofillDlcResponseKeywords
|
|
@@ -86,9 +84,9 @@ module Pinnacle
|
|
|
86
84
|
# @param obj [Object]
|
|
87
85
|
# @return [Void]
|
|
88
86
|
def self.validate_raw(obj:)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
Pinnacle::Types::AutofillDlcResponseKeywordsHelp.validate_raw(obj: obj.help)
|
|
88
|
+
Pinnacle::Types::AutofillDlcResponseKeywordsOptIn.validate_raw(obj: obj.opt_in)
|
|
89
|
+
Pinnacle::Types::AutofillDlcResponseKeywordsOptOut.validate_raw(obj: obj.opt_out)
|
|
92
90
|
end
|
|
93
91
|
end
|
|
94
92
|
end
|
|
@@ -23,9 +23,9 @@ module Pinnacle
|
|
|
23
23
|
# @param values [Array<String>] Keywords that trigger help response.
|
|
24
24
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
25
25
|
# @return [Pinnacle::Types::AutofillDlcResponseKeywordsHelp]
|
|
26
|
-
def initialize(message: OMIT,
|
|
26
|
+
def initialize(values:, message: OMIT, additional_properties: nil)
|
|
27
27
|
@message = message if message != OMIT
|
|
28
|
-
@values = values
|
|
28
|
+
@values = values
|
|
29
29
|
@additional_properties = additional_properties
|
|
30
30
|
@_field_set = { "message": message, "values": values }.reject do |_k, v|
|
|
31
31
|
v == OMIT
|
|
@@ -63,7 +63,7 @@ module Pinnacle
|
|
|
63
63
|
# @return [Void]
|
|
64
64
|
def self.validate_raw(obj:)
|
|
65
65
|
obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
|
66
|
-
obj.values
|
|
66
|
+
obj.values.is_a?(Array) != false || raise("Passed value for field obj.values is not the expected type, validation failed.")
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
end
|
|
@@ -23,11 +23,13 @@ module Pinnacle
|
|
|
23
23
|
# @param values [Array<String>] Keywords that trigger opt-in.
|
|
24
24
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
25
25
|
# @return [Pinnacle::Types::AutofillDlcResponseKeywordsOptIn]
|
|
26
|
-
def initialize(
|
|
27
|
-
@message = message
|
|
26
|
+
def initialize(values:, message: OMIT, additional_properties: nil)
|
|
27
|
+
@message = message if message != OMIT
|
|
28
28
|
@values = values
|
|
29
29
|
@additional_properties = additional_properties
|
|
30
|
-
@_field_set = { "message": message, "values": values }
|
|
30
|
+
@_field_set = { "message": message, "values": values }.reject do |_k, v|
|
|
31
|
+
v == OMIT
|
|
32
|
+
end
|
|
31
33
|
end
|
|
32
34
|
|
|
33
35
|
# Deserialize a JSON object to an instance of AutofillDlcResponseKeywordsOptIn
|
|
@@ -60,7 +62,7 @@ module Pinnacle
|
|
|
60
62
|
# @param obj [Object]
|
|
61
63
|
# @return [Void]
|
|
62
64
|
def self.validate_raw(obj:)
|
|
63
|
-
obj.message
|
|
65
|
+
obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
|
64
66
|
obj.values.is_a?(Array) != false || raise("Passed value for field obj.values is not the expected type, validation failed.")
|
|
65
67
|
end
|
|
66
68
|
end
|
|
@@ -23,9 +23,9 @@ module Pinnacle
|
|
|
23
23
|
# @param values [Array<String>] Keywords that trigger opt-out.
|
|
24
24
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
25
25
|
# @return [Pinnacle::Types::AutofillDlcResponseKeywordsOptOut]
|
|
26
|
-
def initialize(message: OMIT,
|
|
26
|
+
def initialize(values:, message: OMIT, additional_properties: nil)
|
|
27
27
|
@message = message if message != OMIT
|
|
28
|
-
@values = values
|
|
28
|
+
@values = values
|
|
29
29
|
@additional_properties = additional_properties
|
|
30
30
|
@_field_set = { "message": message, "values": values }.reject do |_k, v|
|
|
31
31
|
v == OMIT
|
|
@@ -63,7 +63,7 @@ module Pinnacle
|
|
|
63
63
|
# @return [Void]
|
|
64
64
|
def self.validate_raw(obj:)
|
|
65
65
|
obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
|
66
|
-
obj.values
|
|
66
|
+
obj.values.is_a?(Array) != false || raise("Passed value for field obj.values is not the expected type, validation failed.")
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
end
|
|
@@ -35,14 +35,14 @@ module Pinnacle
|
|
|
35
35
|
# @param number_pooling [Boolean] Whether the campaign uses number pooling.
|
|
36
36
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
37
37
|
# @return [Pinnacle::Types::AutofillDlcResponseOptions]
|
|
38
|
-
def initialize(affiliate_marketing
|
|
39
|
-
|
|
40
|
-
@affiliate_marketing = affiliate_marketing
|
|
41
|
-
@age_gated = age_gated
|
|
42
|
-
@direct_lending = direct_lending
|
|
38
|
+
def initialize(affiliate_marketing:, age_gated:, direct_lending:, embedded_phone:, number_pooling:,
|
|
39
|
+
embedded_link: OMIT, additional_properties: nil)
|
|
40
|
+
@affiliate_marketing = affiliate_marketing
|
|
41
|
+
@age_gated = age_gated
|
|
42
|
+
@direct_lending = direct_lending
|
|
43
43
|
@embedded_link = embedded_link if embedded_link != OMIT
|
|
44
|
-
@embedded_phone = embedded_phone
|
|
45
|
-
@number_pooling = number_pooling
|
|
44
|
+
@embedded_phone = embedded_phone
|
|
45
|
+
@number_pooling = number_pooling
|
|
46
46
|
@additional_properties = additional_properties
|
|
47
47
|
@_field_set = {
|
|
48
48
|
"affiliateMarketing": affiliate_marketing,
|
|
@@ -94,12 +94,12 @@ module Pinnacle
|
|
|
94
94
|
# @param obj [Object]
|
|
95
95
|
# @return [Void]
|
|
96
96
|
def self.validate_raw(obj:)
|
|
97
|
-
obj.affiliate_marketing
|
|
98
|
-
obj.age_gated
|
|
99
|
-
obj.direct_lending
|
|
97
|
+
obj.affiliate_marketing.is_a?(Boolean) != false || raise("Passed value for field obj.affiliate_marketing is not the expected type, validation failed.")
|
|
98
|
+
obj.age_gated.is_a?(Boolean) != false || raise("Passed value for field obj.age_gated is not the expected type, validation failed.")
|
|
99
|
+
obj.direct_lending.is_a?(Boolean) != false || raise("Passed value for field obj.direct_lending is not the expected type, validation failed.")
|
|
100
100
|
obj.embedded_link&.is_a?(String) != false || raise("Passed value for field obj.embedded_link is not the expected type, validation failed.")
|
|
101
|
-
obj.embedded_phone
|
|
102
|
-
obj.number_pooling
|
|
101
|
+
obj.embedded_phone.is_a?(Boolean) != false || raise("Passed value for field obj.embedded_phone is not the expected type, validation failed.")
|
|
102
|
+
obj.number_pooling.is_a?(Boolean) != false || raise("Passed value for field obj.number_pooling is not the expected type, validation failed.")
|
|
103
103
|
end
|
|
104
104
|
end
|
|
105
105
|
end
|
|
@@ -10,7 +10,8 @@ module Pinnacle
|
|
|
10
10
|
class BrandStatus
|
|
11
11
|
# @return [Array<String>] List of errors that occurred.
|
|
12
12
|
attr_reader :errors
|
|
13
|
-
# @return [
|
|
13
|
+
# @return [String] The unique identifier of the brand. This identifier is a string that always
|
|
14
|
+
# begins with the prefix `b_`, for example: `b_1234567890`.
|
|
14
15
|
attr_reader :id
|
|
15
16
|
# @return [Pinnacle::Types::BrandStatusEnum] Current review status of the brand. <br>
|
|
16
17
|
# `INCOMPLETE`: Has not been submitted. Use the [submit
|
|
@@ -31,7 +32,8 @@ module Pinnacle
|
|
|
31
32
|
OMIT = Object.new
|
|
32
33
|
|
|
33
34
|
# @param errors [Array<String>] List of errors that occurred.
|
|
34
|
-
# @param id [
|
|
35
|
+
# @param id [String] The unique identifier of the brand. This identifier is a string that always
|
|
36
|
+
# begins with the prefix `b_`, for example: `b_1234567890`.
|
|
35
37
|
# @param status [Pinnacle::Types::BrandStatusEnum] Current review status of the brand. <br>
|
|
36
38
|
# `INCOMPLETE`: Has not been submitted. Use the [submit
|
|
37
39
|
# endpoint](../brands/submit). <br>
|
|
@@ -84,7 +86,7 @@ module Pinnacle
|
|
|
84
86
|
# @return [Void]
|
|
85
87
|
def self.validate_raw(obj:)
|
|
86
88
|
obj.errors.is_a?(Array) != false || raise("Passed value for field obj.errors is not the expected type, validation failed.")
|
|
87
|
-
obj.id.is_a?(
|
|
89
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
|
88
90
|
obj.status.is_a?(Pinnacle::Types::BrandStatusEnum) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
|
89
91
|
end
|
|
90
92
|
end
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "json"
|
|
4
|
-
require_relative "
|
|
4
|
+
require_relative "button_clicked_data"
|
|
5
5
|
require_relative "location_share_action"
|
|
6
6
|
|
|
7
7
|
module Pinnacle
|
|
8
8
|
module Types
|
|
9
|
-
class
|
|
10
|
-
# Deserialize a JSON object to an instance of
|
|
9
|
+
class ButtonClicked
|
|
10
|
+
# Deserialize a JSON object to an instance of ButtonClicked
|
|
11
11
|
#
|
|
12
12
|
# @param json_object [String]
|
|
13
|
-
# @return [Pinnacle::Types::
|
|
13
|
+
# @return [Pinnacle::Types::ButtonClicked]
|
|
14
14
|
def self.from_json(json_object:)
|
|
15
15
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
16
16
|
begin
|
|
17
|
-
Pinnacle::Types::
|
|
18
|
-
return Pinnacle::Types::
|
|
17
|
+
Pinnacle::Types::ButtonClickedData.validate_raw(obj: struct)
|
|
18
|
+
return Pinnacle::Types::ButtonClickedData.from_json(json_object: struct) unless struct.nil?
|
|
19
19
|
|
|
20
20
|
return nil
|
|
21
21
|
rescue StandardError
|
|
@@ -40,7 +40,7 @@ module Pinnacle
|
|
|
40
40
|
# @return [Void]
|
|
41
41
|
def self.validate_raw(obj:)
|
|
42
42
|
begin
|
|
43
|
-
return Pinnacle::Types::
|
|
43
|
+
return Pinnacle::Types::ButtonClickedData.validate_raw(obj: obj)
|
|
44
44
|
rescue StandardError
|
|
45
45
|
# noop
|
|
46
46
|
end
|