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
@@ -1,73 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "click_action_data"
4
- require "ostruct"
5
- require "json"
6
-
7
- module Pinnacle
8
- module Types
9
- class ClickAction
10
- # @return [String] Title of the button or quick reply that was clicked on.
11
- attr_reader :button
12
- # @return [Pinnacle::Types::ClickActionData] Payload received from the button interaction.
13
- attr_reader :data
14
- # @return [OpenStruct] Additional properties unmapped to the current class definition
15
- attr_reader :additional_properties
16
- # @return [Object]
17
- attr_reader :_field_set
18
- protected :_field_set
19
-
20
- OMIT = Object.new
21
-
22
- # @param button [String] Title of the button or quick reply that was clicked on.
23
- # @param data [Pinnacle::Types::ClickActionData] Payload received from the button interaction.
24
- # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
25
- # @return [Pinnacle::Types::ClickAction]
26
- def initialize(button:, data:, additional_properties: nil)
27
- @button = button
28
- @data = data
29
- @additional_properties = additional_properties
30
- @_field_set = { "button": button, "data": data }
31
- end
32
-
33
- # Deserialize a JSON object to an instance of ClickAction
34
- #
35
- # @param json_object [String]
36
- # @return [Pinnacle::Types::ClickAction]
37
- def self.from_json(json_object:)
38
- struct = JSON.parse(json_object, object_class: OpenStruct)
39
- parsed_json = JSON.parse(json_object)
40
- button = parsed_json["button"]
41
- if parsed_json["data"].nil?
42
- data = nil
43
- else
44
- data = parsed_json["data"].to_json
45
- data = Pinnacle::Types::ClickActionData.from_json(json_object: data)
46
- end
47
- new(
48
- button: button,
49
- data: data,
50
- additional_properties: struct
51
- )
52
- end
53
-
54
- # Serialize an instance of ClickAction to a JSON object
55
- #
56
- # @return [String]
57
- def to_json(*_args)
58
- @_field_set&.to_json
59
- end
60
-
61
- # Leveraged for Union-type generation, validate_raw attempts to parse the given
62
- # hash and check each fields type against the current object's property
63
- # definitions.
64
- #
65
- # @param obj [Object]
66
- # @return [Void]
67
- def self.validate_raw(obj:)
68
- obj.button.is_a?(String) != false || raise("Passed value for field obj.button is not the expected type, validation failed.")
69
- Pinnacle::Types::ClickActionData.validate_raw(obj: obj.data)
70
- end
71
- end
72
- end
73
- end
@@ -1,69 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "ostruct"
4
- require "json"
5
-
6
- module Pinnacle
7
- module Types
8
- # Data that is attached to the button. <br>
9
- # This is only returned when `trigger` buttons are pressed.
10
- class ClickActionDataMetadata
11
- # @return [String] Additional metadata attached to the interaction.
12
- attr_reader :metadata
13
- # @return [String] Payload associated with the button.
14
- attr_reader :payload
15
- # @return [OpenStruct] Additional properties unmapped to the current class definition
16
- attr_reader :additional_properties
17
- # @return [Object]
18
- attr_reader :_field_set
19
- protected :_field_set
20
-
21
- OMIT = Object.new
22
-
23
- # @param metadata [String] Additional metadata attached to the interaction.
24
- # @param payload [String] Payload associated with the button.
25
- # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
26
- # @return [Pinnacle::Types::ClickActionDataMetadata]
27
- def initialize(metadata:, payload:, additional_properties: nil)
28
- @metadata = metadata
29
- @payload = payload
30
- @additional_properties = additional_properties
31
- @_field_set = { "metadata": metadata, "payload": payload }
32
- end
33
-
34
- # Deserialize a JSON object to an instance of ClickActionDataMetadata
35
- #
36
- # @param json_object [String]
37
- # @return [Pinnacle::Types::ClickActionDataMetadata]
38
- def self.from_json(json_object:)
39
- struct = JSON.parse(json_object, object_class: OpenStruct)
40
- parsed_json = JSON.parse(json_object)
41
- metadata = parsed_json["metadata"]
42
- payload = parsed_json["payload"]
43
- new(
44
- metadata: metadata,
45
- payload: payload,
46
- additional_properties: struct
47
- )
48
- end
49
-
50
- # Serialize an instance of ClickActionDataMetadata to a JSON object
51
- #
52
- # @return [String]
53
- def to_json(*_args)
54
- @_field_set&.to_json
55
- end
56
-
57
- # Leveraged for Union-type generation, validate_raw attempts to parse the given
58
- # hash and check each fields type against the current object's property
59
- # definitions.
60
- #
61
- # @param obj [Object]
62
- # @return [Void]
63
- def self.validate_raw(obj:)
64
- obj.metadata.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
65
- obj.payload.is_a?(String) != false || raise("Passed value for field obj.payload is not the expected type, validation failed.")
66
- end
67
- end
68
- end
69
- end