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
@@ -0,0 +1,197 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "message_with_reaction_direction"
4
+ require_relative "message_content"
5
+ require_relative "message_method_enum"
6
+ require_relative "message_status_enum"
7
+ require_relative "message_protocol_enum"
8
+ require "ostruct"
9
+ require "json"
10
+
11
+ module Pinnacle
12
+ module Types
13
+ # Message with additional conversation-specific fields including direction and
14
+ # reaction.
15
+ class MessageWithReaction
16
+ # @return [Pinnacle::Types::MessageWithReactionDirection] Direction of the message flow.
17
+ attr_reader :direction
18
+ # @return [String] Unicode emoji reaction attached to this message. <br>
19
+ # Null indicates no reaction has been added.
20
+ attr_reader :reaction
21
+ # @return [Pinnacle::Types::MessageContent]
22
+ attr_reader :content
23
+ # @return [Float] Total cost charged for sending the message. <br>
24
+ # Null means the message incurred no cost or has not been charged yet.
25
+ attr_reader :cost
26
+ # @return [String] Timestamp indicating when the message was successfully delivered to the
27
+ # recipient. <br>
28
+ # Null indicates the message has not yet been delivered.
29
+ attr_reader :delivered_at
30
+ # @return [String] Detailed explanation of any errors that occurred while delivering the message.
31
+ # <br>
32
+ # Null indicates no errors.
33
+ attr_reader :error
34
+ # @return [String] Unique identifier of the message. This identifier is a string that always begins
35
+ # with the prefix `msg_`, for example: `msg_1234567890`.
36
+ attr_reader :id
37
+ # @return [Pinnacle::Types::MessageMethodEnum]
38
+ attr_reader :method_
39
+ # @return [Integer] Number of segments the message was split into for delivery.
40
+ attr_reader :num_segments
41
+ # @return [String] Phone number that received the message in E.164 format.
42
+ attr_reader :receiver
43
+ # @return [String] Phone number or agent that sent the message.
44
+ attr_reader :sender
45
+ # @return [String] Timestamp indicating when the message was submitted for delivery. <br>
46
+ # Null indicates the message is still in the queue.
47
+ attr_reader :sent_at
48
+ # @return [Pinnacle::Types::MessageStatusEnum]
49
+ attr_reader :status
50
+ # @return [Pinnacle::Types::MessageProtocolEnum]
51
+ attr_reader :type
52
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
53
+ attr_reader :additional_properties
54
+ # @return [Object]
55
+ attr_reader :_field_set
56
+ protected :_field_set
57
+
58
+ OMIT = Object.new
59
+
60
+ # @param direction [Pinnacle::Types::MessageWithReactionDirection] Direction of the message flow.
61
+ # @param reaction [String] Unicode emoji reaction attached to this message. <br>
62
+ # Null indicates no reaction has been added.
63
+ # @param content [Pinnacle::Types::MessageContent]
64
+ # @param cost [Float] Total cost charged for sending the message. <br>
65
+ # Null means the message incurred no cost or has not been charged yet.
66
+ # @param delivered_at [String] Timestamp indicating when the message was successfully delivered to the
67
+ # recipient. <br>
68
+ # Null indicates the message has not yet been delivered.
69
+ # @param error [String] Detailed explanation of any errors that occurred while delivering the message.
70
+ # <br>
71
+ # Null indicates no errors.
72
+ # @param id [String] Unique identifier of the message. This identifier is a string that always begins
73
+ # with the prefix `msg_`, for example: `msg_1234567890`.
74
+ # @param method_ [Pinnacle::Types::MessageMethodEnum]
75
+ # @param num_segments [Integer] Number of segments the message was split into for delivery.
76
+ # @param receiver [String] Phone number that received the message in E.164 format.
77
+ # @param sender [String] Phone number or agent that sent the message.
78
+ # @param sent_at [String] Timestamp indicating when the message was submitted for delivery. <br>
79
+ # Null indicates the message is still in the queue.
80
+ # @param status [Pinnacle::Types::MessageStatusEnum]
81
+ # @param type [Pinnacle::Types::MessageProtocolEnum]
82
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
83
+ # @return [Pinnacle::Types::MessageWithReaction]
84
+ def initialize(direction:, content:, id:, method_:, num_segments:, receiver:, sender:, status:, type:,
85
+ reaction: OMIT, cost: OMIT, delivered_at: OMIT, error: OMIT, sent_at: OMIT, additional_properties: nil)
86
+ @direction = direction
87
+ @reaction = reaction if reaction != OMIT
88
+ @content = content
89
+ @cost = cost if cost != OMIT
90
+ @delivered_at = delivered_at if delivered_at != OMIT
91
+ @error = error if error != OMIT
92
+ @id = id
93
+ @method_ = method_
94
+ @num_segments = num_segments
95
+ @receiver = receiver
96
+ @sender = sender
97
+ @sent_at = sent_at if sent_at != OMIT
98
+ @status = status
99
+ @type = type
100
+ @additional_properties = additional_properties
101
+ @_field_set = {
102
+ "direction": direction,
103
+ "reaction": reaction,
104
+ "content": content,
105
+ "cost": cost,
106
+ "deliveredAt": delivered_at,
107
+ "error": error,
108
+ "id": id,
109
+ "method": method_,
110
+ "numSegments": num_segments,
111
+ "receiver": receiver,
112
+ "sender": sender,
113
+ "sentAt": sent_at,
114
+ "status": status,
115
+ "type": type
116
+ }.reject do |_k, v|
117
+ v == OMIT
118
+ end
119
+ end
120
+
121
+ # Deserialize a JSON object to an instance of MessageWithReaction
122
+ #
123
+ # @param json_object [String]
124
+ # @return [Pinnacle::Types::MessageWithReaction]
125
+ def self.from_json(json_object:)
126
+ struct = JSON.parse(json_object, object_class: OpenStruct)
127
+ parsed_json = JSON.parse(json_object)
128
+ direction = parsed_json["direction"]
129
+ reaction = parsed_json["reaction"]
130
+ if parsed_json["content"].nil?
131
+ content = nil
132
+ else
133
+ content = parsed_json["content"].to_json
134
+ content = Pinnacle::Types::MessageContent.from_json(json_object: content)
135
+ end
136
+ cost = parsed_json["cost"]
137
+ delivered_at = parsed_json["deliveredAt"]
138
+ error = parsed_json["error"]
139
+ id = parsed_json["id"]
140
+ method_ = parsed_json["method"]
141
+ num_segments = parsed_json["numSegments"]
142
+ receiver = parsed_json["receiver"]
143
+ sender = parsed_json["sender"]
144
+ sent_at = parsed_json["sentAt"]
145
+ status = parsed_json["status"]
146
+ type = parsed_json["type"]
147
+ new(
148
+ direction: direction,
149
+ reaction: reaction,
150
+ content: content,
151
+ cost: cost,
152
+ delivered_at: delivered_at,
153
+ error: error,
154
+ id: id,
155
+ method_: method_,
156
+ num_segments: num_segments,
157
+ receiver: receiver,
158
+ sender: sender,
159
+ sent_at: sent_at,
160
+ status: status,
161
+ type: type,
162
+ additional_properties: struct
163
+ )
164
+ end
165
+
166
+ # Serialize an instance of MessageWithReaction to a JSON object
167
+ #
168
+ # @return [String]
169
+ def to_json(*_args)
170
+ @_field_set&.to_json
171
+ end
172
+
173
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
174
+ # hash and check each fields type against the current object's property
175
+ # definitions.
176
+ #
177
+ # @param obj [Object]
178
+ # @return [Void]
179
+ def self.validate_raw(obj:)
180
+ obj.direction.is_a?(Pinnacle::Types::MessageWithReactionDirection) != false || raise("Passed value for field obj.direction is not the expected type, validation failed.")
181
+ obj.reaction&.is_a?(String) != false || raise("Passed value for field obj.reaction is not the expected type, validation failed.")
182
+ Pinnacle::Types::MessageContent.validate_raw(obj: obj.content)
183
+ obj.cost&.is_a?(Float) != false || raise("Passed value for field obj.cost is not the expected type, validation failed.")
184
+ obj.delivered_at&.is_a?(String) != false || raise("Passed value for field obj.delivered_at is not the expected type, validation failed.")
185
+ obj.error&.is_a?(String) != false || raise("Passed value for field obj.error is not the expected type, validation failed.")
186
+ obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
187
+ obj.method_.is_a?(Pinnacle::Types::MessageMethodEnum) != false || raise("Passed value for field obj.method_ is not the expected type, validation failed.")
188
+ obj.num_segments.is_a?(Integer) != false || raise("Passed value for field obj.num_segments is not the expected type, validation failed.")
189
+ obj.receiver.is_a?(String) != false || raise("Passed value for field obj.receiver is not the expected type, validation failed.")
190
+ obj.sender.is_a?(String) != false || raise("Passed value for field obj.sender is not the expected type, validation failed.")
191
+ obj.sent_at&.is_a?(String) != false || raise("Passed value for field obj.sent_at is not the expected type, validation failed.")
192
+ obj.status.is_a?(Pinnacle::Types::MessageStatusEnum) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
193
+ obj.type.is_a?(Pinnacle::Types::MessageProtocolEnum) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
194
+ end
195
+ end
196
+ end
197
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ # Direction of the message flow.
6
+ class MessageWithReactionDirection
7
+ INBOUND = "INBOUND"
8
+ OUTBOUND = "OUTBOUND"
9
+ end
10
+ end
11
+ end
@@ -5,8 +5,8 @@ require "json"
5
5
 
