rcs 2.0.0.pre.rc.4 → 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.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rcs/brands/client.rb +36 -24
  3. data/lib/rcs/campaigns/dlc/client.rb +44 -34
  4. data/lib/rcs/campaigns/rcs/client.rb +26 -22
  5. data/lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb +6 -6
  6. data/lib/rcs/campaigns/rcs/types/upsert_rcs_agent.rb +4 -4
  7. data/lib/rcs/campaigns/toll_free/client.rb +32 -26
  8. data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +6 -6
  9. data/lib/rcs/contacts/client.rb +10 -8
  10. data/lib/rcs/conversations/client.rb +142 -14
  11. data/lib/rcs/conversations/types/conversations_list_messages_request_direction.rb +12 -0
  12. data/lib/rcs/conversations/types/conversations_list_messages_request_sort_order.rb +12 -0
  13. data/lib/rcs/conversations/types/conversations_list_messages_request_status.rb +17 -0
  14. data/lib/rcs/conversations/types/conversations_list_messages_request_type.rb +13 -0
  15. data/lib/rcs/messages/client.rb +12 -29
  16. data/lib/rcs/messages/mms/client.rb +2 -2
  17. data/lib/rcs/messages/rcs/client.rb +1 -1
  18. data/lib/rcs/messages/sms/client.rb +2 -2
  19. data/lib/rcs/phone_numbers/campaign/client.rb +20 -6
  20. data/lib/rcs/phone_numbers/client.rb +0 -14
  21. data/lib/rcs/phone_numbers/webhook/client.rb +12 -10
  22. data/lib/rcs/rcs/client.rb +330 -0
  23. data/lib/rcs/status/get/client.rb +34 -18
  24. data/lib/rcs/tools/contact_card/client.rb +18 -8
  25. data/lib/rcs/tools/file/client.rb +92 -2
  26. data/lib/rcs/tools/file/types/upload_file_options.rb +21 -3
  27. data/lib/rcs/tools/url/client.rb +4 -2
  28. data/lib/rcs/types/attach_webhook_by_id_params.rb +5 -5
  29. data/lib/rcs/types/attach_webhook_response_webhook.rb +5 -3
  30. data/lib/rcs/types/autofill_campaign_params.rb +15 -3
  31. data/lib/rcs/types/autofill_dlc_campaign_response.rb +10 -6
  32. data/lib/rcs/types/autofill_dlc_response_keywords.rb +8 -10
  33. data/lib/rcs/types/autofill_dlc_response_keywords_help.rb +3 -3
  34. data/lib/rcs/types/autofill_dlc_response_keywords_opt_in.rb +6 -4
  35. data/lib/rcs/types/autofill_dlc_response_keywords_opt_out.rb +3 -3
  36. data/lib/rcs/types/autofill_dlc_response_options.rb +12 -12
  37. data/lib/rcs/types/brand_status.rb +5 -3
  38. data/lib/rcs/types/{inbound_button.rb → button_clicked.rb} +7 -7
  39. data/lib/rcs/types/button_clicked_data.rb +80 -0
  40. data/lib/rcs/types/button_clicked_data_button.rb +118 -0
  41. data/lib/rcs/types/{click_action_data.rb → button_clicked_data_button_raw.rb} +10 -8
  42. data/lib/rcs/types/button_clicked_data_button_type.rb +15 -0
  43. data/lib/rcs/types/campaign_query.rb +10 -2
  44. data/lib/rcs/types/contact.rb +5 -3
  45. data/lib/rcs/types/contact_id.rb +5 -3
  46. data/lib/rcs/types/conversation.rb +16 -8
  47. data/lib/rcs/types/conversation_by_id_params.rb +7 -3
  48. data/lib/rcs/types/conversation_contact.rb +5 -3
  49. data/lib/rcs/types/create_url_options.rb +4 -2
  50. data/lib/rcs/types/detached_webhook_info.rb +5 -3
  51. data/lib/rcs/types/dlc_campaign_status.rb +7 -5
  52. data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +21 -19
  53. data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_help.rb +3 -3
  54. data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_opt_in.rb +6 -4
  55. data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_opt_out.rb +6 -4
  56. data/lib/rcs/types/extended_brand.rb +25 -13
  57. data/lib/rcs/types/extended_brand_with_vetting.rb +25 -13
  58. data/lib/rcs/types/extended_rcs_campaign.rb +25 -14
  59. data/lib/rcs/types/get_dlc_campaign_status_response_updates.rb +1 -1
  60. data/lib/rcs/types/link_click_event.rb +1 -17
  61. data/lib/rcs/types/message.rb +5 -3
  62. data/lib/rcs/types/message_content.rb +4 -4
  63. data/lib/rcs/types/message_event.rb +143 -0
  64. data/lib/rcs/types/message_event_content.rb +127 -0
  65. data/lib/rcs/types/message_event_conversation.rb +82 -0
  66. data/lib/rcs/types/message_event_direction.rb +11 -0
  67. data/lib/rcs/types/message_event_mms_content.rb +94 -0
  68. data/lib/rcs/types/message_event_rcs_button_data.rb +104 -0
  69. data/lib/rcs/types/message_event_rcs_cards_content.rb +99 -0
  70. data/lib/rcs/types/message_event_rcs_cards_content_cards_item.rb +94 -0
  71. data/lib/rcs/types/message_event_rcs_location_data.rb +91 -0
  72. data/lib/rcs/types/message_event_rcs_media_content.rb +94 -0
  73. data/lib/rcs/types/message_event_rcs_text_content.rb +92 -0
  74. data/lib/rcs/types/message_event_sms_content.rb +81 -0
  75. data/lib/rcs/types/message_list.rb +79 -0
  76. data/lib/rcs/types/message_schedule.rb +4 -5
  77. data/lib/rcs/types/message_with_reaction.rb +197 -0
  78. data/lib/rcs/types/message_with_reaction_direction.rb +11 -0
  79. data/lib/rcs/types/not_found_error_body.rb +59 -0
  80. data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item_campaign.rb +7 -3
  81. data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item_campaign.rb +7 -3
  82. data/lib/rcs/types/pinnacle_file_upload_metadata.rb +18 -2
  83. data/lib/rcs/types/profile_status_enum.rb +4 -4
  84. data/lib/rcs/types/rcs_base_options.rb +12 -1
  85. data/lib/rcs/types/rcs_button_call.rb +11 -2
  86. data/lib/rcs/types/rcs_button_open_url.rb +11 -2
  87. data/lib/rcs/types/rcs_button_request_user_location.rb +15 -3
  88. data/lib/rcs/types/rcs_button_schedule_event.rb +9 -1
  89. data/lib/rcs/types/rcs_button_send_location.rb +11 -2
  90. data/lib/rcs/types/rcs_button_trigger.rb +8 -6
  91. data/lib/rcs/types/rcs_campaign.rb +3 -3
  92. data/lib/rcs/types/rcs_campaign_schema_agent.rb +4 -4
  93. data/lib/rcs/types/rcs_campaign_schema_extra_agent.rb +12 -12
  94. data/lib/rcs/types/rcs_campaign_status.rb +5 -3
  95. data/lib/rcs/types/rcs_capabilities_result.rb +7 -0
  96. data/lib/rcs/types/rcs_capability.rb +82 -0
  97. data/lib/rcs/types/rcs_capability_actions.rb +105 -0
  98. data/lib/rcs/types/rcs_capability_cards.rb +67 -0
  99. data/lib/rcs/types/rcs_link_result.rb +75 -0
  100. data/lib/rcs/types/rcs_validate_content_media.rb +17 -3
  101. data/lib/rcs/types/rcs_whitelist_response.rb +58 -0
  102. data/lib/rcs/types/reaction_result.rb +10 -6
  103. data/lib/rcs/types/refreshed_file.rb +67 -0
  104. data/lib/rcs/types/{rcs.rb → rich_message.rb} +3 -3
  105. data/lib/rcs/types/scheduled_messaage.rb +5 -3
  106. data/lib/rcs/types/sent_mms_details.rb +4 -2
  107. data/lib/rcs/types/sent_rcs_details.rb +12 -13
  108. data/lib/rcs/types/sent_sms_details.rb +5 -3
  109. data/lib/rcs/types/toll_free_campaign.rb +3 -3
  110. data/lib/rcs/types/toll_free_campaign_status.rb +5 -3
  111. data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +3 -5
  112. data/lib/rcs/types/updated_contact_id.rb +5 -3
  113. data/lib/rcs/types/user_event.rb +83 -0
  114. data/lib/rcs/types/user_event_conversation.rb +78 -0
  115. data/lib/rcs/types/v_card_data.rb +5 -3
  116. data/lib/rcs/types/validate_campaign_params.rb +15 -3
  117. data/lib/rcs/types/vcard.rb +5 -3
  118. data/lib/rcs/types/vcard_content.rb +5 -3
  119. data/lib/rcs/types/vcard_resource.rb +5 -3
  120. data/lib/rcs/types/webhook_event_enum.rb +1 -0
  121. data/lib/rcs/types/webhooks.rb +5 -3
  122. data/lib/rcs.rb +7 -0
  123. data/lib/requests.rb +2 -2
  124. data/lib/types_export.rb +35 -5
  125. metadata +40 -9
  126. data/lib/rcs/types/click_action.rb +0 -73
  127. data/lib/rcs/types/click_action_data_metadata.rb +0 -69
