rcs 2.0.0.pre.rc.4 → 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 (127) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rcs/brands/client.rb +36 -24
  3. data/lib/rcs/campaigns/dlc/client.rb +44 -34
  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/rcs/types/upsert_rcs_agent.rb +4 -4
  7. data/lib/rcs/campaigns/toll_free/client.rb +32 -26
  8. data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +6 -6
  9. data/lib/rcs/contacts/client.rb +10 -8
  10. data/lib/rcs/conversations/client.rb +142 -14
  11. data/lib/rcs/conversations/types/conversations_list_messages_request_direction.rb +12 -0
  12. data/lib/rcs/conversations/types/conversations_list_messages_request_sort_order.rb +12 -0
  13. data/lib/rcs/conversations/types/conversations_list_messages_request_status.rb +17 -0
  14. data/lib/rcs/conversations/types/conversations_list_messages_request_type.rb +13 -0
  15. data/lib/rcs/messages/client.rb +12 -29
  16. data/lib/rcs/messages/mms/client.rb +2 -2
  17. data/lib/rcs/messages/rcs/client.rb +1 -1
  18. data/lib/rcs/messages/sms/client.rb +2 -2
  19. data/lib/rcs/phone_numbers/campaign/client.rb +20 -6
  20. data/lib/rcs/phone_numbers/client.rb +0 -14
  21. data/lib/rcs/phone_numbers/webhook/client.rb +12 -10
  22. data/lib/rcs/rcs/client.rb +330 -0
  23. data/lib/rcs/status/get/client.rb +34 -18
  24. data/lib/rcs/tools/contact_card/client.rb +18 -8
  25. data/lib/rcs/tools/file/client.rb +92 -2
  26. data/lib/rcs/tools/file/types/upload_file_options.rb +21 -3
  27. data/lib/rcs/tools/url/client.rb +4 -2
  28. data/lib/rcs/types/attach_webhook_by_id_params.rb +5 -5
  29. data/lib/rcs/types/attach_webhook_response_webhook.rb +5 -3
  30. data/lib/rcs/types/autofill_campaign_params.rb +15 -3
  31. data/lib/rcs/types/autofill_dlc_campaign_response.rb +10 -6
  32. data/lib/rcs/types/autofill_dlc_response_keywords.rb +8 -10
  33. data/lib/rcs/types/autofill_dlc_response_keywords_help.rb +3 -3
  34. data/lib/rcs/types/autofill_dlc_response_keywords_opt_in.rb +6 -4
  35. data/lib/rcs/types/autofill_dlc_response_keywords_opt_out.rb +3 -3
  36. data/lib/rcs/types/autofill_dlc_response_options.rb +12 -12
  37. data/lib/rcs/types/brand_status.rb +5 -3
  38. data/lib/rcs/types/{inbound_button.rb → button_clicked.rb} +7 -7
  39. data/lib/rcs/types/button_clicked_data.rb +80 -0
  40. data/lib/rcs/types/button_clicked_data_button.rb +118 -0
  41. data/lib/rcs/types/{click_action_data.rb → button_clicked_data_button_raw.rb} +10 -8
  42. data/lib/rcs/types/button_clicked_data_button_type.rb +15 -0
  43. data/lib/rcs/types/campaign_query.rb +10 -2
  44. data/lib/rcs/types/contact.rb +5 -3
  45. data/lib/rcs/types/contact_id.rb +5 -3
  46. data/lib/rcs/types/conversation.rb +16 -8
  47. data/lib/rcs/types/conversation_by_id_params.rb +7 -3
  48. data/lib/rcs/types/conversation_contact.rb +5 -3
  49. data/lib/rcs/types/create_url_options.rb +4 -2
  50. data/lib/rcs/types/detached_webhook_info.rb +5 -3
  51. data/lib/rcs/types/dlc_campaign_status.rb +7 -5
  52. data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +21 -19
  53. data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_help.rb +3 -3
  54. data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_opt_in.rb +6 -4
  55. data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_opt_out.rb +6 -4
  56. data/lib/rcs/types/extended_brand.rb +25 -13
  57. data/lib/rcs/types/extended_brand_with_vetting.rb +25 -13
  58. data/lib/rcs/types/extended_rcs_campaign.rb +25 -14
  59. data/lib/rcs/types/get_dlc_campaign_status_response_updates.rb +1 -1
  60. data/lib/rcs/types/link_click_event.rb +1 -17
  61. data/lib/rcs/types/message.rb +5 -3
  62. data/lib/rcs/types/message_content.rb +4 -4
  63. data/lib/rcs/types/message_event.rb +143 -0
  64. data/lib/rcs/types/message_event_content.rb +127 -0
  65. data/lib/rcs/types/message_event_conversation.rb +82 -0
  66. data/lib/rcs/types/message_event_direction.rb +11 -0
  67. data/lib/rcs/types/message_event_mms_content.rb +94 -0
  68. data/lib/rcs/types/message_event_rcs_button_data.rb +104 -0
  69. data/lib/rcs/types/message_event_rcs_cards_content.rb +99 -0
  70. data/lib/rcs/types/message_event_rcs_cards_content_cards_item.rb +94 -0
  71. data/lib/rcs/types/message_event_rcs_location_data.rb +91 -0
  72. data/lib/rcs/types/message_event_rcs_media_content.rb +94 -0
  73. data/lib/rcs/types/message_event_rcs_text_content.rb +92 -0
  74. data/lib/rcs/types/message_event_sms_content.rb +81 -0
  75. data/lib/rcs/types/message_list.rb +79 -0
  76. data/lib/rcs/types/message_schedule.rb +4 -5
  77. data/lib/rcs/types/message_with_reaction.rb +197 -0
  78. data/lib/rcs/types/message_with_reaction_direction.rb +11 -0
  79. data/lib/rcs/types/not_found_error_body.rb +59 -0
  80. data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item_campaign.rb +7 -3
  81. data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item_campaign.rb +7 -3
  82. data/lib/rcs/types/pinnacle_file_upload_metadata.rb +18 -2
  83. data/lib/rcs/types/profile_status_enum.rb +4 -4
  84. data/lib/rcs/types/rcs_base_options.rb +12 -1
  85. data/lib/rcs/types/rcs_button_call.rb +11 -2
  86. data/lib/rcs/types/rcs_button_open_url.rb +11 -2
  87. data/lib/rcs/types/rcs_button_request_user_location.rb +15 -3
  88. data/lib/rcs/types/rcs_button_schedule_event.rb +9 -1
  89. data/lib/rcs/types/rcs_button_send_location.rb +11 -2
  90. data/lib/rcs/types/rcs_button_trigger.rb +8 -6
  91. data/lib/rcs/types/rcs_campaign.rb +3 -3
  92. data/lib/rcs/types/rcs_campaign_schema_agent.rb +4 -4
  93. data/lib/rcs/types/rcs_campaign_schema_extra_agent.rb +12 -12
  94. data/lib/rcs/types/rcs_campaign_status.rb +5 -3
  95. data/lib/rcs/types/rcs_capabilities_result.rb +7 -0
  96. data/lib/rcs/types/rcs_capability.rb +82 -0
  97. data/lib/rcs/types/rcs_capability_actions.rb +105 -0
  98. data/lib/rcs/types/rcs_capability_cards.rb +67 -0
  99. data/lib/rcs/types/rcs_link_result.rb +75 -0
  100. data/lib/rcs/types/rcs_validate_content_media.rb +17 -3
  101. data/lib/rcs/types/rcs_whitelist_response.rb +58 -0
  102. data/lib/rcs/types/reaction_result.rb +10 -6
  103. data/lib/rcs/types/refreshed_file.rb +67 -0
  104. data/lib/rcs/types/{rcs.rb → rich_message.rb} +3 -3
  105. data/lib/rcs/types/scheduled_messaage.rb +5 -3
  106. data/lib/rcs/types/sent_mms_details.rb +4 -2
  107. data/lib/rcs/types/sent_rcs_details.rb +12 -13
  108. data/lib/rcs/types/sent_sms_details.rb +5 -3
  109. data/lib/rcs/types/toll_free_campaign.rb +3 -3
  110. data/lib/rcs/types/toll_free_campaign_status.rb +5 -3
  111. data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +3 -5
  112. data/lib/rcs/types/updated_contact_id.rb +5 -3
  113. data/lib/rcs/types/user_event.rb +83 -0
  114. data/lib/rcs/types/user_event_conversation.rb +78 -0
  115. data/lib/rcs/types/v_card_data.rb +5 -3
  116. data/lib/rcs/types/validate_campaign_params.rb +15 -3
  117. data/lib/rcs/types/vcard.rb +5 -3
  118. data/lib/rcs/types/vcard_content.rb +5 -3
  119. data/lib/rcs/types/vcard_resource.rb +5 -3
  120. data/lib/rcs/types/webhook_event_enum.rb +1 -0
  121. data/lib/rcs/types/webhooks.rb +5 -3
  122. data/lib/rcs.rb +7 -0
  123. data/lib/requests.rb +2 -2
  124. data/lib/types_export.rb +35 -5
  125. metadata +40 -9
  126. data/lib/rcs/types/click_action.rb +0 -73
  127. data/lib/rcs/types/click_action_data_metadata.rb +0 -69
