rcs 2.0.0.pre.rc.5 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rcs/brands/client.rb +36 -24
  3. data/lib/rcs/campaigns/dlc/client.rb +36 -26
  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/toll_free/client.rb +32 -26
  7. data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +6 -6
  8. data/lib/rcs/contacts/client.rb +10 -8
  9. data/lib/rcs/conversations/client.rb +144 -16
  10. data/lib/rcs/conversations/types/conversations_list_messages_request_direction.rb +12 -0
  11. data/lib/rcs/conversations/types/conversations_list_messages_request_sort_order.rb +12 -0
  12. data/lib/rcs/conversations/types/conversations_list_messages_request_status.rb +17 -0
  13. data/lib/rcs/conversations/types/conversations_list_messages_request_type.rb +13 -0
  14. data/lib/rcs/messages/client.rb +12 -29
  15. data/lib/rcs/messages/rcs/client.rb +1 -1
  16. data/lib/rcs/phone_numbers/campaign/client.rb +20 -6
  17. data/lib/rcs/phone_numbers/client.rb +0 -14
  18. data/lib/rcs/phone_numbers/webhook/client.rb +12 -10
  19. data/lib/rcs/rcs/client.rb +32 -18
  20. data/lib/rcs/status/get/client.rb +32 -16
  21. data/lib/rcs/tools/contact_card/client.rb +18 -8
  22. data/lib/rcs/tools/file/client.rb +92 -2
  23. data/lib/rcs/tools/file/types/upload_file_options.rb +21 -3
  24. data/lib/rcs/tools/url/client.rb +4 -2
  25. data/lib/rcs/types/attach_webhook_by_id_params.rb +5 -5
  26. data/lib/rcs/types/attach_webhook_response_webhook.rb +5 -3
  27. data/lib/rcs/types/autofill_campaign_params.rb +15 -3
  28. data/lib/rcs/types/autofill_dlc_campaign_response.rb +10 -6
  29. data/lib/rcs/types/autofill_dlc_response_keywords.rb +8 -10
  30. data/lib/rcs/types/autofill_dlc_response_keywords_help.rb +3 -3
  31. data/lib/rcs/types/autofill_dlc_response_keywords_opt_in.rb +6 -4
  32. data/lib/rcs/types/autofill_dlc_response_keywords_opt_out.rb +3 -3
  33. data/lib/rcs/types/autofill_dlc_response_options.rb +12 -12
  34. data/lib/rcs/types/brand_status.rb +5 -3
  35. data/lib/rcs/types/{inbound_button.rb → button_clicked.rb} +7 -7
  36. data/lib/rcs/types/button_clicked_data.rb +80 -0
  37. data/lib/rcs/types/button_clicked_data_button.rb +118 -0
  38. data/lib/rcs/types/{click_action_data.rb → button_clicked_data_button_raw.rb} +10 -8
  39. data/lib/rcs/types/button_clicked_data_button_type.rb +15 -0
  40. data/lib/rcs/types/campaign_query.rb +10 -2
  41. data/lib/rcs/types/contact.rb +5 -3
  42. data/lib/rcs/types/contact_id.rb +5 -3
  43. data/lib/rcs/types/conversation.rb +16 -8
  44. data/lib/rcs/types/conversation_by_id_params.rb +7 -3
  45. data/lib/rcs/types/conversation_contact.rb +5 -3
  46. data/lib/rcs/types/conversation_list.rb +50 -28
  47. data/lib/rcs/types/create_url_options.rb +4 -2
  48. data/lib/rcs/types/detached_webhook_info.rb +5 -3
  49. data/lib/rcs/types/dlc_campaign_status.rb +5 -3
  50. data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +21 -19
  51. data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_help.rb +3 -3
  52. data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_opt_in.rb +6 -4
  53. data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_opt_out.rb +6 -4
  54. data/lib/rcs/types/extended_brand.rb +25 -13
  55. data/lib/rcs/types/extended_brand_with_vetting.rb +25 -13
  56. data/lib/rcs/types/extended_rcs_campaign.rb +25 -14
  57. data/lib/rcs/types/link_click_event.rb +1 -17
  58. data/lib/rcs/types/message.rb +5 -3
  59. data/lib/rcs/types/message_content.rb +4 -4
  60. data/lib/rcs/types/message_event.rb +143 -0
  61. data/lib/rcs/types/message_event_content.rb +127 -0
  62. data/lib/rcs/types/message_event_conversation.rb +82 -0
  63. data/lib/rcs/types/message_event_direction.rb +11 -0
  64. data/lib/rcs/types/message_event_mms_content.rb +94 -0
  65. data/lib/rcs/types/message_event_rcs_button_data.rb +104 -0
  66. data/lib/rcs/types/message_event_rcs_cards_content.rb +99 -0
  67. data/lib/rcs/types/message_event_rcs_cards_content_cards_item.rb +94 -0
  68. data/lib/rcs/types/message_event_rcs_location_data.rb +91 -0
  69. data/lib/rcs/types/message_event_rcs_media_content.rb +94 -0
  70. data/lib/rcs/types/message_event_rcs_text_content.rb +92 -0
  71. data/lib/rcs/types/message_event_sms_content.rb +81 -0
  72. data/lib/rcs/types/{retrieved_conversations.rb → message_list.rb} +26 -25
  73. data/lib/rcs/types/message_with_reaction.rb +197 -0
  74. data/lib/rcs/types/message_with_reaction_direction.rb +11 -0
  75. data/lib/rcs/types/{error_response.rb → not_found_error_body.rb} +7 -7
  76. data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item_campaign.rb +7 -3
  77. data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item_campaign.rb +7 -3
  78. data/lib/rcs/types/pinnacle_file_upload_metadata.rb +18 -2
  79. data/lib/rcs/types/profile_status_enum.rb +4 -4
  80. data/lib/rcs/types/rcs_base_options.rb +12 -1
  81. data/lib/rcs/types/rcs_button_call.rb +11 -2
  82. data/lib/rcs/types/rcs_button_open_url.rb +11 -2
  83. data/lib/rcs/types/rcs_button_request_user_location.rb +15 -3
  84. data/lib/rcs/types/rcs_button_schedule_event.rb +9 -1
  85. data/lib/rcs/types/rcs_button_send_location.rb +11 -2
  86. data/lib/rcs/types/rcs_button_trigger.rb +8 -6
  87. data/lib/rcs/types/rcs_campaign.rb +3 -3
  88. data/lib/rcs/types/rcs_campaign_schema_extra_agent.rb +8 -8
  89. data/lib/rcs/types/rcs_campaign_status.rb +5 -3
  90. data/lib/rcs/types/reaction_result.rb +10 -6
  91. data/lib/rcs/types/refreshed_file.rb +67 -0
  92. data/lib/rcs/types/{rcs.rb → rich_message.rb} +3 -3
  93. data/lib/rcs/types/scheduled_messaage.rb +5 -3
  94. data/lib/rcs/types/sent_mms_details.rb +4 -2
  95. data/lib/rcs/types/sent_rcs_details.rb +12 -13
  96. data/lib/rcs/types/sent_sms_details.rb +5 -3
  97. data/lib/rcs/types/toll_free_campaign.rb +3 -3
  98. data/lib/rcs/types/toll_free_campaign_status.rb +5 -3
  99. data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +3 -5
  100. data/lib/rcs/types/updated_contact_id.rb +5 -3
  101. data/lib/rcs/types/user_event.rb +83 -0
  102. data/lib/rcs/types/user_event_conversation.rb +78 -0
  103. data/lib/rcs/types/v_card_data.rb +5 -3
  104. data/lib/rcs/types/validate_campaign_params.rb +15 -3
  105. data/lib/rcs/types/vcard.rb +5 -3
  106. data/lib/rcs/types/vcard_content.rb +5 -3
  107. data/lib/rcs/types/vcard_resource.rb +5 -3
  108. data/lib/rcs/types/webhook_event_enum.rb +1 -0
  109. data/lib/rcs/types/webhooks.rb +5 -3
  110. data/lib/requests.rb +2 -2
  111. data/lib/types_export.rb +29 -7
  112. metadata +33 -11
  113. data/lib/rcs/types/click_action.rb +0 -73
  114. data/lib/rcs/types/click_action_data_metadata.rb +0 -69
