rcs 2.0.0.pre.rc.4 → 2.0.0.pre.rc.5

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.
@@ -0,0 +1,78 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "conversation"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Pinnacle
8
+ module Types
9
+ class RetrievedConversations
10
+ # @return [Integer] Total number of conversations matching the filter.
11
+ attr_reader :count
12
+ # @return [Array<Pinnacle::Types::Conversation>]
13
+ attr_reader :conversations
14
+ # @return [Boolean] Indicates if more conversations are available beyond the current page.
15
+ attr_reader :has_more
16
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
17
+ attr_reader :additional_properties
18
+ # @return [Object]
19
+ attr_reader :_field_set
20
+ protected :_field_set
21
+
22
+ OMIT = Object.new
23
+
24
+ # @param count [Integer] Total number of conversations matching the filter.
25
+ # @param conversations [Array<Pinnacle::Types::Conversation>]
26
+ # @param has_more [Boolean] Indicates if more conversations are available beyond the current page.
27
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
28
+ # @return [Pinnacle::Types::RetrievedConversations]
29
+ def initialize(count:, conversations:, has_more:, additional_properties: nil)
30
+ @count = count
31
+ @conversations = conversations
32
+ @has_more = has_more
33
+ @additional_properties = additional_properties
34
+ @_field_set = { "count": count, "conversations": conversations, "hasMore": has_more }
35
+ end
36
+
37
+ # Deserialize a JSON object to an instance of RetrievedConversations
38
+ #
39
+ # @param json_object [String]
40
+ # @return [Pinnacle::Types::RetrievedConversations]
41
+ def self.from_json(json_object:)
42
+ struct = JSON.parse(json_object, object_class: OpenStruct)
43
+ parsed_json = JSON.parse(json_object)
44
+ count = parsed_json["count"]
45
+ conversations = parsed_json["conversations"]&.map do |item|
46
+ item = item.to_json
47
+ Pinnacle::Types::Conversation.from_json(json_object: item)
48
+ end
49
+ has_more = parsed_json["hasMore"]
50
+ new(
51
+ count: count,
52
+ conversations: conversations,
53
+ has_more: has_more,
54
+ additional_properties: struct
55
+ )
56
+ end
57
+
58
+ # Serialize an instance of RetrievedConversations to a JSON object
59
+ #
60
+ # @return [String]
61
+ def to_json(*_args)
62
+ @_field_set&.to_json
63
+ end
64
+
65
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
66
+ # hash and check each fields type against the current object's property
67
+ # definitions.
68
+ #
69
+ # @param obj [Object]
70
+ # @return [Void]
71
+ def self.validate_raw(obj:)
72
+ obj.count.is_a?(Integer) != false || raise("Passed value for field obj.count is not the expected type, validation failed.")
73
+ obj.conversations.is_a?(Array) != false || raise("Passed value for field obj.conversations is not the expected type, validation failed.")
74
+ obj.has_more.is_a?(Boolean) != false || raise("Passed value for field obj.has_more is not the expected type, validation failed.")
75
+ end
76
+ end
77
+ end
78
+ end
data/lib/rcs.rb CHANGED
@@ -8,6 +8,7 @@ require_relative "rcs/contacts/client"
8
8
  require_relative "rcs/conversations/client"
9
9
  require_relative "rcs/messages/client"
10
10
  require_relative "rcs/phone_numbers/client"
11
+ require_relative "rcs/rcs/client"
11
12
  require_relative "rcs/webhooks/client"
12
13
  require_relative "rcs/campaigns/client"
13
14
  require_relative "rcs/status/client"
@@ -25,6 +26,8 @@ module Pinnacle
25
26
  attr_reader :messages
26
27
  # @return [Pinnacle::PhoneNumbersClient]
27
28
  attr_reader :phone_numbers
29
+ # @return [Pinnacle::RcsClient]
30
+ attr_reader :rcs
28
31
  # @return [Pinnacle::WebhooksClient]
29
32
  attr_reader :webhooks
30
33
  # @return [Pinnacle::Campaigns::Client]
@@ -54,6 +57,7 @@ module Pinnacle
54
57
  @conversations = Pinnacle::ConversationsClient.new(request_client: @request_client)
55
58
  @messages = Pinnacle::MessagesClient.new(request_client: @request_client)
56
59
  @phone_numbers = Pinnacle::PhoneNumbersClient.new(request_client: @request_client)
60
+ @rcs = Pinnacle::RcsClient.new(request_client: @request_client)
57
61
  @webhooks = Pinnacle::WebhooksClient.new(request_client: @request_client)
58
62
  @campaigns = Pinnacle::Campaigns::Client.new(request_client: @request_client)
59
63
  @status = Pinnacle::Status::Client.new(request_client: @request_client)
@@ -72,6 +76,8 @@ module Pinnacle
72
76
  attr_reader :messages
73
77
  # @return [Pinnacle::AsyncPhoneNumbersClient]
74
78
  attr_reader :phone_numbers
79
+ # @return [Pinnacle::AsyncRcsClient]
80
+ attr_reader :rcs
75
81
  # @return [Pinnacle::AsyncWebhooksClient]
76
82
  attr_reader :webhooks
77
83
  # @return [Pinnacle::Campaigns::AsyncClient]
@@ -101,6 +107,7 @@ module Pinnacle
101
107
  @conversations = Pinnacle::AsyncConversationsClient.new(request_client: @async_request_client)
102
108
  @messages = Pinnacle::AsyncMessagesClient.new(request_client: @async_request_client)
103
109
  @phone_numbers = Pinnacle::AsyncPhoneNumbersClient.new(request_client: @async_request_client)