@@ -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
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Pinnacle
7
+ module Types
8
+ class NotFoundErrorBody
9
+ # @return [String]
10
+ attr_reader :error
11
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
12
+ attr_reader :additional_properties
13
+ # @return [Object]
14
+ attr_reader :_field_set
15
+ protected :_field_set
16
+
17
+ OMIT = Object.new
18
+
19
+ # @param error [String]
20
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
21
+ # @return [Pinnacle::Types::NotFoundErrorBody]
22
+ def initialize(error: OMIT, additional_properties: nil)
23
+ @error = error if error != OMIT
24
+ @additional_properties = additional_properties
25
+ @_field_set = { "error": error }.reject do |_k, v|
26
+ v == OMIT
27
+ end
28
+ end
29
+
30
+ # Deserialize a JSON object to an instance of NotFoundErrorBody
31
+ #
32
+ # @param json_object [String]
33
+ # @return [Pinnacle::Types::NotFoundErrorBody]
34
+ def self.from_json(json_object:)
35
+ struct = JSON.parse(json_object, object_class: OpenStruct)
36
+ parsed_json = JSON.parse(json_object)
37
+ error = parsed_json["error"]
38
+ new(error: error, additional_properties: struct)
39
+ end
40
+
41
+ # Serialize an instance of NotFoundErrorBody to a JSON object
42
+ #
43
+ # @return [String]
44
+ def to_json(*_args)
45
+ @_field_set&.to_json
46
+ end
47
+
48
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
49
+ # hash and check each fields type against the current object's property
50
+ # definitions.
51
+ #
52
+ # @param obj [Object]
53
+ # @return [Void]
54
+ def self.validate_raw(obj:)
55
+ obj.error&.is_a?(String) != false || raise("Passed value for field obj.error is not the expected type, validation failed.")
56
+ end
57
+ end
58
+ end
59
+ end
@@ -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
@@ -10,6 +10,8 @@ module Pinnacle
10
10
  class RcsButtonSendLocation