@@ -4,34 +4,23 @@ require_relative "../../requests"
4
4
  require_relative "../types/message"
5
5
  require_relative "types/react_message_options"
6
6
  require_relative "../types/reaction_result"
7
- require_relative "sms/client"
8
- require_relative "mms/client"
9
- require_relative "rcs/client"
10
7
  require "async"
11
8
 
12
9
  module Pinnacle
13
10
  class MessagesClient
14
11
  # @return [Pinnacle::RequestClient]
15
12
  attr_reader :request_client
16
- # @return [Pinnacle::Messages::SmsClient]
17
- attr_reader :sms
18
- # @return [Pinnacle::Messages::MmsClient]
19
- attr_reader :mms
20
- # @return [Pinnacle::Messages::RcsClient]
21
- attr_reader :rcs
22
13
 
23
14
  # @param request_client [Pinnacle::RequestClient]
24
15
  # @return [Pinnacle::MessagesClient]
25
16
  def initialize(request_client:)
26
17
  @request_client = request_client
27
- @sms = Pinnacle::Messages::SmsClient.new(request_client: request_client)
28
- @mms = Pinnacle::Messages::MmsClient.new(request_client: request_client)
29
- @rcs = Pinnacle::Messages::RcsClient.new(request_client: request_client)
30
18
  end
