rcs 2.0.14 → 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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +4 -3
  3. data/.rubocop.yml +19 -0
  4. data/lib/pinnacle/campaigns/rcs/types/upsert_rcs_campaign_params.rb +3 -6
  5. data/lib/pinnacle/client.rb +1 -1
  6. data/lib/pinnacle/internal/types/boolean.rb +1 -1
  7. data/lib/pinnacle/internal/types/utils.rb +2 -2
  8. data/lib/pinnacle/messages/client.rb +5 -0
  9. data/lib/pinnacle/messages/simulate/client.rb +50 -0
  10. data/lib/pinnacle/phone_numbers/client.rb +0 -5
  11. data/lib/pinnacle/types/attach_webhook_response_webhook.rb +2 -2
  12. data/lib/pinnacle/types/attach_webhook_result.rb +12 -0
  13. data/lib/pinnacle/types/detach_webhook_result.rb +11 -0
  14. data/lib/pinnacle/types/extended_brand_with_vetting.rb +2 -2
  15. data/lib/pinnacle/types/extended_rcs_campaign.rb +3 -6
  16. data/lib/pinnacle/types/failed_sender.rb +10 -0
  17. data/lib/pinnacle/types/rcs_campaign.rb +3 -6
  18. data/lib/pinnacle/types/rcs_campaign_summary.rb +0 -1
  19. data/lib/pinnacle/types/rcs_cards_content.rb +1 -1
  20. data/lib/pinnacle/types/rcs_cards_content_cards_item.rb +1 -1
  21. data/lib/pinnacle/types/rcs_media_content.rb +1 -1
  22. data/lib/pinnacle/types/rcs_validate_content_media.rb +1 -1
  23. data/lib/pinnacle/types/rich_card.rb +1 -1
  24. data/lib/pinnacle/types/rich_cards.rb +1 -1
  25. data/lib/pinnacle/types/rich_media_message.rb +1 -1
  26. data/lib/pinnacle/types/rich_text.rb +1 -1
  27. data/lib/pinnacle/types/send_rich_cards_options.rb +5 -0
  28. data/lib/pinnacle/types/send_rich_message_options_4.rb +13 -0
  29. data/lib/pinnacle/types/simulate_message_input.rb +12 -0
  30. data/lib/pinnacle/types/simulate_user_button.rb +12 -0
  31. data/lib/pinnacle/types/simulate_user_message.rb +12 -0
  32. data/lib/pinnacle/types/simulate_user_params.rb +13 -0
  33. data/lib/pinnacle/types/simulate_user_response.rb +10 -0
  34. data/lib/pinnacle/types/user_button_press.rb +19 -0
  35. data/lib/pinnacle/types/user_button_press_call.rb +12 -0
  36. data/lib/pinnacle/types/user_button_press_open_url.rb +12 -0
  37. data/lib/pinnacle/types/user_button_press_request_user_location.rb +12 -0
  38. data/lib/pinnacle/types/user_button_press_request_user_location_location.rb +13 -0
  39. data/lib/pinnacle/types/user_button_press_schedule_event.rb +15 -0
  40. data/lib/pinnacle/types/user_button_press_send_location.rb +13 -0
  41. data/lib/pinnacle/types/user_button_press_send_location_lat_long.rb +11 -0
  42. data/lib/pinnacle/types/user_button_press_trigger.rb +12 -0
  43. data/lib/pinnacle/types/vcard_content.rb +1 -1
  44. data/lib/pinnacle/types/webhook_event_enum.rb +1 -0
  45. data/lib/pinnacle/types/webhook_summary.rb +1 -0
  46. data/lib/pinnacle/types/webhooks.rb +1 -0
  47. data/lib/pinnacle/version.rb +1 -1
  48. data/lib/pinnacle/webhooks/client.rb +85 -0
  49. data/lib/pinnacle/webhooks/types/attach_webhook_params.rb +16 -0
  50. data/lib/pinnacle/webhooks/types/detach_webhook_params.rb +12 -0
  51. data/lib/pinnacle.rb +23 -12
  52. data/reference.md +223 -151
  53. metadata +23 -12
  54. data/lib/pinnacle/campaigns/rcs/types/rcs_use_case.rb +0 -15
  55. data/lib/pinnacle/phone_numbers/webhook/client.rb +0 -90
  56. data/lib/pinnacle/types/attach_webhook_by_id_params.rb +0 -11
  57. data/lib/pinnacle/types/attach_webhook_params.rb +0 -15
  58. data/lib/pinnacle/types/configured_webhook.rb +0 -13
  59. data/lib/pinnacle/types/create_and_attach_webhook_by_url_params.rb +0 -12
  60. data/lib/pinnacle/types/detached_webhook_info.rb +0 -11
  61. data/lib/pinnacle/types/rcs_campaign_schema_extra_use_case.rb +0 -11
  62. data/lib/pinnacle/types/rcs_campaign_schema_use_case.rb +0 -11
  63. data/lib/pinnacle/types/rcs_campaign_use_case_enum.rb +0 -43
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 362ad9ba7c8c47a7e24f2e98ae2b6a4af84b43e66faaa0682622414565a8f5de
4
- data.tar.gz: eb18c0b9268ce71ae35a20a2b6a8a68409f80637fa495faac8a93a541f59bd3b
3
+ metadata.gz: af1df4309329865c8db83166a625b88da9d2247b9657cbce4964e260a8cef0d2
4
+ data.tar.gz: edaebb702d60e2e0d2cefaca64210f518641ed5d4c7455cda0f87abd3409c33a
5
5
  SHA512:
