rcs 2.0.0.pre.rc.5 → 2.0.1
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 +125 -1
- data/lib/rcs/messages/rcs/types/send_typing_indicator_schema_options.rb +66 -0
- 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/options.rb +111 -0
- data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item_campaign.rb +7 -3
- data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item_campaign.rb +7 -3
- data/lib/rcs/types/pinnacle_file_upload_metadata.rb +18 -2
- data/lib/rcs/types/profile_status_enum.rb +4 -4
- data/lib/rcs/types/rcs_base_options.rb +12 -1
- data/lib/rcs/types/rcs_button_call.rb +11 -2
- data/lib/rcs/types/rcs_button_open_url.rb +38 -2
- data/lib/rcs/types/rcs_button_open_url_webview_mode.rb +19 -0
- 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 +22 -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/rich_cards_message.rb +10 -10
- data/lib/rcs/types/{rcs.rb → rich_message.rb} +3 -3
- data/lib/rcs/types/scheduled_messaage.rb +5 -3
- data/lib/rcs/types/send_rcs_card_options.rb +132 -0
- data/lib/rcs/types/send_rcs_card_options_standalone_card.rb +78 -0
- data/lib/rcs/types/send_rcs_card_options_standalone_card_image_alignment.rb +12 -0
- data/lib/rcs/types/send_rcs_card_options_standalone_card_orientation.rb +11 -0
- data/lib/rcs/types/send_typing_indicator_response.rb +100 -0
- 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 +37 -7
- metadata +41 -11
- data/lib/rcs/types/click_action.rb +0 -73
- data/lib/rcs/types/click_action_data_metadata.rb +0 -69
|
@@ -22,7 +22,9 @@ module Pinnacle
|
|
|
22
22
|
|
|
23
23
|
# Retrieve a brand's status.
|
|
24
24
|
#
|
|
25
|
-
# @param brand_id [
|
|
25
|
+
# @param brand_id [String] The unique identifier of the brand you want to retrieve the status for. This
|
|
26
|
+
# identifier is a string that always begins with the prefix `b_`, for example:
|
|
27
|
+
# `b_1234567890`.
|
|
26
28
|
# @param request_options [Pinnacle::RequestOptions]
|
|
27
29
|
# @return [Pinnacle::Types::BrandStatus]
|
|
28
30
|
# @example
|
|
@@ -31,7 +33,7 @@ module Pinnacle
|
|
|
31
33
|
# environment: Pinnacle::Environment::DEFAULT,
|
|
32
34
|
# api_key: "YOUR_API_KEY"
|
|
33
35
|
# )
|
|
34
|
-
# api.status.get.brand(brand_id:
|
|
36
|
+
# api.status.get.brand(brand_id: "b_1234567890")
|
|
35
37
|
def brand(brand_id:, request_options: nil)
|
|
36
38
|
response = @request_client.conn.get do |req|
|
|
37
39
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
@@ -54,7 +56,9 @@ module Pinnacle
|
|
|
54
56
|
|
|
55
57
|
# Retrieve a toll-free campaign's status.
|
|
56
58
|
#
|
|
57
|
-
# @param campaign_id [
|
|
59
|
+
# @param campaign_id [String] The unique identifier of the toll-free campaign you want to retrieve the status
|
|
60
|
+
# for. This identifier is a string that always begins with the prefix `tf_`, for
|
|
61
|
+
# example: `tf_1234567890`.
|
|
58
62
|
# @param request_options [Pinnacle::RequestOptions]
|
|
59
63
|
# @return [Pinnacle::Types::TollFreeCampaignStatus]
|
|
60
64
|
# @example
|
|
@@ -63,7 +67,7 @@ module Pinnacle
|
|
|
63
67
|
# environment: Pinnacle::Environment::DEFAULT,
|
|
64
68
|
# api_key: "YOUR_API_KEY"
|
|
65
69
|
# )
|
|
66
|
-
# api.status.get.toll_free(campaign_id:
|
|
70
|
+
# api.status.get.toll_free(campaign_id: "tf_1234567890")
|
|
67
71
|
def toll_free(campaign_id:, request_options: nil)
|
|
68
72
|
response = @request_client.conn.get do |req|
|
|
69
73
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
@@ -86,7 +90,9 @@ module Pinnacle
|
|
|
86
90
|
|
|
87
91
|
# Retrieve a 10DLC campaign's status.
|
|
88
92
|
#
|
|
89
|
-
# @param campaign_id [
|
|
93
|
+
# @param campaign_id [String] The unique identifier of the 10DLC campaign you want to retrieve the status for.
|
|
94
|
+
# This identifier is a string that always begins with the prefix `dlc_`, for
|
|
95
|
+
# example: `dlc_1234567890`.
|
|
90
96
|
# @param request_options [Pinnacle::RequestOptions]
|
|
91
97
|
# @return [Pinnacle::Types::DlcCampaignStatus]
|
|
92
98
|
# @example
|
|
@@ -95,7 +101,7 @@ module Pinnacle
|
|
|
95
101
|
# environment: Pinnacle::Environment::DEFAULT,
|
|
96
102
|
# api_key: "YOUR_API_KEY"
|
|
97
103
|
# )
|
|
98
|
-
# api.status.get.dlc(campaign_id:
|
|
104
|
+
# api.status.get.dlc(campaign_id: "dlc_1234567890")
|
|
99
105
|
def dlc(campaign_id:, request_options: nil)
|
|
100
106
|
response = @request_client.conn.get do |req|
|
|
101
107
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
@@ -118,7 +124,9 @@ module Pinnacle
|
|
|
118
124
|
|
|
119
125
|
# Retrieve a RCS campaign's status.
|
|
120
126
|
#
|
|
121
|
-
# @param campaign_id [
|
|
127
|
+
# @param campaign_id [String] The unique identifier of the RCS campaign you want to retrieve the status for.
|
|
128
|
+
# This identifier is a string that always begins with the prefix `rcs_`, for
|
|
129
|
+
# example: `rcs_1234567890`.
|
|
122
130
|
# @param request_options [Pinnacle::RequestOptions]
|
|
123
131
|
# @return [Pinnacle::Types::RcsCampaignStatus]
|
|
124
132
|
# @example
|
|
@@ -127,7 +135,7 @@ module Pinnacle
|
|
|
127
135
|
# environment: Pinnacle::Environment::DEFAULT,
|
|
128
136
|
# api_key: "YOUR_API_KEY"
|
|
129
137
|
# )
|
|
130
|
-
# api.status.get.rcs(campaign_id:
|
|
138
|
+
# api.status.get.rcs(campaign_id: "rcs_1234567890")
|
|
131
139
|
def rcs(campaign_id:, request_options: nil)
|
|
132
140
|
response = @request_client.conn.get do |req|
|
|
133
141
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
@@ -194,7 +202,9 @@ module Pinnacle
|
|
|
194
202
|
|
|
195
203
|
# Retrieve a brand's status.
|
|
196
204
|
#
|
|
197
|
-
# @param brand_id [
|
|
205
|
+
# @param brand_id [String] The unique identifier of the brand you want to retrieve the status for. This
|
|
206
|
+
# identifier is a string that always begins with the prefix `b_`, for example:
|
|
207
|
+
# `b_1234567890`.
|
|
198
208
|
# @param request_options [Pinnacle::RequestOptions]
|
|
199
209
|
# @return [Pinnacle::Types::BrandStatus]
|
|
200
210
|
# @example
|
|
@@ -203,7 +213,7 @@ module Pinnacle
|
|
|
203
213
|
# environment: Pinnacle::Environment::DEFAULT,
|
|
204
214
|
# api_key: "YOUR_API_KEY"
|
|
205
215
|
# )
|
|
206
|
-
# api.status.get.brand(brand_id:
|
|
216
|
+
# api.status.get.brand(brand_id: "b_1234567890")
|
|
207
217
|
def brand(brand_id:, request_options: nil)
|
|
208
218
|
Async do
|
|
209
219
|
response = @request_client.conn.get do |req|
|
|
@@ -228,7 +238,9 @@ module Pinnacle
|
|
|
228
238
|
|
|
229
239
|
# Retrieve a toll-free campaign's status.
|
|
230
240
|
#
|
|
231
|
-
# @param campaign_id [
|
|
241
|
+
# @param campaign_id [String] The unique identifier of the toll-free campaign you want to retrieve the status
|
|
242
|
+
# for. This identifier is a string that always begins with the prefix `tf_`, for
|
|
243
|
+
# example: `tf_1234567890`.
|
|
232
244
|
# @param request_options [Pinnacle::RequestOptions]
|
|
233
245
|
# @return [Pinnacle::Types::TollFreeCampaignStatus]
|
|
234
246
|
# @example
|
|
@@ -237,7 +249,7 @@ module Pinnacle
|
|
|
237
249
|
# environment: Pinnacle::Environment::DEFAULT,
|
|
238
250
|
# api_key: "YOUR_API_KEY"
|
|
239
251
|
# )
|
|
240
|
-
# api.status.get.toll_free(campaign_id:
|
|
252
|
+
# api.status.get.toll_free(campaign_id: "tf_1234567890")
|
|
241
253
|
def toll_free(campaign_id:, request_options: nil)
|
|
242
254
|
Async do
|
|
243
255
|
response = @request_client.conn.get do |req|
|
|
@@ -262,7 +274,9 @@ module Pinnacle
|
|
|
262
274
|
|
|
263
275
|
# Retrieve a 10DLC campaign's status.
|
|
264
276
|
#
|
|
265
|
-
# @param campaign_id [
|
|
277
|
+
# @param campaign_id [String] The unique identifier of the 10DLC campaign you want to retrieve the status for.
|
|
278
|
+
# This identifier is a string that always begins with the prefix `dlc_`, for
|
|
279
|
+
# example: `dlc_1234567890`.
|
|
266
280
|
# @param request_options [Pinnacle::RequestOptions]
|
|
267
281
|
# @return [Pinnacle::Types::DlcCampaignStatus]
|
|
268
282
|
# @example
|
|
@@ -271,7 +285,7 @@ module Pinnacle
|
|
|
271
285
|
# environment: Pinnacle::Environment::DEFAULT,
|
|
272
286
|
# api_key: "YOUR_API_KEY"
|
|
273
287
|
# )
|
|
274
|
-
# api.status.get.dlc(campaign_id:
|
|
288
|
+
# api.status.get.dlc(campaign_id: "dlc_1234567890")
|
|
275
289
|
def dlc(campaign_id:, request_options: nil)
|
|
276
290
|
Async do
|
|
277
291
|
response = @request_client.conn.get do |req|
|
|
@@ -296,7 +310,9 @@ module Pinnacle
|
|
|
296
310
|
|
|
297
311
|
# Retrieve a RCS campaign's status.
|
|
298
312
|
#
|
|
299
|
-
# @param campaign_id [
|
|
313
|
+
# @param campaign_id [String] The unique identifier of the RCS campaign you want to retrieve the status for.
|
|
314
|
+
# This identifier is a string that always begins with the prefix `rcs_`, for
|
|
315
|
+
# example: `rcs_1234567890`.
|
|
300
316
|
# @param request_options [Pinnacle::RequestOptions]
|
|
301
317
|
# @return [Pinnacle::Types::RcsCampaignStatus]
|
|
302
318
|
# @example
|
|
@@ -305,7 +321,7 @@ module Pinnacle
|
|
|
305
321
|
# environment: Pinnacle::Environment::DEFAULT,
|
|
306
322
|
# api_key: "YOUR_API_KEY"
|
|
307
323
|
# )
|
|
308
|
-
# api.status.get.rcs(campaign_id:
|
|
324
|
+
# api.status.get.rcs(campaign_id: "rcs_1234567890")
|
|
309
325
|
def rcs(campaign_id:, request_options: nil)
|
|
310
326
|
Async do
|
|
311
327
|
response = @request_client.conn.get do |req|
|
|
@@ -25,9 +25,11 @@ module Pinnacle
|
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
# Retrieve contact information as a vCard and get a presigned URL to download the
|
|
28
|
-
# file.
|
|
28
|
+
# file. Contact cards can be sent [via MMS](/api-reference/messages/send-mms) as a
|
|
29
|
+
# media file.
|
|
29
30
|
#
|
|
30
|
-
# @param id [
|
|
31
|
+
# @param id [String] The unique identifier of the contact. This identifier is a string that always
|
|
32
|
+
# begins with the prefix `cc_`, for example: `cc_1234567890`.
|
|
31
33
|
# @param options [Hash] Request of type Pinnacle::Tools::ContactCard::Types::GetVCardSchemaOptions, as a Hash
|
|
32
34
|
# * :expires_at (String)
|
|
33
35
|
# @param request_options [Pinnacle::RequestOptions]
|
|
@@ -38,7 +40,7 @@ module Pinnacle
|
|
|
38
40
|
# environment: Pinnacle::Environment::DEFAULT,
|
|
39
41
|
# api_key: "YOUR_API_KEY"
|
|
40
42
|
# )
|
|
41
|
-
# api.tools.contact_card.get(id:
|
|
43
|
+
# api.tools.contact_card.get(id: "cc_1234567890")
|
|
42
44
|
def get(id:, options: nil, request_options: nil)
|
|
43
45
|
response = @request_client.conn.post do |req|
|
|
44
46
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
@@ -58,8 +60,11 @@ module Pinnacle
|
|
|
58
60
|
end
|
|
59
61
|
|
|
60
62
|
# Create a new contact card or updates an existing one with full vCard data.
|
|
63
|
+
# Contact cards can be sent [via MMS](/api-reference/messages/send-mms) as a media
|
|
64
|
+
# file.
|
|
61
65
|
#
|
|
62
|
-
# @param id [
|
|
66
|
+
# @param id [String] The unique identifier of the contact. This identifier is a string that always
|
|
67
|
+
# begins with the prefix `cc_`, for example: `cc_1234567890`.
|
|
63
68
|
# @param formatted_name [String] Full display name for the vCard.
|
|
64
69
|
# @param name [Hash] Structured name components.Request of type Pinnacle::Types::VCardName, as a Hash
|
|
65
70
|
# * :family_name (String)
|
|
@@ -157,9 +162,11 @@ module Pinnacle
|
|
|
157
162
|
end
|
|
158
163
|
|
|
159
164
|
# Retrieve contact information as a vCard and get a presigned URL to download the
|
|
160
|
-
# file.
|
|
165
|
+
# file. Contact cards can be sent [via MMS](/api-reference/messages/send-mms) as a
|
|
166
|
+
# media file.
|
|
161
167
|
#
|
|
162
|
-
# @param id [
|
|
168
|
+
# @param id [String] The unique identifier of the contact. This identifier is a string that always
|
|
169
|
+
# begins with the prefix `cc_`, for example: `cc_1234567890`.
|
|
163
170
|
# @param options [Hash] Request of type Pinnacle::Tools::ContactCard::Types::GetVCardSchemaOptions, as a Hash
|
|
164
171
|
# * :expires_at (String)
|
|
165
172
|
# @param request_options [Pinnacle::RequestOptions]
|
|
@@ -170,7 +177,7 @@ module Pinnacle
|
|
|
170
177
|
# environment: Pinnacle::Environment::DEFAULT,
|
|
171
178
|
# api_key: "YOUR_API_KEY"
|
|
172
179
|
# )
|
|
173
|
-
# api.tools.contact_card.get(id:
|
|
180
|
+
# api.tools.contact_card.get(id: "cc_1234567890")
|
|
174
181
|
def get(id:, options: nil, request_options: nil)
|
|
175
182
|
Async do
|
|
176
183
|
response = @request_client.conn.post do |req|
|
|
@@ -192,8 +199,11 @@ module Pinnacle
|
|
|
192
199
|
end
|
|
193
200
|
|
|
194
201
|
# Create a new contact card or updates an existing one with full vCard data.
|
|
202
|
+
# Contact cards can be sent [via MMS](/api-reference/messages/send-mms) as a media
|
|
203
|
+
# file.
|
|
195
204
|
#
|
|
196
|
-
# @param id [
|
|
205
|
+
# @param id [String] The unique identifier of the contact. This identifier is a string that always
|
|
206
|
+
# begins with the prefix `cc_`, for example: `cc_1234567890`.
|
|
197
207
|
# @param formatted_name [String] Full display name for the vCard.
|
|
198
208
|
# @param name [Hash] Structured name components.Request of type Pinnacle::Types::VCardName, as a Hash
|
|
199
209
|
# * :family_name (String)
|
|
@@ -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
|