rcs 2.0.15 → 2.0.16
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/.fern/metadata.json +3 -2
- data/.rubocop.yml +19 -0
- data/lib/pinnacle/client.rb +1 -1
- data/lib/pinnacle/internal/types/boolean.rb +1 -1
- data/lib/pinnacle/internal/types/utils.rb +2 -2
- data/lib/pinnacle/messages/client.rb +5 -0
- data/lib/pinnacle/messages/simulate/client.rb +50 -0
- data/lib/pinnacle/types/attach_webhook_response_webhook.rb +1 -0
- data/lib/pinnacle/types/extended_brand_with_vetting.rb +2 -2
- data/lib/pinnacle/types/rcs_cards_content.rb +1 -1
- data/lib/pinnacle/types/rcs_cards_content_cards_item.rb +1 -1
- data/lib/pinnacle/types/rcs_media_content.rb +1 -1
- data/lib/pinnacle/types/rcs_validate_content_media.rb +1 -1
- data/lib/pinnacle/types/rich_card.rb +1 -1
- data/lib/pinnacle/types/rich_cards.rb +1 -1
- data/lib/pinnacle/types/rich_media_message.rb +1 -1
- data/lib/pinnacle/types/rich_text.rb +1 -1
- data/lib/pinnacle/types/send_rich_cards_options.rb +5 -0
- data/lib/pinnacle/types/send_rich_message_options_4.rb +13 -0
- data/lib/pinnacle/types/simulate_message_input.rb +12 -0
- data/lib/pinnacle/types/simulate_user_button.rb +12 -0
- data/lib/pinnacle/types/simulate_user_message.rb +12 -0
- data/lib/pinnacle/types/simulate_user_params.rb +13 -0
- data/lib/pinnacle/types/simulate_user_response.rb +10 -0
- data/lib/pinnacle/types/user_button_press.rb +19 -0
- data/lib/pinnacle/types/user_button_press_call.rb +12 -0
- data/lib/pinnacle/types/user_button_press_open_url.rb +12 -0
- data/lib/pinnacle/types/user_button_press_request_user_location.rb +12 -0
- data/lib/pinnacle/types/user_button_press_request_user_location_location.rb +13 -0
- data/lib/pinnacle/types/user_button_press_schedule_event.rb +15 -0
- data/lib/pinnacle/types/user_button_press_send_location.rb +13 -0
- data/lib/pinnacle/types/user_button_press_send_location_lat_long.rb +11 -0
- data/lib/pinnacle/types/user_button_press_trigger.rb +12 -0
- data/lib/pinnacle/types/vcard_content.rb +1 -1
- data/lib/pinnacle/types/webhook_summary.rb +1 -0
- data/lib/pinnacle/types/webhooks.rb +1 -0
- data/lib/pinnacle/version.rb +1 -1
- data/lib/pinnacle/webhooks/client.rb +7 -1
- data/lib/pinnacle/webhooks/types/attach_webhook_params.rb +1 -0
- data/lib/pinnacle.rb +16 -0
- data/reference.md +94 -7
- metadata +18 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: af1df4309329865c8db83166a625b88da9d2247b9657cbce4964e260a8cef0d2
|
|
4
|
+
data.tar.gz: edaebb702d60e2e0d2cefaca64210f518641ed5d4c7455cda0f87abd3409c33a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 518bb3cb3e93e4f69310e5ed0a4556756544746c740d15aa4fe3b888db72d6979c5ccf03eaa71d5c46d0aaf2deb5ebf5aabf4ee1f95d9ae6fbf4a1c0ddc88bc8
|
|
7
|
+
data.tar.gz: b20e523cdc367b741b4b20c2d3bb7b6c2481891540670b06fe4ba8b5a2f2442608fc51e0f518333d77b5ceb9e1cf1d099c25f53f9a1de46ae5a51ea49a608a51
|
data/.fern/metadata.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"cliVersion": "
|
|
2
|
+
"cliVersion": "4.58.0",
|
|
3
3
|
"generatorName": "fernapi/fern-ruby-sdk",
|
|
4
4
|
"generatorVersion": "1.0.0-rc85",
|
|
5
5
|
"generatorConfig": {
|
|
@@ -7,5 +7,6 @@
|
|
|
7
7
|
"flattenModuleStructure": true,
|
|
8
8
|
"useProvidedDefaults": true
|
|
9
9
|
},
|
|
10
|
-
"
|
|
10
|
+
"originGitCommit": "fbc56cbecaab985e0a6ae7ecc7de124c3d4d57d8",
|
|
11
|
+
"sdkVersion": "2.0.16"
|
|
11
12
|
}
|
data/.rubocop.yml
CHANGED
|
@@ -58,3 +58,22 @@ Minitest/MultipleAssertions:
|
|
|
58
58
|
|
|
59
59
|
Minitest/UselessAssertion:
|
|
60
60
|
Enabled: false
|
|
61
|
+
|
|
62
|
+
# The generator emits bare `value` expressions as the fall-through result
|
|
63
|
+
# of `case` blocks; rubocop flags these as void. Excluded here so the
|
|
64
|
+
# suppressions survive Fern regeneration.
|
|
65
|
+
Lint/Void:
|
|
66
|
+
Exclude:
|
|
67
|
+
- 'lib/pinnacle/internal/types/boolean.rb'
|
|
68
|
+
- 'lib/pinnacle/internal/types/utils.rb'
|
|
69
|
+
|
|
70
|
+
# `Union.member?` is not a collection `include?`; the Minitest cops
|
|
71
|
+
# don't distinguish them. Excluded for the union test file so Fern
|
|
72
|
+
# regeneration doesn't need to preserve inline disables.
|
|
73
|
+
Minitest/AssertIncludes:
|
|
74
|
+
Exclude:
|
|
75
|
+
- 'test/unit/internal/types/test_union.rb'
|
|
76
|
+
|
|
77
|
+
Minitest/RefuteIncludes:
|
|
78
|
+
Exclude:
|
|
79
|
+
- 'test/unit/internal/types/test_union.rb'
|
data/lib/pinnacle/client.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Pinnacle
|
|
|
10
10
|
@raw_client = Pinnacle::Internal::Http::RawClient.new(
|
|
11
11
|
base_url: base_url || Pinnacle::Environment::DEFAULT,
|
|
12
12
|
headers: {
|
|
13
|
-
"User-Agent" => "rcs/2.0.
|
|
13
|
+
"User-Agent" => "rcs/2.0.16",
|
|
14
14
|
"X-Fern-Language" => "Ruby",
|
|
15
15
|
"PINNACLE-API-KEY" => api_key.to_s
|
|
16
16
|
}
|
|
@@ -81,10 +81,10 @@ module Pinnacle
|
|
|
81
81
|
}
|
|
82
82
|
return type.coerce(value, strict: strict)
|
|
83
83
|
else
|
|
84
|
-
|
|
84
|
+
value
|
|
85
85
|
end
|
|
86
86
|
else
|
|
87
|
-
|
|
87
|
+
value
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
raise Errors::TypeError, "cannot coerce value of type `#{value.class}` to `#{target}`" if strict
|
|
@@ -146,6 +146,11 @@ module Pinnacle
|
|
|
146
146
|
def blasts
|
|
147
147
|
@blasts ||= Pinnacle::Messages::Blasts::Client.new(client: @client)
|
|
148
148
|
end
|
|
149
|
+
|
|
150
|
+
# @return [Pinnacle::Simulate::Client]
|
|
151
|
+
def simulate
|
|
152
|
+
@simulate ||= Pinnacle::Messages::Simulate::Client.new(client: @client)
|
|
153
|
+
end
|
|
149
154
|
end
|
|
150
155
|
end
|
|
151
156
|
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Messages
|
|
5
|
+
module Simulate
|
|
6
|
+
class Client
|
|
7
|
+
# @param client [Pinnacle::Internal::Http::RawClient]
|
|
8
|
+
#
|
|
9
|
+
# @return [void]
|
|
10
|
+
def initialize(client:)
|
|
11
|
+
@client = client
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Simulate inbound messages and button presses from a user.
|
|
15
|
+
#
|
|
16
|
+
# @param request_options [Hash]
|
|
17
|
+
# @param params [Pinnacle::Types::SimulateUserParams]
|
|
18
|
+
# @option request_options [String] :base_url
|
|
19
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
20
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
21
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
22
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
23
|
+
#
|
|
24
|
+
# @return [Pinnacle::Types::SimulateUserResponse]
|
|
25
|
+
def user(request_options: {}, **params)
|
|
26
|
+
params = Pinnacle::Internal::Types::Utils.normalize_keys(params)
|
|
27
|
+
request = Pinnacle::Internal::JSON::Request.new(
|
|
28
|
+
base_url: request_options[:base_url],
|
|
29
|
+
method: "POST",
|
|
30
|
+
path: "messages/simulate/user",
|
|
31
|
+
body: Pinnacle::Types::SimulateUserParams.new(params).to_h,
|
|
32
|
+
request_options: request_options
|
|
33
|
+
)
|
|
34
|
+
begin
|
|
35
|
+
response = @client.send(request)
|
|
36
|
+
rescue Net::HTTPRequestTimeout
|
|
37
|
+
raise Pinnacle::Errors::TimeoutError
|
|
38
|
+
end
|
|
39
|
+
code = response.code.to_i
|
|
40
|
+
if code.between?(200, 299)
|
|
41
|
+
Pinnacle::Types::SimulateUserResponse.load(response.body)
|
|
42
|
+
else
|
|
43
|
+
error_class = Pinnacle::Errors::ResponseError.subclass_for_code(code)
|
|
44
|
+
raise error_class.new(response.body, code: code)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -7,6 +7,7 @@ module Pinnacle
|
|
|
7
7
|
field :name, -> { String }, optional: false, nullable: false
|
|
8
8
|
field :url, -> { String }, optional: false, nullable: false
|
|
9
9
|
field :secret, -> { String }, optional: false, nullable: false
|
|
10
|
+
field :headers, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false
|
|
10
11
|
end
|
|
11
12
|
end
|
|
12
13
|
end
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
module Pinnacle
|
|
4
4
|
module Types
|
|
5
5
|
class ExtendedBrandWithVetting < Internal::Types::Model
|
|
6
|
-
field :last_tcr_vetting_date, -> { String }, optional: false, nullable:
|
|
7
|
-
field :tcr_feedback, -> { Internal::Types::Array[Pinnacle::Types::VettingFeedback] }, optional: false, nullable:
|
|
6
|
+
field :last_tcr_vetting_date, -> { String }, optional: false, nullable: false, api_name: "lastTcrVettingDate"
|
|
7
|
+
field :tcr_feedback, -> { Internal::Types::Array[Pinnacle::Types::VettingFeedback] }, optional: false, nullable: false, api_name: "tcrFeedback"
|
|
8
8
|
field :vetting_history, -> { Internal::Types::Array[Pinnacle::Types::VettingHistory] }, optional: false, nullable: false, api_name: "vettingHistory"
|
|
9
9
|
end
|
|
10
10
|
end
|
|
@@ -7,7 +7,7 @@ module Pinnacle
|
|
|
7
7
|
# See (supported file types)[https://app.pinnacle.sh/supported-file-types?type=RCS-CARD].
|
|
8
8
|
class RcsCardsContent < Internal::Types::Model
|
|
9
9
|
field :cards, -> { Internal::Types::Array[Pinnacle::Types::RcsCardsContentCardsItem] }, optional: false, nullable: false
|
|
10
|
-
field :quick_replies, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional:
|
|
10
|
+
field :quick_replies, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional: true, nullable: false, api_name: "quickReplies"
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -4,7 +4,7 @@ module Pinnacle
|
|
|
4
4
|
module Types
|
|
5
5
|
# Individual card containing title, optional media, and action buttons.
|
|
6
6
|
class RcsCardsContentCardsItem < Internal::Types::Model
|
|
7
|
-
field :buttons, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional:
|
|
7
|
+
field :buttons, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional: true, nullable: false
|
|
8
8
|
field :media, -> { Pinnacle::Types::RcsMediaDetailsContent }, optional: true, nullable: false
|
|
9
9
|
field :subtitle, -> { String }, optional: true, nullable: false
|
|
10
10
|
field :title, -> { String }, optional: false, nullable: false
|
|
@@ -7,7 +7,7 @@ module Pinnacle
|
|
|
7
7
|
# See (supported file types)[https://app.pinnacle.sh/supported-file-types?type=RCS-MEDIA].
|
|
8
8
|
class RcsMediaContent < Internal::Types::Model
|
|
9
9
|
field :media, -> { Pinnacle::Types::RcsMediaDetailsContent }, optional: false, nullable: false
|
|
10
|
-
field :quick_replies, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional:
|
|
10
|
+
field :quick_replies, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional: true, nullable: false, api_name: "quickReplies"
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -7,7 +7,7 @@ module Pinnacle
|
|
|
7
7
|
# See [supported media types](https://app.pinnacle.sh/supported-file-types?type=RCS-MEDIA).
|
|
8
8
|
class RcsValidateContentMedia < Internal::Types::Model
|
|
9
9
|
field :media, -> { String }, optional: false, nullable: false
|
|
10
|
-
field :quick_replies, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional:
|
|
10
|
+
field :quick_replies, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional: true, nullable: false, api_name: "quickReplies"
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -4,7 +4,7 @@ module Pinnacle
|
|
|
4
4
|
module Types
|
|
5
5
|
# Individual card containing title, optional media, and action buttons.
|
|
6
6
|
class RichCard < Internal::Types::Model
|
|
7
|
-
field :buttons, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional:
|
|
7
|
+
field :buttons, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional: true, nullable: false
|
|
8
8
|
field :media, -> { String }, optional: true, nullable: false
|
|
9
9
|
field :subtitle, -> { String }, optional: true, nullable: false
|
|
10
10
|
field :title, -> { String }, optional: false, nullable: false
|
|
@@ -7,7 +7,7 @@ module Pinnacle
|
|
|
7
7
|
# See (supported file types)[https://app.pinnacle.sh/supported-file-types?type=RCS-CARD].
|
|
8
8
|
class RichCards < Internal::Types::Model
|
|
9
9
|
field :cards, -> { Internal::Types::Array[Pinnacle::Types::RichCard] }, optional: false, nullable: false
|
|
10
|
-
field :quick_replies, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional:
|
|
10
|
+
field :quick_replies, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional: true, nullable: false, api_name: "quickReplies"
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -4,7 +4,7 @@ module Pinnacle
|
|
|
4
4
|
module Types
|
|
5
5
|
class RichMediaMessage < Internal::Types::Model
|
|
6
6
|
field :media, -> { String }, optional: false, nullable: false
|
|
7
|
-
field :quick_replies, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional:
|
|
7
|
+
field :quick_replies, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional: true, nullable: false, api_name: "quickReplies"
|
|
8
8
|
end
|
|
9
9
|
end
|
|
10
10
|
end
|
|
@@ -4,7 +4,7 @@ module Pinnacle
|
|
|
4
4
|
module Types
|
|
5
5
|
# Message containing longer text content with optional quick reply buttons.
|
|
6
6
|
class RichText < Internal::Types::Model
|
|
7
|
-
field :quick_replies, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional:
|
|
7
|
+
field :quick_replies, -> { Internal::Types::Array[Pinnacle::Types::RichButton] }, optional: true, nullable: false, api_name: "quickReplies"
|
|
8
8
|
field :text, -> { String }, optional: false, nullable: false
|
|
9
9
|
end
|
|
10
10
|
end
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module Pinnacle
|
|
4
4
|
module Types
|
|
5
|
+
# Configure how your RCS message is sent and tracked.
|
|
5
6
|
class SendRichCardsOptions < Internal::Types::Model
|
|
7
|
+
field :schedule, -> { Pinnacle::Types::MessageSchedule }, optional: true, nullable: false
|
|
8
|
+
field :tracking, -> { Pinnacle::Types::Tracking }, optional: true, nullable: false
|
|
9
|
+
field :transcode, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
10
|
+
field :validate, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
6
11
|
field :standalone_card, -> { Pinnacle::Types::RichStandaloneCardOptions }, optional: true, nullable: false
|
|
7
12
|
end
|
|
8
13
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Configure how your RCS message is sent and tracked.
|
|
6
|
+
class SendRichMessageOptions4 < Internal::Types::Model
|
|
7
|
+
field :schedule, -> { Pinnacle::Types::MessageSchedule }, optional: true, nullable: false
|
|
8
|
+
field :tracking, -> { Pinnacle::Types::Tracking }, optional: true, nullable: false
|
|
9
|
+
field :transcode, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
10
|
+
field :validate, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# User message payload. At least one of `text` or `mediaUrls` must be non-empty.
|
|
6
|
+
# Send only `text` to simulate an inbound SMS; include `mediaUrls` to simulate an inbound MMS.
|
|
7
|
+
class SimulateMessageInput < Internal::Types::Model
|
|
8
|
+
field :text, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :media_urls, -> { Internal::Types::Array[String] }, optional: true, nullable: false, api_name: "mediaUrls"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Simulate a button press from a user.
|
|
6
|
+
class SimulateUserButton < Internal::Types::Model
|
|
7
|
+
field :from, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :to, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :button, -> { Pinnacle::Types::UserButtonPress }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Simulate an inbound message from a user.
|
|
6
|
+
class SimulateUserMessage < Internal::Types::Model
|
|
7
|
+
field :from, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :to, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :message, -> { Pinnacle::Types::SimulateMessageInput }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Request body for simulating an inbound event from a user.
|
|
6
|
+
class SimulateUserParams < Internal::Types::Model
|
|
7
|
+
extend Pinnacle::Internal::Types::Union
|
|
8
|
+
|
|
9
|
+
member -> { Pinnacle::Types::SimulateUserMessage }
|
|
10
|
+
member -> { Pinnacle::Types::SimulateUserButton }
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Discriminated union of button presses that can be simulated for a user.
|
|
6
|
+
class UserButtonPress < Internal::Types::Model
|
|
7
|
+
extend Pinnacle::Internal::Types::Union
|
|
8
|
+
|
|
9
|
+
discriminant :type
|
|
10
|
+
|
|
11
|
+
member -> { Pinnacle::Types::UserButtonPressTrigger }, key: "TRIGGER"
|
|
12
|
+
member -> { Pinnacle::Types::UserButtonPressOpenUrl }, key: "OPEN_URL"
|
|
13
|
+
member -> { Pinnacle::Types::UserButtonPressCall }, key: "CALL"
|
|
14
|
+
member -> { Pinnacle::Types::UserButtonPressScheduleEvent }, key: "SCHEDULE_EVENT"
|
|
15
|
+
member -> { Pinnacle::Types::UserButtonPressSendLocation }, key: "SEND_LOCATION"
|
|
16
|
+
member -> { Pinnacle::Types::UserButtonPressRequestUserLocation }, key: "REQUEST_USER_LOCATION"
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Simulates when a user presses a `call` button.
|
|
6
|
+
class UserButtonPressCall < Internal::Types::Model
|
|
7
|
+
field :title, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :metadata, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :payload, -> { String }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Simulates when a user presses an `openUrl` button.
|
|
6
|
+
class UserButtonPressOpenUrl < Internal::Types::Model
|
|
7
|
+
field :title, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :metadata, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :payload, -> { String }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Simulates when a user presses a `requestUserLocation` button.
|
|
6
|
+
class UserButtonPressRequestUserLocation < Internal::Types::Model
|
|
7
|
+
field :title, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :metadata, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :location, -> { Pinnacle::Types::UserButtonPressRequestUserLocationLocation }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Location the simulated user responded with.
|
|
6
|
+
class UserButtonPressRequestUserLocationLocation < Internal::Types::Model
|
|
7
|
+
field :text, -> { String }, optional: true, nullable: false
|
|
8
|
+
field :latitude, -> { Integer }, optional: true, nullable: false
|
|
9
|
+
field :longitude, -> { Integer }, optional: true, nullable: false
|
|
10
|
+
field :address, -> { String }, optional: true, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Simulates when a user presses a `scheduleEvent` button.
|
|
6
|
+
class UserButtonPressScheduleEvent < Internal::Types::Model
|
|
7
|
+
field :title, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :metadata, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :event_start_time, -> { String }, optional: true, nullable: false, api_name: "eventStartTime"
|
|
10
|
+
field :event_end_time, -> { String }, optional: true, nullable: false, api_name: "eventEndTime"
|
|
11
|
+
field :event_title, -> { String }, optional: true, nullable: false, api_name: "eventTitle"
|
|
12
|
+
field :event_description, -> { String }, optional: true, nullable: false, api_name: "eventDescription"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Simulates when a user presses a `sendLocation` button.
|
|
6
|
+
class UserButtonPressSendLocation < Internal::Types::Model
|
|
7
|
+
field :title, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :metadata, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :name, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :lat_long, -> { Pinnacle::Types::UserButtonPressSendLocationLatLong }, optional: true, nullable: false, api_name: "latLong"
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Shared coordinates.
|
|
6
|
+
class UserButtonPressSendLocationLatLong < Internal::Types::Model
|
|
7
|
+
field :lat, -> { Integer }, optional: true, nullable: false
|
|
8
|
+
field :lng, -> { Integer }, optional: true, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Simulates when a user presses a `trigger` button.
|
|
6
|
+
class UserButtonPressTrigger < Internal::Types::Model
|
|
7
|
+
field :title, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :metadata, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :payload, -> { String }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -9,6 +9,7 @@ module Pinnacle
|
|
|
9
9
|
field :status, -> { Pinnacle::Types::WebhookSummaryStatus }, optional: false, nullable: false
|
|
10
10
|
field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
|
|
11
11
|
field :updated_at, -> { String }, optional: false, nullable: false, api_name: "updatedAt"
|
|
12
|
+
field :headers, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false
|
|
12
13
|
end
|
|
13
14
|
end
|
|
14
15
|
end
|
|
@@ -7,6 +7,7 @@ module Pinnacle
|
|
|
7
7
|
field :endpoint, -> { String }, optional: false, nullable: false
|
|
8
8
|
field :id, -> { String }, optional: false, nullable: false
|
|
9
9
|
field :name, -> { String }, optional: false, nullable: false
|
|
10
|
+
field :headers, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false
|
|
10
11
|
end
|
|
11
12
|
end
|
|
12
13
|
end
|
data/lib/pinnacle/version.rb
CHANGED
|
@@ -85,7 +85,13 @@ module Pinnacle
|
|
|
85
85
|
# Supports bulk operations with up to 50 senders per request. <br>
|
|
86
86
|
#
|
|
87
87
|
# Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender
|
|
88
|
-
# updates the event type filter without creating duplicates.
|
|
88
|
+
# updates the event type filter without creating duplicates. <br>
|
|
89
|
+
#
|
|
90
|
+
# **Custom headers** may be provided in either case via the optional `headers` field. When attaching a new
|
|
91
|
+
# webhook, the headers are stored on the webhook and sent on every delivery. When attaching an existing
|
|
92
|
+
# `webhookId`, supplying `headers` **overwrites** the stored headers on that webhook — omit the field to leave
|
|
93
|
+
# them unchanged, or pass an empty object `{}` to clear them. The reserved `PINNACLE-SIGNING-SECRET` header is
|
|
94
|
+
# always set by Pinnacle and cannot be overridden.
|
|
89
95
|
#
|
|
90
96
|
# @param request_options [Hash]
|
|
91
97
|
# @param params [Pinnacle::Webhooks::Types::AttachWebhookParams]
|
|
@@ -9,6 +9,7 @@ module Pinnacle
|
|
|
9
9
|
field :name, -> { String }, optional: true, nullable: false
|
|
10
10
|
field :url, -> { String }, optional: true, nullable: false
|
|
11
11
|
field :event, -> { Pinnacle::Types::WebhookEventEnum }, optional: true, nullable: false
|
|
12
|
+
field :headers, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false
|
|
12
13
|
end
|
|
13
14
|
end
|
|
14
15
|
end
|
data/lib/pinnacle.rb
CHANGED
|
@@ -302,6 +302,7 @@ require_relative "pinnacle/types/rich_text_message"
|
|
|
302
302
|
require_relative "pinnacle/types/rich_media_message"
|
|
303
303
|
require_relative "pinnacle/types/rich_card"
|
|
304
304
|
require_relative "pinnacle/types/rich_cards"
|
|
305
|
+
require_relative "pinnacle/types/send_rich_message_options_4"
|
|
305
306
|
require_relative "pinnacle/types/send_rcs_card_options_standalone_card_orientation"
|
|
306
307
|
require_relative "pinnacle/types/send_rcs_card_options_standalone_card_image_alignment"
|
|
307
308
|
require_relative "pinnacle/types/rich_standalone_card_options"
|
|
@@ -333,6 +334,20 @@ require_relative "pinnacle/types/list_scheduled_messages_response"
|
|
|
333
334
|
require_relative "pinnacle/types/blast_summary_type"
|
|
334
335
|
require_relative "pinnacle/types/blast_summary"
|
|
335
336
|
require_relative "pinnacle/types/list_blasts_response"
|
|
337
|
+
require_relative "pinnacle/types/simulate_message_input"
|
|
338
|
+
require_relative "pinnacle/types/simulate_user_message"
|
|
339
|
+
require_relative "pinnacle/types/user_button_press_trigger"
|
|
340
|
+
require_relative "pinnacle/types/user_button_press_open_url"
|
|
341
|
+
require_relative "pinnacle/types/user_button_press_call"
|
|
342
|
+
require_relative "pinnacle/types/user_button_press_schedule_event"
|
|
343
|
+
require_relative "pinnacle/types/user_button_press_send_location_lat_long"
|
|
344
|
+
require_relative "pinnacle/types/user_button_press_send_location"
|
|
345
|
+
require_relative "pinnacle/types/user_button_press_request_user_location_location"
|
|
346
|
+
require_relative "pinnacle/types/user_button_press_request_user_location"
|
|
347
|
+
require_relative "pinnacle/types/user_button_press"
|
|
348
|
+
require_relative "pinnacle/types/simulate_user_button"
|
|
349
|
+
require_relative "pinnacle/types/simulate_user_params"
|
|
350
|
+
require_relative "pinnacle/types/simulate_user_response"
|
|
336
351
|
require_relative "pinnacle/types/phone_feature_enum"
|
|
337
352
|
require_relative "pinnacle/types/phone_enum"
|
|
338
353
|
require_relative "pinnacle/types/phone_number_cost"
|
|
@@ -514,6 +529,7 @@ require_relative "pinnacle/messages/schedules/client"
|
|
|
514
529
|
require_relative "pinnacle/messages/schedules/types/list_scheduled_messages_params"
|
|
515
530
|
require_relative "pinnacle/messages/blasts/client"
|
|
516
531
|
require_relative "pinnacle/messages/blasts/types/list_blasts_params"
|
|
532
|
+
require_relative "pinnacle/messages/simulate/client"
|
|
517
533
|
require_relative "pinnacle/phone_numbers/campaign/client"
|
|
518
534
|
require_relative "pinnacle/phone_numbers/campaign/types/attach_campaign_params"
|
|
519
535
|
require_relative "pinnacle/phone_numbers/campaign/types/detach_campaign_params"
|
data/reference.md
CHANGED
|
@@ -2783,7 +2783,9 @@ Attach a webhook to one or more senders (phone numbers or RCS agent IDs) to rece
|
|
|
2783
2783
|
|
|
2784
2784
|
You can attach an existing webhook by providing its ID, or create a new webhook by specifying a name and URL. Supports bulk operations with up to 50 senders per request. <br>
|
|
2785
2785
|
|
|
2786
|
-
Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender updates the event type filter without creating duplicates.
|
|
2786
|
+
Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender updates the event type filter without creating duplicates. <br>
|
|
2787
|
+
|
|
2788
|
+
**Custom headers** may be provided in either case via the optional `headers` field. When attaching a new webhook, the headers are stored on the webhook and sent on every delivery. When attaching an existing `webhookId`, supplying `headers` **overwrites** the stored headers on that webhook — omit the field to leave them unchanged, or pass an empty object `{}` to clear them. The reserved `PINNACLE-SIGNING-SECRET` header is always set by Pinnacle and cannot be overridden.
|
|
2787
2789
|
</dd>
|
|
2788
2790
|
</dl>
|
|
2789
2791
|
</dd>
|
|
@@ -2821,7 +2823,11 @@ client.webhooks.attach(senders: ['+14155551234', 'agent_abc123']);
|
|
|
2821
2823
|
<dl>
|
|
2822
2824
|
<dd>
|
|
2823
2825
|
|
|
2824
|
-
**webhook_id:** `String`
|
|
2826
|
+
**webhook_id:** `String`
|
|
2827
|
+
|
|
2828
|
+
Existing webhook ID (starts with `wh_`). Provide this OR `name` + `url` to create a new webhook. The webhook must be in ENABLED status. Disabled webhooks can be re-enabled from the [dashboard](https://app.pinnacle.sh/dashboard/development/webhooks).
|
|
2829
|
+
|
|
2830
|
+
Supplying `headers` alongside `webhookId` **overwrites** the stored headers on the webhook. Omit `headers` to leave them unchanged.
|
|
2825
2831
|
|
|
2826
2832
|
</dd>
|
|
2827
2833
|
</dl>
|
|
@@ -2857,6 +2863,22 @@ Event type filter for the subscription. Set to `null` to receive all events. <br
|
|
|
2857
2863
|
<dl>
|
|
2858
2864
|
<dd>
|
|
2859
2865
|
|
|
2866
|
+
**headers:** `Internal::Types::Hash[String, String]`
|
|
2867
|
+
|
|
2868
|
+
Optional custom HTTP headers (key-value map) to include when dispatching webhook events to the endpoint.
|
|
2869
|
+
|
|
2870
|
+
Header names must start with a letter or digit and contain only letters, digits, `-`, or `_` (matching the pattern `^[A-Za-z0-9][A-Za-z0-9_-]*$`). Names are case-insensitive per [RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110#name-field-names) and are normalized to uppercase before storage and sending.
|
|
2871
|
+
|
|
2872
|
+
When provided with an existing `webhookId`, these headers **overwrite** any headers currently stored on that webhook. Omit to leave existing headers unchanged.
|
|
2873
|
+
|
|
2874
|
+
The reserved `PINNACLE-SIGNING-SECRET` header is silently ignored and cannot be overridden.
|
|
2875
|
+
|
|
2876
|
+
</dd>
|
|
2877
|
+
</dl>
|
|
2878
|
+
|
|
2879
|
+
<dl>
|
|
2880
|
+
<dd>
|
|
2881
|
+
|
|
2860
2882
|
**request_options:** `Pinnacle::Webhooks::RequestOptions`
|
|
2861
2883
|
|
|
2862
2884
|
</dd>
|
|
@@ -5109,7 +5131,6 @@ Requires an active RCS agent and recipient devices that support RCS Business Mes
|
|
|
5109
5131
|
client.messages.rcs.send_(
|
|
5110
5132
|
from: 'from',
|
|
5111
5133
|
to: 'to',
|
|
5112
|
-
quick_replies: [],
|
|
5113
5134
|
text: 'text'
|
|
5114
5135
|
);
|
|
5115
5136
|
```
|
|
@@ -5264,10 +5285,7 @@ Validate RCS message content without sending it.
|
|
|
5264
5285
|
<dd>
|
|
5265
5286
|
|
|
5266
5287
|
```ruby
|
|
5267
|
-
client.messages.rcs.validate(
|
|
5268
|
-
quick_replies: [],
|
|
5269
|
-
text: 'text'
|
|
5270
|
-
);
|
|
5288
|
+
client.messages.rcs.validate(text: 'text');
|
|
5271
5289
|
```
|
|
5272
5290
|
</dd>
|
|
5273
5291
|
</dl>
|
|
@@ -5897,6 +5915,75 @@ client.messages.blasts.list();
|
|
|
5897
5915
|
</dl>
|
|
5898
5916
|
|
|
5899
5917
|
|
|
5918
|
+
</dd>
|
|
5919
|
+
</dl>
|
|
5920
|
+
</details>
|
|
5921
|
+
|
|
5922
|
+
## Messages Simulate
|
|
5923
|
+
<details><summary><code>client.messages.simulate.<a href="/lib/pinnacle/messages/simulate/client.rb">user</a>(request) -> Pinnacle::Types::SimulateUserResponse</code></summary>
|
|
5924
|
+
<dl>
|
|
5925
|
+
<dd>
|
|
5926
|
+
|
|
5927
|
+
#### 📝 Description
|
|
5928
|
+
|
|
5929
|
+
<dl>
|
|
5930
|
+
<dd>
|
|
5931
|
+
|
|
5932
|
+
<dl>
|
|
5933
|
+
<dd>
|
|
5934
|
+
|
|
5935
|
+
Simulate inbound messages and button presses from a user.
|
|
5936
|
+
</dd>
|
|
5937
|
+
</dl>
|
|
5938
|
+
</dd>
|
|
5939
|
+
</dl>
|
|
5940
|
+
|
|
5941
|
+
#### 🔌 Usage
|
|
5942
|
+
|
|
5943
|
+
<dl>
|
|
5944
|
+
<dd>
|
|
5945
|
+
|
|
5946
|
+
<dl>
|
|
5947
|
+
<dd>
|
|
5948
|
+
|
|
5949
|
+
```ruby
|
|
5950
|
+
client.messages.simulate.user(
|
|
5951
|
+
from: '+14155551234',
|
|
5952
|
+
to: '+14155555678',
|
|
5953
|
+
message: {
|
|
5954
|
+
text: 'Hello from the test user!'
|
|
5955
|
+
}
|
|
5956
|
+
);
|
|
5957
|
+
```
|
|
5958
|
+
</dd>
|
|
5959
|
+
</dl>
|
|
5960
|
+
</dd>
|
|
5961
|
+
</dl>
|
|
5962
|
+
|
|
5963
|
+
#### ⚙️ Parameters
|
|
5964
|
+
|
|
5965
|
+
<dl>
|
|
5966
|
+
<dd>
|
|
5967
|
+
|
|
5968
|
+
<dl>
|
|
5969
|
+
<dd>
|
|
5970
|
+
|
|
5971
|
+
**request:** `Pinnacle::Types::SimulateUserParams`
|
|
5972
|
+
|
|
5973
|
+
</dd>
|
|
5974
|
+
</dl>
|
|
5975
|
+
|
|
5976
|
+
<dl>
|
|
5977
|
+
<dd>
|
|
5978
|
+
|
|
5979
|
+
**request_options:** `Pinnacle::Messages::Simulate::RequestOptions`
|
|
5980
|
+
|
|
5981
|
+
</dd>
|
|
5982
|
+
</dl>
|
|
5983
|
+
</dd>
|
|
5984
|
+
</dl>
|
|
5985
|
+
|
|
5986
|
+
|
|
5900
5987
|
</dd>
|
|
5901
5988
|
</dl>
|
|
5902
5989
|
</details>
|
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.
|
|
4
|
+
version: 2.0.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pinnacle
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-04-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: The Pinnacle Ruby library provides convenient access to the Pinnacle
|
|
14
14
|
API from Ruby.
|
|
@@ -159,6 +159,7 @@ files:
|
|
|
159
159
|
- lib/pinnacle/messages/schedules/types/list_scheduled_messages_params.rb
|
|
160
160
|
- lib/pinnacle/messages/schedules/types/list_scheduled_messages_request_schedule_type.rb
|
|
161
161
|
- lib/pinnacle/messages/schedules/types/list_scheduled_messages_request_status.rb
|
|
162
|
+
- lib/pinnacle/messages/simulate/client.rb
|
|
162
163
|
- lib/pinnacle/messages/sms/client.rb
|
|
163
164
|
- lib/pinnacle/messages/sms/types/send_sms_options.rb
|
|
164
165
|
- lib/pinnacle/messages/sms/types/sms.rb
|
|
@@ -477,6 +478,7 @@ files:
|
|
|
477
478
|
- lib/pinnacle/types/send_rcs_card_options_standalone_card_orientation.rb
|
|
478
479
|
- lib/pinnacle/types/send_rich_cards_options.rb
|
|
479
480
|
- lib/pinnacle/types/send_rich_message_options.rb
|
|
481
|
+
- lib/pinnacle/types/send_rich_message_options_4.rb
|
|
480
482
|
- lib/pinnacle/types/send_sms_response_segments.rb
|
|
481
483
|
- lib/pinnacle/types/send_sms_response_segments_encoding.rb
|
|
482
484
|
- lib/pinnacle/types/send_typing_indicator_response.rb
|
|
@@ -488,6 +490,11 @@ files:
|
|
|
488
490
|
- lib/pinnacle/types/sent_sms_details.rb
|
|
489
491
|
- lib/pinnacle/types/shortened_url.rb
|
|
490
492
|
- lib/pinnacle/types/shortened_url_with_click_data.rb
|
|
493
|
+
- lib/pinnacle/types/simulate_message_input.rb
|
|
494
|
+
- lib/pinnacle/types/simulate_user_button.rb
|
|
495
|
+
- lib/pinnacle/types/simulate_user_message.rb
|
|
496
|
+
- lib/pinnacle/types/simulate_user_params.rb
|
|
497
|
+
- lib/pinnacle/types/simulate_user_response.rb
|
|
491
498
|
- lib/pinnacle/types/sms_content.rb
|
|
492
499
|
- lib/pinnacle/types/sms_validation_response_segments.rb
|
|
493
500
|
- lib/pinnacle/types/sms_validation_response_segments_gsm_7.rb
|
|
@@ -523,6 +530,15 @@ files:
|
|
|
523
530
|
- lib/pinnacle/types/tracking.rb
|
|
524
531
|
- lib/pinnacle/types/updated_contact_id.rb
|
|
525
532
|
- lib/pinnacle/types/upload_results.rb
|
|
533
|
+
- lib/pinnacle/types/user_button_press.rb
|
|
534
|
+
- lib/pinnacle/types/user_button_press_call.rb
|
|
535
|
+
- lib/pinnacle/types/user_button_press_open_url.rb
|
|
536
|
+
- lib/pinnacle/types/user_button_press_request_user_location.rb
|
|
537
|
+
- lib/pinnacle/types/user_button_press_request_user_location_location.rb
|
|
538
|
+
- lib/pinnacle/types/user_button_press_schedule_event.rb
|
|
539
|
+
- lib/pinnacle/types/user_button_press_send_location.rb
|
|
540
|
+
- lib/pinnacle/types/user_button_press_send_location_lat_long.rb
|
|
541
|
+
- lib/pinnacle/types/user_button_press_trigger.rb
|
|
526
542
|
- lib/pinnacle/types/user_event.rb
|
|
527
543
|
- lib/pinnacle/types/user_event_conversation.rb
|
|
528
544
|
- lib/pinnacle/types/v_card_address_schema_type_item.rb
|