sentdm 0.24.0 → 0.26.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 (110) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +28 -0
  3. data/README.md +7 -11
  4. data/lib/sentdm/client.rb +4 -0
  5. data/lib/sentdm/models/api_response_of_contact_message_summary.rb +43 -0
  6. data/lib/sentdm/models/api_response_of_conversation_messages_list.rb +43 -0
  7. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_authentication_config.rb → authentication_config.rb} +2 -3
  8. data/lib/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rb → brand_business_info.rb} +5 -7
  9. data/lib/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rb → brand_compliance_info.rb} +2 -10
  10. data/lib/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info.rb → brand_contact_info.rb} +1 -1
  11. data/lib/sentdm/models/brands_brand_data.rb +9 -13
  12. data/lib/sentdm/models/contact_message_summary.rb +76 -0
  13. data/lib/sentdm/models/contact_retrieve_message_summary_params.rb +26 -0
  14. data/lib/sentdm/models/conversation_list_messages_params.rb +38 -0
  15. data/lib/sentdm/models/conversation_list_params.rb +32 -0
  16. data/lib/sentdm/models/conversation_messages_list.rb +245 -0
  17. data/lib/sentdm/models/message_send_response.rb +2 -6
  18. data/lib/sentdm/models/profile_detail.rb +3 -11
  19. data/lib/sentdm/models/profile_update_params.rb +2 -2
  20. data/lib/sentdm/models/profiles/{api_response_of_tcr_campaign_with_use_cases.rb → api_response_of_brand_campaign.rb} +5 -5
  21. data/lib/sentdm/models/profiles/{campaign_list_response.rb → api_response_of_list_of_brand_campaign.rb} +4 -6
  22. data/lib/sentdm/models/profiles/{tcr_campaign_with_use_cases.rb → brand_campaign.rb} +63 -111
  23. data/lib/sentdm/models/profiles/campaign_data.rb +13 -6
  24. data/lib/sentdm/models/profiles/campaign_use_case.rb +71 -0
  25. data/lib/sentdm/models/profiles/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rb → campaign_use_case_data.rb} +1 -1
  26. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_body.rb → template_body.rb} +2 -3
  27. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button.rb → template_button.rb} +5 -6
  28. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button_props.rb → template_button_props.rb} +2 -3
  29. data/lib/sentdm/models/template_definition.rb +15 -19
  30. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_footer.rb → template_footer.rb} +1 -1
  31. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_header.rb → template_header.rb} +2 -3
  32. data/lib/sentdm/models.rb +32 -27
  33. data/lib/sentdm/resources/contacts.rb +30 -0
  34. data/lib/sentdm/resources/conversations.rb +82 -0
  35. data/lib/sentdm/resources/messages.rb +4 -1
  36. data/lib/sentdm/resources/profiles/campaigns.rb +6 -6
  37. data/lib/sentdm/resources/profiles.rb +31 -19
  38. data/lib/sentdm/version.rb +1 -1
  39. data/lib/sentdm.rb +22 -14
  40. data/rbi/sentdm/client.rbi +3 -0
  41. data/rbi/sentdm/models/api_response_of_contact_message_summary.rbi +79 -0
  42. data/rbi/sentdm/models/api_response_of_conversation_messages_list.rbi +79 -0
  43. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_authentication_config.rbi → authentication_config.rbi} +2 -5
  44. data/rbi/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rbi → brand_business_info.rbi} +12 -30
  45. data/rbi/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rbi → brand_compliance_info.rbi} +2 -13
  46. data/rbi/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info.rbi → brand_contact_info.rbi} +2 -5
  47. data/rbi/sentdm/models/brands_brand_data.rbi +12 -51
  48. data/rbi/sentdm/models/contact_message_summary.rbi +144 -0
  49. data/rbi/sentdm/models/contact_retrieve_message_summary_params.rbi +49 -0
  50. data/rbi/sentdm/models/conversation_list_messages_params.rbi +65 -0
  51. data/rbi/sentdm/models/conversation_list_params.rbi +51 -0
  52. data/rbi/sentdm/models/conversation_messages_list.rbi +419 -0
  53. data/rbi/sentdm/models/message_send_response.rbi +2 -4
  54. data/rbi/sentdm/models/profile_detail.rbi +2 -10
  55. data/rbi/sentdm/models/profile_update_params.rbi +2 -2
  56. data/rbi/sentdm/models/profiles/{api_response_of_tcr_campaign_with_use_cases.rbi → api_response_of_brand_campaign.rbi} +8 -10
  57. data/rbi/sentdm/models/profiles/{campaign_list_response.rbi → api_response_of_list_of_brand_campaign.rbi} +5 -13
  58. data/rbi/sentdm/models/profiles/brand_campaign.rbi +299 -0
  59. data/rbi/sentdm/models/profiles/campaign_data.rbi +16 -18
  60. data/rbi/sentdm/models/profiles/campaign_use_case.rbi +110 -0
  61. data/rbi/sentdm/models/profiles/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbi → campaign_use_case_data.rbi} +2 -2
  62. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_body.rbi → template_body.rbi} +2 -7
  63. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button.rbi → template_button.rbi} +6 -22
  64. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button_props.rbi → template_button_props.rbi} +2 -5
  65. data/rbi/sentdm/models/template_definition.rbi +19 -87
  66. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_footer.rbi → template_footer.rbi} +2 -5
  67. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_header.rbi → template_header.rbi} +2 -5
  68. data/rbi/sentdm/models.rbi +36 -27
  69. data/rbi/sentdm/resources/contacts.rbi +20 -0
  70. data/rbi/sentdm/resources/conversations.rbi +61 -0
  71. data/rbi/sentdm/resources/messages.rbi +4 -1
  72. data/rbi/sentdm/resources/profiles/campaigns.rbi +3 -3
  73. data/rbi/sentdm/resources/profiles.rbi +29 -18
  74. data/sig/sentdm/client.rbs +2 -0
  75. data/sig/sentdm/models/api_response_of_contact_message_summary.rbs +39 -0
  76. data/sig/sentdm/models/api_response_of_conversation_messages_list.rbs +39 -0
  77. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_authentication_config.rbs → authentication_config.rbs} +2 -2
  78. data/sig/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rbs → brand_business_info.rbs} +7 -7
  79. data/sig/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rbs → brand_compliance_info.rbs} +2 -7
  80. data/sig/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info.rbs → brand_contact_info.rbs} +2 -2
  81. data/sig/sentdm/models/brands_brand_data.rbs +12 -12
  82. data/sig/sentdm/models/contact_message_summary.rbs +84 -0
  83. data/sig/sentdm/models/contact_retrieve_message_summary_params.rbs +30 -0
  84. data/sig/sentdm/models/conversation_list_messages_params.rbs +38 -0
  85. data/sig/sentdm/models/conversation_list_params.rbs +34 -0
  86. data/sig/sentdm/models/conversation_messages_list.rbs +240 -0
  87. data/sig/sentdm/models/profile_detail.rbs +0 -5
  88. data/sig/sentdm/models/profiles/{campaign_list_response.rbs → api_response_of_brand_campaign.rbs} +6 -6
  89. data/sig/sentdm/models/profiles/{api_response_of_tcr_campaign_with_use_cases.rbs → api_response_of_list_of_brand_campaign.rbs} +6 -6
  90. data/sig/sentdm/models/profiles/brand_campaign.rbs +194 -0
  91. data/sig/sentdm/models/profiles/campaign_data.rbs +12 -7
  92. data/sig/sentdm/models/profiles/campaign_use_case.rbs +66 -0
  93. data/sig/sentdm/models/profiles/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbs → campaign_use_case_data.rbs} +2 -2
  94. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_body.rbs → template_body.rbs} +2 -2
  95. data/sig/sentdm/models/template_button.rbs +28 -0
  96. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button_props.rbs → template_button_props.rbs} +2 -2
  97. data/sig/sentdm/models/template_definition.rbs +20 -20
  98. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_footer.rbs → template_footer.rbs} +2 -2
  99. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_header.rbs → template_header.rbs} +2 -2
  100. data/sig/sentdm/models.rbs +32 -18
  101. data/sig/sentdm/resources/contacts.rbs +6 -0
  102. data/sig/sentdm/resources/conversations.rbs +22 -0
  103. data/sig/sentdm/resources/profiles/campaigns.rbs +3 -3
  104. metadata +68 -44
  105. data/lib/sentdm/models/profiles/base_dto.rb +0 -32
  106. data/rbi/sentdm/models/profiles/base_dto.rbi +0 -53
  107. data/rbi/sentdm/models/profiles/tcr_campaign_with_use_cases.rbi +0 -425
  108. data/sig/sentdm/models/profiles/base_dto.rbs +0 -27
  109. data/sig/sentdm/models/profiles/tcr_campaign_with_use_cases.rbs +0 -306
  110. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rbs +0 -32