6
6
  module Pinnacle
7
7
  module Types
8
- class ErrorResponse
9
- # @return [String] Description of the error that occurred.
8
+ class NotFoundErrorBody
9
+ # @return [String]
10
10
  attr_reader :error
11
11
  # @return [OpenStruct] Additional properties unmapped to the current class definition
12
12
  attr_reader :additional_properties
@@ -16,9 +16,9 @@ module Pinnacle
16
16
 
17
17
  OMIT = Object.new
18
18
 
19
- # @param error [String] Description of the error that occurred.
19
+ # @param error [String]
20
20
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
21
- # @return [Pinnacle::Types::ErrorResponse]
21
+ # @return [Pinnacle::Types::NotFoundErrorBody]
22
22
  def initialize(error: OMIT, additional_properties: nil)
23
23
  @error = error if error != OMIT
24
24
  @additional_properties = additional_properties
@@ -27,10 +27,10 @@ module Pinnacle
27
27
  end
28
28
  end
29
29
 
30
- # Deserialize a JSON object to an instance of ErrorResponse
30
+ # Deserialize a JSON object to an instance of NotFoundErrorBody
31
31
  #
32
32
  # @param json_object [String]
33
- # @return [Pinnacle::Types::ErrorResponse]
33
+ # @return [Pinnacle::Types::NotFoundErrorBody]
34
34
  def self.from_json(json_object:)