11
11
  # @return [Pinnacle::Types::RcsButtonSendLocationLatLong] Geographic coordinates of the location to share.
12
12
  attr_reader :lat_long
13
+ # @return [String] Optional additional data to attach to this button.
14
+ attr_reader :metadata
13
15
  # @return [String] Display text for the button.
14
16
  attr_reader :title
15
17
  # @return [OpenStruct] Additional properties unmapped to the current class definition
@@ -21,14 +23,18 @@ module Pinnacle
21
23
  OMIT = Object.new
22
24
 
23
25
  # @param lat_long [Pinnacle::Types::RcsButtonSendLocationLatLong] Geographic coordinates of the location to share.
26
+ # @param metadata [String] Optional additional data to attach to this button.
24
27
  # @param title [String] Display text for the button.
25
28
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
26
29
  # @return [Pinnacle::Types::RcsButtonSendLocation]
27
- def initialize(lat_long:, title:, additional_properties: nil)
30
+ def initialize(lat_long:, title:, metadata: OMIT, additional_properties: nil)
28
31
  @lat_long = lat_long
32
+ @metadata = metadata if metadata != OMIT
29
33
  @title = title
30
34
  @additional_properties = additional_properties
31
- @_field_set = { "latLong": lat_long, "title": title }
35
+ @_field_set = { "latLong": lat_long, "metadata": metadata, "title": title }.reject do |_k, v|
36
+ v == OMIT
37
+ end
32
38
  end
