rcs 2.0.0.pre.rc.2 → 2.0.0.pre.rc.4
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 +6 -6
- data/lib/rcs/brands/types/{autofill_brand_schema_options.rb → autofill_brand_options.rb} +5 -5
- data/lib/rcs/campaigns/dlc/client.rb +12 -12
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_schema_keywords_help.rb → upsert_dlc_campaign_help_keywords.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_schema_keywords.rb → upsert_dlc_campaign_keywords.rb} +20 -20
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_schema_links.rb → upsert_dlc_campaign_links.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_schema_keywords_opt_in.rb → upsert_dlc_campaign_opt_in_keywords.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_schema_keywords_opt_out.rb → upsert_dlc_campaign_opt_out_keywords.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_schema_options.rb → upsert_dlc_campaign_options.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_schema_use_case.rb → upsert_dlc_campaign_use_case.rb} +5 -5
- data/lib/rcs/campaigns/rcs/client.rb +39 -29
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_agent_emails_item.rb → rcs_agent_email.rb} +5 -5
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_agent_phones_item.rb → rcs_agent_phone.rb} +5 -5
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_agent_websites_item.rb → rcs_agent_website.rb} +5 -5
- data/lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb +14 -2
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_agent.rb → upsert_rcs_agent.rb} +17 -17
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_links.rb → upsert_rcs_links.rb} +5 -5
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_opt_in.rb → upsert_rcs_opt_in.rb} +13 -13
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_opt_out.rb → upsert_rcs_opt_out.rb} +5 -5
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_schema_use_case.rb → upsert_rcs_use_case.rb} +5 -5
- data/lib/rcs/campaigns/toll_free/client.rb +4 -4
- data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +10 -10
- data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_opt_in.rb +8 -8
- data/lib/rcs/conversations/client.rb +2 -2
- data/lib/rcs/messages/client.rb +24 -10
- data/lib/rcs/messages/mms/client.rb +118 -0
- data/lib/rcs/messages/{send/types/send_mms_response.rb → mms/types/mms_send_response.rb} +4 -4
- data/lib/rcs/messages/{send/types/send_mms_schema_options.rb → mms/types/send_mms_options.rb} +6 -6
- data/lib/rcs/messages/rcs/client.rb +68 -0
- data/lib/rcs/messages/{send/types/send_rcs_response.rb → rcs/types/rcs_send_response.rb} +4 -4
- data/lib/rcs/messages/sms/client.rb +198 -0
- data/lib/rcs/messages/{send/types/send_sms_schema_options.rb → sms/types/send_sms_options.rb} +6 -6
- data/lib/rcs/messages/{send/types/send_sms_response.rb → sms/types/sms_send_response.rb} +4 -4
- data/lib/rcs/messages/types/{message_reaction_schema_options.rb → react_message_options.rb} +5 -5
- data/lib/rcs/phone_numbers/client.rb +18 -18
- data/lib/rcs/phone_numbers/types/{phone_details_schema_options_enhanced_contact_info.rb → enhanced_contact_info.rb} +5 -7
- data/lib/rcs/phone_numbers/types/{phone_details_schema_options.rb → retrieve_phone_number_details_options.rb} +10 -10
- data/lib/rcs/phone_numbers/types/{search_schema_number.rb → search_phone_number_by_digits.rb} +5 -5
- data/lib/rcs/phone_numbers/types/{search_schema_location.rb → search_phone_number_by_location.rb} +5 -5
- data/lib/rcs/phone_numbers/types/{search_schema_options.rb → search_phone_number_options.rb} +5 -5
- data/lib/rcs/phone_numbers/webhook/client.rb +2 -2
- data/lib/rcs/tools/file/client.rb +3 -3
- data/lib/rcs/tools/file/types/{file_upload_schema_options_download.rb → download_options.rb} +5 -5
- data/lib/rcs/tools/file/types/{file_upload_schema_options.rb → upload_file_options.rb} +10 -10
- data/lib/rcs/types/{attach_webhook_schema_webhook_id.rb → attach_webhook_by_id_params.rb} +5 -5
- data/lib/rcs/types/attach_webhook_params.rb +8 -8
- data/lib/rcs/types/{get_conversation_request_id.rb → conversation_by_id_params.rb} +5 -5
- data/lib/rcs/types/{get_conversation_request_recipient.rb → conversation_by_participants_params.rb} +5 -5
- data/lib/rcs/types/{attach_webhook_schema_name.rb → create_and_attach_webhook_by_url_params.rb} +5 -5
- data/lib/rcs/types/extended_rcs_campaign.rb +13 -1
- data/lib/rcs/types/get_conversation_params.rb +8 -8
- data/lib/rcs/types/link_click_event.rb +8 -8
- data/lib/rcs/types/message.rb +8 -8
- data/lib/rcs/types/rcs.rb +12 -12
- data/lib/rcs/types/rcs_campaign.rb +14 -2
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_in.rb +8 -8
- data/lib/rcs/types/rcs_campaign_schema_opt_in.rb +8 -8
- data/lib/rcs/types/rcs_cards.rb +4 -4
- data/lib/rcs/types/rcs_cards_cards_item.rb +4 -4
- data/lib/rcs/types/rcs_cards_content.rb +4 -4
- data/lib/rcs/types/rcs_cards_content_cards_item.rb +4 -4
- data/lib/rcs/types/rcs_media_content.rb +4 -4
- data/lib/rcs/types/rcs_text_content.rb +4 -4
- data/lib/rcs/types/{rcs_button_content.rb → rich_button.rb} +10 -10
- data/lib/rcs/types/{rcs_card.rb → rich_cards_message.rb} +9 -9
- data/lib/rcs/types/{rcs_media.rb → rich_media_message.rb} +9 -9
- data/lib/rcs/types/{rcs_text.rb → rich_text_message.rb} +9 -9
- data/lib/rcs/types/toll_free_campaign.rb +10 -10
- data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +10 -10
- data/lib/rcs/types/{nullable_contact.rb → upsert_contact.rb} +5 -5
- data/lib/rcs/types/{toll_free_campaign_schema_opt_in.rb → upsert_toll_free_campaign_opt_in.rb} +13 -13
- data/lib/rcs/types/{toll_free_campaign_schema_use_case.rb → upsert_toll_free_campaign_use_case.rb} +5 -5
- data/lib/rcs.rb +0 -7
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +40 -40
- metadata +43 -45
- data/lib/rcs/message/client.rb +0 -30
- data/lib/rcs/message/sms/client.rb +0 -96
- data/lib/rcs/messages/send/client.rb +0 -318
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.pre.rc.
|
4
|
+
version: 2.0.0.pre.rc.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-09-
|
11
|
+
date: 2025-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|
@@ -100,54 +100,52 @@ files:
|
|
100
100
|
- lib/gemconfig.rb
|
101
101
|
- lib/rcs.rb
|
102
102
|
- lib/rcs/brands/client.rb
|
103
|
-
- lib/rcs/brands/types/
|
103
|
+
- lib/rcs/brands/types/autofill_brand_options.rb
|
104
104
|
- lib/rcs/brands/types/brand_contact.rb
|
105
105
|
- lib/rcs/campaigns/client.rb
|
106
106
|
- lib/rcs/campaigns/dlc/client.rb
|
107
|
-
- lib/rcs/campaigns/dlc/types/
|
108
|
-
- lib/rcs/campaigns/dlc/types/
|
109
|
-
- lib/rcs/campaigns/dlc/types/
|
110
|
-
- lib/rcs/campaigns/dlc/types/
|
111
|
-
- lib/rcs/campaigns/dlc/types/
|
112
|
-
- lib/rcs/campaigns/dlc/types/
|
113
|
-
- lib/rcs/campaigns/dlc/types/
|
107
|
+
- lib/rcs/campaigns/dlc/types/upsert_dlc_campaign_help_keywords.rb
|
108
|
+
- lib/rcs/campaigns/dlc/types/upsert_dlc_campaign_keywords.rb
|
109
|
+
- lib/rcs/campaigns/dlc/types/upsert_dlc_campaign_links.rb
|
110
|
+
- lib/rcs/campaigns/dlc/types/upsert_dlc_campaign_opt_in_keywords.rb
|
111
|
+
- lib/rcs/campaigns/dlc/types/upsert_dlc_campaign_opt_out_keywords.rb
|
112
|
+
- lib/rcs/campaigns/dlc/types/upsert_dlc_campaign_options.rb
|
113
|
+
- lib/rcs/campaigns/dlc/types/upsert_dlc_campaign_use_case.rb
|
114
114
|
- lib/rcs/campaigns/rcs/client.rb
|
115
|
+
- lib/rcs/campaigns/rcs/types/rcs_agent_email.rb
|
116
|
+
- lib/rcs/campaigns/rcs/types/rcs_agent_phone.rb
|
117
|
+
- lib/rcs/campaigns/rcs/types/rcs_agent_website.rb
|
115
118
|
- lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb
|
116
|
-
- lib/rcs/campaigns/rcs/types/
|
117
|
-
- lib/rcs/campaigns/rcs/types/
|
118
|
-
- lib/rcs/campaigns/rcs/types/
|
119
|
-
- lib/rcs/campaigns/rcs/types/
|
120
|
-
- lib/rcs/campaigns/rcs/types/
|
121
|
-
- lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_in.rb
|
122
|
-
- lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_out.rb
|
123
|
-
- lib/rcs/campaigns/rcs/types/upsert_rcs_schema_use_case.rb
|
119
|
+
- lib/rcs/campaigns/rcs/types/upsert_rcs_agent.rb
|
120
|
+
- lib/rcs/campaigns/rcs/types/upsert_rcs_links.rb
|
121
|
+
- lib/rcs/campaigns/rcs/types/upsert_rcs_opt_in.rb
|
122
|
+
- lib/rcs/campaigns/rcs/types/upsert_rcs_opt_out.rb
|
123
|
+
- lib/rcs/campaigns/rcs/types/upsert_rcs_use_case.rb
|
124
124
|
- lib/rcs/campaigns/toll_free/client.rb
|
125
125
|
- lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb
|
126
126
|
- lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_opt_in.rb
|
127
127
|
- lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_use_case.rb
|
128
128
|
- lib/rcs/contacts/client.rb
|
129
129
|
- lib/rcs/conversations/client.rb
|
130
|
-
- lib/rcs/message/client.rb
|
131
|
-
- lib/rcs/message/sms/client.rb
|
132
130
|
- lib/rcs/messages/client.rb
|
133
131
|
- lib/rcs/messages/mms/client.rb
|
132
|
+
- lib/rcs/messages/mms/types/mms_send_response.rb
|
133
|
+
- lib/rcs/messages/mms/types/send_mms_options.rb
|
134
134
|
- lib/rcs/messages/rcs/client.rb
|
135
|
-
- lib/rcs/messages/
|
136
|
-
- lib/rcs/messages/
|
137
|
-
- lib/rcs/messages/
|
138
|
-
- lib/rcs/messages/
|
139
|
-
- lib/rcs/messages/
|
140
|
-
- lib/rcs/messages/send/types/send_sms_schema_options.rb
|
141
|
-
- lib/rcs/messages/types/message_reaction_schema_options.rb
|
135
|
+
- lib/rcs/messages/rcs/types/rcs_send_response.rb
|
136
|
+
- lib/rcs/messages/sms/client.rb
|
137
|
+
- lib/rcs/messages/sms/types/send_sms_options.rb
|
138
|
+
- lib/rcs/messages/sms/types/sms_send_response.rb
|
139
|
+
- lib/rcs/messages/types/react_message_options.rb
|
142
140
|
- lib/rcs/phone_numbers/campaign/client.rb
|
143
141
|
- lib/rcs/phone_numbers/client.rb
|
142
|
+
- lib/rcs/phone_numbers/types/enhanced_contact_info.rb
|
144
143
|
- lib/rcs/phone_numbers/types/phone_details_schema_level.rb
|
145
|
-
- lib/rcs/phone_numbers/types/phone_details_schema_options.rb
|
146
|
-
- lib/rcs/phone_numbers/types/phone_details_schema_options_enhanced_contact_info.rb
|
147
144
|
- lib/rcs/phone_numbers/types/phone_numbers_get_response.rb
|
148
|
-
- lib/rcs/phone_numbers/types/
|
149
|
-
- lib/rcs/phone_numbers/types/
|
150
|
-
- lib/rcs/phone_numbers/types/
|
145
|
+
- lib/rcs/phone_numbers/types/retrieve_phone_number_details_options.rb
|
146
|
+
- lib/rcs/phone_numbers/types/search_phone_number_by_digits.rb
|
147
|
+
- lib/rcs/phone_numbers/types/search_phone_number_by_location.rb
|
148
|
+
- lib/rcs/phone_numbers/types/search_phone_number_options.rb
|
151
149
|
- lib/rcs/phone_numbers/webhook/client.rb
|
152
150
|
- lib/rcs/status/client.rb
|
153
151
|
- lib/rcs/status/get/client.rb
|
@@ -155,8 +153,8 @@ files:
|
|
155
153
|
- lib/rcs/tools/contact_card/client.rb
|
156
154
|
- lib/rcs/tools/contact_card/types/get_v_card_schema_options.rb
|
157
155
|
- lib/rcs/tools/file/client.rb
|
158
|
-
- lib/rcs/tools/file/types/
|
159
|
-
- lib/rcs/tools/file/types/
|
156
|
+
- lib/rcs/tools/file/types/download_options.rb
|
157
|
+
- lib/rcs/tools/file/types/upload_file_options.rb
|
160
158
|
- lib/rcs/tools/url/client.rb
|
161
159
|
- lib/rcs/types/advanced_phone_information.rb
|
162
160
|
- lib/rcs/types/advanced_phone_information_carrier.rb
|
@@ -167,10 +165,9 @@ files:
|
|
167
165
|
- lib/rcs/types/advanced_phone_information_type.rb
|
168
166
|
- lib/rcs/types/advanced_phone_information_type_recommendation.rb
|
169
167
|
- lib/rcs/types/agent.rb
|
168
|
+
- lib/rcs/types/attach_webhook_by_id_params.rb
|
170
169
|
- lib/rcs/types/attach_webhook_params.rb
|
171
170
|
- lib/rcs/types/attach_webhook_response_webhook.rb
|
172
|
-
- lib/rcs/types/attach_webhook_schema_name.rb
|
173
|
-
- lib/rcs/types/attach_webhook_schema_webhook_id.rb
|
174
171
|
- lib/rcs/types/attached_phone_number_result.rb
|
175
172
|
- lib/rcs/types/autofill_campaign_params.rb
|
176
173
|
- lib/rcs/types/autofill_dlc_campaign_response.rb
|
@@ -203,9 +200,12 @@ files:
|
|
203
200
|
- lib/rcs/types/contact.rb
|
204
201
|
- lib/rcs/types/contact_id.rb
|
205
202
|
- lib/rcs/types/conversation.rb
|
203
|
+
- lib/rcs/types/conversation_by_id_params.rb
|
204
|
+
- lib/rcs/types/conversation_by_participants_params.rb
|
206
205
|
- lib/rcs/types/conversation_contact.rb
|
207
206
|
- lib/rcs/types/conversation_list.rb
|
208
207
|
- lib/rcs/types/conversation_sender.rb
|
208
|
+
- lib/rcs/types/create_and_attach_webhook_by_url_params.rb
|
209
209
|
- lib/rcs/types/create_url_options.rb
|
210
210
|
- lib/rcs/types/detached_phone_number_result.rb
|
211
211
|
- lib/rcs/types/detached_webhook_info.rb
|
@@ -228,8 +228,6 @@ files:
|
|
228
228
|
- lib/rcs/types/extended_brand_with_vetting.rb
|
229
229
|
- lib/rcs/types/extended_rcs_campaign.rb
|
230
230
|
- lib/rcs/types/get_conversation_params.rb
|
231
|
-
- lib/rcs/types/get_conversation_request_id.rb
|
232
|
-
- lib/rcs/types/get_conversation_request_recipient.rb
|
233
231
|
- lib/rcs/types/get_dlc_campaign_status_response_updates.rb
|
234
232
|
- lib/rcs/types/get_toll_free_campaign_status_response_updates.rb
|
235
233
|
- lib/rcs/types/inbound_button.rb
|
@@ -248,7 +246,6 @@ files:
|
|
248
246
|
- lib/rcs/types/mms_validation_response_segments.rb
|
249
247
|
- lib/rcs/types/mms_validation_response_segments_value_item.rb
|
250
248
|
- lib/rcs/types/mms_validation_result.rb
|
251
|
-
- lib/rcs/types/nullable_contact.rb
|
252
249
|
- lib/rcs/types/number_format.rb
|
253
250
|
- lib/rcs/types/opt_in_method_enum.rb
|
254
251
|
- lib/rcs/types/optional_brand_info.rb
|
@@ -278,7 +275,6 @@ files:
|
|
278
275
|
- lib/rcs/types/rcs_base.rb
|
279
276
|
- lib/rcs/types/rcs_base_options.rb
|
280
277
|
- lib/rcs/types/rcs_button_call.rb
|
281
|
-
- lib/rcs/types/rcs_button_content.rb
|
282
278
|
- lib/rcs/types/rcs_button_open_url.rb
|
283
279
|
- lib/rcs/types/rcs_button_request_user_location.rb
|
284
280
|
- lib/rcs/types/rcs_button_schedule_event.rb
|
@@ -305,21 +301,22 @@ files:
|
|
305
301
|
- lib/rcs/types/rcs_campaign_schema_use_case.rb
|
306
302
|
- lib/rcs/types/rcs_campaign_status.rb
|
307
303
|
- lib/rcs/types/rcs_campaign_use_case_enum.rb
|
308
|
-
- lib/rcs/types/rcs_card.rb
|
309
304
|
- lib/rcs/types/rcs_cards.rb
|
310
305
|
- lib/rcs/types/rcs_cards_cards_item.rb
|
311
306
|
- lib/rcs/types/rcs_cards_content.rb
|
312
307
|
- lib/rcs/types/rcs_cards_content_cards_item.rb
|
313
308
|
- lib/rcs/types/rcs_content.rb
|
314
|
-
- lib/rcs/types/rcs_media.rb
|
315
309
|
- lib/rcs/types/rcs_media_content.rb
|
316
310
|
- lib/rcs/types/rcs_media_details_content.rb
|
317
|
-
- lib/rcs/types/rcs_text.rb
|
318
311
|
- lib/rcs/types/rcs_text_content.rb
|
319
312
|
- lib/rcs/types/rcs_validate_content.rb
|
320
313
|
- lib/rcs/types/rcs_validate_content_media.rb
|
321
314
|
- lib/rcs/types/rcs_validation_result.rb
|
322
315
|
- lib/rcs/types/reaction_result.rb
|
316
|
+
- lib/rcs/types/rich_button.rb
|
317
|
+
- lib/rcs/types/rich_cards_message.rb
|
318
|
+
- lib/rcs/types/rich_media_message.rb
|
319
|
+
- lib/rcs/types/rich_text_message.rb
|
323
320
|
- lib/rcs/types/scheduled_messaage.rb
|
324
321
|
- lib/rcs/types/scheduled_send_response_config.rb
|
325
322
|
- lib/rcs/types/send_sms_response_segments.rb
|
@@ -339,8 +336,6 @@ files:
|
|
339
336
|
- lib/rcs/types/submission_results.rb
|
340
337
|
- lib/rcs/types/successful_conversation_update.rb
|
341
338
|
- lib/rcs/types/toll_free_campaign.rb
|
342
|
-
- lib/rcs/types/toll_free_campaign_schema_opt_in.rb
|
343
|
-
- lib/rcs/types/toll_free_campaign_schema_use_case.rb
|
344
339
|
- lib/rcs/types/toll_free_campaign_status.rb
|
345
340
|
- lib/rcs/types/toll_free_campaign_use_case_enum.rb
|
346
341
|
- lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb
|
@@ -348,6 +343,9 @@ files:
|
|
348
343
|
- lib/rcs/types/tracking.rb
|
349
344
|
- lib/rcs/types/updated_contact_id.rb
|
350
345
|
- lib/rcs/types/upload_results.rb
|
346
|
+
- lib/rcs/types/upsert_contact.rb
|
347
|
+
- lib/rcs/types/upsert_toll_free_campaign_opt_in.rb
|
348
|
+
- lib/rcs/types/upsert_toll_free_campaign_use_case.rb
|
351
349
|
- lib/rcs/types/v_card_address_schema_type_item.rb
|
352
350
|
- lib/rcs/types/v_card_data.rb
|
353
351
|
- lib/rcs/types/v_card_data_file.rb
|
data/lib/rcs/message/client.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "../../requests"
|
4
|
-
require_relative "sms/client"
|
5
|
-
|
6
|
-
module Pinnacle
|
7
|
-
module Message
|
8
|
-
class Client
|
9
|
-
# @return [Pinnacle::Message::SmsClient]
|
10
|
-
attr_reader :sms
|
11
|
-
|
12
|
-
# @param request_client [Pinnacle::RequestClient]
|
13
|
-
# @return [Pinnacle::Message::Client]
|
14
|
-
def initialize(request_client:)
|
15
|
-
@sms = Pinnacle::Message::SmsClient.new(request_client: request_client)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
class AsyncClient
|
20
|
-
# @return [Pinnacle::Message::AsyncSmsClient]
|
21
|
-
attr_reader :sms
|
22
|
-
|
23
|
-
# @param request_client [Pinnacle::AsyncRequestClient]
|
24
|
-
# @return [Pinnacle::Message::AsyncClient]
|
25
|
-
def initialize(request_client:)
|
26
|
-
@sms = Pinnacle::Message::AsyncSmsClient.new(request_client: request_client)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,96 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "../../../requests"
|
4
|
-
require_relative "../../types/sms_content"
|
5
|
-
require_relative "../../types/sms_validation_result"
|
6
|
-
require "async"
|
7
|
-
|
8
|
-
module Pinnacle
|
9
|
-
module Message
|
10
|
-
class SmsClient
|
11
|
-
# @return [Pinnacle::RequestClient]
|
12
|
-
attr_reader :request_client
|
13
|
-
|
14
|
-
# @param request_client [Pinnacle::RequestClient]
|
15
|
-
# @return [Pinnacle::Message::SmsClient]
|
16
|
-
def initialize(request_client:)
|
17
|
-
@request_client = request_client
|
18
|
-
end
|
19
|
-
|
20
|
-
# Validate SMS message content without sending it.
|
21
|
-
#
|
22
|
-
# @param request [Hash] Request of type Pinnacle::Types::SmsContent, as a Hash
|
23
|
-
# * :text (String)
|
24
|
-
# @param request_options [Pinnacle::RequestOptions]
|
25
|
-
# @return [Pinnacle::Types::SmsValidationResult]
|
26
|
-
# @example
|
27
|
-
# api = Pinnacle::Client.new(
|
28
|
-
# base_url: "https://api.example.com",
|
29
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
30
|
-
# api_key: "YOUR_API_KEY"
|
31
|
-
# )
|
32
|
-
# api.message.sms.validate(request: { text: "Hello from Pinnacle" })
|
33
|
-
def validate(request:, request_options: nil)
|
34
|
-
response = @request_client.conn.post do |req|
|
35
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
36
|
-
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
37
|
-
req.headers = {
|
38
|
-
**(req.headers || {}),
|
39
|
-
**@request_client.get_headers,
|
40
|
-
**(request_options&.additional_headers || {})
|
41
|
-
}.compact
|
42
|
-
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
43
|
-
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
44
|
-
end
|
45
|
-
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
46
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/messages/validate/sms"
|
47
|
-
end
|
48
|
-
Pinnacle::Types::SmsValidationResult.from_json(json_object: response.body)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
class AsyncSmsClient
|
53
|
-
# @return [Pinnacle::AsyncRequestClient]
|
54
|
-
attr_reader :request_client
|
55
|
-
|
56
|
-
# @param request_client [Pinnacle::AsyncRequestClient]
|
57
|
-
# @return [Pinnacle::Message::AsyncSmsClient]
|
58
|
-
def initialize(request_client:)
|
59
|
-
@request_client = request_client
|
60
|
-
end
|
61
|
-
|
62
|
-
# Validate SMS message content without sending it.
|
63
|
-
#
|
64
|
-
# @param request [Hash] Request of type Pinnacle::Types::SmsContent, as a Hash
|
65
|
-
# * :text (String)
|
66
|
-
# @param request_options [Pinnacle::RequestOptions]
|
67
|
-
# @return [Pinnacle::Types::SmsValidationResult]
|
68
|
-
# @example
|
69
|
-
# api = Pinnacle::Client.new(
|
70
|
-
# base_url: "https://api.example.com",
|
71
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
72
|
-
# api_key: "YOUR_API_KEY"
|
73
|
-
# )
|
74
|
-
# api.message.sms.validate(request: { text: "Hello from Pinnacle" })
|
75
|
-
def validate(request:, request_options: nil)
|
76
|
-
Async do
|
77
|
-
response = @request_client.conn.post do |req|
|
78
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
79
|
-
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
80
|
-
req.headers = {
|
81
|
-
**(req.headers || {}),
|
82
|
-
**@request_client.get_headers,
|
83
|
-
**(request_options&.additional_headers || {})
|
84
|
-
}.compact
|
85
|
-
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
86
|
-
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
87
|
-
end
|
88
|
-
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
89
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/messages/validate/sms"
|
90
|
-
end
|
91
|
-
Pinnacle::Types::SmsValidationResult.from_json(json_object: response.body)
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
@@ -1,318 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "../../../requests"
|
4
|
-
require_relative "types/send_sms_schema_options"
|
5
|
-
require_relative "types/send_sms_response"
|
6
|
-
require_relative "types/send_mms_schema_options"
|
7
|
-
require_relative "types/send_mms_response"
|
8
|
-
require_relative "../../types/rcs"
|
9
|
-
require_relative "types/send_rcs_response"
|
10
|
-
require "async"
|
11
|
-
|
12
|
-
module Pinnacle
|
13
|
-
module Messages
|
14
|
-
class SendClient
|
15
|
-
# @return [Pinnacle::RequestClient]
|
16
|
-
attr_reader :request_client
|
17
|
-
|
18
|
-
# @param request_client [Pinnacle::RequestClient]
|
19
|
-
# @return [Pinnacle::Messages::SendClient]
|
20
|
-
def initialize(request_client:)
|
21
|
-
@request_client = request_client
|
22
|
-
end
|
23
|
-
|
24
|
-
# Send a SMS message immediately or schedule it for future delivery.
|
25
|
-
#
|
26
|
-
# @param from [String] Phone number that sends the message in E.164 format.
|
27
|
-
# @param options [Hash] Additional settings to customize SMS delivery.Request of type Pinnacle::Messages::Send::Types::SendSmsSchemaOptions, as a Hash
|
28
|
-
# * :schedule (Hash)
|
29
|
-
# * :end_date (DateTime)
|
30
|
-
# * :recurrence (String)
|
31
|
-
# * :send_at (String)
|
32
|
-
# * :timezone (String)
|
33
|
-
# * :tracking (Pinnacle::Types::Tracking)
|
34
|
-
# @param text [String] Message content.
|
35
|
-
# @param to [String] Recipient's phone number in E.164 format.
|
36
|
-
# @param request_options [Pinnacle::RequestOptions]
|
37
|
-
# @return [Pinnacle::Types::SentSmsDetails, Pinnacle::Types::ScheduledMessaage]
|
38
|
-
# @example
|
39
|
-
# api = Pinnacle::Client.new(
|
40
|
-
# base_url: "https://api.example.com",
|
41
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
42
|
-
# api_key: "YOUR_API_KEY"
|
43
|
-
# )
|
44
|
-
# api.messages.send.sms(
|
45
|
-
# from: "+14155164736",
|
46
|
-
# text: "Hey! 😂",
|
47
|
-
# to: "+14154746461"
|
48
|
-
# )
|
49
|
-
def sms(from:, text:, to:, options: nil, request_options: nil)
|
50
|
-
response = @request_client.conn.post do |req|
|
51
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
52
|
-
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
53
|
-
req.headers = {
|
54
|
-
**(req.headers || {}),
|
55
|
-
**@request_client.get_headers,
|
56
|
-
**(request_options&.additional_headers || {})
|
57
|
-
}.compact
|
58
|
-
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
59
|
-
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
60
|
-
end
|
61
|
-
req.body = {
|
62
|
-
**(request_options&.additional_body_parameters || {}),
|
63
|
-
from: from,
|
64
|
-
options: options,
|
65
|
-
text: text,
|
66
|
-
to: to
|
67
|
-
}.compact
|
68
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/messages/send/sms"
|
69
|
-
end
|
70
|
-
Pinnacle::Messages::Send::Types::SendSmsResponse.from_json(json_object: response.body)
|
71
|
-
end
|
72
|
-
|
73
|
-
# Send a MMS immediately or schedule it for future delivery.
|
74
|
-
#
|
75
|
-
# @param from [String] Phone number you want to send the message from in E.164 format.
|
76
|
-
# @param media_urls [Array<String>] Media file URLs to send.<br>
|
77
|
-
# See [supported media
|
78
|
-
# types](https://app.pinnacle.sh/supported-file-types?type=MMS).
|
79
|
-
# @param options [Hash] Control how your MMS is processed and delivered.Request of type Pinnacle::Messages::Send::Types::SendMmsSchemaOptions, as a Hash
|
80
|
-
# * :multiple_messages (Boolean)
|
81
|
-
# * :schedule (Hash)
|
82
|
-
# * :end_date (DateTime)
|
83
|
-
# * :recurrence (String)
|
84
|
-
# * :send_at (String)
|
85
|
-
# * :timezone (String)
|
86
|
-
# * :tracking (Pinnacle::Types::Tracking)
|
87
|
-
# * :validate (Boolean)
|
88
|
-
# @param text [String] Message text to accompany the media.
|
89
|
-
# @param to [String] Recipient's phone number in E.164 format.
|
90
|
-
# @param request_options [Pinnacle::RequestOptions]
|
91
|
-
# @return [Pinnacle::Types::SentMmsDetails, Pinnacle::Types::ScheduledMessaage]
|
92
|
-
# @example
|
93
|
-
# api = Pinnacle::Client.new(
|
94
|
-
# base_url: "https://api.example.com",
|
95
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
96
|
-
# api_key: "YOUR_API_KEY"
|
97
|
-
# )
|
98
|
-
# api.messages.send.mms(
|
99
|
-
# from: "+14155164736",
|
100
|
-
# media_urls: ["https://fastly.picsum.photos/id/941/300/300.jpg?hmac=mDxM9PWSqRDjecwSCEpzU4bj35gqnG7yA25OL29uNv0"],
|
101
|
-
# options: { multiple_messages: true, validate: true },
|
102
|
-
# text: "Check out this image!",
|
103
|
-
# to: "+14154746461"
|
104
|
-
# )
|
105
|
-
def mms(from:, media_urls:, text:, to:, options: nil, request_options: nil)
|
106
|
-
response = @request_client.conn.post do |req|
|
107
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
108
|
-
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
109
|
-
req.headers = {
|
110
|
-
**(req.headers || {}),
|
111
|
-
**@request_client.get_headers,
|
112
|
-
**(request_options&.additional_headers || {})
|
113
|
-
}.compact
|
114
|
-
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
115
|
-
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
116
|
-
end
|
117
|
-
req.body = {
|
118
|
-
**(request_options&.additional_body_parameters || {}),
|
119
|
-
from: from,
|
120
|
-
mediaUrls: media_urls,
|
121
|
-
options: options,
|
122
|
-
text: text,
|
123
|
-
to: to
|
124
|
-
}.compact
|
125
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/messages/send/mms"
|
126
|
-
end
|
127
|
-
Pinnacle::Messages::Send::Types::SendMmsResponse.from_json(json_object: response.body)
|
128
|
-
end
|
129
|
-
|
130
|
-
# Send a RCS message immediately or schedule it for future delivery. <br>
|
131
|
-
# Requires an active RCS agent and recipient devices that support RCS Business
|
132
|
-
# Messaging.
|
133
|
-
#
|
134
|
-
# @param request [Pinnacle::Types::RcsText, Pinnacle::Types::RcsMedia, Pinnacle::Types::RcsCard]
|
135
|
-
# @param request_options [Pinnacle::RequestOptions]
|
136
|
-
# @return [Pinnacle::Types::SentRcsDetails, Pinnacle::Types::ScheduledMessaage]
|
137
|
-
# @example
|
138
|
-
# api = Pinnacle::Client.new(
|
139
|
-
# base_url: "https://api.example.com",
|
140
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
141
|
-
# api_key: "YOUR_API_KEY"
|
142
|
-
# )
|
143
|
-
# api.messages.send.rcs(request: { quick_replies: , text: "text", from: "from", to: "to" })
|
144
|
-
def rcs(request:, request_options: nil)
|
145
|
-
response = @request_client.conn.post do |req|
|
146
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
147
|
-
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
148
|
-
req.headers = {
|
149
|
-
**(req.headers || {}),
|
150
|
-
**@request_client.get_headers,
|
151
|
-
**(request_options&.additional_headers || {})
|
152
|
-
}.compact
|
153
|
-
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
154
|
-
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
155
|
-
end
|
156
|
-
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
157
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/messages/send/rcs"
|
158
|
-
end
|
159
|
-
Pinnacle::Messages::Send::Types::SendRcsResponse.from_json(json_object: response.body)
|
160
|
-
end
|
161
|
-
end
|
162
|
-
|
163
|
-
class AsyncSendClient
|
164
|
-
# @return [Pinnacle::AsyncRequestClient]
|
165
|
-
attr_reader :request_client
|
166
|
-
|
167
|
-
# @param request_client [Pinnacle::AsyncRequestClient]
|
168
|
-
# @return [Pinnacle::Messages::AsyncSendClient]
|
169
|
-
def initialize(request_client:)
|
170
|
-
@request_client = request_client
|
171
|
-
end
|
172
|
-
|
173
|
-
# Send a SMS message immediately or schedule it for future delivery.
|
174
|
-
#
|
175
|
-
# @param from [String] Phone number that sends the message in E.164 format.
|
176
|
-
# @param options [Hash] Additional settings to customize SMS delivery.Request of type Pinnacle::Messages::Send::Types::SendSmsSchemaOptions, as a Hash
|
177
|
-
# * :schedule (Hash)
|
178
|
-
# * :end_date (DateTime)
|
179
|
-
# * :recurrence (String)
|
180
|
-
# * :send_at (String)
|
181
|
-
# * :timezone (String)
|
182
|
-
# * :tracking (Pinnacle::Types::Tracking)
|
183
|
-
# @param text [String] Message content.
|
184
|
-
# @param to [String] Recipient's phone number in E.164 format.
|
185
|
-
# @param request_options [Pinnacle::RequestOptions]
|
186
|
-
# @return [Pinnacle::Types::SentSmsDetails, Pinnacle::Types::ScheduledMessaage]
|
187
|
-
# @example
|
188
|
-
# api = Pinnacle::Client.new(
|
189
|
-
# base_url: "https://api.example.com",
|
190
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
191
|
-
# api_key: "YOUR_API_KEY"
|
192
|
-
# )
|
193
|
-
# api.messages.send.sms(
|
194
|
-
# from: "+14155164736",
|
195
|
-
# text: "Hey! 😂",
|
196
|
-
# to: "+14154746461"
|
197
|
-
# )
|
198
|
-
def sms(from:, text:, to:, options: nil, request_options: nil)
|
199
|
-
Async do
|
200
|
-
response = @request_client.conn.post do |req|
|
201
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
202
|
-
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
203
|
-
req.headers = {
|
204
|
-
**(req.headers || {}),
|
205
|
-
**@request_client.get_headers,
|
206
|
-
**(request_options&.additional_headers || {})
|
207
|
-
}.compact
|
208
|
-
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
209
|
-
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
210
|
-
end
|
211
|
-
req.body = {
|
212
|
-
**(request_options&.additional_body_parameters || {}),
|
213
|
-
from: from,
|
214
|
-
options: options,
|
215
|
-
text: text,
|
216
|
-
to: to
|
217
|
-
}.compact
|
218
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/messages/send/sms"
|
219
|
-
end
|
220
|
-
Pinnacle::Messages::Send::Types::SendSmsResponse.from_json(json_object: response.body)
|
221
|
-
end
|
222
|
-
end
|
223
|
-
|
224
|
-
# Send a MMS immediately or schedule it for future delivery.
|
225
|
-
#
|
226
|
-
# @param from [String] Phone number you want to send the message from in E.164 format.
|
227
|
-
# @param media_urls [Array<String>] Media file URLs to send.<br>
|
228
|
-
# See [supported media
|
229
|
-
# types](https://app.pinnacle.sh/supported-file-types?type=MMS).
|
230
|
-
# @param options [Hash] Control how your MMS is processed and delivered.Request of type Pinnacle::Messages::Send::Types::SendMmsSchemaOptions, as a Hash
|
231
|
-
# * :multiple_messages (Boolean)
|
232
|
-
# * :schedule (Hash)
|
233
|
-
# * :end_date (DateTime)
|
234
|
-
# * :recurrence (String)
|
235
|
-
# * :send_at (String)
|
236
|
-
# * :timezone (String)
|
237
|
-
# * :tracking (Pinnacle::Types::Tracking)
|
238
|
-
# * :validate (Boolean)
|
239
|
-
# @param text [String] Message text to accompany the media.
|
240
|
-
# @param to [String] Recipient's phone number in E.164 format.
|
241
|
-
# @param request_options [Pinnacle::RequestOptions]
|
242
|
-
# @return [Pinnacle::Types::SentMmsDetails, Pinnacle::Types::ScheduledMessaage]
|
243
|
-
# @example
|
244
|
-
# api = Pinnacle::Client.new(
|
245
|
-
# base_url: "https://api.example.com",
|
246
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
247
|
-
# api_key: "YOUR_API_KEY"
|
248
|
-
# )
|
249
|
-
# api.messages.send.mms(
|
250
|
-
# from: "+14155164736",
|
251
|
-
# media_urls: ["https://fastly.picsum.photos/id/941/300/300.jpg?hmac=mDxM9PWSqRDjecwSCEpzU4bj35gqnG7yA25OL29uNv0"],
|
252
|
-
# options: { multiple_messages: true, validate: true },
|
253
|
-
# text: "Check out this image!",
|
254
|
-
# to: "+14154746461"
|
255
|
-
# )
|
256
|
-
def mms(from:, media_urls:, text:, to:, options: nil, request_options: nil)
|
257
|
-
Async do
|
258
|
-
response = @request_client.conn.post do |req|
|
259
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
260
|
-
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
261
|
-
req.headers = {
|
262
|
-
**(req.headers || {}),
|
263
|
-
**@request_client.get_headers,
|
264
|
-
**(request_options&.additional_headers || {})
|
265
|
-
}.compact
|
266
|
-
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
267
|
-
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
268
|
-
end
|
269
|
-
req.body = {
|
270
|
-
**(request_options&.additional_body_parameters || {}),
|
271
|
-
from: from,
|
272
|
-
mediaUrls: media_urls,
|
273
|
-
options: options,
|
274
|
-
text: text,
|
275
|
-
to: to
|
276
|
-
}.compact
|
277
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/messages/send/mms"
|
278
|
-
end
|
279
|
-
Pinnacle::Messages::Send::Types::SendMmsResponse.from_json(json_object: response.body)
|
280
|
-
end
|
281
|
-
end
|
282
|
-
|
283
|
-
# Send a RCS message immediately or schedule it for future delivery. <br>
|
284
|
-
# Requires an active RCS agent and recipient devices that support RCS Business
|
285
|
-
# Messaging.
|
286
|
-
#
|
287
|
-
# @param request [Pinnacle::Types::RcsText, Pinnacle::Types::RcsMedia, Pinnacle::Types::RcsCard]
|
288
|
-
# @param request_options [Pinnacle::RequestOptions]
|
289
|
-
# @return [Pinnacle::Types::SentRcsDetails, Pinnacle::Types::ScheduledMessaage]
|
290
|
-
# @example
|
291
|
-
# api = Pinnacle::Client.new(
|
292
|
-
# base_url: "https://api.example.com",
|
293
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
294
|
-
# api_key: "YOUR_API_KEY"
|
295
|
-
# )
|
296
|
-
# api.messages.send.rcs(request: { quick_replies: , text: "text", from: "from", to: "to" })
|
297
|
-
def rcs(request:, request_options: nil)
|
298
|
-
Async do
|
299
|
-
response = @request_client.conn.post do |req|
|
300
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
301
|
-
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
302
|
-
req.headers = {
|
303
|
-
**(req.headers || {}),
|
304
|
-
**@request_client.get_headers,
|
305
|
-
**(request_options&.additional_headers || {})
|
306
|
-
}.compact
|
307
|
-
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
308
|
-
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
309
|
-
end
|
310
|
-
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
311
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/messages/send/rcs"
|
312
|
-
end
|
313
|
-
Pinnacle::Messages::Send::Types::SendRcsResponse.from_json(json_object: response.body)
|
314
|
-
end
|
315
|
-
end
|
316
|
-
end
|
317
|
-
end
|
318
|
-
end
|