31
19
 
32
20
  # Retrieve a previously sent message.
33
21
  #
34
- # @param id [Integer] Unique identifier of the message.
22
+ # @param id [String] Unique identifier of the message. This identifier is a string that always begins
23
+ # with the prefix `msg_`, for example: `msg_1234567890`.
35
24
  # @param request_options [Pinnacle::RequestOptions]
36
25
  # @return [Pinnacle::Types::Message]
37
26
  # @example
@@ -40,7 +29,7 @@ module Pinnacle
40
29
  # environment: Pinnacle::Environment::DEFAULT,
41
30
  # api_key: "YOUR_API_KEY"
42
31
  # )
43
- # api.messages.get(id: 1240)
32
+ # api.messages.get(id: "msg_1234567890")
44
33
  def get(id:, request_options: nil)
45
34
  response = @request_client.conn.get do |req|
46
35
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -63,7 +52,8 @@ module Pinnacle
63
52
 
64
53
  # Add or remove an emoji reaction to a previously sent message.
65
54
  #
66
- # @param message_id [Integer] Unique identifier of the message.
55
+ # @param message_id [String] Unique identifier of the message. This identifier is a string that always begins
56
+ # with the prefix `msg_`, for example: `msg_1234567890`.
67
57
  # @param options [Hash] Request of type Pinnacle::Messages::Types::ReactMessageOptions, as a Hash
68
58
  # * :force (Boolean)
69
59
  # @param reaction [String] Unicode emoji to add. <br>
@@ -77,7 +67,7 @@ module Pinnacle
77
67
  # api_key: "YOUR_API_KEY"
78
68
  # )
79
69
  # api.messages.react(
80
- # message_id: 1410,
70
+ # message_id: "msg_1234567890",
81
71
  # options: { force: true },
82
72
  # reaction: "👍"
83
73
  # )
@@ -108,25 +98,17 @@ module Pinnacle
108
98
  class AsyncMessagesClient
109
99
  # @return [Pinnacle::AsyncRequestClient]
110
100
  attr_reader :request_client
111
- # @return [Pinnacle::Messages::AsyncSmsClient]
112
- attr_reader :sms
113
- # @return [Pinnacle::Messages::AsyncMmsClient]
114
- attr_reader :mms
115
- # @return [Pinnacle::Messages::AsyncRcsClient]
116
- attr_reader :rcs
117
101
 
118
102
  # @param request_client [Pinnacle::AsyncRequestClient]
119
103
  # @return [Pinnacle::AsyncMessagesClient]
120
104
  def initialize(request_client:)
121
105
  @request_client = request_client
122
- @sms = Pinnacle::Messages::AsyncSmsClient.new(request_client: request_client)
123
- @mms = Pinnacle::Messages::AsyncMmsClient.new(request_client: request_client)
124
- @rcs = Pinnacle::Messages::AsyncRcsClient.new(request_client: request_client)
125
106
  end