35
35
  struct = JSON.parse(json_object, object_class: OpenStruct)
36
36
  parsed_json = JSON.parse(json_object)
@@ -38,7 +38,7 @@ module Pinnacle
38
38
  new(error: error, additional_properties: struct)
39
39
  end
40
40
 
41
- # Serialize an instance of ErrorResponse to a JSON object
41
+ # Serialize an instance of NotFoundErrorBody to a JSON object
42
42
  #
43
43
  # @return [String]
44
44
  def to_json(*_args)
@@ -8,7 +8,9 @@ module Pinnacle
8
8
  module Types
9
9
  # Campaign that the phone is now attached to.
10
10
  class PhoneNumberCampaignAttachPhoneNumbersItemCampaign
11
- # @return [Integer] Id of the campaign.
11
+ # @return [String] Id of the campaign. For `TOLL_FREE` campaigns, it will begin with the prefix
12
+ # `tf_`, for example: `tf_1234567890`. For `10DLC` campaigns, it will begin with
13
+ # the prefix `dlc_`, for example: `dlc_1234567890`.
12
14
  attr_reader :id
13
15
  # @return [String] Campaign's name.
14
16
  attr_reader :name
@@ -22,7 +24,9 @@ module Pinnacle
22
24
 
23
25
  OMIT = Object.new
