sentdm 0.18.0 → 0.20.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 +21 -0
- data/README.md +1 -1
- data/lib/sentdm/internal/transport/base_client.rb +2 -0
- data/lib/sentdm/models/contact_response.rb +4 -14
- data/lib/sentdm/models/contact_update_params.rb +4 -16
- data/lib/sentdm/models/message_retrieve_status_response.rb +13 -1
- data/lib/sentdm/models/message_send_params.rb +2 -2
- data/lib/sentdm/models/profiles/tcr_campaign_with_use_cases.rb +13 -1
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rb +9 -1
- data/lib/sentdm/resources/contacts.rb +2 -4
- data/lib/sentdm/version.rb +1 -1
- data/rbi/sentdm/models/contact_response.rbi +4 -16
- data/rbi/sentdm/models/contact_update_params.rbi +4 -20
- data/rbi/sentdm/models/message_retrieve_status_response.rbi +23 -3
- data/rbi/sentdm/models/message_send_params.rbi +4 -4
- data/rbi/sentdm/models/profiles/tcr_campaign_with_use_cases.rbi +15 -0
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rbi +11 -0
- data/rbi/sentdm/resources/contacts.rbi +2 -9
- data/rbi/sentdm/resources/messages.rbi +2 -2
- data/sig/sentdm/models/contact_response.rbs +0 -5
- data/sig/sentdm/models/contact_update_params.rbs +0 -5
- data/sig/sentdm/models/message_retrieve_status_response.rbs +24 -4
- data/sig/sentdm/models/profiles/tcr_campaign_with_use_cases.rbs +14 -0
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rbs +5 -0
- data/sig/sentdm/resources/contacts.rbs +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 634c8f9c1711011e0280ebcdb4419b93193a9288622adb1768d327646fa29ebf
|
|
4
|
+
data.tar.gz: 15eaaa4dad36cb8d03f11ce33e9793ba2cbad249634a335ba85fa1804e33dba9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 41450d9f5fe9ae3f85709cce0d67b299a2c88a10aae4758f72587a4880e6bcddf4923e594f9041118f29a485a6aae4b11e8aebdc88eeeba5416eebe7b539d606
|
|
7
|
+
data.tar.gz: ac4c7fa1687d70569edccb8e8084c9f438f2f9f1785a3ab2fb5681a8a6b9116ef69b1e5a2b3739d77ffcee7c8dc76b1bf9f28cb861387588fcdf7d1d1b3e9fbd
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.20.0 (2026-05-14)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.19.0...v0.20.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.19.0...v0.20.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([f9d7ba9](https://github.com/sentdm/sent-dm-ruby/commit/f9d7ba98c6a8a0fc22eff4d019b3ce4a319ff8c4))
|
|
10
|
+
|
|
11
|
+
## 0.19.0 (2026-05-14)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.18.0...v0.19.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.18.0...v0.19.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** api update ([77b9ef0](https://github.com/sentdm/sent-dm-ruby/commit/77b9ef0062e98c2d3d0531614a31ee61db897df9))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **client:** elide content type header on requests without body ([b0f835e](https://github.com/sentdm/sent-dm-ruby/commit/b0f835eb138baa4aabbb2d68b4799d9815e257c3))
|
|
23
|
+
|
|
3
24
|
## 0.18.0 (2026-04-29)
|
|
4
25
|
|
|
5
26
|
Full Changelog: [v0.17.0...v0.18.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.17.0...v0.18.0)
|
data/README.md
CHANGED
|
@@ -306,6 +306,8 @@ module Sentdm
|
|
|
306
306
|
Sentdm::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
|
|
307
307
|
end
|
|
308
308
|
|
|
309
|
+
headers.delete("content-type") if body.nil?
|
|
310
|
+
|
|
309
311
|
url = Sentdm::Internal::Util.join_parsed_uri(
|
|
310
312
|
@base_url_components,
|
|
311
313
|
{**req, path: path, query: query}
|
|
@@ -15,15 +15,6 @@ module Sentdm
|
|
|
15
15
|
# @return [String, nil]
|
|
16
16
|
optional :available_channels, String
|
|
17
17
|
|
|
18
|
-
# @!attribute channel_consent
|
|
19
|
-
# Consent status by channel. Keys: "sms", "whatsapp". Values: "opted_in",
|
|
20
|
-
# "opted_out". All channels will have the same status because consent is global
|
|
21
|
-
# across channels. A STOP on any channel opts out of all channels; a START opts in
|
|
22
|
-
# to all.
|
|
23
|
-
#
|
|
24
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
25
|
-
optional :channel_consent, Sentdm::Internal::Type::HashOf[String], nil?: true
|
|
26
|
-
|
|
27
18
|
# @!attribute country_code
|
|
28
19
|
# Country calling code (e.g., 1 for US/Canada)
|
|
29
20
|
#
|
|
@@ -73,7 +64,8 @@ module Sentdm
|
|
|
73
64
|
optional :is_inherited, Sentdm::Internal::Type::Boolean
|
|
74
65
|
|
|
75
66
|
# @!attribute opt_out
|
|
76
|
-
# Whether the contact has opted out of messaging
|
|
67
|
+
# Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
68
|
+
# is per-contact, not per-channel.
|
|
77
69
|
#
|
|
78
70
|
# @return [Boolean, nil]
|
|
79
71
|
optional :opt_out, Sentdm::Internal::Type::Boolean
|
|
@@ -96,7 +88,7 @@ module Sentdm
|
|
|
96
88
|
# @return [Time, nil]
|
|
97
89
|
optional :updated_at, Time, nil?: true
|
|
98
90
|
|
|
99
|
-
# @!method initialize(id: nil, available_channels: nil,
|
|
91
|
+
# @!method initialize(id: nil, available_channels: nil, country_code: nil, created_at: nil, default_channel: nil, format_e164: nil, format_international: nil, format_national: nil, format_rfc: nil, is_inherited: nil, opt_out: nil, phone_number: nil, region_code: nil, updated_at: nil)
|
|
100
92
|
# Some parameter documentations has been truncated, see
|
|
101
93
|
# {Sentdm::Models::ContactResponse} for more details.
|
|
102
94
|
#
|
|
@@ -106,8 +98,6 @@ module Sentdm
|
|
|
106
98
|
#
|
|
107
99
|
# @param available_channels [String] Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
108
100
|
#
|
|
109
|
-
# @param channel_consent [Hash{Symbol=>String}, nil] Consent status by channel. Keys: "sms", "whatsapp". Values: "opted_in", "opted_o
|
|
110
|
-
#
|
|
111
101
|
# @param country_code [String] Country calling code (e.g., 1 for US/Canada)
|
|
112
102
|
#
|
|
113
103
|
# @param created_at [Time] When the contact was created
|
|
@@ -124,7 +114,7 @@ module Sentdm
|
|
|
124
114
|
#
|
|
125
115
|
# @param is_inherited [Boolean] Whether this is an inherited contact (read-only)
|
|
126
116
|
#
|
|
127
|
-
# @param opt_out [Boolean] Whether the contact has opted out of messaging
|
|
117
|
+
# @param opt_out [Boolean] Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
128
118
|
#
|
|
129
119
|
# @param phone_number [String] Phone number in original format
|
|
130
120
|
#
|
|
@@ -12,17 +12,6 @@ module Sentdm
|
|
|
12
12
|
# @return [String]
|
|
13
13
|
required :id, String
|
|
14
14
|
|
|
15
|
-
# @!attribute channel_consent
|
|
16
|
-
# Consent status by channel. Keys: "sms", "whatsapp". Values: "opted_in",
|
|
17
|
-
# "opted_out". All entries must have the same status — mixed values (e.g., sms:
|
|
18
|
-
# opted_out + whatsapp: opted_in) are rejected with 400. The provided status is
|
|
19
|
-
# applied to ALL channels regardless of which keys are specified, because consent
|
|
20
|
-
# is global across channels. When provided, takes precedence over the opt_out
|
|
21
|
-
# field.
|
|
22
|
-
#
|
|
23
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
24
|
-
optional :channel_consent, Sentdm::Internal::Type::HashOf[String], nil?: true
|
|
25
|
-
|
|
26
15
|
# @!attribute default_channel
|
|
27
16
|
# Default messaging channel: "sms" or "whatsapp"
|
|
28
17
|
#
|
|
@@ -30,7 +19,8 @@ module Sentdm
|
|
|
30
19
|
optional :default_channel, String, nil?: true
|
|
31
20
|
|
|
32
21
|
# @!attribute opt_out
|
|
33
|
-
# Whether the contact has opted out of messaging
|
|
22
|
+
# Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
23
|
+
# is per-contact, not per-channel.
|
|
34
24
|
#
|
|
35
25
|
# @return [Boolean, nil]
|
|
36
26
|
optional :opt_out, Sentdm::Internal::Type::Boolean, nil?: true
|
|
@@ -52,17 +42,15 @@ module Sentdm
|
|
|
52
42
|
# @return [String, nil]
|
|
53
43
|
optional :x_profile_id, String
|
|
54
44
|
|
|
55
|
-
# @!method initialize(id:,
|
|
45
|
+
# @!method initialize(id:, default_channel: nil, opt_out: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
56
46
|
# Some parameter documentations has been truncated, see
|
|
57
47
|
# {Sentdm::Models::ContactUpdateParams} for more details.
|
|
58
48
|
#
|
|
59
49
|
# @param id [String]
|
|
60
50
|
#
|
|
61
|
-
# @param channel_consent [Hash{Symbol=>String}, nil] Consent status by channel. Keys: "sms", "whatsapp". Values: "opted_in", "opted_o
|
|
62
|
-
#
|
|
63
51
|
# @param default_channel [String, nil] Default messaging channel: "sms" or "whatsapp"
|
|
64
52
|
#
|
|
65
|
-
# @param opt_out [Boolean, nil] Whether the contact has opted out of messaging
|
|
53
|
+
# @param opt_out [Boolean, nil] Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
66
54
|
#
|
|
67
55
|
# @param sandbox [Boolean] Sandbox flag - when true, the operation is simulated without side effects
|
|
68
56
|
#
|
|
@@ -230,6 +230,16 @@ module Sentdm
|
|
|
230
230
|
# @param header [String, nil]
|
|
231
231
|
|
|
232
232
|
class Button < Sentdm::Internal::Type::BaseModel
|
|
233
|
+
# @!attribute postback_data
|
|
234
|
+
#
|
|
235
|
+
# @return [String, nil]
|
|
236
|
+
optional :postback_data, String, api_name: :postbackData, nil?: true
|
|
237
|
+
|
|
238
|
+
# @!attribute text
|
|
239
|
+
#
|
|
240
|
+
# @return [String, nil]
|
|
241
|
+
optional :text, String, nil?: true
|
|
242
|
+
|
|
233
243
|
# @!attribute type
|
|
234
244
|
#
|
|
235
245
|
# @return [String, nil]
|
|
@@ -240,7 +250,9 @@ module Sentdm
|
|
|
240
250
|
# @return [String, nil]
|
|
241
251
|
optional :value, String
|
|
242
252
|
|
|
243
|
-
# @!method initialize(type: nil, value: nil)
|
|
253
|
+
# @!method initialize(postback_data: nil, text: nil, type: nil, value: nil)
|
|
254
|
+
# @param postback_data [String, nil]
|
|
255
|
+
# @param text [String, nil]
|
|
244
256
|
# @param type [String]
|
|
245
257
|
# @param value [String]
|
|
246
258
|
end
|
|
@@ -9,8 +9,8 @@ module Sentdm
|
|
|
9
9
|
|
|
10
10
|
# @!attribute channel
|
|
11
11
|
# Channels to broadcast on, e.g. ["whatsapp", "sms"]. Each channel produces a
|
|
12
|
-
# separate message per recipient. "sent" = auto-detect
|
|
13
|
-
# (
|
|
12
|
+
# separate message per recipient. "sent" = auto-detect. Defaults to ["sent"]
|
|
13
|
+
# (auto-detect) if omitted.
|
|
14
14
|
#
|
|
15
15
|
# @return [Array<String>, nil]
|
|
16
16
|
optional :channel, Sentdm::Internal::Type::ArrayOf[String], nil?: true
|
|
@@ -29,6 +29,16 @@ module Sentdm
|
|
|
29
29
|
# @return [String, nil]
|
|
30
30
|
optional :customer_id, String, api_name: :customerId
|
|
31
31
|
|
|
32
|
+
# @!attribute dca_elections_complete
|
|
33
|
+
#
|
|
34
|
+
# @return [Boolean, nil]
|
|
35
|
+
optional :dca_elections_complete, Sentdm::Internal::Type::Boolean, api_name: :dcaElectionsComplete
|
|
36
|
+
|
|
37
|
+
# @!attribute dca_elections_completed_at
|
|
38
|
+
#
|
|
39
|
+
# @return [Time, nil]
|
|
40
|
+
optional :dca_elections_completed_at, Time, api_name: :dcaElectionsCompletedAt, nil?: true
|
|
41
|
+
|
|
32
42
|
# @!attribute description
|
|
33
43
|
#
|
|
34
44
|
# @return [String, nil]
|
|
@@ -149,12 +159,14 @@ module Sentdm
|
|
|
149
159
|
-> { Sentdm::Internal::Type::ArrayOf[Sentdm::Profiles::TcrCampaignWithUseCases::UseCase] },
|
|
150
160
|
api_name: :useCases
|
|
151
161
|
|
|
152
|
-
# @!method initialize(billed_date: nil, brand_id: nil, cost: nil, csp_id: nil, customer_id: nil, description: nil, help_keywords: nil, help_message: nil, kyc_submission_form_id: nil, message_flow: nil, name: nil, optin_keywords: nil, optin_message: nil, optout_keywords: nil, optout_message: nil, privacy_policy_link: nil, reseller_id: nil, sharing_status: nil, status: nil, submitted_at: nil, submitted_to_tcr: nil, tcr_campaign_id: nil, tcr_sync_error: nil, telnyx_campaign_id: nil, terms_and_conditions_link: nil, type: nil, upstream_cnp_id: nil, use_cases: nil)
|
|
162
|
+
# @!method initialize(billed_date: nil, brand_id: nil, cost: nil, csp_id: nil, customer_id: nil, dca_elections_complete: nil, dca_elections_completed_at: nil, description: nil, help_keywords: nil, help_message: nil, kyc_submission_form_id: nil, message_flow: nil, name: nil, optin_keywords: nil, optin_message: nil, optout_keywords: nil, optout_message: nil, privacy_policy_link: nil, reseller_id: nil, sharing_status: nil, status: nil, submitted_at: nil, submitted_to_tcr: nil, tcr_campaign_id: nil, tcr_sync_error: nil, telnyx_campaign_id: nil, terms_and_conditions_link: nil, type: nil, upstream_cnp_id: nil, use_cases: nil)
|
|
153
163
|
# @param billed_date [Time, nil]
|
|
154
164
|
# @param brand_id [String, nil]
|
|
155
165
|
# @param cost [Float, nil]
|
|
156
166
|
# @param csp_id [String, nil]
|
|
157
167
|
# @param customer_id [String]
|
|
168
|
+
# @param dca_elections_complete [Boolean]
|
|
169
|
+
# @param dca_elections_completed_at [Time, nil]
|
|
158
170
|
# @param description [String]
|
|
159
171
|
# @param help_keywords [String, nil]
|
|
160
172
|
# @param help_message [String, nil]
|
|
@@ -10,6 +10,12 @@ module Sentdm
|
|
|
10
10
|
# @return [Sentdm::Models::TemplateBodyContent, nil]
|
|
11
11
|
optional :multi_channel, -> { Sentdm::TemplateBodyContent }, api_name: :multiChannel, nil?: true
|
|
12
12
|
|
|
13
|
+
# @!attribute rcs
|
|
14
|
+
# RCS-specific content that overrides multi-channel content for RCS messages
|
|
15
|
+
#
|
|
16
|
+
# @return [Sentdm::Models::TemplateBodyContent, nil]
|
|
17
|
+
optional :rcs, -> { Sentdm::TemplateBodyContent }, nil?: true
|
|
18
|
+
|
|
13
19
|
# @!attribute sms
|
|
14
20
|
# SMS-specific content that overrides multi-channel content for SMS messages
|
|
15
21
|
#
|
|
@@ -23,7 +29,7 @@ module Sentdm
|
|
|
23
29
|
# @return [Sentdm::Models::TemplateBodyContent, nil]
|
|
24
30
|
optional :whatsapp, -> { Sentdm::TemplateBodyContent }, nil?: true
|
|
25
31
|
|
|
26
|
-
# @!method initialize(multi_channel: nil, sms: nil, whatsapp: nil)
|
|
32
|
+
# @!method initialize(multi_channel: nil, rcs: nil, sms: nil, whatsapp: nil)
|
|
27
33
|
# Some parameter documentations has been truncated, see
|
|
28
34
|
# {Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateBody} for more
|
|
29
35
|
# details.
|
|
@@ -32,6 +38,8 @@ module Sentdm
|
|
|
32
38
|
#
|
|
33
39
|
# @param multi_channel [Sentdm::Models::TemplateBodyContent, nil] Content that will be used for all channels (SMS and WhatsApp) unless channel-spe
|
|
34
40
|
#
|
|
41
|
+
# @param rcs [Sentdm::Models::TemplateBodyContent, nil] RCS-specific content that overrides multi-channel content for RCS messages
|
|
42
|
+
#
|
|
35
43
|
# @param sms [Sentdm::Models::TemplateBodyContent, nil] SMS-specific content that overrides multi-channel content for SMS messages
|
|
36
44
|
#
|
|
37
45
|
# @param whatsapp [Sentdm::Models::TemplateBodyContent, nil] WhatsApp-specific content that overrides multi-channel content for WhatsApp mess
|
|
@@ -73,15 +73,13 @@ module Sentdm
|
|
|
73
73
|
# Updates a contact's default channel and/or opt-out status. Inherited contacts
|
|
74
74
|
# cannot be updated.
|
|
75
75
|
#
|
|
76
|
-
# @overload update(id,
|
|
76
|
+
# @overload update(id, default_channel: nil, opt_out: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
77
77
|
#
|
|
78
78
|
# @param id [String] Path param: Contact ID from route parameter
|
|
79
79
|
#
|
|
80
|
-
# @param channel_consent [Hash{Symbol=>String}, nil] Body param: Consent status by channel. Keys: "sms", "whatsapp". Values: "opted_i
|
|
81
|
-
#
|
|
82
80
|
# @param default_channel [String, nil] Body param: Default messaging channel: "sms" or "whatsapp"
|
|
83
81
|
#
|
|
84
|
-
# @param opt_out [Boolean, nil] Body param: Whether the contact has opted out of messaging
|
|
82
|
+
# @param opt_out [Boolean, nil] Body param: Whether the contact has opted out of messaging. Single source of tru
|
|
85
83
|
#
|
|
86
84
|
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
87
85
|
#
|
data/lib/sentdm/version.rb
CHANGED
|
@@ -22,13 +22,6 @@ module Sentdm
|
|
|
22
22
|
sig { params(available_channels: String).void }
|
|
23
23
|
attr_writer :available_channels
|
|
24
24
|
|
|
25
|
-
# Consent status by channel. Keys: "sms", "whatsapp". Values: "opted_in",
|
|
26
|
-
# "opted_out". All channels will have the same status because consent is global
|
|
27
|
-
# across channels. A STOP on any channel opts out of all channels; a START opts in
|
|
28
|
-
# to all.
|
|
29
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
30
|
-
attr_accessor :channel_consent
|
|
31
|
-
|
|
32
25
|
# Country calling code (e.g., 1 for US/Canada)
|
|
33
26
|
sig { returns(T.nilable(String)) }
|
|
34
27
|
attr_reader :country_code
|
|
@@ -85,7 +78,8 @@ module Sentdm
|
|
|
85
78
|
sig { params(is_inherited: T::Boolean).void }
|
|
86
79
|
attr_writer :is_inherited
|
|
87
80
|
|
|
88
|
-
# Whether the contact has opted out of messaging
|
|
81
|
+
# Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
82
|
+
# is per-contact, not per-channel.
|
|
89
83
|
sig { returns(T.nilable(T::Boolean)) }
|
|
90
84
|
attr_reader :opt_out
|
|
91
85
|
|
|
@@ -115,7 +109,6 @@ module Sentdm
|
|
|
115
109
|
params(
|
|
116
110
|
id: String,
|
|
117
111
|
available_channels: String,
|
|
118
|
-
channel_consent: T.nilable(T::Hash[Symbol, String]),
|
|
119
112
|
country_code: String,
|
|
120
113
|
created_at: Time,
|
|
121
114
|
default_channel: String,
|
|
@@ -135,11 +128,6 @@ module Sentdm
|
|
|
135
128
|
id: nil,
|
|
136
129
|
# Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
137
130
|
available_channels: nil,
|
|
138
|
-
# Consent status by channel. Keys: "sms", "whatsapp". Values: "opted_in",
|
|
139
|
-
# "opted_out". All channels will have the same status because consent is global
|
|
140
|
-
# across channels. A STOP on any channel opts out of all channels; a START opts in
|
|
141
|
-
# to all.
|
|
142
|
-
channel_consent: nil,
|
|
143
131
|
# Country calling code (e.g., 1 for US/Canada)
|
|
144
132
|
country_code: nil,
|
|
145
133
|
# When the contact was created
|
|
@@ -156,7 +144,8 @@ module Sentdm
|
|
|
156
144
|
format_rfc: nil,
|
|
157
145
|
# Whether this is an inherited contact (read-only)
|
|
158
146
|
is_inherited: nil,
|
|
159
|
-
# Whether the contact has opted out of messaging
|
|
147
|
+
# Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
148
|
+
# is per-contact, not per-channel.
|
|
160
149
|
opt_out: nil,
|
|
161
150
|
# Phone number in original format
|
|
162
151
|
phone_number: nil,
|
|
@@ -172,7 +161,6 @@ module Sentdm
|
|
|
172
161
|
{
|
|
173
162
|
id: String,
|
|
174
163
|
available_channels: String,
|
|
175
|
-
channel_consent: T.nilable(T::Hash[Symbol, String]),
|
|
176
164
|
country_code: String,
|
|
177
165
|
created_at: Time,
|
|
178
166
|
default_channel: String,
|
|
@@ -14,20 +14,12 @@ module Sentdm
|
|
|
14
14
|
sig { returns(String) }
|
|
15
15
|
attr_accessor :id
|
|
16
16
|
|
|
17
|
-
# Consent status by channel. Keys: "sms", "whatsapp". Values: "opted_in",
|
|
18
|
-
# "opted_out". All entries must have the same status — mixed values (e.g., sms:
|
|
19
|
-
# opted_out + whatsapp: opted_in) are rejected with 400. The provided status is
|
|
20
|
-
# applied to ALL channels regardless of which keys are specified, because consent
|
|
21
|
-
# is global across channels. When provided, takes precedence over the opt_out
|
|
22
|
-
# field.
|
|
23
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
24
|
-
attr_accessor :channel_consent
|
|
25
|
-
|
|
26
17
|
# Default messaging channel: "sms" or "whatsapp"
|
|
27
18
|
sig { returns(T.nilable(String)) }
|
|
28
19
|
attr_accessor :default_channel
|
|
29
20
|
|
|
30
|
-
# Whether the contact has opted out of messaging
|
|
21
|
+
# Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
22
|
+
# is per-contact, not per-channel.
|
|
31
23
|
sig { returns(T.nilable(T::Boolean)) }
|
|
32
24
|
attr_accessor :opt_out
|
|
33
25
|
|
|
@@ -54,7 +46,6 @@ module Sentdm
|
|
|
54
46
|
sig do
|
|
55
47
|
params(
|
|
56
48
|
id: String,
|
|
57
|
-
channel_consent: T.nilable(T::Hash[Symbol, String]),
|
|
58
49
|
default_channel: T.nilable(String),
|
|
59
50
|
opt_out: T.nilable(T::Boolean),
|
|
60
51
|
sandbox: T::Boolean,
|
|
@@ -65,16 +56,10 @@ module Sentdm
|
|
|
65
56
|
end
|
|
66
57
|
def self.new(
|
|
67
58
|
id:,
|
|
68
|
-
# Consent status by channel. Keys: "sms", "whatsapp". Values: "opted_in",
|
|
69
|
-
# "opted_out". All entries must have the same status — mixed values (e.g., sms:
|
|
70
|
-
# opted_out + whatsapp: opted_in) are rejected with 400. The provided status is
|
|
71
|
-
# applied to ALL channels regardless of which keys are specified, because consent
|
|
72
|
-
# is global across channels. When provided, takes precedence over the opt_out
|
|
73
|
-
# field.
|
|
74
|
-
channel_consent: nil,
|
|
75
59
|
# Default messaging channel: "sms" or "whatsapp"
|
|
76
60
|
default_channel: nil,
|
|
77
|
-
# Whether the contact has opted out of messaging
|
|
61
|
+
# Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
62
|
+
# is per-contact, not per-channel.
|
|
78
63
|
opt_out: nil,
|
|
79
64
|
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
80
65
|
# for testing integrations without actual execution
|
|
@@ -89,7 +74,6 @@ module Sentdm
|
|
|
89
74
|
override.returns(
|
|
90
75
|
{
|
|
91
76
|
id: String,
|
|
92
|
-
channel_consent: T.nilable(T::Hash[Symbol, String]),
|
|
93
77
|
default_channel: T.nilable(String),
|
|
94
78
|
opt_out: T.nilable(T::Boolean),
|
|
95
79
|
sandbox: T::Boolean,
|
|
@@ -414,6 +414,12 @@ module Sentdm
|
|
|
414
414
|
)
|
|
415
415
|
end
|
|
416
416
|
|
|
417
|
+
sig { returns(T.nilable(String)) }
|
|
418
|
+
attr_accessor :postback_data
|
|
419
|
+
|
|
420
|
+
sig { returns(T.nilable(String)) }
|
|
421
|
+
attr_accessor :text
|
|
422
|
+
|
|
417
423
|
sig { returns(T.nilable(String)) }
|
|
418
424
|
attr_reader :type
|
|
419
425
|
|
|
@@ -427,12 +433,26 @@ module Sentdm
|
|
|
427
433
|
attr_writer :value
|
|
428
434
|
|
|
429
435
|
sig do
|
|
430
|
-
params(
|
|
436
|
+
params(
|
|
437
|
+
postback_data: T.nilable(String),
|
|
438
|
+
text: T.nilable(String),
|
|
439
|
+
type: String,
|
|
440
|
+
value: String
|
|
441
|
+
).returns(T.attached_class)
|
|
431
442
|
end
|
|
432
|
-
def self.new(type: nil, value: nil)
|
|
443
|
+
def self.new(postback_data: nil, text: nil, type: nil, value: nil)
|
|
433
444
|
end
|
|
434
445
|
|
|
435
|
-
sig
|
|
446
|
+
sig do
|
|
447
|
+
override.returns(
|
|
448
|
+
{
|
|
449
|
+
postback_data: T.nilable(String),
|
|
450
|
+
text: T.nilable(String),
|
|
451
|
+
type: String,
|
|
452
|
+
value: String
|
|
453
|
+
}
|
|
454
|
+
)
|
|
455
|
+
end
|
|
436
456
|
def to_hash
|
|
437
457
|
end
|
|
438
458
|
end
|
|
@@ -12,8 +12,8 @@ module Sentdm
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
# Channels to broadcast on, e.g. ["whatsapp", "sms"]. Each channel produces a
|
|
15
|
-
# separate message per recipient. "sent" = auto-detect
|
|
16
|
-
# (
|
|
15
|
+
# separate message per recipient. "sent" = auto-detect. Defaults to ["sent"]
|
|
16
|
+
# (auto-detect) if omitted.
|
|
17
17
|
sig { returns(T.nilable(T::Array[String])) }
|
|
18
18
|
attr_accessor :channel
|
|
19
19
|
|
|
@@ -65,8 +65,8 @@ module Sentdm
|
|
|
65
65
|
end
|
|
66
66
|
def self.new(
|
|
67
67
|
# Channels to broadcast on, e.g. ["whatsapp", "sms"]. Each channel produces a
|
|
68
|
-
# separate message per recipient. "sent" = auto-detect
|
|
69
|
-
# (
|
|
68
|
+
# separate message per recipient. "sent" = auto-detect. Defaults to ["sent"]
|
|
69
|
+
# (auto-detect) if omitted.
|
|
70
70
|
channel: nil,
|
|
71
71
|
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
72
72
|
# for testing integrations without actual execution
|
|
@@ -30,6 +30,15 @@ module Sentdm
|
|
|
30
30
|
sig { params(customer_id: String).void }
|
|
31
31
|
attr_writer :customer_id
|
|
32
32
|
|
|
33
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
34
|
+
attr_reader :dca_elections_complete
|
|
35
|
+
|
|
36
|
+
sig { params(dca_elections_complete: T::Boolean).void }
|
|
37
|
+
attr_writer :dca_elections_complete
|
|
38
|
+
|
|
39
|
+
sig { returns(T.nilable(Time)) }
|
|
40
|
+
attr_accessor :dca_elections_completed_at
|
|
41
|
+
|
|
33
42
|
sig { returns(T.nilable(String)) }
|
|
34
43
|
attr_reader :description
|
|
35
44
|
|
|
@@ -146,6 +155,8 @@ module Sentdm
|
|
|
146
155
|
cost: T.nilable(Float),
|
|
147
156
|
csp_id: T.nilable(String),
|
|
148
157
|
customer_id: String,
|
|
158
|
+
dca_elections_complete: T::Boolean,
|
|
159
|
+
dca_elections_completed_at: T.nilable(Time),
|
|
149
160
|
description: String,
|
|
150
161
|
help_keywords: T.nilable(String),
|
|
151
162
|
help_message: T.nilable(String),
|
|
@@ -186,6 +197,8 @@ module Sentdm
|
|
|
186
197
|
cost: nil,
|
|
187
198
|
csp_id: nil,
|
|
188
199
|
customer_id: nil,
|
|
200
|
+
dca_elections_complete: nil,
|
|
201
|
+
dca_elections_completed_at: nil,
|
|
189
202
|
description: nil,
|
|
190
203
|
help_keywords: nil,
|
|
191
204
|
help_message: nil,
|
|
@@ -220,6 +233,8 @@ module Sentdm
|
|
|
220
233
|
cost: T.nilable(Float),
|
|
221
234
|
csp_id: T.nilable(String),
|
|
222
235
|
customer_id: String,
|
|
236
|
+
dca_elections_complete: T::Boolean,
|
|
237
|
+
dca_elections_completed_at: T.nilable(Time),
|
|
223
238
|
description: String,
|
|
224
239
|
help_keywords: T.nilable(String),
|
|
225
240
|
help_message: T.nilable(String),
|
|
@@ -23,6 +23,13 @@ module Sentdm
|
|
|
23
23
|
end
|
|
24
24
|
attr_writer :multi_channel
|
|
25
25
|
|
|
26
|
+
# RCS-specific content that overrides multi-channel content for RCS messages
|
|
27
|
+
sig { returns(T.nilable(Sentdm::TemplateBodyContent)) }
|
|
28
|
+
attr_reader :rcs
|
|
29
|
+
|
|
30
|
+
sig { params(rcs: T.nilable(Sentdm::TemplateBodyContent::OrHash)).void }
|
|
31
|
+
attr_writer :rcs
|
|
32
|
+
|
|
26
33
|
# SMS-specific content that overrides multi-channel content for SMS messages
|
|
27
34
|
sig { returns(T.nilable(Sentdm::TemplateBodyContent)) }
|
|
28
35
|
attr_reader :sms
|
|
@@ -44,6 +51,7 @@ module Sentdm
|
|
|
44
51
|
sig do
|
|
45
52
|
params(
|
|
46
53
|
multi_channel: T.nilable(Sentdm::TemplateBodyContent::OrHash),
|
|
54
|
+
rcs: T.nilable(Sentdm::TemplateBodyContent::OrHash),
|
|
47
55
|
sms: T.nilable(Sentdm::TemplateBodyContent::OrHash),
|
|
48
56
|
whatsapp: T.nilable(Sentdm::TemplateBodyContent::OrHash)
|
|
49
57
|
).returns(T.attached_class)
|
|
@@ -52,6 +60,8 @@ module Sentdm
|
|
|
52
60
|
# Content that will be used for all channels (SMS and WhatsApp) unless
|
|
53
61
|
# channel-specific content is provided
|
|
54
62
|
multi_channel: nil,
|
|
63
|
+
# RCS-specific content that overrides multi-channel content for RCS messages
|
|
64
|
+
rcs: nil,
|
|
55
65
|
# SMS-specific content that overrides multi-channel content for SMS messages
|
|
56
66
|
sms: nil,
|
|
57
67
|
# WhatsApp-specific content that overrides multi-channel content for WhatsApp
|
|
@@ -64,6 +74,7 @@ module Sentdm
|
|
|
64
74
|
override.returns(
|
|
65
75
|
{
|
|
66
76
|
multi_channel: T.nilable(Sentdm::TemplateBodyContent),
|
|
77
|
+
rcs: T.nilable(Sentdm::TemplateBodyContent),
|
|
67
78
|
sms: T.nilable(Sentdm::TemplateBodyContent),
|
|
68
79
|
whatsapp: T.nilable(Sentdm::TemplateBodyContent)
|
|
69
80
|
}
|
|
@@ -58,7 +58,6 @@ module Sentdm
|
|
|
58
58
|
sig do
|
|
59
59
|
params(
|
|
60
60
|
id: String,
|
|
61
|
-
channel_consent: T.nilable(T::Hash[Symbol, String]),
|
|
62
61
|
default_channel: T.nilable(String),
|
|
63
62
|
opt_out: T.nilable(T::Boolean),
|
|
64
63
|
sandbox: T::Boolean,
|
|
@@ -70,16 +69,10 @@ module Sentdm
|
|
|
70
69
|
def update(
|
|
71
70
|
# Path param: Contact ID from route parameter
|
|
72
71
|
id,
|
|
73
|
-
# Body param: Consent status by channel. Keys: "sms", "whatsapp". Values:
|
|
74
|
-
# "opted_in", "opted_out". All entries must have the same status — mixed values
|
|
75
|
-
# (e.g., sms: opted_out + whatsapp: opted_in) are rejected with 400. The provided
|
|
76
|
-
# status is applied to ALL channels regardless of which keys are specified,
|
|
77
|
-
# because consent is global across channels. When provided, takes precedence over
|
|
78
|
-
# the opt_out field.
|
|
79
|
-
channel_consent: nil,
|
|
80
72
|
# Body param: Default messaging channel: "sms" or "whatsapp"
|
|
81
73
|
default_channel: nil,
|
|
82
|
-
# Body param: Whether the contact has opted out of messaging
|
|
74
|
+
# Body param: Whether the contact has opted out of messaging. Single source of
|
|
75
|
+
# truth — opt-out is per-contact, not per-channel.
|
|
83
76
|
opt_out: nil,
|
|
84
77
|
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
85
78
|
# effects Useful for testing integrations without actual execution
|
|
@@ -60,8 +60,8 @@ module Sentdm
|
|
|
60
60
|
end
|
|
61
61
|
def send_(
|
|
62
62
|
# Body param: Channels to broadcast on, e.g. ["whatsapp", "sms"]. Each channel
|
|
63
|
-
# produces a separate message per recipient. "sent" = auto-detect
|
|
64
|
-
#
|
|
63
|
+
# produces a separate message per recipient. "sent" = auto-detect. Defaults to
|
|
64
|
+
# ["sent"] (auto-detect) if omitted.
|
|
65
65
|
channel: nil,
|
|
66
66
|
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
67
67
|
# effects Useful for testing integrations without actual execution
|
|
@@ -4,7 +4,6 @@ module Sentdm
|
|
|
4
4
|
{
|
|
5
5
|
id: String,
|
|
6
6
|
available_channels: String,
|
|
7
|
-
channel_consent: ::Hash[Symbol, String]?,
|
|
8
7
|
country_code: String,
|
|
9
8
|
created_at: Time,
|
|
10
9
|
default_channel: String,
|
|
@@ -28,8 +27,6 @@ module Sentdm
|
|
|
28
27
|
|
|
29
28
|
def available_channels=: (String) -> String
|
|
30
29
|
|
|
31
|
-
attr_accessor channel_consent: ::Hash[Symbol, String]?
|
|
32
|
-
|
|
33
30
|
attr_reader country_code: String?
|
|
34
31
|
|
|
35
32
|
def country_code=: (String) -> String
|
|
@@ -79,7 +76,6 @@ module Sentdm
|
|
|
79
76
|
def initialize: (
|
|
80
77
|
?id: String,
|
|
81
78
|
?available_channels: String,
|
|
82
|
-
?channel_consent: ::Hash[Symbol, String]?,
|
|
83
79
|
?country_code: String,
|
|
84
80
|
?created_at: Time,
|
|
85
81
|
?default_channel: String,
|
|
@@ -97,7 +93,6 @@ module Sentdm
|
|
|
97
93
|
def to_hash: -> {
|
|
98
94
|
id: String,
|
|
99
95
|
available_channels: String,
|
|
100
|
-
channel_consent: ::Hash[Symbol, String]?,
|
|
101
96
|
country_code: String,
|
|
102
97
|
created_at: Time,
|
|
103
98
|
default_channel: String,
|
|
@@ -3,7 +3,6 @@ module Sentdm
|
|
|
3
3
|
type contact_update_params =
|
|
4
4
|
{
|
|
5
5
|
id: String,
|
|
6
|
-
channel_consent: ::Hash[Symbol, String]?,
|
|
7
6
|
default_channel: String?,
|
|
8
7
|
opt_out: bool?,
|
|
9
8
|
sandbox: bool,
|
|
@@ -18,8 +17,6 @@ module Sentdm
|
|
|
18
17
|
|
|
19
18
|
attr_accessor id: String
|
|
20
19
|
|
|
21
|
-
attr_accessor channel_consent: ::Hash[Symbol, String]?
|
|
22
|
-
|
|
23
20
|
attr_accessor default_channel: String?
|
|
24
21
|
|
|
25
22
|
attr_accessor opt_out: bool?
|
|
@@ -38,7 +35,6 @@ module Sentdm
|
|
|
38
35
|
|
|
39
36
|
def initialize: (
|
|
40
37
|
id: String,
|
|
41
|
-
?channel_consent: ::Hash[Symbol, String]?,
|
|
42
38
|
?default_channel: String?,
|
|
43
39
|
?opt_out: bool?,
|
|
44
40
|
?sandbox: bool,
|
|
@@ -49,7 +45,6 @@ module Sentdm
|
|
|
49
45
|
|
|
50
46
|
def to_hash: -> {
|
|
51
47
|
id: String,
|
|
52
|
-
channel_consent: ::Hash[Symbol, String]?,
|
|
53
48
|
default_channel: String?,
|
|
54
49
|
opt_out: bool?,
|
|
55
50
|
sandbox: bool,
|
|
@@ -210,9 +210,19 @@ module Sentdm
|
|
|
210
210
|
header: String?
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
type button =
|
|
213
|
+
type button =
|
|
214
|
+
{
|
|
215
|
+
postback_data: String?,
|
|
216
|
+
text: String?,
|
|
217
|
+
type: String,
|
|
218
|
+
value: String
|
|
219
|
+
}
|
|
214
220
|
|
|
215
221
|
class Button < Sentdm::Internal::Type::BaseModel
|
|
222
|
+
attr_accessor postback_data: String?
|
|
223
|
+
|
|
224
|
+
attr_accessor text: String?
|
|
225
|
+
|
|
216
226
|
attr_reader type: String?
|
|
217
227
|
|
|
218
228
|
def type=: (String) -> String
|
|
@@ -221,9 +231,19 @@ module Sentdm
|
|
|
221
231
|
|
|
222
232
|
def value=: (String) -> String
|
|
223
233
|
|
|
224
|
-
def initialize: (
|
|
225
|
-
|
|
226
|
-
|
|
234
|
+
def initialize: (
|
|
235
|
+
?postback_data: String?,
|
|
236
|
+
?text: String?,
|
|
237
|
+
?type: String,
|
|
238
|
+
?value: String
|
|
239
|
+
) -> void
|
|
240
|
+
|
|
241
|
+
def to_hash: -> {
|
|
242
|
+
postback_data: String?,
|
|
243
|
+
text: String?,
|
|
244
|
+
type: String,
|
|
245
|
+
value: String
|
|
246
|
+
}
|
|
227
247
|
end
|
|
228
248
|
end
|
|
229
249
|
end
|
|
@@ -8,6 +8,8 @@ module Sentdm
|
|
|
8
8
|
cost: Float?,
|
|
9
9
|
csp_id: String?,
|
|
10
10
|
customer_id: String,
|
|
11
|
+
dca_elections_complete: bool,
|
|
12
|
+
dca_elections_completed_at: Time?,
|
|
11
13
|
description: String,
|
|
12
14
|
help_keywords: String?,
|
|
13
15
|
help_message: String?,
|
|
@@ -54,6 +56,14 @@ module Sentdm
|
|
|
54
56
|
|
|
55
57
|
def customer_id=: (String _) -> String
|
|
56
58
|
|
|
59
|
+
def dca_elections_complete: -> bool?
|
|
60
|
+
|
|
61
|
+
def dca_elections_complete=: (bool _) -> bool
|
|
62
|
+
|
|
63
|
+
def dca_elections_completed_at: -> Time?
|
|
64
|
+
|
|
65
|
+
def dca_elections_completed_at=: (Time? _) -> Time?
|
|
66
|
+
|
|
57
67
|
def description: -> String?
|
|
58
68
|
|
|
59
69
|
def description=: (String _) -> String
|
|
@@ -158,6 +168,8 @@ module Sentdm
|
|
|
158
168
|
?cost: Float?,
|
|
159
169
|
?csp_id: String?,
|
|
160
170
|
?customer_id: String,
|
|
171
|
+
?dca_elections_complete: bool,
|
|
172
|
+
?dca_elections_completed_at: Time?,
|
|
161
173
|
?description: String,
|
|
162
174
|
?help_keywords: String?,
|
|
163
175
|
?help_message: String?,
|
|
@@ -189,6 +201,8 @@ module Sentdm
|
|
|
189
201
|
cost: Float?,
|
|
190
202
|
csp_id: String?,
|
|
191
203
|
customer_id: String,
|
|
204
|
+
dca_elections_complete: bool,
|
|
205
|
+
dca_elections_completed_at: Time?,
|
|
192
206
|
description: String,
|
|
193
207
|
help_keywords: String?,
|
|
194
208
|
help_message: String?,
|
|
@@ -3,6 +3,7 @@ module Sentdm
|
|
|
3
3
|
type sent_dm_services_common_contracts_poc_os_template_body =
|
|
4
4
|
{
|
|
5
5
|
multi_channel: Sentdm::TemplateBodyContent?,
|
|
6
|
+
rcs: Sentdm::TemplateBodyContent?,
|
|
6
7
|
sms: Sentdm::TemplateBodyContent?,
|
|
7
8
|
whatsapp: Sentdm::TemplateBodyContent?
|
|
8
9
|
}
|
|
@@ -10,18 +11,22 @@ module Sentdm
|
|
|
10
11
|
class SentDmServicesCommonContractsPocOsTemplateBody < Sentdm::Internal::Type::BaseModel
|
|
11
12
|
attr_accessor multi_channel: Sentdm::TemplateBodyContent?
|
|
12
13
|
|
|
14
|
+
attr_accessor rcs: Sentdm::TemplateBodyContent?
|
|
15
|
+
|
|
13
16
|
attr_accessor sms: Sentdm::TemplateBodyContent?
|
|
14
17
|
|
|
15
18
|
attr_accessor whatsapp: Sentdm::TemplateBodyContent?
|
|
16
19
|
|
|
17
20
|
def initialize: (
|
|
18
21
|
?multi_channel: Sentdm::TemplateBodyContent?,
|
|
22
|
+
?rcs: Sentdm::TemplateBodyContent?,
|
|
19
23
|
?sms: Sentdm::TemplateBodyContent?,
|
|
20
24
|
?whatsapp: Sentdm::TemplateBodyContent?
|
|
21
25
|
) -> void
|
|
22
26
|
|
|
23
27
|
def to_hash: -> {
|
|
24
28
|
multi_channel: Sentdm::TemplateBodyContent?,
|
|
29
|
+
rcs: Sentdm::TemplateBodyContent?,
|
|
25
30
|
sms: Sentdm::TemplateBodyContent?,
|
|
26
31
|
whatsapp: Sentdm::TemplateBodyContent?
|
|
27
32
|
}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sentdm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.20.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sent
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-05-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|