6
- metadata.gz: af1d17f92bbd2f7e9835f1b9360dc4bb93d5b88140951da73ef943bcc83b38cc2189d7e914dee005bf61101cf17feb643814bd7695acd41d20ce996e1af47a9b
7
- data.tar.gz: c89f1854e0650dfcb4a01a46c88f4016007550e8c3d642f4578e1835cc3b744c0cc61cb6e662625e6e2e9a562c3d41a95d0934c26dacce2ac535e6fd583d2749
6
+ metadata.gz: 518bb3cb3e93e4f69310e5ed0a4556756544746c740d15aa4fe3b888db72d6979c5ccf03eaa71d5c46d0aaf2deb5ebf5aabf4ee1f95d9ae6fbf4a1c0ddc88bc8
7
+ data.tar.gz: b20e523cdc367b741b4b20c2d3bb7b6c2481891540670b06fe4ba8b5a2f2442608fc51e0f518333d77b5ceb9e1cf1d099c25f53f9a1de46ae5a51ea49a608a51
data/.fern/metadata.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
- "cliVersion": "3.51.3",
2
+ "cliVersion": "4.58.0",
3
3
  "generatorName": "fernapi/fern-ruby-sdk",
4
- "generatorVersion": "1.0.0-rc84",
4
+ "generatorVersion": "1.0.0-rc85",
5
5
  "generatorConfig": {
6
6
  "clientModuleName": "PinnacleBaseClient",
7
7
  "flattenModuleStructure": true,
8
8
  "useProvidedDefaults": true
9
9
  },
10
- "sdkVersion": "2.0.14"
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'
@@ -10,15 +10,12 @@ module Pinnacle
10
10
  field :campaign_id, -> { String }, optional: true, nullable: false, api_name: "campaignId"
11
11
  field :expected_agent_responses, -> { Internal::Types::Array[String] }, optional: true, nullable: false, api_name: "expectedAgentResponses"
12
12
  field :links, -> { Pinnacle::Campaigns::Rcs::Types::RcsLinks }, optional: true, nullable: false
13
- field :use_case, -> { Pinnacle::Campaigns::Rcs::Types::RcsUseCase }, optional: true, nullable: false, api_name: "useCase"
14
- field :opt_in_terms_and_conditions, -> { String }, optional: true, nullable: false, api_name: "optInTermsAndConditions"
13
+ field :use_case_description, -> { String }, optional: true, nullable: false, api_name: "useCaseDescription"
15
14
  field :messaging_type, -> { Pinnacle::Types::RcsMessagingTypeEnum }, optional: true, nullable: false, api_name: "messagingType"
16
- field :carrier_description, -> { String }, optional: true, nullable: false, api_name: "carrierDescription"
15
+ field :cta_media, -> { String }, optional: true, nullable: false, api_name: "ctaMedia"
16
+ field :opt_in_method, -> { String }, optional: true, nullable: false, api_name: "optInMethod"
17
17
  field :keywords, -> { Pinnacle::Campaigns::Rcs::Types::RcsCampaignKeywords }, optional: true, nullable: false
18
18
  field :traffic, -> { Pinnacle::Campaigns::Rcs::Types::RcsCampaignTraffic }, optional: true, nullable: false
19
- field :agent_triggers, -> { String }, optional: true, nullable: false, api_name: "agentTriggers"
20
- field :interaction_description, -> { String }, optional: true, nullable: false, api_name: "interactionDescription"
21
- field :is_conversational, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isConversational"
22
19
  field :cta_language, -> { String }, optional: true, nullable: false, api_name: "ctaLanguage"