@@ -0,0 +1,299 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Profiles
6
+ class BrandCampaign < Sentdm::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(Sentdm::Profiles::BrandCampaign, Sentdm::Internal::AnyHash)
10
+ end
11
+
12
+ sig { returns(T.nilable(String)) }
13
+ attr_reader :id
14
+
15
+ sig { params(id: String).void }
16
+ attr_writer :id
17
+
18
+ sig { returns(T.nilable(Time)) }
19
+ attr_accessor :billed_date
20
+
21
+ sig { returns(T.nilable(String)) }
22
+ attr_accessor :brand_id
23
+
24
+ sig { returns(T.nilable(Float)) }
25
+ attr_accessor :cost
26
+
27
+ sig { returns(T.nilable(Time)) }
28
+ attr_reader :created_at
29
+
30
+ sig { params(created_at: Time).void }
31
+ attr_writer :created_at
32
+
33
+ sig { returns(T.nilable(String)) }
34
+ attr_reader :customer_id
35
+
36
+ sig { params(customer_id: String).void }
37
+ attr_writer :customer_id
38
+
39
+ # True once every carrier has completed its DCA election and the campaign is
40
+ # operationally ready for traffic.
41
+ sig { returns(T.nilable(T::Boolean)) }
42
+ attr_accessor :dca_elections_complete
43
+
44
+ sig { returns(T.nilable(Time)) }
45
+ attr_accessor :dca_elections_completed_at
46
+
47
+ sig { returns(T.nilable(String)) }
48
+ attr_reader :description
49
+
50
+ sig { params(description: String).void }
51
+ attr_writer :description
52
+
53
+ # True when the one-time campaign submission fee has already been charged.
54
+ sig { returns(T.nilable(T::Boolean)) }
55
+ attr_reader :has_submission_transaction
56
+
57
+ sig { params(has_submission_transaction: T::Boolean).void }
58
+ attr_writer :has_submission_transaction
59
+
60
+ sig { returns(T.nilable(String)) }
61
+ attr_accessor :help_keywords
62
+
63
+ sig { returns(T.nilable(String)) }
64
+ attr_accessor :help_message
65
+
66
+ sig { returns(T.nilable(String)) }
67
+ attr_accessor :message_flow
68
+
69
+ sig { returns(T.nilable(String)) }
70
+ attr_reader :name
71
+
72
+ sig { params(name: String).void }
73
+ attr_writer :name
74
+
75
+ sig { returns(T.nilable(String)) }
76
+ attr_accessor :optin_keywords
77
+
78
+ sig { returns(T.nilable(String)) }
79
+ attr_accessor :optin_message
80
+
81
+ sig { returns(T.nilable(String)) }
82
+ attr_accessor :optout_keywords
83
+
84
+ sig { returns(T.nilable(String)) }
85
+ attr_accessor :optout_message
86
+
87
+ sig { returns(T.nilable(String)) }
88
+ attr_accessor :privacy_policy_link
89
+
90
+ sig do
91
+ returns(
92
+ T.nilable(Sentdm::Profiles::BrandCampaign::Status::TaggedSymbol)
93
+ )
94
+ end
95
+ attr_accessor :status
96
+
97
+ sig { returns(T.nilable(Time)) }
98
+ attr_accessor :submitted_at
99
+
100
+ sig { returns(T.nilable(T::Boolean)) }
101
+ attr_reader :submitted_to_tcr
102
+
103
+ sig { params(submitted_to_tcr: T::Boolean).void }
104
+ attr_writer :submitted_to_tcr
105
+
106
+ # The Campaign Registry identifier, once the campaign has been accepted.
107
+ sig { returns(T.nilable(String)) }
108
+ attr_accessor :tcr_campaign_id
109
+
110
+ # Surfaced so customers can see why a submission did not reach the registry.
111
+ sig { returns(T.nilable(String)) }
112
+ attr_accessor :tcr_sync_error
113
+
114
+ sig { returns(T.nilable(String)) }
115
+ attr_accessor :terms_and_conditions_link
116
+
117
+ # Campaign type (for example KYC or App).
118
+ sig { returns(T.nilable(String)) }
119
+ attr_reader :type
120
+
121
+ sig { params(type: String).void }
122
+ attr_writer :type
123
+
124
+ sig { returns(T.nilable(Time)) }
125
+ attr_accessor :updated_at
126
+
127
+ sig { returns(T.nilable(T::Array[Sentdm::Profiles::CampaignUseCase])) }
128
+ attr_reader :use_cases
129
+
130
+ sig do
131
+ params(
132
+ use_cases: T::Array[Sentdm::Profiles::CampaignUseCase::OrHash]
133
+ ).void
134
+ end
135
+ attr_writer :use_cases
136
+
137
+ # Expected messaging volume for this campaign — customer-supplied on
138
+ # create/update, and the input to both the TCR usecase classification (LOW_VOLUME
139
+ # vs MIXED/specific) and the campaign fee tier. Surfaced so customers can read
140
+ # back the value they set.
141
+ sig { returns(T.nilable(String)) }
142
+ attr_accessor :volume
143
+
144
+ # A 10DLC campaign registered for a brand.
145
+ sig do
146
+ params(
147
+ id: String,
148
+ billed_date: T.nilable(Time),
149
+ brand_id: T.nilable(String),
150
+ cost: T.nilable(Float),
151
+ created_at: Time,
152
+ customer_id: String,
153
+ dca_elections_complete: T.nilable(T::Boolean),
154
+ dca_elections_completed_at: T.nilable(Time),
155
+ description: String,
156
+ has_submission_transaction: T::Boolean,
157
+ help_keywords: T.nilable(String),
158
+ help_message: T.nilable(String),
159
+ message_flow: T.nilable(String),
160
+ name: String,
161
+ optin_keywords: T.nilable(String),
162
+ optin_message: T.nilable(String),
163
+ optout_keywords: T.nilable(String),
164
+ optout_message: T.nilable(String),
165
+ privacy_policy_link: T.nilable(String),
166
+ status:
167
+ T.nilable(Sentdm::Profiles::BrandCampaign::Status::OrSymbol),
168
+ submitted_at: T.nilable(Time),
169
+ submitted_to_tcr: T::Boolean,
170
+ tcr_campaign_id: T.nilable(String),
171
+ tcr_sync_error: T.nilable(String),
172
+ terms_and_conditions_link: T.nilable(String),
173
+ type: String,
174
+ updated_at: T.nilable(Time),
175
+ use_cases: T::Array[Sentdm::Profiles::CampaignUseCase::OrHash],
176
+ volume: T.nilable(String)
177
+ ).returns(T.attached_class)
178
+ end
179
+ def self.new(
180
+ id: nil,
181
+ billed_date: nil,
182
+ brand_id: nil,
183
+ cost: nil,
184
+ created_at: nil,
185
+ customer_id: nil,
186
+ # True once every carrier has completed its DCA election and the campaign is
187
+ # operationally ready for traffic.
188
+ dca_elections_complete: nil,
189
+ dca_elections_completed_at: nil,
190
+ description: nil,
191
+ # True when the one-time campaign submission fee has already been charged.
192
+ has_submission_transaction: nil,
193
+ help_keywords: nil,
194
+ help_message: nil,
195
+ message_flow: nil,
196
+ name: nil,
197
+ optin_keywords: nil,
198
+ optin_message: nil,
199
+ optout_keywords: nil,
200
+ optout_message: nil,
201
+ privacy_policy_link: nil,
202
+ status: nil,
203
+ submitted_at: nil,
204
+ submitted_to_tcr: nil,
205
+ # The Campaign Registry identifier, once the campaign has been accepted.
206
+ tcr_campaign_id: nil,
207
+ # Surfaced so customers can see why a submission did not reach the registry.
208
+ tcr_sync_error: nil,
209
+ terms_and_conditions_link: nil,
210
+ # Campaign type (for example KYC or App).
211
+ type: nil,
212
+ updated_at: nil,
213
+ use_cases: nil,
214
+ # Expected messaging volume for this campaign — customer-supplied on
215
+ # create/update, and the input to both the TCR usecase classification (LOW_VOLUME
216
+ # vs MIXED/specific) and the campaign fee tier. Surfaced so customers can read
217
+ # back the value they set.
218
+ volume: nil
219
+ )
220
+ end
221
+
222
+ sig do
223
+ override.returns(
224
+ {
225
+ id: String,
226
+ billed_date: T.nilable(Time),
227
+ brand_id: T.nilable(String),
228
+ cost: T.nilable(Float),
229
+ created_at: Time,
230
+ customer_id: String,
231
+ dca_elections_complete: T.nilable(T::Boolean),
232
+ dca_elections_completed_at: T.nilable(Time),
233
+ description: String,
234
+ has_submission_transaction: T::Boolean,
235
+ help_keywords: T.nilable(String),
236
+ help_message: T.nilable(String),
237
+ message_flow: T.nilable(String),
238
+ name: String,
239
+ optin_keywords: T.nilable(String),
240
+ optin_message: T.nilable(String),
241
+ optout_keywords: T.nilable(String),
242
+ optout_message: T.nilable(String),
243
+ privacy_policy_link: T.nilable(String),
244
+ status:
245
+ T.nilable(
246
+ Sentdm::Profiles::BrandCampaign::Status::TaggedSymbol
247
+ ),
248
+ submitted_at: T.nilable(Time),
249
+ submitted_to_tcr: T::Boolean,
250
+ tcr_campaign_id: T.nilable(String),
251
+ tcr_sync_error: T.nilable(String),
252
+ terms_and_conditions_link: T.nilable(String),
253
+ type: String,
254
+ updated_at: T.nilable(Time),
255
+ use_cases: T::Array[Sentdm::Profiles::CampaignUseCase],
256
+ volume: T.nilable(String)
257
+ }
258
+ )
259
+ end
260
+ def to_hash
261
+ end
262
+
263
+ module Status
264
+ extend Sentdm::Internal::Type::Enum
265
+
266
+ TaggedSymbol =
267
+ T.type_alias do
268
+ T.all(Symbol, Sentdm::Profiles::BrandCampaign::Status)
269
+ end
270
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
271
+
272
+ SENT_CREATED =
273
+ T.let(
274
+ :SENT_CREATED,
275
+ Sentdm::Profiles::BrandCampaign::Status::TaggedSymbol
276
+ )
277
+ ACTIVE =
278
+ T.let(
279
+ :ACTIVE,
280
+ Sentdm::Profiles::BrandCampaign::Status::TaggedSymbol
281
+ )
282
+ EXPIRED =
283
+ T.let(
284
+ :EXPIRED,
285
+ Sentdm::Profiles::BrandCampaign::Status::TaggedSymbol
286
+ )
287
+
288
+ sig do
289
+ override.returns(
290
+ T::Array[Sentdm::Profiles::BrandCampaign::Status::TaggedSymbol]
291
+ )
292
+ end
293
+ def self.values
294
+ end
295
+ end
296
+ end
297
+ end
298
+ end
299
+ end
@@ -22,13 +22,7 @@ module Sentdm
22
22
  attr_accessor :type
