sentdm 0.30.0 → 0.31.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +29 -1
- data/lib/sentdm/internal/contacts_page.rb +115 -0
- data/lib/sentdm/internal/conversations_page.rb +115 -0
- data/lib/sentdm/internal/templates_page.rb +115 -0
- data/lib/sentdm/internal/webhook_events_page.rb +115 -0
- data/lib/sentdm/internal/webhooks_page.rb +115 -0
- data/lib/sentdm/models/api_response_of_conversation_messages_list.rb +0 -1
- data/lib/sentdm/models/contact_list_params.rb +13 -13
- data/lib/sentdm/models/contact_response.rb +1 -0
- data/lib/sentdm/models/conversation_list_messages_params.rb +5 -5
- data/lib/sentdm/models/conversation_list_params.rb +5 -5
- data/lib/sentdm/models/template.rb +1 -0
- data/lib/sentdm/models/template_list_params.rb +17 -17
- data/lib/sentdm/models/webhook_list_events_params.rb +5 -5
- data/lib/sentdm/models/webhook_list_events_response.rb +108 -168
- data/lib/sentdm/models/webhook_list_params.rb +11 -11
- data/lib/sentdm/models/webhook_response.rb +1 -0
- data/lib/sentdm/resources/contacts.rb +8 -7
- data/lib/sentdm/resources/conversations.rb +10 -8
- data/lib/sentdm/resources/templates.rb +10 -9
- data/lib/sentdm/resources/webhooks.rb +12 -10
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +5 -3
- data/rbi/sentdm/internal/contacts_page.rbi +71 -0
- data/rbi/sentdm/internal/conversations_page.rbi +71 -0
- data/rbi/sentdm/internal/templates_page.rbi +71 -0
- data/rbi/sentdm/internal/webhook_events_page.rbi +71 -0
- data/rbi/sentdm/internal/webhooks_page.rbi +71 -0
- data/rbi/sentdm/models/contact_list_params.rbi +19 -13
- data/rbi/sentdm/models/conversation_list_messages_params.rbi +12 -6
- data/rbi/sentdm/models/conversation_list_params.rbi +16 -5
- data/rbi/sentdm/models/template_list_params.rbi +22 -16
- data/rbi/sentdm/models/webhook_list_events_params.rbi +12 -6
- data/rbi/sentdm/models/webhook_list_events_response.rbi +114 -263
- data/rbi/sentdm/models/webhook_list_params.rbi +16 -10
- data/rbi/sentdm/resources/contacts.rbi +6 -6
- data/rbi/sentdm/resources/conversations.rbi +14 -6
- data/rbi/sentdm/resources/templates.rbi +7 -7
- data/rbi/sentdm/resources/webhooks.rbi +12 -8
- data/sig/sentdm/internal/contacts_page.rbs +41 -0
- data/sig/sentdm/internal/conversations_page.rbs +41 -0
- data/sig/sentdm/internal/templates_page.rbs +44 -0
- data/sig/sentdm/internal/webhook_events_page.rbs +41 -0
- data/sig/sentdm/internal/webhooks_page.rbs +41 -0
- data/sig/sentdm/models/contact_list_params.rbs +11 -7
- data/sig/sentdm/models/conversation_list_messages_params.rbs +8 -4
- data/sig/sentdm/models/conversation_list_params.rbs +8 -4
- data/sig/sentdm/models/template_list_params.rbs +14 -10
- data/sig/sentdm/models/webhook_list_events_params.rbs +8 -4
- data/sig/sentdm/models/webhook_list_events_response.rbs +63 -127
- data/sig/sentdm/models/webhook_list_params.rbs +11 -7
- data/sig/sentdm/resources/contacts.rbs +3 -3
- data/sig/sentdm/resources/conversations.rbs +6 -6
- data/sig/sentdm/resources/templates.rbs +3 -3
- data/sig/sentdm/resources/webhooks.rbs +6 -6
- metadata +16 -10
- data/lib/sentdm/models/contact_list_response.rb +0 -65
- data/lib/sentdm/models/template_list_response.rb +0 -65
- data/lib/sentdm/models/webhook_list_response.rb +0 -65
- data/rbi/sentdm/models/contact_list_response.rbi +0 -128
- data/rbi/sentdm/models/template_list_response.rbi +0 -128
- data/rbi/sentdm/models/webhook_list_response.rbi +0 -128
- data/sig/sentdm/models/contact_list_response.rbs +0 -67
- data/sig/sentdm/models/template_list_response.rbs +0 -65
- data/sig/sentdm/models/webhook_list_response.rbs +0 -67
|
@@ -7,23 +7,23 @@ module Sentdm
|
|
|
7
7
|
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Sentdm::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute channel
|
|
11
|
+
# Optional channel filter (sms, whatsapp)
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
optional :channel, String, nil?: true
|
|
15
|
+
|
|
10
16
|
# @!attribute page
|
|
11
17
|
# Page number (1-indexed)
|
|
12
18
|
#
|
|
13
|
-
# @return [Integer]
|
|
14
|
-
|
|
19
|
+
# @return [Integer, nil]
|
|
20
|
+
optional :page, Integer
|
|
15
21
|
|
|
16
22
|
# @!attribute page_size
|
|
17
23
|
# Number of items per page
|
|
18
24
|
#
|
|
19
|
-
# @return [Integer]
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# @!attribute channel
|
|
23
|
-
# Optional channel filter (sms, whatsapp)
|
|
24
|
-
#
|
|
25
|
-
# @return [String, nil]
|
|
26
|
-
optional :channel, String, nil?: true
|
|
25
|
+
# @return [Integer, nil]
|
|
26
|
+
optional :page_size, Integer
|
|
27
27
|
|
|
28
28
|
# @!attribute phone
|
|
29
29
|
# Optional phone number filter (alternative to list view)
|
|
@@ -42,13 +42,13 @@ module Sentdm
|
|
|
42
42
|
# @return [String, nil]
|
|
43
43
|
optional :x_profile_id, String
|
|
44
44
|
|
|
45
|
-
# @!method initialize(page
|
|
45
|
+
# @!method initialize(channel: nil, page: nil, page_size: nil, phone: nil, search: nil, x_profile_id: nil, request_options: {})
|
|
46
|
+
# @param channel [String, nil] Optional channel filter (sms, whatsapp)
|
|
47
|
+
#
|
|
46
48
|
# @param page [Integer] Page number (1-indexed)
|
|
47
49
|
#
|
|
48
50
|
# @param page_size [Integer] Number of items per page
|
|
49
51
|
#
|
|
50
|
-
# @param channel [String, nil] Optional channel filter (sms, whatsapp)
|
|
51
|
-
#
|
|
52
52
|
# @param phone [String, nil] Optional phone number filter (alternative to list view)
|
|
53
53
|
#
|
|
54
54
|
# @param search [String, nil] Optional search term for filtering contacts
|
|
@@ -14,20 +14,20 @@ module Sentdm
|
|
|
14
14
|
|
|
15
15
|
# @!attribute page
|
|
16
16
|
#
|
|
17
|
-
# @return [Integer]
|
|
18
|
-
|
|
17
|
+
# @return [Integer, nil]
|
|
18
|
+
optional :page, Integer
|
|
19
19
|
|
|
20
20
|
# @!attribute page_size
|
|
21
21
|
#
|
|
22
|
-
# @return [Integer]
|
|
23
|
-
|
|
22
|
+
# @return [Integer, nil]
|
|
23
|
+
optional :page_size, Integer
|
|
24
24
|
|
|
25
25
|
# @!attribute x_profile_id
|
|
26
26
|
#
|
|
27
27
|
# @return [String, nil]
|
|
28
28
|
optional :x_profile_id, String
|
|
29
29
|
|
|
30
|
-
# @!method initialize(id:, page
|
|
30
|
+
# @!method initialize(id:, page: nil, page_size: nil, x_profile_id: nil, request_options: {})
|
|
31
31
|
# @param id [String]
|
|
32
32
|
# @param page [Integer]
|
|
33
33
|
# @param page_size [Integer]
|
|
@@ -9,20 +9,20 @@ module Sentdm
|
|
|
9
9
|
|
|
10
10
|
# @!attribute page
|
|
11
11
|
#
|
|
12
|
-
# @return [Integer]
|
|
13
|
-
|
|
12
|
+
# @return [Integer, nil]
|
|
13
|
+
optional :page, Integer
|
|
14
14
|
|
|
15
15
|
# @!attribute page_size
|
|
16
16
|
#
|
|
17
|
-
# @return [Integer]
|
|
18
|
-
|
|
17
|
+
# @return [Integer, nil]
|
|
18
|
+
optional :page_size, Integer
|
|
19
19
|
|
|
20
20
|
# @!attribute x_profile_id
|
|
21
21
|
#
|
|
22
22
|
# @return [String, nil]
|
|
23
23
|
optional :x_profile_id, String
|
|
24
24
|
|
|
25
|
-
# @!method initialize(page
|
|
25
|
+
# @!method initialize(page: nil, page_size: nil, x_profile_id: nil, request_options: {})
|
|
26
26
|
# @param page [Integer]
|
|
27
27
|
# @param page_size [Integer]
|
|
28
28
|
# @param x_profile_id [String]
|
|
@@ -7,18 +7,6 @@ module Sentdm
|
|
|
7
7
|
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Sentdm::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!attribute page
|
|
11
|
-
# Page number (1-indexed)
|
|
12
|
-
#
|
|
13
|
-
# @return [Integer]
|
|
14
|
-
required :page, Integer
|
|
15
|
-
|
|
16
|
-
# @!attribute page_size
|
|
17
|
-
# Number of items per page
|
|
18
|
-
#
|
|
19
|
-
# @return [Integer]
|
|
20
|
-
required :page_size, Integer
|
|
21
|
-
|
|
22
10
|
# @!attribute category
|
|
23
11
|
# Optional category filter: MARKETING, UTILITY, AUTHENTICATION
|
|
24
12
|
#
|
|
@@ -35,6 +23,18 @@ module Sentdm
|
|
|
35
23
|
# @return [Boolean, nil]
|
|
36
24
|
optional :is_welcome_playground, Sentdm::Internal::Type::Boolean, nil?: true
|
|
37
25
|
|
|
26
|
+
# @!attribute page
|
|
27
|
+
# Page number (1-indexed)
|
|
28
|
+
#
|
|
29
|
+
# @return [Integer, nil]
|
|
30
|
+
optional :page, Integer
|
|
31
|
+
|
|
32
|
+
# @!attribute page_size
|
|
33
|
+
# Number of items per page
|
|
34
|
+
#
|
|
35
|
+
# @return [Integer, nil]
|
|
36
|
+
optional :page_size, Integer
|
|
37
|
+
|
|
38
38
|
# @!attribute search
|
|
39
39
|
# Optional search term for filtering templates
|
|
40
40
|
#
|
|
@@ -52,18 +52,18 @@ module Sentdm
|
|
|
52
52
|
# @return [String, nil]
|
|
53
53
|
optional :x_profile_id, String
|
|
54
54
|
|
|
55
|
-
# @!method initialize(
|
|
55
|
+
# @!method initialize(category: nil, is_welcome_playground: nil, page: nil, page_size: nil, search: nil, status: nil, x_profile_id: nil, request_options: {})
|
|
56
56
|
# Some parameter documentations has been truncated, see
|
|
57
57
|
# {Sentdm::Models::TemplateListParams} for more details.
|
|
58
58
|
#
|
|
59
|
-
# @param page [Integer] Page number (1-indexed)
|
|
60
|
-
#
|
|
61
|
-
# @param page_size [Integer] Number of items per page
|
|
62
|
-
#
|
|
63
59
|
# @param category [String, nil] Optional category filter: MARKETING, UTILITY, AUTHENTICATION
|
|
64
60
|
#
|
|
65
61
|
# @param is_welcome_playground [Boolean, nil] Accepted and ignored. It used to filter on the welcome-playground marker inside
|
|
66
62
|
#
|
|
63
|
+
# @param page [Integer] Page number (1-indexed)
|
|
64
|
+
#
|
|
65
|
+
# @param page_size [Integer] Number of items per page
|
|
66
|
+
#
|
|
67
67
|
# @param search [String, nil] Optional search term for filtering templates
|
|
68
68
|
#
|
|
69
69
|
# @param status [String, nil] Optional status filter: APPROVED, PENDING, REJECTED
|
|
@@ -14,13 +14,13 @@ module Sentdm
|
|
|
14
14
|
|
|
15
15
|
# @!attribute page
|
|
16
16
|
#
|
|
17
|
-
# @return [Integer]
|
|
18
|
-
|
|
17
|
+
# @return [Integer, nil]
|
|
18
|
+
optional :page, Integer
|
|
19
19
|
|
|
20
20
|
# @!attribute page_size
|
|
21
21
|
#
|
|
22
|
-
# @return [Integer]
|
|
23
|
-
|
|
22
|
+
# @return [Integer, nil]
|
|
23
|
+
optional :page_size, Integer
|
|
24
24
|
|
|
25
25
|
# @!attribute search
|
|
26
26
|
#
|
|
@@ -32,7 +32,7 @@ module Sentdm
|
|
|
32
32
|
# @return [String, nil]
|
|
33
33
|
optional :x_profile_id, String
|
|
34
34
|
|
|
35
|
-
# @!method initialize(id:, page
|
|
35
|
+
# @!method initialize(id:, page: nil, page_size: nil, search: nil, x_profile_id: nil, request_options: {})
|
|
36
36
|
# @param id [String]
|
|
37
37
|
# @param page [Integer]
|
|
38
38
|
# @param page_size [Integer]
|
|
@@ -4,174 +4,114 @@ module Sentdm
|
|
|
4
4
|
module Models
|
|
5
5
|
# @see Sentdm::Resources::Webhooks#list_events
|
|
6
6
|
class WebhookListEventsResponse < Sentdm::Internal::Type::BaseModel
|
|
7
|
-
# @!attribute
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
# @
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
#
|
|
116
|
-
# @return [Time, nil]
|
|
117
|
-
optional :processing_started_at, Time, nil?: true
|
|
118
|
-
|
|
119
|
-
# @!attribute response_body
|
|
120
|
-
#
|
|
121
|
-
# @return [String, nil]
|
|
122
|
-
optional :response_body, String, nil?: true
|
|
123
|
-
|
|
124
|
-
# @!method initialize(id: nil, created_at: nil, delivery_attempts: nil, delivery_status: nil, error_message: nil, event_data: nil, event_type: nil, http_status_code: nil, processing_completed_at: nil, processing_started_at: nil, response_body: nil)
|
|
125
|
-
# Some parameter documentations has been truncated, see
|
|
126
|
-
# {Sentdm::Models::WebhookListEventsResponse::Data::Event} for more details.
|
|
127
|
-
#
|
|
128
|
-
# @param id [String]
|
|
129
|
-
#
|
|
130
|
-
# @param created_at [Time]
|
|
131
|
-
#
|
|
132
|
-
# @param delivery_attempts [Integer]
|
|
133
|
-
#
|
|
134
|
-
# @param delivery_status [String]
|
|
135
|
-
#
|
|
136
|
-
# @param error_message [String, nil]
|
|
137
|
-
#
|
|
138
|
-
# @param event_data [Sentdm::Models::MessageEvent, Sentdm::Models::InboundMessageEvent, Sentdm::Models::TemplateEvent] The exact event body that was delivered, or attempted, for this record. One of t
|
|
139
|
-
#
|
|
140
|
-
# @param event_type [String]
|
|
141
|
-
#
|
|
142
|
-
# @param http_status_code [Integer, nil]
|
|
143
|
-
#
|
|
144
|
-
# @param processing_completed_at [Time, nil]
|
|
145
|
-
#
|
|
146
|
-
# @param processing_started_at [Time, nil]
|
|
147
|
-
#
|
|
148
|
-
# @param response_body [String, nil]
|
|
149
|
-
|
|
150
|
-
# The exact event body that was delivered, or attempted, for this record. One of
|
|
151
|
-
# the three webhook envelopes: a message status change, an inbound message, or a
|
|
152
|
-
# template status change. Read field and event to tell which, the same way your
|
|
153
|
-
# endpoint does.
|
|
154
|
-
#
|
|
155
|
-
# @see Sentdm::Models::WebhookListEventsResponse::Data::Event#event_data
|
|
156
|
-
module EventData
|
|
157
|
-
extend Sentdm::Internal::Type::Union
|
|
158
|
-
|
|
159
|
-
# The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares this shape and
|
|
160
|
-
# varies only in Payload.
|
|
161
|
-
variant -> { Sentdm::MessageEvent }
|
|
162
|
-
|
|
163
|
-
# The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares this shape and
|
|
164
|
-
# varies only in Payload.
|
|
165
|
-
variant -> { Sentdm::InboundMessageEvent }
|
|
166
|
-
|
|
167
|
-
# The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares this shape and
|
|
168
|
-
# varies only in Payload.
|
|
169
|
-
variant -> { Sentdm::TemplateEvent }
|
|
170
|
-
|
|
171
|
-
# @!method self.variants
|
|
172
|
-
# @return [Array(Sentdm::Models::MessageEvent, Sentdm::Models::InboundMessageEvent, Sentdm::Models::TemplateEvent)]
|
|
173
|
-
end
|
|
174
|
-
end
|
|
7
|
+
# @!attribute id
|
|
8
|
+
#
|
|
9
|
+
# @return [String, nil]
|
|
10
|
+
optional :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute created_at
|
|
13
|
+
#
|
|
14
|
+
# @return [Time, nil]
|
|
15
|
+
optional :created_at, Time
|
|
16
|
+
|
|
17
|
+
# @!attribute delivery_attempts
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer, nil]
|
|
20
|
+
optional :delivery_attempts, Integer
|
|
21
|
+
|
|
22
|
+
# @!attribute delivery_status
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
optional :delivery_status, String
|
|
26
|
+
|
|
27
|
+
# @!attribute error_message
|
|
28
|
+
#
|
|
29
|
+
# @return [String, nil]
|
|
30
|
+
optional :error_message, String, nil?: true
|
|
31
|
+
|
|
32
|
+
# @!attribute event_data
|
|
33
|
+
# The exact event body that was delivered, or attempted, for this record. One of
|
|
34
|
+
# the three webhook envelopes: a message status change, an inbound message, or a
|
|
35
|
+
# template status change. Read field and event to tell which, the same way your
|
|
36
|
+
# endpoint does.
|
|
37
|
+
#
|
|
38
|
+
# @return [Sentdm::Models::MessageEvent, Sentdm::Models::InboundMessageEvent, Sentdm::Models::TemplateEvent, nil]
|
|
39
|
+
optional :event_data, union: -> { Sentdm::Models::WebhookListEventsResponse::EventData }
|
|
40
|
+
|
|
41
|
+
# @!attribute event_type
|
|
42
|
+
#
|
|
43
|
+
# @return [String, nil]
|
|
44
|
+
optional :event_type, String
|
|
45
|
+
|
|
46
|
+
# @!attribute http_status_code
|
|
47
|
+
#
|
|
48
|
+
# @return [Integer, nil]
|
|
49
|
+
optional :http_status_code, Integer, nil?: true
|
|
50
|
+
|
|
51
|
+
# @!attribute processing_completed_at
|
|
52
|
+
#
|
|
53
|
+
# @return [Time, nil]
|
|
54
|
+
optional :processing_completed_at, Time, nil?: true
|
|
55
|
+
|
|
56
|
+
# @!attribute processing_started_at
|
|
57
|
+
#
|
|
58
|
+
# @return [Time, nil]
|
|
59
|
+
optional :processing_started_at, Time, nil?: true
|
|
60
|
+
|
|
61
|
+
# @!attribute response_body
|
|
62
|
+
#
|
|
63
|
+
# @return [String, nil]
|
|
64
|
+
optional :response_body, String, nil?: true
|
|
65
|
+
|
|
66
|
+
# @!method initialize(id: nil, created_at: nil, delivery_attempts: nil, delivery_status: nil, error_message: nil, event_data: nil, event_type: nil, http_status_code: nil, processing_completed_at: nil, processing_started_at: nil, response_body: nil)
|
|
67
|
+
# Some parameter documentations has been truncated, see
|
|
68
|
+
# {Sentdm::Models::WebhookListEventsResponse} for more details.
|
|
69
|
+
#
|
|
70
|
+
# @param id [String]
|
|
71
|
+
#
|
|
72
|
+
# @param created_at [Time]
|
|
73
|
+
#
|
|
74
|
+
# @param delivery_attempts [Integer]
|
|
75
|
+
#
|
|
76
|
+
# @param delivery_status [String]
|
|
77
|
+
#
|
|
78
|
+
# @param error_message [String, nil]
|
|
79
|
+
#
|
|
80
|
+
# @param event_data [Sentdm::Models::MessageEvent, Sentdm::Models::InboundMessageEvent, Sentdm::Models::TemplateEvent] The exact event body that was delivered, or attempted, for this record. One of t
|
|
81
|
+
#
|
|
82
|
+
# @param event_type [String]
|
|
83
|
+
#
|
|
84
|
+
# @param http_status_code [Integer, nil]
|
|
85
|
+
#
|
|
86
|
+
# @param processing_completed_at [Time, nil]
|
|
87
|
+
#
|
|
88
|
+
# @param processing_started_at [Time, nil]
|
|
89
|
+
#
|
|
90
|
+
# @param response_body [String, nil]
|
|
91
|
+
|
|
92
|
+
# The exact event body that was delivered, or attempted, for this record. One of
|
|
93
|
+
# the three webhook envelopes: a message status change, an inbound message, or a
|
|
94
|
+
# template status change. Read field and event to tell which, the same way your
|
|
95
|
+
# endpoint does.
|
|
96
|
+
#
|
|
97
|
+
# @see Sentdm::Models::WebhookListEventsResponse#event_data
|
|
98
|
+
module EventData
|
|
99
|
+
extend Sentdm::Internal::Type::Union
|
|
100
|
+
|
|
101
|
+
# The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares this shape and
|
|
102
|
+
# varies only in Payload.
|
|
103
|
+
variant -> { Sentdm::MessageEvent }
|
|
104
|
+
|
|
105
|
+
# The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares this shape and
|
|
106
|
+
# varies only in Payload.
|
|
107
|
+
variant -> { Sentdm::InboundMessageEvent }
|
|
108
|
+
|
|
109
|
+
# The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares this shape and
|
|
110
|
+
# varies only in Payload.
|
|
111
|
+
variant -> { Sentdm::TemplateEvent }
|
|
112
|
+
|
|
113
|
+
# @!method self.variants
|
|
114
|
+
# @return [Array(Sentdm::Models::MessageEvent, Sentdm::Models::InboundMessageEvent, Sentdm::Models::TemplateEvent)]
|
|
175
115
|
end
|
|
176
116
|
end
|
|
177
117
|
end
|
|
@@ -7,20 +7,20 @@ module Sentdm
|
|
|
7
7
|
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Sentdm::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!attribute
|
|
10
|
+
# @!attribute is_active
|
|
11
11
|
#
|
|
12
|
-
# @return [
|
|
13
|
-
|
|
12
|
+
# @return [Boolean, nil]
|
|
13
|
+
optional :is_active, Sentdm::Internal::Type::Boolean, nil?: true
|
|
14
14
|
|
|
15
|
-
# @!attribute
|
|
15
|
+
# @!attribute page
|
|
16
16
|
#
|
|
17
|
-
# @return [Integer]
|
|
18
|
-
|
|
17
|
+
# @return [Integer, nil]
|
|
18
|
+
optional :page, Integer
|
|
19
19
|
|
|
20
|
-
# @!attribute
|
|
20
|
+
# @!attribute page_size
|
|
21
21
|
#
|
|
22
|
-
# @return [
|
|
23
|
-
optional :
|
|
22
|
+
# @return [Integer, nil]
|
|
23
|
+
optional :page_size, Integer
|
|
24
24
|
|
|
25
25
|
# @!attribute search
|
|
26
26
|
#
|
|
@@ -32,10 +32,10 @@ module Sentdm
|
|
|
32
32
|
# @return [String, nil]
|
|
33
33
|
optional :x_profile_id, String
|
|
34
34
|
|
|
35
|
-
# @!method initialize(page
|
|
35
|
+
# @!method initialize(is_active: nil, page: nil, page_size: nil, search: nil, x_profile_id: nil, request_options: {})
|
|
36
|
+
# @param is_active [Boolean, nil]
|
|
36
37
|
# @param page [Integer]
|
|
37
38
|
# @param page_size [Integer]
|
|
38
|
-
# @param is_active [Boolean, nil]
|
|
39
39
|
# @param search [String, nil]
|
|
40
40
|
# @param x_profile_id [String]
|
|
41
41
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -118,14 +118,14 @@ module Sentdm
|
|
|
118
118
|
# Retrieves a paginated list of contacts for the authenticated customer. Supports
|
|
119
119
|
# filtering by search term, channel, or phone number.
|
|
120
120
|
#
|
|
121
|
-
# @overload list(page
|
|
121
|
+
# @overload list(channel: nil, page: nil, page_size: nil, phone: nil, search: nil, x_profile_id: nil, request_options: {})
|
|
122
|
+
#
|
|
123
|
+
# @param channel [String, nil] Query param: Optional channel filter (sms, whatsapp)
|
|
122
124
|
#
|
|
123
125
|
# @param page [Integer] Query param: Page number (1-indexed)
|
|
124
126
|
#
|
|
125
127
|
# @param page_size [Integer] Query param: Number of items per page
|
|
126
128
|
#
|
|
127
|
-
# @param channel [String, nil] Query param: Optional channel filter (sms, whatsapp)
|
|
128
|
-
#
|
|
129
129
|
# @param phone [String, nil] Query param: Optional phone number filter (alternative to list view)
|
|
130
130
|
#
|
|
131
131
|
# @param search [String, nil] Query param: Optional search term for filtering contacts
|
|
@@ -134,11 +134,11 @@ module Sentdm
|
|
|
134
134
|
#
|
|
135
135
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
136
136
|
#
|
|
137
|
-
# @return [Sentdm::Models::
|
|
137
|
+
# @return [Sentdm::Internal::ContactsPage<Sentdm::Models::ContactResponse>]
|
|
138
138
|
#
|
|
139
139
|
# @see Sentdm::Models::ContactListParams
|
|
140
|
-
def list(params)
|
|
141
|
-
query_params = [:
|
|
140
|
+
def list(params = {})
|
|
141
|
+
query_params = [:channel, :page, :page_size, :phone, :search]
|
|
142
142
|
parsed, options = Sentdm::ContactListParams.dump_request(params)
|
|
143
143
|
query = Sentdm::Internal::Util.encode_query_params(parsed.slice(*query_params))
|
|
144
144
|
@client.request(
|
|
@@ -146,7 +146,8 @@ module Sentdm
|
|
|
146
146
|
path: "v3/contacts",
|
|
147
147
|
query: query,
|
|
148
148
|
headers: parsed.except(*query_params).transform_keys(x_profile_id: "x-profile-id"),
|
|
149
|
-
|
|
149
|
+
page: Sentdm::Internal::ContactsPage,
|
|
150
|
+
model: Sentdm::ContactResponse,
|
|
150
151
|
options: options
|
|
151
152
|
)
|
|
152
153
|
end
|
|
@@ -17,7 +17,7 @@ module Sentdm
|
|
|
17
17
|
# Retrieves a paginated list of the authenticated customer's messages across all
|
|
18
18
|
# conversations, ordered by created date (most recent first).
|
|
19
19
|
#
|
|
20
|
-
# @overload list(page
|
|
20
|
+
# @overload list(page: nil, page_size: nil, x_profile_id: nil, request_options: {})
|
|
21
21
|
#
|
|
22
22
|
# @param page [Integer] Query param
|
|
23
23
|
#
|
|
@@ -27,10 +27,10 @@ module Sentdm
|
|
|
27
27
|
#
|
|
28
28
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
29
29
|
#
|
|
30
|
-
# @return [Sentdm::Models::
|
|
30
|
+
# @return [Sentdm::Internal::ConversationsPage<Sentdm::Models::ConversationMessagesList::Message>]
|
|
31
31
|
#
|
|
32
32
|
# @see Sentdm::Models::ConversationListParams
|
|
33
|
-
def list(params)
|
|
33
|
+
def list(params = {})
|
|
34
34
|
query_params = [:page, :page_size]
|
|
35
35
|
parsed, options = Sentdm::ConversationListParams.dump_request(params)
|
|
36
36
|
query = Sentdm::Internal::Util.encode_query_params(parsed.slice(*query_params))
|
|
@@ -39,7 +39,8 @@ module Sentdm
|
|
|
39
39
|
path: "v3/conversations",
|
|
40
40
|
query: query,
|
|
41
41
|
headers: parsed.except(*query_params).transform_keys(x_profile_id: "x-profile-id"),
|
|
42
|
-
|
|
42
|
+
page: Sentdm::Internal::ConversationsPage,
|
|
43
|
+
model: Sentdm::ConversationMessagesList::Message,
|
|
43
44
|
options: options
|
|
44
45
|
)
|
|
45
46
|
end
|
|
@@ -50,7 +51,7 @@ module Sentdm
|
|
|
50
51
|
# Retrieves a paginated list of the messages in a single conversation (scoped to
|
|
51
52
|
# the authenticated customer), ordered by created date (most recent first).
|
|
52
53
|
#
|
|
53
|
-
# @overload list_messages(id, page
|
|
54
|
+
# @overload list_messages(id, page: nil, page_size: nil, x_profile_id: nil, request_options: {})
|
|
54
55
|
#
|
|
55
56
|
# @param id [String] Path param: Conversation id from the route.
|
|
56
57
|
#
|
|
@@ -62,10 +63,10 @@ module Sentdm
|
|
|
62
63
|
#
|
|
63
64
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
64
65
|
#
|
|
65
|
-
# @return [Sentdm::Models::
|
|
66
|
+
# @return [Sentdm::Internal::ConversationsPage<Sentdm::Models::ConversationMessagesList::Message>]
|
|
66
67
|
#
|
|
67
68
|
# @see Sentdm::Models::ConversationListMessagesParams
|
|
68
|
-
def list_messages(id, params)
|
|
69
|
+
def list_messages(id, params = {})
|
|
69
70
|
query_params = [:page, :page_size]
|
|
70
71
|
parsed, options = Sentdm::ConversationListMessagesParams.dump_request(params)
|
|
71
72
|
query = Sentdm::Internal::Util.encode_query_params(parsed.slice(*query_params))
|
|
@@ -74,7 +75,8 @@ module Sentdm
|
|
|
74
75
|
path: ["v3/conversations/%1$s", id],
|
|
75
76
|
query: query,
|
|
76
77
|
headers: parsed.except(*query_params).transform_keys(x_profile_id: "x-profile-id"),
|
|
77
|
-
|
|
78
|
+
page: Sentdm::Internal::ConversationsPage,
|
|
79
|
+
model: Sentdm::ConversationMessagesList::Message,
|
|
78
80
|
options: options
|
|
79
81
|
)
|
|
80
82
|
end
|