@@ -0,0 +1,330 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../requests"
4
+ require_relative "../types/rcs_capabilities_result"
5
+ require "json"
6
+ require_relative "../types/rcs_whitelist_response"
7
+ require_relative "../types/rcs_link_result"
8
+ require "async"
9
+
10
+ module Pinnacle
11
+ class RcsClient
12
+ # @return [Pinnacle::RequestClient]
13
+ attr_reader :request_client
14
+
15
+ # @param request_client [Pinnacle::RequestClient]
16
+ # @return [Pinnacle::RcsClient]
17
+ def initialize(request_client:)
18
+ @request_client = request_client
19
+ end
20
+
21
+ # Check RCS capabilities for one or more phone numbers.
22
+ # This endpoint allows you to verify which RCS features (cards, buttons, etc.) are
23
+ # supported
24
+ # on specific phone numbers before sending RCS messages to them.
25
+ #
26
+ # @param phone_numbers [Array<String>] List of phone numbers to check RCS capabilities for (E.164 format)
27
+ # @param request_options [Pinnacle::RequestOptions]
28
+ # @return [Pinnacle::Types::RCS_CAPABILITIES_RESULT]
29
+ # @example
30
+ # api = Pinnacle::Client.new(
31
+ # base_url: "https://api.example.com",
32
+ # environment: Pinnacle::Environment::DEFAULT,
33
+ # api_key: "YOUR_API_KEY"
34
+ # )
35
+ # api.rcs.get_capabilities(phone_numbers: ["+12345678901", "+19876543210"])
36
+ def get_capabilities(phone_numbers:, request_options: nil)
37
+ response = @request_client.conn.post do |req|
38
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
39
+ req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
40
+ req.headers = {
41
+ **(req.headers || {}),
42
+ **@request_client.get_headers,
43
+ **(request_options&.additional_headers || {})
44
+ }.compact
45
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
46
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
47
+ end
48
+ req.body = { **(request_options&.additional_body_parameters || {}), phoneNumbers: phone_numbers }.compact
49
+ req.url "#{@request_client.get_url(request_options: request_options)}/rcs/capabilities"
50
+ end
51
+ parsed_json = JSON.parse(response.body)
52
+ parsed_json&.transform_values do |value|
53
+ value = value.to_json
54
+ Pinnacle::Types::RcsCapability.from_json(json_object: value)
55
+ end
56
+ end
57
+
58
+ # Whitelist a phone number for testing with your test RCS agent.
59
+ # ## Overview
60
+ # During development and testing, RCS agents can only send messages to whitelisted
61
+ # phone numbers.
62
+ # Use this endpoint to whitelist specific phone numbers to send and receive
63
+ # messages from the test agent.
64
+ # ## Verification Process
65
+ # After whitelisting a number, you'll need to complete verification:
66
+ # 1. Check the test device for message from "RBM Tester Management"
67
+ # 2. Click the "Make me a tester" button
68
+ # 3. Enter the separate 4-digit verification SMS code in the Pinnacle dashboard
69
+ # at:
70
+ # ```
71
+ # .pinnacle.sh/dashboard/brands/{brandId}?campaignId={campaignId}&campaignType=RCS
72
+ # ```
73
+ # > **⚠️ Important: Re-whitelisting Numbers**
74
+ # >
75
+ # > If you whitelist a number that's already whitelisted, you'll receive a new
76
+ # message from "RBM Tester Management". **You must click the "Make me a tester"
77
+ # button again to continue sending and receiving messages.**
78
+ # > **Important Notes**
79
+ # >
80
+ # > - **Verification required:** Messages cannot be sent nor received until you
81
+ # have clicked the "Make me a tester" button on the test device.
82
+ # > - **Testing only:** This is only required for test agents. Production agents
83
+ # can message any RCS-enabled number.
84
+ # > - **Network limitations:** Whitelisting may be temporarily unavailable for
85
+ # some carriers but are usually restored shortly.
86
+ #
87
+ # @param agent_id [String] The RCS agent ID (must be prefixed with 'agent_')
88
+ # @param phone_number [String] Phone number to whitelist for testing (E.164 format)
89
+ # @param request_options [Pinnacle::RequestOptions]
90
+ # @return [Pinnacle::Types::RcsWhitelistResponse]
91
+ # @example
92
+ # api = Pinnacle::Client.new(
93
+ # base_url: "https://api.example.com",
94
+ # environment: Pinnacle::Environment::DEFAULT,
95
+ # api_key: "YOUR_API_KEY"
96
+ # )
97
+ # api.rcs.whitelist(agent_id: "agent_XXXXXXXXXXXX", phone_number: "+12345678901")
98
+ def whitelist(agent_id:, phone_number:, request_options: nil)
99
+ response = @request_client.conn.post do |req|
100
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
101
+ req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
102
+ req.headers = {
103
+ **(req.headers || {}),
104
+ **@request_client.get_headers,
105
+ **(request_options&.additional_headers || {})
106
+ }.compact
107
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
108
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
109
+ end
110
+ req.body = {
111
+ **(request_options&.additional_body_parameters || {}),
112
+ agentId: agent_id,
113
+ phoneNumber: phone_number
114
+ }.compact
115
+ req.url "#{@request_client.get_url(request_options: request_options)}/rcs/whitelist"
116
+ end
117
+ Pinnacle::Types::RcsWhitelistResponse.from_json(json_object: response.body)
118
+ end
119
+
120
+ # Generate a link for initiating an RCS conversation with your agent.
121
+ # Users can click these links to start conversations with your RCS agent directly
122
+ # from websites, emails, or other applications.
123
+ #
124
+ # @param agent_id [String] The RCS agent ID (must be prefixed with 'agent_')
125
+ # @param test_mode [Boolean] Link to the test agent or the production agent if false
126
+ # @param phone_number [String] Fallback phone number (E.164 format) to use if the phone number does not support
127
+ # RCS. If not provided, no url will be generated.
128
+ # @param body [String] Optional message body to pre-fill after the user clicks the link
129
+ # @param request_options [Pinnacle::RequestOptions]
130
+ # @return [Pinnacle::Types::RcsLinkResult]
131
+ # @example
132
+ # api = Pinnacle::Client.new(
133
+ # base_url: "https://api.example.com",
134
+ # environment: Pinnacle::Environment::DEFAULT,
135
+ # api_key: "YOUR_API_KEY"
136
+ # )
137
+ # api.rcs.get_link(
138
+ # agent_id: "agent_XXXXXXXXXXXX",
139
+ # test_mode: false,
140
+ # phone_number: "+12345678901",
141
+ # body: "Hello, I need help with my order"
142
+ # )
143
+ def get_link(agent_id:, test_mode: nil, phone_number: nil, body: nil, request_options: nil)
144
+ response = @request_client.conn.post do |req|
145
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
146
+ req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
147
+ req.headers = {
148
+ **(req.headers || {}),
149
+ **@request_client.get_headers,
150
+ **(request_options&.additional_headers || {})
151
+ }.compact
152
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
153
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
154
+ end
155
+ req.body = {
156
+ **(request_options&.additional_body_parameters || {}),
157
+ agentId: agent_id,
158
+ testMode: test_mode,
159
+ phoneNumber: phone_number,
160
+ body: body
161
+ }.compact
162
+ req.url "#{@request_client.get_url(request_options: request_options)}/rcs/link"
163
+ end
164
+ Pinnacle::Types::RcsLinkResult.from_json(json_object: response.body)
165
+ end
166
+ end
167
+
168
+ class AsyncRcsClient
169
+ # @return [Pinnacle::AsyncRequestClient]
170
+ attr_reader :request_client
171
+
172
+ # @param request_client [Pinnacle::AsyncRequestClient]
173
+ # @return [Pinnacle::AsyncRcsClient]
174
+ def initialize(request_client:)
175
+ @request_client = request_client
176
+ end
177
+
178
+ # Check RCS capabilities for one or more phone numbers.
179
+ # This endpoint allows you to verify which RCS features (cards, buttons, etc.) are
180
+ # supported
181
+ # on specific phone numbers before sending RCS messages to them.
182
+ #
183
+ # @param phone_numbers [Array<String>] List of phone numbers to check RCS capabilities for (E.164 format)
184
+ # @param request_options [Pinnacle::RequestOptions]
185
+ # @return [Pinnacle::Types::RCS_CAPABILITIES_RESULT]
186
+ # @example
187
+ # api = Pinnacle::Client.new(
188
+ # base_url: "https://api.example.com",
189
+ # environment: Pinnacle::Environment::DEFAULT,
190
+ # api_key: "YOUR_API_KEY"
191
+ # )
192
+ # api.rcs.get_capabilities(phone_numbers: ["+12345678901", "+19876543210"])
193
+ def get_capabilities(phone_numbers:, request_options: nil)
194
+ Async do
195
+ response = @request_client.conn.post do |req|
196
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
197
+ req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
198
+ req.headers = {
199
+ **(req.headers || {}),
200
+ **@request_client.get_headers,
201
+ **(request_options&.additional_headers || {})
202
+ }.compact
203
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
204
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
205
+ end
206
+ req.body = { **(request_options&.additional_body_parameters || {}), phoneNumbers: phone_numbers }.compact
207
+ req.url "#{@request_client.get_url(request_options: request_options)}/rcs/capabilities"
208
+ end
209
+ parsed_json = JSON.parse(response.body)
210
+ parsed_json&.transform_values do |value|
211
+ value = value.to_json
212
+ Pinnacle::Types::RcsCapability.from_json(json_object: value)
213
+ end
214
+ end
215
+ end
216
+
217
+ # Whitelist a phone number for testing with your test RCS agent.
218
+ # ## Overview
219
+ # During development and testing, RCS agents can only send messages to whitelisted
220
+ # phone numbers.
221
+ # Use this endpoint to whitelist specific phone numbers to send and receive
222
+ # messages from the test agent.
223
+ # ## Verification Process
224
+ # After whitelisting a number, you'll need to complete verification:
225
+ # 1. Check the test device for message from "RBM Tester Management"
226
+ # 2. Click the "Make me a tester" button
227
+ # 3. Enter the separate 4-digit verification SMS code in the Pinnacle dashboard
228
+ # at:
229
+ # ```
230
+ # .pinnacle.sh/dashboard/brands/{brandId}?campaignId={campaignId}&campaignType=RCS
231
+ # ```
232
+ # > **⚠️ Important: Re-whitelisting Numbers**
233
+ # >
234
+ # > If you whitelist a number that's already whitelisted, you'll receive a new
235
+ # message from "RBM Tester Management". **You must click the "Make me a tester"
236
+ # button again to continue sending and receiving messages.**
237
+ # > **Important Notes**
238
+ # >
239
+ # > - **Verification required:** Messages cannot be sent nor received until you
240
+ # have clicked the "Make me a tester" button on the test device.
241
+ # > - **Testing only:** This is only required for test agents. Production agents
242
+ # can message any RCS-enabled number.
243
+ # > - **Network limitations:** Whitelisting may be temporarily unavailable for
244
+ # some carriers but are usually restored shortly.
245
+ #
246
+ # @param agent_id [String] The RCS agent ID (must be prefixed with 'agent_')
247
+ # @param phone_number [String] Phone number to whitelist for testing (E.164 format)
248
+ # @param request_options [Pinnacle::RequestOptions]
249
+ # @return [Pinnacle::Types::RcsWhitelistResponse]
250
+ # @example
251
+ # api = Pinnacle::Client.new(
252
+ # base_url: "https://api.example.com",
253
+ # environment: Pinnacle::Environment::DEFAULT,
254
+ # api_key: "YOUR_API_KEY"
255
+ # )
256
+ # api.rcs.whitelist(agent_id: "agent_XXXXXXXXXXXX", phone_number: "+12345678901")
257
+ def whitelist(agent_id:, phone_number:, request_options: nil)
258
+ Async do
259
+ response = @request_client.conn.post do |req|
260
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
261
+ req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
262
+ req.headers = {
263
+ **(req.headers || {}),
264
+ **@request_client.get_headers,
265
+ **(request_options&.additional_headers || {})
266
+ }.compact
267
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
268
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
269
+ end
270
+ req.body = {
271
+ **(request_options&.additional_body_parameters || {}),
272
+ agentId: agent_id,
273
+ phoneNumber: phone_number
274
+ }.compact
275
+ req.url "#{@request_client.get_url(request_options: request_options)}/rcs/whitelist"
276
+ end
277
+ Pinnacle::Types::RcsWhitelistResponse.from_json(json_object: response.body)
278
+ end
279
+ end
280
+
281
+ # Generate a link for initiating an RCS conversation with your agent.
282
+ # Users can click these links to start conversations with your RCS agent directly
283
+ # from websites, emails, or other applications.
284
+ #
285
+ # @param agent_id [String] The RCS agent ID (must be prefixed with 'agent_')
286
+ # @param test_mode [Boolean] Link to the test agent or the production agent if false
287
+ # @param phone_number [String] Fallback phone number (E.164 format) to use if the phone number does not support
288
+ # RCS. If not provided, no url will be generated.
289
+ # @param body [String] Optional message body to pre-fill after the user clicks the link
290
+ # @param request_options [Pinnacle::RequestOptions]
291
+ # @return [Pinnacle::Types::RcsLinkResult]
292
+ # @example
293
+ # api = Pinnacle::Client.new(
294
+ # base_url: "https://api.example.com",
295
+ # environment: Pinnacle::Environment::DEFAULT,
296
+ # api_key: "YOUR_API_KEY"
297
+ # )
298
+ # api.rcs.get_link(
299
+ # agent_id: "agent_XXXXXXXXXXXX",
300
+ # test_mode: false,
301
+ # phone_number: "+12345678901",
302
+ # body: "Hello, I need help with my order"
303
+ # )
304
+ def get_link(agent_id:, test_mode: nil, phone_number: nil, body: nil, request_options: nil)
305
+ Async do
306
+ response = @request_client.conn.post do |req|
307
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
308
+ req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
309
+ req.headers = {
310
+ **(req.headers || {}),
311
+ **@request_client.get_headers,
312
+ **(request_options&.additional_headers || {})
313
+ }.compact
314
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
315
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
316
+ end
317
+ req.body = {
318
+ **(request_options&.additional_body_parameters || {}),
319
+ agentId: agent_id,
320
+ testMode: test_mode,
321
+ phoneNumber: phone_number,
322
+ body: body
323
+ }.compact
324
+ req.url "#{@request_client.get_url(request_options: request_options)}/rcs/link"
325
+ end
326
+ Pinnacle::Types::RcsLinkResult.from_json(json_object: response.body)
327
+ end
328
+ end
329
+ end
330
+ end
@@ -22,7 +22,9 @@ module Pinnacle
22
22
 