110
+ @rcs = Pinnacle::AsyncRcsClient.new(request_client: @async_request_client)
104
111
  @webhooks = Pinnacle::AsyncWebhooksClient.new(request_client: @async_request_client)
105
112
  @campaigns = Pinnacle::Campaigns::AsyncClient.new(request_client: @async_request_client)
106
113
  @status = Pinnacle::Status::AsyncClient.new(request_client: @async_request_client)
data/lib/requests.rb CHANGED
@@ -43,7 +43,7 @@ module Pinnacle
43
43
 
44
44
  # @return [Hash{String => String}]
45
45
  def get_headers
46
- headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "2.0.0-rc.4" }
46
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "2.0.0-rc.5" }
47
47
  headers["PINNACLE-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
48
48
  headers
49
49
  end
@@ -87,7 +87,7 @@ module Pinnacle
87
87
 
88
88
  # @return [Hash{String => String}]
89
89
  def get_headers
90
- headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "2.0.0-rc.4" }
90
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "2.0.0-rc.5" }
91
91
  headers["PINNACLE-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
92
92
  headers
93
93
  end
data/lib/types_export.rb CHANGED
@@ -127,6 +127,8 @@ require_relative "rcs/types/phone"
127
127
  require_relative "rcs/types/agent"
128
128
  require_relative "rcs/types/conversation_sender"
129
129
  require_relative "rcs/types/conversation"
130
+ require_relative "rcs/types/error_response"
131
+ require_relative "rcs/types/retrieved_conversations"
130
132
  require_relative "rcs/types/conversation_list"
131
133
  require_relative "rcs/types/successful_conversation_update"
132
134
  require_relative "rcs/types/sms_content"
@@ -219,6 +221,12 @@ require_relative "rcs/types/phone_number_campaign_detach_phone_numbers_item_camp
219
221
  require_relative "rcs/types/phone_number_campaign_detach_phone_numbers_item"
220
222
  require_relative "rcs/types/phone_number_campaign_detach_failed_item"
221
223
  require_relative "rcs/types/detached_phone_number_result"
224
+ require_relative "rcs/types/rcs_capability_cards"
225
+ require_relative "rcs/types/rcs_capability_actions"
226
+ require_relative "rcs/types/rcs_capability"
227
+ require_relative "rcs/types/rcs_capabilities_result"
228
+ require_relative "rcs/types/rcs_whitelist_response"
229
+ require_relative "rcs/types/rcs_link_result"
222
230
  require_relative "rcs/types/brand_status"
223
231
  require_relative "rcs/types/toll_free_status_enum"
224
232
  require_relative "rcs/types/get_toll_free_campaign_status_response_updates"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcs
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.rc.4
4
+ version: 2.0.0.pre.rc.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-09-16 00:00:00.000000000 Z
11
+ date: 2025-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-http-faraday
@@ -147,6 +147,7 @@ files:
147
147
  - lib/rcs/phone_numbers/types/search_phone_number_by_location.rb
148
148
  - lib/rcs/phone_numbers/types/search_phone_number_options.rb
149
149
  - lib/rcs/phone_numbers/webhook/client.rb
150
+ - lib/rcs/rcs/client.rb
150
151
  - lib/rcs/status/client.rb
151
152
  - lib/rcs/status/get/client.rb
152
153
  - lib/rcs/tools/client.rb
@@ -224,6 +225,7 @@ files:
224
225
  - lib/rcs/types/enhanced_contact.rb
225
226
  - lib/rcs/types/enhanced_contact_item.rb
226
227
  - lib/rcs/types/error.rb
228
+ - lib/rcs/types/error_response.rb
227
229
  - lib/rcs/types/extended_brand.rb
228
230
  - lib/rcs/types/extended_brand_with_vetting.rb
229
231
  - lib/rcs/types/extended_rcs_campaign.rb
@@ -301,18 +303,25 @@ files:
301
303
  - lib/rcs/types/rcs_campaign_schema_use_case.rb
302
304
  - lib/rcs/types/rcs_campaign_status.rb
303
305
  - lib/rcs/types/rcs_campaign_use_case_enum.rb
306
+ - lib/rcs/types/rcs_capabilities_result.rb
307
+ - lib/rcs/types/rcs_capability.rb
308
+ - lib/rcs/types/rcs_capability_actions.rb
309
+ - lib/rcs/types/rcs_capability_cards.rb
304
310
  - lib/rcs/types/rcs_cards.rb
305
311
  - lib/rcs/types/rcs_cards_cards_item.rb
306
312
  - lib/rcs/types/rcs_cards_content.rb
307
313
  - lib/rcs/types/rcs_cards_content_cards_item.rb
308
314
  - lib/rcs/types/rcs_content.rb
315
+ - lib/rcs/types/rcs_link_result.rb
309
316
  - lib/rcs/types/rcs_media_content.rb
310
317
  - lib/rcs/types/rcs_media_details_content.rb
311
318
  - lib/rcs/types/rcs_text_content.rb
312
319
  - lib/rcs/types/rcs_validate_content.rb
313
320
  - lib/rcs/types/rcs_validate_content_media.rb
314
321
  - lib/rcs/types/rcs_validation_result.rb
322
+ - lib/rcs/types/rcs_whitelist_response.rb
315
323
  - lib/rcs/types/reaction_result.rb
324
+ - lib/rcs/types/retrieved_conversations.rb
316
325
  - lib/rcs/types/rich_button.rb
317
326
  - lib/rcs/types/rich_cards_message.rb
318
327
  - lib/rcs/types/rich_media_message.rb