126
107
 
127
108
  # Retrieve a previously sent message.
128
109
  #
129
- # @param id [Integer] Unique identifier of the message.
110
+ # @param id [String] Unique identifier of the message. This identifier is a string that always begins
111
+ # with the prefix `msg_`, for example: `msg_1234567890`.
130
112
  # @param request_options [Pinnacle::RequestOptions]
131
113
  # @return [Pinnacle::Types::Message]
132
114
  # @example
@@ -135,7 +117,7 @@ module Pinnacle
135
117
  # environment: Pinnacle::Environment::DEFAULT,
136
118
  # api_key: "YOUR_API_KEY"
137
119
  # )
138
- # api.messages.get(id: 1240)
120
+ # api.messages.get(id: "msg_1234567890")
139
121
  def get(id:, request_options: nil)
140
122
  Async do
141
123
  response = @request_client.conn.get do |req|
@@ -160,7 +142,8 @@ module Pinnacle
160
142
 
161
143
  # Add or remove an emoji reaction to a previously sent message.
162
144
  #
163
- # @param message_id [Integer] Unique identifier of the message.
145
+ # @param message_id [String] Unique identifier of the message. This identifier is a string that always begins
146
+ # with the prefix `msg_`, for example: `msg_1234567890`.
164
147
  # @param options [Hash] Request of type Pinnacle::Messages::Types::ReactMessageOptions, as a Hash
165
148
  # * :force (Boolean)
166
149
  # @param reaction [String] Unicode emoji to add. <br>
@@ -174,7 +157,7 @@ module Pinnacle
174
157
  # api_key: "YOUR_API_KEY"
175
158
  # )
176
159
  # api.messages.react(
177
- # message_id: 1410,
160
+ # message_id: "msg_1234567890",
178
161
  # options: { force: true },
179
162
  # reaction: "👍"
180
163
  # )
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "../../../requests"
4
- require_relative "../../types/rcs"
4
+ require_relative "../../types/rich_message"
5
5
  require_relative "types/rcs_send_response"
6
6
  require_relative "../../types/rcs_validate_content"
7
7
  require_relative "../../types/rcs_validation_result"
@@ -18,11 +18,18 @@ module Pinnacle
18
18
  @request_client = request_client
19
19
  end
20
20
 
21
- # Link a phone number to a specific campaign.
21
+ # Link a phone number to a specific campaign. Phone numbers must be linked to a
22
+ # campaign to send messages.
22
23
  #
23
24
  # @param phones [Array<String>] List of phone number (E.164 format).
24
25
  # @param campaign_type [Pinnacle::Types::MessagingProfileEnum]
25
- # @param campaign_id [Integer] Campaign's identifier.
26
+ # @param campaign_id [String] Unique identifier for the campaign. <br>
27
+ # - **TOLL_FREE** campaigns:
28
+ # - Must begin with the prefix `tf_`
29
+ # - Example: `tf_1234567890`
30
+ # - **10DLC** campaigns:
31
+ # - Must begin with the prefix `dlc_`
32
+ # - Example: `dlc_1234567890`
26
33
  # @param request_options [Pinnacle::RequestOptions]
27
34
  # @return [Pinnacle::Types::AttachedPhoneNumberResult]
28
35
  # @example
@@ -34,7 +41,7 @@ module Pinnacle
34
41
  # api.phone_numbers.campaign.attach(
35
42
  # phones: ["+14155550123", "+14155559876", "+14155550111"],
36
43
  # campaign_type: TOLL_FREE,
37
- # campaign_id: 101
44
+ # campaign_id: "tf_1234567890"
38
45
  # )
39
46
  def attach(phones:, campaign_type:, campaign_id:, request_options: nil)
40
47
  response = @request_client.conn.post do |req|
@@ -100,11 +107,18 @@ module Pinnacle
100
107
  @request_client = request_client
101
108
  end
102
109
 
103
- # Link a phone number to a specific campaign.
110
+ # Link a phone number to a specific campaign. Phone numbers must be linked to a
111
+ # campaign to send messages.
104
112
  #
105
113
  # @param phones [Array<String>] List of phone number (E.164 format).
106
114
  # @param campaign_type [Pinnacle::Types::MessagingProfileEnum]