24
26
 
25
- # @param id [Integer] Id of the campaign.
27
+ # @param id [String] Id of the campaign. For `TOLL_FREE` campaigns, it will begin with the prefix
28
+ # `tf_`, for example: `tf_1234567890`. For `10DLC` campaigns, it will begin with
29
+ # the prefix `dlc_`, for example: `dlc_1234567890`.
26
30
  # @param name [String] Campaign's name.
27
31
  # @param type [Pinnacle::Types::MessagingProfileEnum]
28
32
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
@@ -69,7 +73,7 @@ module Pinnacle
69
73
  # @param obj [Object]
70
74
  # @return [Void]
71
75
  def self.validate_raw(obj:)
72
- obj.id.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
76
+ obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
73
77
  obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
74
78
  obj.type.is_a?(Pinnacle::Types::MessagingProfileEnum) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
75
79
  end
@@ -8,7 +8,9 @@ module Pinnacle
8
8
  module Types
9
9
  # Campaign that the phone is now detached from.
10
10
  class PhoneNumberCampaignDetachPhoneNumbersItemCampaign
11
- # @return [Integer] Id of the campaign.
11
+ # @return [String] Id of the campaign. For `TOLL_FREE` campaigns, it will begin with the prefix
12
+ # `tf_`, for example: `tf_1234567890`. For `10DLC` campaigns, it will begin with
13
+ # the prefix `dlc_`, for example: `dlc_1234567890`.
12
14
  attr_reader :id
13
15
  # @return [String] Campaign's name.
14
16
  attr_reader :name
@@ -22,7 +24,9 @@ module Pinnacle
22
24
 
23
25
  OMIT = Object.new
24
26
 
25
- # @param id [Integer] Id of the campaign.
27
+ # @param id [String] Id of the campaign. For `TOLL_FREE` campaigns, it will begin with the prefix
28
+ # `tf_`, for example: `tf_1234567890`. For `10DLC` campaigns, it will begin with
29
+ # the prefix `dlc_`, for example: `dlc_1234567890`.
26
30
  # @param name [String] Campaign's name.
27
31
  # @param type [Pinnacle::Types::MessagingProfileEnum]
28
32
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
@@ -69,7 +73,7 @@ module Pinnacle
69
73
  # @param obj [Object]
70
74
  # @return [Void]
71
75
  def self.validate_raw(obj:)
72
- obj.id.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
76
+ obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
73
77
  obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
74
78
  obj.type.is_a?(Pinnacle::Types::MessagingProfileEnum) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
75
79
  end
@@ -14,6 +14,12 @@ module Pinnacle
14
14
  # Null indicates that `download.expiresAt` was not provided and the expiration
15
15
  # time is defaulted to one hour after uploading.
16
16
  attr_reader :expires_at
17
+ # @return [String] Deletion date for the file in ISO 8601 format. After this date, the file will be
18
+ # automatically deleted from our storage.<br>
19
+ # If this field is not provided, the file will not be deleted. You can still
20
+ # schedule deletion or delete the file manually in the Storage page in the
21
+ # dashboard.
22
+ attr_reader :delete_at
17
23
  # @return [OpenStruct] Additional properties unmapped to the current class definition
18
24
  attr_reader :additional_properties
19
25
  # @return [Object]
@@ -27,17 +33,24 @@ module Pinnacle
27
33
  # @param expires_at [String] Expiration date in ISO 8601 format for file download access.<br>
28
34
  # Null indicates that `download.expiresAt` was not provided and the expiration
29
35
  # time is defaulted to one hour after uploading.
36
+ # @param delete_at [String] Deletion date for the file in ISO 8601 format. After this date, the file will be
37
+ # automatically deleted from our storage.<br>
38
+ # If this field is not provided, the file will not be deleted. You can still
39
+ # schedule deletion or delete the file manually in the Storage page in the
40
+ # dashboard.
30
41
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
31
42
  # @return [Pinnacle::Types::PinnacleFileUploadMetadata]