33
39
 
34
40
  # Deserialize a JSON object to an instance of RcsButtonSendLocation
@@ -44,9 +50,11 @@ module Pinnacle
44
50
  lat_long = parsed_json["latLong"].to_json
45
51
  lat_long = Pinnacle::Types::RcsButtonSendLocationLatLong.from_json(json_object: lat_long)
46
52
  end
53
+ metadata = parsed_json["metadata"]
47
54
  title = parsed_json["title"]
48
55
  new(
49
56
  lat_long: lat_long,
57
+ metadata: metadata,
50
58
  title: title,
51
59
  additional_properties: struct
52
60
  )
@@ -67,6 +75,7 @@ module Pinnacle
67
75
  # @return [Void]
68
76
  def self.validate_raw(obj:)
69
77
  Pinnacle::Types::RcsButtonSendLocationLatLong.validate_raw(obj: obj.lat_long)
78
+ obj.metadata&.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
70
79
  obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
71
80
  end
72
81
  end
@@ -8,7 +8,7 @@ module Pinnacle
8
8
  # Button that sends custom data back to your application when tapped by the
9
9
  # recipient.
10
10
  class RcsButtonTrigger
11
- # @return [String] Additional data attached to the button interaction.
11
+ # @return [String] Optional additional data to attach to this button.
12
12
  attr_reader :metadata
13
13
  # @return [String] Custom data sent to your webhook when the button is tapped. Use this to identify
14
14
  # the user's choice.
@@ -23,18 +23,20 @@ module Pinnacle
23
23
 
24
24
  OMIT = Object.new
25
25
 
26
- # @param metadata [String] Additional data attached to the button interaction.
26
+ # @param metadata [String] Optional additional data to attach to this button.
27
27
  # @param payload [String] Custom data sent to your webhook when the button is tapped. Use this to identify
28
28
  # the user's choice.
29
29
  # @param title [String] Display text for the button.
30
30
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
31
31
  # @return [Pinnacle::Types::RcsButtonTrigger]
32
- def initialize(metadata:, payload:, title:, additional_properties: nil)
33
- @metadata = metadata
32
+ def initialize(payload:, title:, metadata: OMIT, additional_properties: nil)
33
+ @metadata = metadata if metadata != OMIT
34
34
  @payload = payload
35
35
  @title = title
36
36
  @additional_properties = additional_properties
37
- @_field_set = { "metadata": metadata, "payload": payload, "title": title }
37
+ @_field_set = { "metadata": metadata, "payload": payload, "title": title }.reject do |_k, v|
38
+ v == OMIT
39
+ end
38
40
  end
39
41
 
40
42
  # Deserialize a JSON object to an instance of RcsButtonTrigger
@@ -69,7 +71,7 @@ module Pinnacle
69
71
  # @param obj [Object]
70
72
  # @return [Void]
71
73
  def self.validate_raw(obj:)