107
- # @param campaign_id [Integer] Campaign's identifier.
115
+ # @param campaign_id [String] Unique identifier for the campaign. <br>
116
+ # - **TOLL_FREE** campaigns:
117
+ # - Must begin with the prefix `tf_`
118
+ # - Example: `tf_1234567890`
119
+ # - **10DLC** campaigns:
120
+ # - Must begin with the prefix `dlc_`
121
+ # - Example: `dlc_1234567890`
108
122
  # @param request_options [Pinnacle::RequestOptions]
109
123
  # @return [Pinnacle::Types::AttachedPhoneNumberResult]
110
124
  # @example
@@ -116,7 +130,7 @@ module Pinnacle
116
130
  # api.phone_numbers.campaign.attach(
117
131
  # phones: ["+14155550123", "+14155559876", "+14155550111"],
118
132
  # campaign_type: TOLL_FREE,
119
- # campaign_id: 101
133
+ # campaign_id: "tf_1234567890"
120
134
  # )
121
135
  def attach(phones:, campaign_type:, campaign_id:, request_options: nil)
122
136
  Async do
@@ -12,25 +12,17 @@ require_relative "../types/purchased_number"
12
12
  require_relative "types/phone_details_schema_level"
13
13
  require_relative "types/retrieve_phone_number_details_options"
14
14
  require_relative "types/phone_numbers_get_response"
15
- require_relative "campaign/client"
16
- require_relative "webhook/client"
17
15
  require "async"
18
16
 
19
17
  module Pinnacle
20
18
  class PhoneNumbersClient
21
19
  # @return [Pinnacle::RequestClient]
22
20
  attr_reader :request_client
23
- # @return [Pinnacle::PhoneNumbers::CampaignClient]
24
- attr_reader :campaign
25
- # @return [Pinnacle::PhoneNumbers::WebhookClient]
26
- attr_reader :webhook
27
21
 
28
22
  # @param request_client [Pinnacle::RequestClient]
29
23
  # @return [Pinnacle::PhoneNumbersClient]
30
24
  def initialize(request_client:)
31
25
  @request_client = request_client
32
- @campaign = Pinnacle::PhoneNumbers::CampaignClient.new(request_client: request_client)
33
- @webhook = Pinnacle::PhoneNumbers::WebhookClient.new(request_client: request_client)
34
26
  end
35
27
 
36
28
  # Search for available phone numbers that match your exact criteria.
@@ -187,17 +179,11 @@ module Pinnacle
187
179
  class AsyncPhoneNumbersClient
188
180
  # @return [Pinnacle::AsyncRequestClient]
189
181
  attr_reader :request_client
190
- # @return [Pinnacle::PhoneNumbers::AsyncCampaignClient]
191
- attr_reader :campaign
192
- # @return [Pinnacle::PhoneNumbers::AsyncWebhookClient]
193
- attr_reader :webhook
194
182
 
195
183
  # @param request_client [Pinnacle::AsyncRequestClient]
196
184
  # @return [Pinnacle::AsyncPhoneNumbersClient]
197
185
  def initialize(request_client:)
198
186
  @request_client = request_client
199
- @campaign = Pinnacle::PhoneNumbers::AsyncCampaignClient.new(request_client: request_client)
200
- @webhook = Pinnacle::PhoneNumbers::AsyncWebhookClient.new(request_client: request_client)
201
187
  end
202
188
 
203
189
  # Search for available phone numbers that match your exact criteria.
@@ -24,7 +24,7 @@ module Pinnacle
24
24
  # @param phone [String] The phone number you want to attach the webhook to in E.164 format. Make sure it
25
25
  # is url encoded (i.e. replace the leading + with %2B). <br>
26
26
  # Must be a phone number that you own and have already [purchased](./buy) through
27
- # the API.
27
+ # the API. A phone number can have multiple webhooks attached to it.
28
28
  # @param request [Pinnacle::Types::AttachWebhookByIdParams, Pinnacle::Types::CreateAndAttachWebhookByUrlParams]
29
29
  # @param request_options [Pinnacle::RequestOptions]
30
30
  # @return [Pinnacle::Types::ConfiguredWebhook]