23
23
  # Retrieve a brand's status.
24
24
  #
25
- # @param brand_id [Integer] ID of the brand.
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: 28)
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 [Integer] ID of the toll-free campaign.
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: 28)
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?
@@ -84,9 +88,11 @@ module Pinnacle
84
88
  Pinnacle::Types::TollFreeCampaignStatus.from_json(json_object: response.body)
85
89
  end
86
90
 
87
- # Retrieve a DLC campaign's status.
91
+ # Retrieve a 10DLC campaign's status.
88
92
  #
89
- # @param campaign_id [Integer] ID of the DLC campaign.
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: 28)
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 [Integer] ID of the campaign.
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: 28)
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 [Integer] ID of the brand.
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: 28)
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 [Integer] ID of the toll-free campaign.
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: 28)
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|
@@ -260,9 +272,11 @@ module Pinnacle
260
272
  end
261
273
  end
262
274
 
263
- # Retrieve a DLC campaign's status.
275
+ # Retrieve a 10DLC campaign's status.
264
276
  #
265
- # @param campaign_id [Integer] ID of the DLC campaign.
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: 28)
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 [Integer] ID of the campaign.
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: 28)
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 [Integer] ID of your contact.
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: 33)
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 [Integer] Unique identifier for the contact.
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 [Integer] ID of your contact.
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: 33)
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 [Integer] Unique identifier for the contact.
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)