32
- def initialize(file_name:, content_type:, expires_at: OMIT, additional_properties: nil)
43
+ def initialize(file_name:, content_type:, expires_at: OMIT, delete_at: OMIT, additional_properties: nil)
33
44
  @file_name = file_name
34
45
  @content_type = content_type
35
46
  @expires_at = expires_at if expires_at != OMIT
47
+ @delete_at = delete_at if delete_at != OMIT
36
48
  @additional_properties = additional_properties
37
49
  @_field_set = {
38
50
  "fileName": file_name,
39
51
  "contentType": content_type,
40
- "expiresAt": expires_at
52
+ "expiresAt": expires_at,
53
+ "deleteAt": delete_at
41
54
  }.reject do |_k, v|
42
55
  v == OMIT
43
56
  end
@@ -53,10 +66,12 @@ module Pinnacle
53
66
  file_name = parsed_json["fileName"]
54
67
  content_type = parsed_json["contentType"]
55
68
  expires_at = parsed_json["expiresAt"]
69
+ delete_at = parsed_json["deleteAt"]
56
70
  new(
57
71
  file_name: file_name,
58
72
  content_type: content_type,
59
73
  expires_at: expires_at,
74
+ delete_at: delete_at,
60
75
  additional_properties: struct
61
76
  )
62
77
  end
@@ -78,6 +93,7 @@ module Pinnacle
78
93
  obj.file_name.is_a?(String) != false || raise("Passed value for field obj.file_name is not the expected type, validation failed.")
79
94
  obj.content_type.is_a?(String) != false || raise("Passed value for field obj.content_type is not the expected type, validation failed.")
80
95
  obj.expires_at&.is_a?(String) != false || raise("Passed value for field obj.expires_at is not the expected type, validation failed.")
96
+ obj.delete_at&.is_a?(String) != false || raise("Passed value for field obj.delete_at is not the expected type, validation failed.")
81
97
  end
82
98
  end
83
99
  end
@@ -2,10 +2,10 @@
2
2
 
3
3
  module Pinnacle
4
4
  module Types
5
- # Current review status of the campaign.
6
- # `INCOMPLETE`: Not submitted.
7
- # `IN REVIEW`: Being reviewed by carriers.
8
- # `VERIFIED`: Approved and ready to send messages.
5
+ # Current review status of the campaign. <br>
6
+ # `INCOMPLETE`: Not submitted. <br>
7
+ # `IN REVIEW`: Being reviewed by carriers. <br>
8
+ # `VERIFIED`: Approved and ready to send messages.<br>
9
9
  # `FAILED`: Issues and errors related to the campaign's details.
10
10
  class ProfileStatusEnum
11
11
  INCOMPLETE = "INCOMPLETE"
@@ -16,6 +16,9 @@ module Pinnacle
16
16
  attr_reader :test_mode
17
17
  # @return [Pinnacle::Types::Tracking]
18
18
  attr_reader :tracking
19
+ # @return [Boolean] Media files and card media will be transcoded to a supported RCS format. This
20
+ # adds a small delay to sending the message. Ignored for rich text messages.
21
+ attr_reader :transcode
19
22
  # @return [Boolean] Validate your message for any unsupported files. <br>
20
23
  # If failed, errors will be thrown and the message will not send.
21
24
  attr_reader :validate
@@ -31,20 +34,25 @@ module Pinnacle
31
34
  # @param test_mode [Boolean] Send via the test agent to whitelisted test devices. Useful for development and
32
35
  # debugging.
33
36
  # @param tracking [Pinnacle::Types::Tracking]
37
+ # @param transcode [Boolean] Media files and card media will be transcoded to a supported RCS format. This
38
+ # adds a small delay to sending the message. Ignored for rich text messages.
34
39
  # @param validate [Boolean] Validate your message for any unsupported files. <br>
35
40
  # If failed, errors will be thrown and the message will not send.
36
41
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
37
42
  # @return [Pinnacle::Types::RcsBaseOptions]