@@ -34,7 +34,7 @@ module Pinnacle
34
34
  # environment: Pinnacle::Environment::DEFAULT,
35
35
  # api_key: "YOUR_API_KEY"
36
36
  # )
37
- # api.phone_numbers.webhook.attach(phone: "%2B14155551234", request: { webhook_id: 1 })
37
+ # api.phone_numbers.webhook.attach(phone: "%2B14155551234", request: { webhook_id: "wh_1234567890", event: MESSAGE_STATUS })
38
38
  def attach(phone:, request:, request_options: nil)
39
39
  response = @request_client.conn.post do |req|
40
40
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -62,10 +62,11 @@ module Pinnacle
62
62
  # is url encoded (i.e. replace the leading + with %2B). <br>
63
63
  # Must be a phone number that you own and currently has the specified webhook
64
64
  # attached.
65
- # @param webhook_id [Integer] The unique identifier of the webhook you want to detach from the phone number.
65
+ # @param webhook_id [String] The unique identifier of the webhook you want to detach from the phone number.
66
66
  # <br>
67
67
  # This must be a valid webhook ID that is currently attached to the specified
68
- # phone number.
68
+ # phone number. This identifier is a string that always begins with the prefix
69
+ # `wh_`, for example: `wh_1234567890`.
69
70
  # @param request_options [Pinnacle::RequestOptions]
70
71
  # @return [Pinnacle::Types::DetachedWebhookInfo]
71
72
  # @example
@@ -74,7 +75,7 @@ module Pinnacle
74
75
  # environment: Pinnacle::Environment::DEFAULT,
75
76
  # api_key: "YOUR_API_KEY"
76
77
  # )
77
- # api.phone_numbers.webhook.detach(phone: "+14155551234", webhook_id: 123)
78
+ # api.phone_numbers.webhook.detach(phone: "+14155551234", webhook_id: "wh_1234567890")
78
79
  def detach(phone:, webhook_id:, request_options: nil)
79
80
  response = @request_client.conn.delete do |req|
80
81
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -112,7 +113,7 @@ module Pinnacle
112
113
  # @param phone [String] The phone number you want to attach the webhook to in E.164 format. Make sure it
113
114
  # is url encoded (i.e. replace the leading + with %2B). <br>
114
115
  # Must be a phone number that you own and have already [purchased](./buy) through
115
- # the API.
116
+ # the API. A phone number can have multiple webhooks attached to it.
116
117
  # @param request [Pinnacle::Types::AttachWebhookByIdParams, Pinnacle::Types::CreateAndAttachWebhookByUrlParams]
117
118
  # @param request_options [Pinnacle::RequestOptions]
118
119
  # @return [Pinnacle::Types::ConfiguredWebhook]
@@ -122,7 +123,7 @@ module Pinnacle
122
123
  # environment: Pinnacle::Environment::DEFAULT,
123
124
  # api_key: "YOUR_API_KEY"
124
125
  # )
125
- # api.phone_numbers.webhook.attach(phone: "%2B14155551234", request: { webhook_id: 1 })
126
+ # api.phone_numbers.webhook.attach(phone: "%2B14155551234", request: { webhook_id: "wh_1234567890", event: MESSAGE_STATUS })
126
127
  def attach(phone:, request:, request_options: nil)
127
128
  Async do
128
129
  response = @request_client.conn.post do |req|
@@ -152,10 +153,11 @@ module Pinnacle
152
153
  # is url encoded (i.e. replace the leading + with %2B). <br>
153
154
  # Must be a phone number that you own and currently has the specified webhook
154
155
  # attached.
155
- # @param webhook_id [Integer] The unique identifier of the webhook you want to detach from the phone number.
156
+ # @param webhook_id [String] The unique identifier of the webhook you want to detach from the phone number.
156
157
  # <br>
157
158
  # This must be a valid webhook ID that is currently attached to the specified
158
- # phone number.
159
+ # phone number. This identifier is a string that always begins with the prefix
160
+ # `wh_`, for example: `wh_1234567890`.
159
161
  # @param request_options [Pinnacle::RequestOptions]
160
162
  # @return [Pinnacle::Types::DetachedWebhookInfo]
161
163
  # @example