23
23
 
24
24
  # List of use cases with sample messages
25
- sig do
26
- returns(
27
- T::Array[
28
- Sentdm::Profiles::SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData
29
- ]
30
- )
31
- end
25
+ sig { returns(T::Array[Sentdm::Profiles::CampaignUseCaseData]) }
32
26
  attr_accessor :use_cases
33
27
 
34
28
  # Comma-separated keywords that trigger help message (e.g., "HELP, INFO, SUPPORT")
@@ -67,16 +61,18 @@ module Sentdm
67
61
  sig { returns(T.nilable(String)) }
68
62
  attr_accessor :terms_and_conditions_link
69
63
 
64
+ # Expected messaging volume for this campaign. Numeric string (e.g. "1999",
65
+ # "5000"); values below 2000 bill at the low-volume tier.
66
+ sig { returns(T.nilable(String)) }
67
+ attr_accessor :volume
68
+
70
69
  # Campaign data for create or update operation
71
70
  sig do
72
71
  params(
73
72
  description: String,
74
73
  name: String,
75
74
  type: String,
76
- use_cases:
77
- T::Array[
78
- Sentdm::Profiles::SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData::OrHash
79
- ],
75
+ use_cases: T::Array[Sentdm::Profiles::CampaignUseCaseData::OrHash],
80
76
  help_keywords: T.nilable(String),
81
77
  help_message: T.nilable(String),
82
78
  message_flow: T.nilable(String),
@@ -85,7 +81,8 @@ module Sentdm
85
81
  optout_keywords: T.nilable(String),
86
82
  optout_message: T.nilable(String),
87
83
  privacy_policy_link: T.nilable(String),
88
- terms_and_conditions_link: T.nilable(String)
84
+ terms_and_conditions_link: T.nilable(String),
85
+ volume: T.nilable(String)
89
86
  ).returns(T.attached_class)