38
- def initialize(schedule: OMIT, test_mode: OMIT, tracking: OMIT, validate: OMIT, additional_properties: nil)
43
+ def initialize(schedule: OMIT, test_mode: OMIT, tracking: OMIT, transcode: OMIT, validate: OMIT,
44
+ additional_properties: nil)
39
45
  @schedule = schedule if schedule != OMIT
40
46
  @test_mode = test_mode if test_mode != OMIT
41
47
  @tracking = tracking if tracking != OMIT
48
+ @transcode = transcode if transcode != OMIT
42
49
  @validate = validate if validate != OMIT
43
50
  @additional_properties = additional_properties
44
51
  @_field_set = {
45
52
  "schedule": schedule,
46
53
  "test_mode": test_mode,
47
54
  "tracking": tracking,
55
+ "transcode": transcode,
48
56
  "validate": validate
49
57
  }.reject do |_k, v|
50
58
  v == OMIT
@@ -66,11 +74,13 @@ module Pinnacle
66
74
  end
67
75
  test_mode = parsed_json["test_mode"]
68
76
  tracking = parsed_json["tracking"]
77
+ transcode = parsed_json["transcode"]
69
78
  validate = parsed_json["validate"]
70
79
  new(
71
80
  schedule: schedule,
72
81
  test_mode: test_mode,
73
82
  tracking: tracking,
83
+ transcode: transcode,
74
84
  validate: validate,
75
85
  additional_properties: struct
76
86
  )
@@ -93,6 +103,7 @@ module Pinnacle
93
103
  obj.schedule.nil? || Pinnacle::Types::MessageSchedule.validate_raw(obj: obj.schedule)
94
104
  obj.test_mode&.is_a?(Boolean) != false || raise("Passed value for field obj.test_mode is not the expected type, validation failed.")
95
105
  obj.tracking&.is_a?(Pinnacle::Types::Tracking) != false || raise("Passed value for field obj.tracking is not the expected type, validation failed.")
106
+ obj.transcode&.is_a?(Boolean) != false || raise("Passed value for field obj.transcode is not the expected type, validation failed.")
96
107
  obj.validate&.is_a?(Boolean) != false || raise("Passed value for field obj.validate is not the expected type, validation failed.")
97
108
  end
98
109
  end
@@ -7,6 +7,8 @@ module Pinnacle
7
7
  module Types
8
8
  # Button that initiates a phone call when tapped by the recipient.
9
9
  class RcsButtonCall
10
+ # @return [String] Optional additional data to attach to this button.
11
+ attr_reader :metadata
10
12
  # @return [String] Phone number to call in E.164 format
11
13
  attr_reader :payload
12
14
  # @return [String] Display text for the button.
@@ -19,15 +21,19 @@ module Pinnacle
19
21
 
20
22
  OMIT = Object.new
21
23
 
24
+ # @param metadata [String] Optional additional data to attach to this button.
22
25
  # @param payload [String] Phone number to call in E.164 format
23
26
  # @param title [String] Display text for the button.
24
27
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
25
28
  # @return [Pinnacle::Types::RcsButtonCall]
26
- def initialize(payload:, title:, additional_properties: nil)
29
+ def initialize(payload:, title:, metadata: OMIT, additional_properties: nil)
30
+ @metadata = metadata if metadata != OMIT
27
31
  @payload = payload
28
32
  @title = title
29
33
  @additional_properties = additional_properties
30
- @_field_set = { "payload": payload, "title": title }
34
+ @_field_set = { "metadata": metadata, "payload": payload, "title": title }.reject do |_k, v|
35
+ v == OMIT
36
+ end
31
37
  end
32
38
 
33
39
  # Deserialize a JSON object to an instance of RcsButtonCall
@@ -37,9 +43,11 @@ module Pinnacle
37
43
  def self.from_json(json_object:)
38
44
  struct = JSON.parse(json_object, object_class: OpenStruct)
39
45
  parsed_json = JSON.parse(json_object)
46
+ metadata = parsed_json["metadata"]
40
47
  payload = parsed_json["payload"]
41
48
  title = parsed_json["title"]