23
20
  field :demo_trigger, -> { String }, optional: true, nullable: false, api_name: "demoTrigger"
24
21
  end
@@ -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.14",
13
+ "User-Agent" => "rcs/2.0.16",
14
14
  "X-Fern-Language" => "Ruby",
15
15
  "PINNACLE-API-KEY" => api_key.to_s
16
16
  }
@@ -17,7 +17,7 @@ module Pinnacle
17
17
  def self.coerce(value, strict: strict?)
18
18
  case value
19
19
  when TrueClass, FalseClass
20
- return value
20
+ value
21
21
  when Integer
22
22
  return value == 1
23
23
  when String
@@ -81,10 +81,10 @@ module Pinnacle
81
81
  }
82
82
  return type.coerce(value, strict: strict)
83
83
  else
84
- return value
84
+ value
85
85
  end
86
86
  else
87
- return value
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
@@ -144,11 +144,6 @@ module Pinnacle
144
144
  end
145
145
  end
146
146
 
147
- # @return [Pinnacle::Webhook::Client]
148
- def webhook
149
- @webhook ||= Pinnacle::PhoneNumbers::Webhook::Client.new(client: @client)
150
- end
151
-
152
147
  # @return [Pinnacle::Campaign::Client]
153
148
  def campaign
154
149
  @campaign ||= Pinnacle::PhoneNumbers::Campaign::Client.new(client: @client)
@@ -2,12 +2,12 @@
2
2
 
3
3
  module Pinnacle
4
4
  module Types
5
- # Detailed information about the attached webhook.
6
5
  class AttachWebhookResponseWebhook < Internal::Types::Model
7
6
  field :id, -> { String }, optional: false, nullable: false
8
7
  field :name, -> { String }, optional: false, nullable: false
9
8
  field :url, -> { String }, optional: false, nullable: false
10
- field :secret, -> { String }, optional: true, nullable: false
9
+ field :secret, -> { String }, optional: false, nullable: false
10
+ field :headers, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false
11
11
  end
12
12
  end
13
13
  end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ class AttachWebhookResult < Internal::Types::Model