@@ -164,7 +166,7 @@ module Pinnacle
164
166
  # environment: Pinnacle::Environment::DEFAULT,
165
167
  # api_key: "YOUR_API_KEY"
166
168
  # )
167
- # api.phone_numbers.webhook.detach(phone: "+14155551234", webhook_id: 123)
169
+ # api.phone_numbers.webhook.detach(phone: "+14155551234", webhook_id: "wh_1234567890")
168
170
  def detach(phone:, webhook_id:, request_options: nil)
169
171
  Async do
170
172
  response = @request_client.conn.delete do |req|
@@ -59,23 +59,30 @@ module Pinnacle
59
59
  # ## Overview
60
60
  # During development and testing, RCS agents can only send messages to whitelisted
61
61
  # phone numbers.
62
- # Use this endpoint to add test devices to your agent's whitelist before sending
63
- # test messages.
62
+ # Use this endpoint to whitelist specific phone numbers to send and receive
63
+ # messages from the test agent.
64
64
  # ## Verification Process
65
65
  # After whitelisting a number, you'll need to complete verification:
66
- # 1. Check the test device for an "RBM Tester Management" request
67
- # 2. Accept the request on the device
68
- # 3. Enter the 4-digit verification code in the Pinnacle dashboard at:
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:
69
70
  # ```
70
71
  # .pinnacle.sh/dashboard/brands/{brandId}?campaignId={campaignId}&campaignType=RCS
71
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.**
72
78
  # > **Important Notes**
73
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.
74
82
  # > - **Testing only:** This is only required for test agents. Production agents
75
- # can message any RCS-enabled number
76
- # > - **AT&T limitation:** Whitelisting may currently fail for AT&T numbers
77
- # > - **Verification required:** The whitelist request isn't complete until you
78
- # verify the device.
83
+ # can message any RCS-enabled number.
84
+ # > - **Network limitations:** Whitelisting may be temporarily unavailable for
85
+ # some carriers but are usually restored shortly.
79
86
  #
80
87
  # @param agent_id [String] The RCS agent ID (must be prefixed with 'agent_')
81
88
  # @param phone_number [String] Phone number to whitelist for testing (E.164 format)
@@ -211,23 +218,30 @@ module Pinnacle
211
218
  # ## Overview
212
219
  # During development and testing, RCS agents can only send messages to whitelisted
213
220
  # phone numbers.
214
- # Use this endpoint to add test devices to your agent's whitelist before sending
215
- # test messages.
221
+ # Use this endpoint to whitelist specific phone numbers to send and receive
222
+ # messages from the test agent.
216
223
  # ## Verification Process
217
224
  # After whitelisting a number, you'll need to complete verification:
218
- # 1. Check the test device for an "RBM Tester Management" request
219
- # 2. Accept the request on the device
220
- # 3. Enter the 4-digit verification code in the Pinnacle dashboard at:
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:
221
229
  # ```
222
230
  # .pinnacle.sh/dashboard/brands/{brandId}?campaignId={campaignId}&campaignType=RCS
223
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.**
224
237
  # > **Important Notes**
225
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.
226
241
  # > - **Testing only:** This is only required for test agents. Production agents
227
- # can message any RCS-enabled number
228
- # > - **AT&T limitation:** Whitelisting may currently fail for AT&T numbers
229
- # > - **Verification required:** The whitelist request isn't complete until you
230
- # verify the device.
242
+ # can message any RCS-enabled number.
243
+ # > - **Network limitations:** Whitelisting may be temporarily unavailable for
244
+ # some carriers but are usually restored shortly.
231
245
  #
232
246
  # @param agent_id [String] The RCS agent ID (must be prefixed with 'agent_')
233
247
  # @param phone_number [String] Phone number to whitelist for testing (E.164 format)
@@ -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?
@@ -86,7 +90,9 @@ module Pinnacle
86
90
 
87
91
  # Retrieve a 10DLC campaign's status.
88
92
  #
89
- # @param campaign_id [Integer] ID of the 10DLC 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|
@@ -262,7 +274,9 @@ module Pinnacle
262
274
 
263
275
  # Retrieve a 10DLC campaign's status.
264
276
  #
265
- # @param campaign_id [Integer] ID of the 10DLC 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)