42
49
  new(
50
+ metadata: metadata,
43
51
  payload: payload,
44
52
  title: title,
45
53
  additional_properties: struct
@@ -60,6 +68,7 @@ module Pinnacle
60
68
  # @param obj [Object]
61
69
  # @return [Void]
62
70
  def self.validate_raw(obj:)
71
+ obj.metadata&.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
63
72
  obj.payload.is_a?(String) != false || raise("Passed value for field obj.payload is not the expected type, validation failed.")
64
73
  obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
65
74
  end
@@ -7,6 +7,8 @@ module Pinnacle
7
7
  module Types
8
8
  # Button that opens a URL when tapped by the recipient.
9
9
  class RcsButtonOpenUrl
10
+ # @return [String] Optional additional data to attach to this button.
11
+ attr_reader :metadata
10
12
  # @return [String] The URL to open when the button is tapped. Must be a valid HTTP or HTTPS URL.
11
13
  attr_reader :payload
12
14
  # @return [String] Display text for the button.
@@ -19,15 +21,19 @@ module Pinnacle
19
21
 
20
22
  OMIT = Object.new
21
23
 
24
+ # @param metadata [String] Optional additional data to attach to this button.
22
25
  # @param payload [String] The URL to open when the button is tapped. Must be a valid HTTP or HTTPS URL.
23
26
  # @param title [String] Display text for the button.
24
27
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
25
28
  # @return [Pinnacle::Types::RcsButtonOpenUrl]
26
- def initialize(payload:, title:, additional_properties: nil)
29
+ def initialize(payload:, title:, metadata: OMIT, additional_properties: nil)
30
+ @metadata = metadata if metadata != OMIT
27
31
  @payload = payload
28
32
  @title = title
29
33
  @additional_properties = additional_properties
30
- @_field_set = { "payload": payload, "title": title }
34
+ @_field_set = { "metadata": metadata, "payload": payload, "title": title }.reject do |_k, v|
35
+ v == OMIT
36
+ end
31
37
  end
32
38
 
33
39
  # Deserialize a JSON object to an instance of RcsButtonOpenUrl
@@ -37,9 +43,11 @@ module Pinnacle
37
43
  def self.from_json(json_object:)
38
44
  struct = JSON.parse(json_object, object_class: OpenStruct)
39
45
  parsed_json = JSON.parse(json_object)
46
+ metadata = parsed_json["metadata"]
40
47
  payload = parsed_json["payload"]
41
48
  title = parsed_json["title"]
42
49
  new(
50
+ metadata: metadata,
43
51
  payload: payload,
44
52
  title: title,
45
53
  additional_properties: struct
@@ -60,6 +68,7 @@ module Pinnacle
60
68
  # @param obj [Object]
61
69
  # @return [Void]
62
70
  def self.validate_raw(obj:)
71
+ obj.metadata&.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
63
72
  obj.payload.is_a?(String) != false || raise("Passed value for field obj.payload is not the expected type, validation failed.")
64
73
  obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
65
74
  end
@@ -7,6 +7,8 @@ module Pinnacle
7
7
  module Types
8
8
  # Button that prompts the recipient to share their current location.
9
9
  class RcsButtonRequestUserLocation
10
+ # @return [String] Optional additional data to attach to this button.
11
+ attr_reader :metadata
10
12
  # @return [String] Display text for the button.
11
13
  attr_reader :title
12
14
  # @return [OpenStruct] Additional properties unmapped to the current class definition
@@ -17,13 +19,17 @@ module Pinnacle
17
19
 
18
20
  OMIT = Object.new
19
21
 
22
+ # @param metadata [String] Optional additional data to attach to this button.
20
23
  # @param title [String] Display text for the button.
21
24
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
22
25
  # @return [Pinnacle::Types::RcsButtonRequestUserLocation]
23
- def initialize(title:, additional_properties: nil)
26
+ def initialize(title:, metadata: OMIT, additional_properties: nil)
27
+ @metadata = metadata if metadata != OMIT
24
28
  @title = title
25
29
  @additional_properties = additional_properties
26
- @_field_set = { "title": title }
30
+ @_field_set = { "metadata": metadata, "title": title }.reject do |_k, v|
31
+ v == OMIT
32
+ end
27
33
  end
28
34
 
29
35
  # Deserialize a JSON object to an instance of RcsButtonRequestUserLocation
@@ -33,8 +39,13 @@ module Pinnacle
33
39
  def self.from_json(json_object:)
34
40
  struct = JSON.parse(json_object, object_class: OpenStruct)
35
41
  parsed_json = JSON.parse(json_object)
42
+ metadata = parsed_json["metadata"]
36
43
  title = parsed_json["title"]
37
- new(title: title, additional_properties: struct)
44
+ new(
45
+ metadata: metadata,
46
+ title: title,
47
+ additional_properties: struct
48
+ )
38
49
  end
39
50
 
40
51
  # Serialize an instance of RcsButtonRequestUserLocation to a JSON object
@@ -51,6 +62,7 @@ module Pinnacle
51
62
  # @param obj [Object]
52
63
  # @return [Void]
53
64
  def self.validate_raw(obj:)
65
+ obj.metadata&.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
54
66
  obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
55
67
  end
56
68
  end
@@ -15,6 +15,8 @@ module Pinnacle
15
15
  attr_reader :event_start_time
16
16
  # @return [String] Title of the event.
17
17
  attr_reader :event_title
18
+ # @return [String] Optional additional data to attach to this button.
19
+ attr_reader :metadata
18
20
  # @return [String] Display text for the button.
19
21
  attr_reader :title
20
22
  # @return [OpenStruct] Additional properties unmapped to the current class definition
@@ -29,15 +31,17 @@ module Pinnacle
29
31
  # @param event_end_time [String] End time in ISO 8601 format.
30
32
  # @param event_start_time [String] Starting time in ISO 8601 format.
31
33
  # @param event_title [String] Title of the event.
34
+ # @param metadata [String] Optional additional data to attach to this button.
32
35
  # @param title [String] Display text for the button.
33
36
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
34
37
  # @return [Pinnacle::Types::RcsButtonScheduleEvent]
35
- def initialize(event_end_time:, event_start_time:, event_title:, title:, event_description: OMIT,
38
+ def initialize(event_end_time:, event_start_time:, event_title:, title:, event_description: OMIT, metadata: OMIT,
36
39
  additional_properties: nil)
37
40
  @event_description = event_description if event_description != OMIT
38
41
  @event_end_time = event_end_time
39
42
  @event_start_time = event_start_time
40
43
  @event_title = event_title
44
+ @metadata = metadata if metadata != OMIT
41
45
  @title = title
42
46
  @additional_properties = additional_properties
43
47
  @_field_set = {
@@ -45,6 +49,7 @@ module Pinnacle
45
49
  "eventEndTime": event_end_time,
46
50
  "eventStartTime": event_start_time,
47
51
  "eventTitle": event_title,
52
+ "metadata": metadata,
48
53
  "title": title
49
54
  }.reject do |_k, v|
50
55
  v == OMIT
@@ -62,12 +67,14 @@ module Pinnacle
62
67
  event_end_time = parsed_json["eventEndTime"]
63
68
  event_start_time = parsed_json["eventStartTime"]
64
69
  event_title = parsed_json["eventTitle"]
70
+ metadata = parsed_json["metadata"]
65
71
  title = parsed_json["title"]
66
72
  new(
67
73
  event_description: event_description,
68
74
  event_end_time: event_end_time,
69
75
  event_start_time: event_start_time,
70
76
  event_title: event_title,
77
+ metadata: metadata,
71
78
  title: title,
72
79
  additional_properties: struct
73
80
  )
@@ -91,6 +98,7 @@ module Pinnacle
91
98
  obj.event_end_time.is_a?(String) != false || raise("Passed value for field obj.event_end_time is not the expected type, validation failed.")
92
99
  obj.event_start_time.is_a?(String) != false || raise("Passed value for field obj.event_start_time is not the expected type, validation failed.")
93
100
  obj.event_title.is_a?(String) != false || raise("Passed value for field obj.event_title is not the expected type, validation failed.")
101
+ obj.metadata&.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
94
102
  obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
95
103
  end
96
104
  end