6
+ field :webhook, -> { Pinnacle::Types::AttachWebhookResponseWebhook }, optional: false, nullable: false
7
+ field :event, -> { Pinnacle::Types::WebhookEventEnum }, optional: false, nullable: true
8
+ field :senders, -> { Internal::Types::Array[String] }, optional: false, nullable: false
9
+ field :failed, -> { Internal::Types::Array[Pinnacle::Types::FailedSender] }, optional: false, nullable: false
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ class DetachWebhookResult < Internal::Types::Model
6
+ field :webhook_id, -> { String }, optional: false, nullable: false, api_name: "webhookId"
7
+ field :senders, -> { Internal::Types::Array[String] }, optional: false, nullable: false
8
+ field :failed, -> { Internal::Types::Array[Pinnacle::Types::FailedSender] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ 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: true, api_name: "lastTcrVettingDate"
7
- field :tcr_feedback, -> { Internal::Types::Array[Pinnacle::Types::VettingFeedback] }, optional: false, nullable: true, api_name: "tcrFeedback"
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
@@ -10,15 +10,12 @@ module Pinnacle
10
10
  field :expected_agent_responses, -> { Internal::Types::Array[String] }, optional: true, nullable: false, api_name: "expectedAgentResponses"
11
11
  field :links, -> { Pinnacle::Types::RcsCampaignSchemaExtraLinks }, optional: true, nullable: false
12
12
  field :status, -> { Pinnacle::Types::ProfileStatusEnum }, optional: false, nullable: false
13
- field :use_case, -> { Pinnacle::Types::RcsCampaignSchemaExtraUseCase }, optional: true, nullable: false, api_name: "useCase"
14
- field :opt_in_terms_and_conditions, -> { String }, optional: true, nullable: false, api_name: "optInTermsAndConditions"
13
+ field :use_case_description, -> { String }, optional: true, nullable: false, api_name: "useCaseDescription"
15
14
  field :messaging_type, -> { Pinnacle::Types::RcsMessagingTypeEnum }, optional: true, nullable: false, api_name: "messagingType"
16
- field :carrier_description, -> { String }, optional: true, nullable: false, api_name: "carrierDescription"
15
+ field :cta_media, -> { String }, optional: true, nullable: false, api_name: "ctaMedia"
16
+ field :opt_in_method, -> { String }, optional: true, nullable: false, api_name: "optInMethod"
17
17
  field :keywords, -> { Pinnacle::Types::RcsCampaignSchemaExtraKeywords }, optional: true, nullable: false
18
18
  field :traffic, -> { Pinnacle::Types::RcsCampaignSchemaExtraTraffic }, optional: true, nullable: false
19
- field :agent_triggers, -> { String }, optional: true, nullable: false, api_name: "agentTriggers"
20
- field :interaction_description, -> { String }, optional: true, nullable: false, api_name: "interactionDescription"
21
- field :is_conversational, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isConversational"
22
19
  field :cta_language, -> { String }, optional: true, nullable: false, api_name: "ctaLanguage"
23
20
  field :demo_trigger, -> { String }, optional: true, nullable: false, api_name: "demoTrigger"
24
21
  end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ class FailedSender < Internal::Types::Model
6
+ field :sender, -> { String }, optional: false, nullable: false
7
+ field :error, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -7,15 +7,12 @@ module Pinnacle
7
7
  field :campaign_id, -> { String }, optional: true, nullable: false, api_name: "campaignId"
8
8
  field :expected_agent_responses, -> { Internal::Types::Array[String] }, optional: true, nullable: false, api_name: "expectedAgentResponses"
9
9
  field :links, -> { Pinnacle::Types::RcsCampaignSchemaLinks }, optional: true, nullable: false
10
- field :use_case, -> { Pinnacle::Types::RcsCampaignSchemaUseCase }, optional: true, nullable: false, api_name: "useCase"
11
- field :opt_in_terms_and_conditions, -> { String }, optional: true, nullable: false, api_name: "optInTermsAndConditions"
10
+ field :use_case_description, -> { String }, optional: true, nullable: false, api_name: "useCaseDescription"
12
11
  field :messaging_type, -> { Pinnacle::Types::RcsMessagingTypeEnum }, optional: true, nullable: false, api_name: "messagingType"
13
- field :carrier_description, -> { String }, optional: true, nullable: false, api_name: "carrierDescription"
12
+ field :cta_media, -> { String }, optional: true, nullable: false, api_name: "ctaMedia"
13
+ field :opt_in_method, -> { String }, optional: true, nullable: false, api_name: "optInMethod"
14
14
  field :keywords, -> { Pinnacle::Types::RcsCampaignSchemaKeywords }, optional: true, nullable: false
15
15
  field :traffic, -> { Pinnacle::Types::RcsCampaignSchemaTraffic }, optional: true, nullable: false
16
- field :agent_triggers, -> { String }, optional: true, nullable: false, api_name: "agentTriggers"
17
- field :interaction_description, -> { String }, optional: true, nullable: false, api_name: "interactionDescription"
18
- field :is_conversational, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isConversational"
19
16
  field :cta_language, -> { String }, optional: true, nullable: false, api_name: "ctaLanguage"
20
17
  field :demo_trigger, -> { String }, optional: true, nullable: false, api_name: "demoTrigger"
21
18
  end
@@ -7,7 +7,6 @@ module Pinnacle
7
7
  field :name, -> { String }, optional: true, nullable: false
8
8
  field :status, -> { Pinnacle::Types::RcsCampaignSummaryStatus }, optional: false, nullable: false
9
9
  field :brand_id, -> { String }, optional: true, nullable: false, api_name: "brandId"
10
- field :use_case, -> { String }, optional: true, nullable: false, api_name: "useCase"
11
10
  field :agent_id, -> { String }, optional: true, nullable: false, api_name: "agentId"
12
11
  field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
13
12
  field :updated_at, -> { String }, optional: false, nullable: false, api_name: "updatedAt"
@@ -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: false, nullable: false, api_name: "quickReplies"
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: false, nullable: false
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: false, nullable: false, api_name: "quickReplies"
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: false, nullable: false, api_name: "quickReplies"
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: false, nullable: false
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: false, nullable: false, api_name: "quickReplies"
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: false, nullable: false, api_name: "quickReplies"
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: false, nullable: false, api_name: "quickReplies"
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,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ # Result of the simulation.
6
+ class SimulateUserResponse < Internal::Types::Model
7
+ field :success, -> { Internal::Types::Boolean }, optional: false, nullable: false
8
+ end
9
+ end
10
+ 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
@@ -3,7 +3,7 @@
3
3
  module Pinnacle
4
4
  module Types
5
5
  class VcardContent < Internal::Types::Model
6
- field :revision, -> { String }, optional: true, nullable: false
6
+ field :revision, -> { String }, optional: false, nullable: false
7
7
  end
8
8
  end
9
9
  end