90
87
  end
91
88
  def self.new(
@@ -114,7 +111,10 @@ module Sentdm
114
111
  # URL to privacy policy
115
112
  privacy_policy_link: nil,
116
113
  # URL to terms and conditions
117
- terms_and_conditions_link: nil
114
+ terms_and_conditions_link: nil,
115
+ # Expected messaging volume for this campaign. Numeric string (e.g. "1999",
116
+ # "5000"); values below 2000 bill at the low-volume tier.
117
+ volume: nil
118
118
  )
119
119
  end
120
120
 
@@ -124,10 +124,7 @@ module Sentdm
124
124
  description: String,
125
125
  name: String,
126
126
  type: String,
127
- use_cases:
128
- T::Array[
129
- Sentdm::Profiles::SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData
130
- ],
127
+ use_cases: T::Array[Sentdm::Profiles::CampaignUseCaseData],
131
128
  help_keywords: T.nilable(String),
132
129
  help_message: T.nilable(String),
133
130
  message_flow: T.nilable(String),
@@ -136,7 +133,8 @@ module Sentdm
136
133
  optout_keywords: T.nilable(String),
137
134
  optout_message: T.nilable(String),
138
135
  privacy_policy_link: T.nilable(String),
139
- terms_and_conditions_link: T.nilable(String)
136
+ terms_and_conditions_link: T.nilable(String),
137
+ volume: T.nilable(String)
140
138
  }