72
- obj.metadata.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
74
+ obj.metadata&.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
73
75
  obj.payload.is_a?(String) != false || raise("Passed value for field obj.payload is not the expected type, validation failed.")
74
76
  obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
75
77
  end
@@ -13,7 +13,7 @@ module Pinnacle
13
13
  class RcsCampaign
14
14
  # @return [Pinnacle::Types::RcsCampaignSchemaAgent] Agent configured to the campaign.
15
15
  attr_reader :agent
16
- # @return [Integer] Unique identifier for the campaign.
16
+ # @return [String] Unique identifier for the campaign.
17
17
  attr_reader :campaign_id
18
18
  # @return [String] Link to document verifying the brand's name. This may be the certificate of
19
19
  # incorporation, business license, or other relevant document. You can typically
@@ -38,7 +38,7 @@ module Pinnacle
38
38
  OMIT = Object.new
39
39
 
40
40
  # @param agent [Pinnacle::Types::RcsCampaignSchemaAgent] Agent configured to the campaign.
41
- # @param campaign_id [Integer] Unique identifier for the campaign.
41
+ # @param campaign_id [String] Unique identifier for the campaign.
42
42
  # @param brand_verification_url [String] Link to document verifying the brand's name. This may be the certificate of
43
43
  # incorporation, business license, or other relevant document. You can typically
44
44
  # find this on the Secretary of State website.
@@ -142,7 +142,7 @@ module Pinnacle
142
142
  # @return [Void]
143
143
  def self.validate_raw(obj:)
144
144
  obj.agent.nil? || Pinnacle::Types::RcsCampaignSchemaAgent.validate_raw(obj: obj.agent)
145
- obj.campaign_id&.is_a?(Integer) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
145
+ obj.campaign_id&.is_a?(String) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
146
146
  obj.brand_verification_url&.is_a?(String) != false || raise("Passed value for field obj.brand_verification_url is not the expected type, validation failed.")
147
147
  obj.expected_agent_responses&.is_a?(Array) != false || raise("Passed value for field obj.expected_agent_responses is not the expected type, validation failed.")
148
148
  obj.links.nil? || Pinnacle::Types::RcsCampaignSchemaLinks.validate_raw(obj: obj.links)
@@ -22,9 +22,9 @@ module Pinnacle
22
22
  attr_reader :phones
23
23
  # @return [Array<Pinnacle::Types::RcsCampaignSchemaAgentWebsitesItem>] List of urls.
24
24
  attr_reader :websites
25
- # @return [String] Link to the agent's hero.
25
+ # @return [String] Link to the agent's hero. Hero must be an image file with dimensions 1440x448px.
26
26
  attr_reader :hero_url
27
- # @return [String] Link to the agent's icon.
27
+ # @return [String] Link to the agent's icon. Icon must be an image file with dimensions 224x224px.
28
28
  attr_reader :icon_url
29
29
  # @return [OpenStruct] Additional properties unmapped to the current class definition
30
30
  attr_reader :additional_properties
@@ -40,8 +40,8 @@ module Pinnacle
40
40
  # @param emails [Array<Pinnacle::Types::RcsCampaignSchemaAgentEmailsItem>] List of emails.
41
41
  # @param phones [Array<Pinnacle::Types::RcsCampaignSchemaAgentPhonesItem>] List of phone numbers.
42
42
  # @param websites [Array<Pinnacle::Types::RcsCampaignSchemaAgentWebsitesItem>] List of urls.
43
- # @param hero_url [String] Link to the agent's hero.
44
- # @param icon_url [String] Link to the agent's icon.
43
+ # @param hero_url [String] Link to the agent's hero. Hero must be an image file with dimensions 1440x448px.
44
+ # @param icon_url [String] Link to the agent's icon. Icon must be an image file with dimensions 224x224px.
45
45
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
46
46
  # @return [Pinnacle::Types::RcsCampaignSchemaAgent]
47
47
  def initialize(name: OMIT, description: OMIT, color: OMIT, emails: OMIT, phones: OMIT, websites: OMIT,