141
139
  )
142
140
  end
@@ -0,0 +1,110 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Profiles
6
+ class CampaignUseCase < Sentdm::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(Sentdm::Profiles::CampaignUseCase, Sentdm::Internal::AnyHash)
10
+ end
11
+
12
+ sig { returns(T.nilable(String)) }
13
+ attr_reader :id
14
+
15
+ sig { params(id: String).void }
16
+ attr_writer :id
17
+
18
+ sig { returns(T.nilable(String)) }
19
+ attr_reader :campaign_id
20
+
21
+ sig { params(campaign_id: String).void }
22
+ attr_writer :campaign_id
23
+
24
+ sig { returns(T.nilable(Time)) }
25
+ attr_reader :created_at
26
+
27
+ sig { params(created_at: Time).void }
28
+ attr_writer :created_at
29
+
30
+ sig { returns(T.nilable(String)) }
31
+ attr_reader :customer_id
32
+
33
+ sig { params(customer_id: String).void }
34
+ attr_writer :customer_id
35
+
36
+ sig do
37
+ returns(T.nilable(Sentdm::Profiles::MessagingUseCaseUs::TaggedSymbol))
38
+ end
39
+ attr_reader :messaging_use_case_us
40
+
41
+ sig do
42
+ params(
43
+ messaging_use_case_us:
44
+ Sentdm::Profiles::MessagingUseCaseUs::OrSymbol
45
+ ).void
46
+ end
47
+ attr_writer :messaging_use_case_us
48
+
49
+ # Sample messages submitted to the registry for this use case.
50
+ sig { returns(T.nilable(T::Array[String])) }
51
+ attr_reader :sample_messages
52
+
53
+ sig { params(sample_messages: T::Array[String]).void }
54
+ attr_writer :sample_messages
55
+
56
+ sig { returns(T.nilable(Time)) }
57
+ attr_accessor :updated_at
58
+
59
+ # Customer-facing use-case representation for the public v3 campaign contract.
60
+ # Exists for the same reason as BrandCampaignV3Response: nesting the
61
+ # TcrCampaignUseCase database entity in a public response means any column added
62
+ # to that table silently becomes part of the customer-facing contract. This DTO is
63
+ # an explicit allowlist, so a new column stays invisible until it is added here on
64
+ # purpose. This mirrors exactly the fields the entity already serialized, so it
65
+ # removes nothing from the current response shape. It only closes the future-leak
66
+ # path.
67
+ sig do
68
+ params(
69
+ id: String,
70
+ campaign_id: String,
71
+ created_at: Time,
72
+ customer_id: String,
73
+ messaging_use_case_us:
74
+ Sentdm::Profiles::MessagingUseCaseUs::OrSymbol,
75
+ sample_messages: T::Array[String],
76
+ updated_at: T.nilable(Time)
77
+ ).returns(T.attached_class)
78
+ end
79
+ def self.new(
80
+ id: nil,
81
+ campaign_id: nil,
82
+ created_at: nil,
83
+ customer_id: nil,
84
+ messaging_use_case_us: nil,
85
+ # Sample messages submitted to the registry for this use case.
86
+ sample_messages: nil,
87
+ updated_at: nil
88
+ )
89
+ end
90
+
91
+ sig do
92
+ override.returns(
93
+ {
94
+ id: String,
95
+ campaign_id: String,
96
+ created_at: Time,
97
+ customer_id: String,
98
+ messaging_use_case_us:
99
+ Sentdm::Profiles::MessagingUseCaseUs::TaggedSymbol,
100
+ sample_messages: T::Array[String],
101
+ updated_at: T.nilable(Time)
102
+ }
103
+ )
104
+ end
105
+ def to_hash
106
+ end
107
+ end
108
+ end
109
+ end
110
+ end
@@ -3,11 +3,11 @@
3
3
  module Sentdm
4
4
  module Models
5
5
  module Profiles
6
- class SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData < Sentdm::Internal::Type::BaseModel
6
+ class CampaignUseCaseData < Sentdm::Internal::Type::BaseModel
7
7
  OrHash =
8
8
  T.type_alias do
9
9
  T.any(
10
- Sentdm::Profiles::SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData,
10
+ Sentdm::Profiles::CampaignUseCaseData,
11
11
  Sentdm::Internal::AnyHash
12
12
  )
13
13
  end
@@ -2,14 +2,9 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- class SentDmServicesCommonContractsPocOsTemplateBody < Sentdm::Internal::Type::BaseModel
5
+ class TemplateBody < Sentdm::Internal::Type::BaseModel
6
6
  OrHash =
7
- T.type_alias do
8
- T.any(
9
- Sentdm::SentDmServicesCommonContractsPocOsTemplateBody,
10
- Sentdm::Internal::AnyHash
11
- )
12
- end
7
+ T.type_alias { T.any(Sentdm::TemplateBody, Sentdm::Internal::AnyHash) }
13
8
 
14
9
  # Content that will be used for all channels (SMS and WhatsApp) unless
15
10
  # channel-specific content is provided
@@ -2,27 +2,17 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- class SentDmServicesCommonContractsPocOsTemplateButton < Sentdm::Internal::Type::BaseModel
5
+ class TemplateButton < Sentdm::Internal::Type::BaseModel
6
6
  OrHash =
7
7
  T.type_alias do
8
- T.any(
9
- Sentdm::SentDmServicesCommonContractsPocOsTemplateButton,
10
- Sentdm::Internal::AnyHash
11
- )
8
+ T.any(Sentdm::TemplateButton, Sentdm::Internal::AnyHash)
12
9
  end
13
10
 
14
11
  # Properties specific to the button type
15
- sig do
16
- returns(Sentdm::SentDmServicesCommonContractsPocOsTemplateButtonProps)
17
- end
12
+ sig { returns(Sentdm::TemplateButtonProps) }
18
13
  attr_reader :props
19
14
 
20
- sig do
21
- params(
22
- props:
23
- Sentdm::SentDmServicesCommonContractsPocOsTemplateButtonProps::OrHash
24
- ).void
25
- end
15
+ sig { params(props: Sentdm::TemplateButtonProps::OrHash).void }
26
16
  attr_writer :props
27
17
 
28
18
  # The type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, VOICE_CALL, COPY_CODE)
@@ -39,8 +29,7 @@ module Sentdm
39
29
  # Interactive button in a message template
40
30
  sig do
41
31
  params(
42
- props:
43
- Sentdm::SentDmServicesCommonContractsPocOsTemplateButtonProps::OrHash,
32
+ props: Sentdm::TemplateButtonProps::OrHash,
44
33
  type: String,
45
34
  id: Integer
46
35
  ).returns(T.attached_class)
@@ -57,12 +46,7 @@ module Sentdm
57
46
 
58
47
  sig do
59
48
  override.returns(
60
- {
61
- props:
62
- Sentdm::SentDmServicesCommonContractsPocOsTemplateButtonProps,
63
- type: String,
64
- id: Integer
65
- }
49
+ { props: Sentdm::TemplateButtonProps, type: String, id: Integer }
66
50
  )
67
51
  end
68
52
  def to_hash
@@ -2,13 +2,10 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- class SentDmServicesCommonContractsPocOsTemplateButtonProps < Sentdm::Internal::Type::BaseModel
5
+ class TemplateButtonProps < Sentdm::Internal::Type::BaseModel
6
6
  OrHash =
7
7
  T.type_alias do
8
- T.any(
9
- Sentdm::SentDmServicesCommonContractsPocOsTemplateButtonProps,
10
- Sentdm::Internal::AnyHash
11
- )
8
+ T.any(Sentdm::TemplateButtonProps, Sentdm::Internal::AnyHash)
12
9
  end
13
10
 
14
11
  sig { returns(Integer) }