sentdm 0.4.0 → 0.5.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 (149) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -27
  4. data/lib/sentdm/client.rb +5 -8
  5. data/lib/sentdm/internal/type/base_model.rb +5 -5
  6. data/lib/sentdm/models/{api_response_contact.rb → api_response_of_contact.rb} +4 -4
  7. data/lib/sentdm/models/base_dto.rb +30 -0
  8. data/lib/sentdm/models/billing_contact_info.rb +47 -0
  9. data/lib/sentdm/models/{brand_data.rb → brands_brand_data.rb} +17 -17
  10. data/lib/sentdm/models/contact_delete_params.rb +1 -1
  11. data/lib/sentdm/models/contact_list_response.rb +3 -3
  12. data/lib/sentdm/models/{contact.rb → contact_response.rb} +1 -1
  13. data/lib/sentdm/models/{mutation_request.rb → mutation_request_base.rb} +2 -2
  14. data/lib/sentdm/models/number_lookup_params.rb +26 -0
  15. data/lib/sentdm/models/number_lookup_response.rb +104 -0
  16. data/lib/sentdm/models/payment_details.rb +44 -0
  17. data/lib/sentdm/models/{profile_complete_params.rb → profile_complete_setup_params.rb} +3 -3
  18. data/lib/sentdm/models/{profile_complete_response.rb → profile_complete_setup_response.rb} +1 -1
  19. data/lib/sentdm/models/profile_create_params.rb +9 -91
  20. data/lib/sentdm/models/profile_delete_params.rb +1 -1
  21. data/lib/sentdm/models/profile_detail.rb +369 -3
  22. data/lib/sentdm/models/profile_update_params.rb +9 -91
  23. data/lib/sentdm/models/{brands/api_response_tcr_campaign_with_use_cases.rb → profiles/api_response_of_tcr_campaign_with_use_cases.rb} +6 -5
  24. data/lib/sentdm/models/profiles/campaign_create_params.rb +57 -0
  25. data/lib/sentdm/models/{brands → profiles}/campaign_data.rb +28 -7
  26. data/lib/sentdm/models/profiles/campaign_delete_params.rb +50 -0
  27. data/lib/sentdm/models/profiles/campaign_list_params.rb +28 -0
  28. data/lib/sentdm/models/profiles/campaign_list_response.rb +47 -0
  29. data/lib/sentdm/models/profiles/campaign_update_params.rb +64 -0
  30. data/lib/sentdm/models/{brands → profiles}/messaging_use_case_us.rb +1 -1
  31. data/lib/sentdm/models/{brands → profiles}/tcr_campaign_with_use_cases.rb +15 -15
  32. data/lib/sentdm/models/template_definition.rb +255 -15
  33. data/lib/sentdm/models/user_remove_params.rb +1 -1
  34. data/lib/sentdm/models/webhook_rotate_secret_params.rb +1 -1
  35. data/lib/sentdm/models.rb +14 -26
  36. data/lib/sentdm/resources/contacts.rb +6 -6
  37. data/lib/sentdm/resources/numbers.rb +44 -0
  38. data/lib/sentdm/resources/profiles/campaigns.rb +160 -0
  39. data/lib/sentdm/resources/profiles.rb +16 -11
  40. data/lib/sentdm/version.rb +1 -1
  41. data/lib/sentdm.rb +22 -22
  42. data/rbi/sentdm/client.rbi +4 -6
  43. data/rbi/sentdm/models/{api_response_contact.rbi → api_response_of_contact.rbi} +6 -6
  44. data/rbi/sentdm/models/base_dto.rbi +49 -0
  45. data/rbi/sentdm/models/billing_contact_info.rbi +65 -0
  46. data/rbi/sentdm/models/{brand_data.rbi → brands_brand_data.rbi} +44 -27
  47. data/rbi/sentdm/models/contact_delete_params.rbi +1 -1
  48. data/rbi/sentdm/models/contact_list_response.rbi +4 -4
  49. data/rbi/sentdm/models/{contact.rbi → contact_response.rbi} +4 -2
  50. data/rbi/sentdm/models/{mutation_request.rbi → mutation_request_base.rbi} +2 -2
  51. data/rbi/sentdm/models/number_lookup_params.rbi +46 -0
  52. data/rbi/sentdm/models/number_lookup_response.rbi +166 -0
  53. data/rbi/sentdm/models/payment_details.rbi +59 -0
  54. data/rbi/sentdm/models/{profile_complete_params.rbi → profile_complete_setup_params.rbi} +2 -2
  55. data/rbi/sentdm/models/{profile_complete_response.rbi → profile_complete_setup_response.rbi} +1 -1
  56. data/rbi/sentdm/models/profile_create_params.rbi +12 -146
  57. data/rbi/sentdm/models/profile_delete_params.rbi +1 -1
  58. data/rbi/sentdm/models/profile_detail.rbi +562 -4
  59. data/rbi/sentdm/models/profile_update_params.rbi +12 -146
  60. data/rbi/sentdm/models/{brands/api_response_tcr_campaign_with_use_cases.rbi → profiles/api_response_of_tcr_campaign_with_use_cases.rbi} +7 -7
  61. data/rbi/sentdm/models/profiles/campaign_create_params.rbi +88 -0
  62. data/rbi/sentdm/models/{brands → profiles}/campaign_data.rbi +51 -16
  63. data/rbi/sentdm/models/profiles/campaign_delete_params.rbi +95 -0
  64. data/rbi/sentdm/models/profiles/campaign_list_params.rbi +51 -0
  65. data/rbi/sentdm/models/profiles/campaign_list_response.rbi +84 -0
  66. data/rbi/sentdm/models/profiles/campaign_update_params.rbi +94 -0
  67. data/rbi/sentdm/models/{brands → profiles}/messaging_use_case_us.rbi +20 -16
  68. data/rbi/sentdm/models/{brands → profiles}/tcr_campaign_with_use_cases.rbi +37 -29
  69. data/rbi/sentdm/models/template_definition.rbi +405 -74
  70. data/rbi/sentdm/models/user_remove_params.rbi +1 -1
  71. data/rbi/sentdm/models/webhook_rotate_secret_params.rbi +1 -1
  72. data/rbi/sentdm/models.rbi +14 -26
  73. data/rbi/sentdm/resources/contacts.rbi +3 -3
  74. data/rbi/sentdm/resources/numbers.rbi +32 -0
  75. data/rbi/sentdm/resources/profiles/campaigns.rbi +127 -0
  76. data/rbi/sentdm/resources/profiles.rbi +11 -11
  77. data/sig/sentdm/client.rbs +2 -4
  78. data/sig/sentdm/models/{api_response_contact.rbs → api_response_of_contact.rbs} +6 -6
  79. data/sig/sentdm/models/base_dto.rbs +25 -0
  80. data/sig/sentdm/models/billing_contact_info.rbs +30 -0
  81. data/sig/sentdm/models/{brand_data.rbs → brands_brand_data.rbs} +19 -19
  82. data/sig/sentdm/models/contact_delete_params.rbs +1 -1
  83. data/sig/sentdm/models/contact_list_response.rbs +7 -5
  84. data/sig/sentdm/models/{contact.rbs → contact_response.rbs} +2 -2
  85. data/sig/sentdm/models/{mutation_request.rbs → mutation_request_base.rbs} +2 -2
  86. data/sig/sentdm/models/number_lookup_params.rbs +30 -0
  87. data/sig/sentdm/models/number_lookup_response.rbs +100 -0
  88. data/sig/sentdm/models/payment_details.rbs +30 -0
  89. data/sig/sentdm/models/{profile_complete_params.rbs → profile_complete_setup_params.rbs} +2 -2
  90. data/sig/sentdm/models/profile_complete_setup_response.rbs +5 -0
  91. data/sig/sentdm/models/profile_create_params.rbs +12 -66
  92. data/sig/sentdm/models/profile_delete_params.rbs +1 -1
  93. data/sig/sentdm/models/profile_detail.rbs +289 -4
  94. data/sig/sentdm/models/profile_update_params.rbs +12 -66
  95. data/sig/sentdm/models/profiles/api_response_of_tcr_campaign_with_use_cases.rbs +41 -0
  96. data/sig/sentdm/models/profiles/campaign_create_params.rbs +54 -0
  97. data/sig/sentdm/models/{brands → profiles}/campaign_data.rbs +27 -5
  98. data/sig/sentdm/models/profiles/campaign_delete_params.rbs +53 -0
  99. data/sig/sentdm/models/profiles/campaign_list_params.rbs +32 -0
  100. data/sig/sentdm/models/{brands/api_response_tcr_campaign_with_use_cases.rbs → profiles/campaign_list_response.rbs} +7 -7
  101. data/sig/sentdm/models/profiles/campaign_update_params.rbs +59 -0
  102. data/sig/sentdm/models/{brands → profiles}/messaging_use_case_us.rbs +2 -2
  103. data/sig/sentdm/models/{brands → profiles}/tcr_campaign_with_use_cases.rbs +29 -29
  104. data/sig/sentdm/models/template_definition.rbs +233 -20
  105. data/sig/sentdm/models/user_remove_params.rbs +1 -1
  106. data/sig/sentdm/models/webhook_rotate_secret_params.rbs +1 -1
  107. data/sig/sentdm/models.rbs +14 -20
  108. data/sig/sentdm/resources/contacts.rbs +3 -3
  109. data/sig/sentdm/resources/numbers.rbs +13 -0
  110. data/sig/sentdm/resources/profiles/campaigns.rbs +42 -0
  111. data/sig/sentdm/resources/profiles.rbs +9 -7
  112. metadata +67 -67
  113. data/lib/sentdm/models/brand_with_kyc.rb +0 -370
  114. data/lib/sentdm/models/brands/base_dto.rb +0 -32
  115. data/lib/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rb +0 -30
  116. data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rb +0 -34
  117. data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rb +0 -40
  118. data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rb +0 -38
  119. data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rb +0 -81
  120. data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rb +0 -34
  121. data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rb +0 -39
  122. data/lib/sentdm/resources/brands/campaigns.rb +0 -16
  123. data/lib/sentdm/resources/brands.rb +0 -18
  124. data/lib/sentdm/resources/lookup.rb +0 -14
  125. data/rbi/sentdm/models/brand_with_kyc.rbi +0 -516
  126. data/rbi/sentdm/models/brands/base_dto.rbi +0 -53
  127. data/rbi/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbi +0 -52
  128. data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rbi +0 -56
  129. data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rbi +0 -76
  130. data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rbi +0 -79
  131. data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rbi +0 -104
  132. data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rbi +0 -60
  133. data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rbi +0 -62
  134. data/rbi/sentdm/resources/brands/campaigns.rbi +0 -14
  135. data/rbi/sentdm/resources/brands.rbi +0 -15
  136. data/rbi/sentdm/resources/lookup.rbi +0 -12
  137. data/sig/sentdm/models/brand_with_kyc.rbs +0 -288
  138. data/sig/sentdm/models/brands/base_dto.rbs +0 -27
  139. data/sig/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbs +0 -27
  140. data/sig/sentdm/models/profile_complete_response.rbs +0 -5
  141. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rbs +0 -24
  142. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rbs +0 -30
  143. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rbs +0 -38
  144. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rbs +0 -75
  145. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rbs +0 -32
  146. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rbs +0 -32
  147. data/sig/sentdm/resources/brands/campaigns.rbs +0 -9
  148. data/sig/sentdm/resources/brands.rbs +0 -9
  149. data/sig/sentdm/resources/lookup.rbs +0 -7
@@ -10,44 +10,28 @@ module Sentdm
10
10
 
11
11
  # Required template body with content for different channels (multi-channel,
12
12
  # SMS-specific, or WhatsApp-specific)
13
- sig { returns(Sentdm::SentDmServicesCommonContractsPocOsTemplateBody) }
13
+ sig { returns(Sentdm::TemplateDefinition::Body) }
14
14
  attr_reader :body
15
15
 
16
- sig do
17
- params(
18
- body: Sentdm::SentDmServicesCommonContractsPocOsTemplateBody::OrHash
19
- ).void
20
- end
16
+ sig { params(body: Sentdm::TemplateDefinition::Body::OrHash).void }
21
17
  attr_writer :body
22
18
 
23
19
  # Configuration specific to AUTHENTICATION category templates (optional)
24
20
  sig do
25
- returns(
26
- T.nilable(
27
- Sentdm::SentDmServicesCommonContractsPocOsAuthenticationConfig
28
- )
29
- )
21
+ returns(T.nilable(Sentdm::TemplateDefinition::AuthenticationConfig))
30
22
  end
31
23
  attr_reader :authentication_config
32
24
 
33
25
  sig do
34
26
  params(
35
27
  authentication_config:
36
- T.nilable(
37
- Sentdm::SentDmServicesCommonContractsPocOsAuthenticationConfig::OrHash
38
- )
28
+ T.nilable(Sentdm::TemplateDefinition::AuthenticationConfig::OrHash)
39
29
  ).void
40
30
  end
41
31
  attr_writer :authentication_config
42
32
 
43
33
  # Optional list of interactive buttons (e.g., quick replies, URLs, phone numbers)
44
- sig do
45
- returns(
46
- T.nilable(
47
- T::Array[Sentdm::SentDmServicesCommonContractsPocOsTemplateButton]
48
- )
49
- )
50
- end
34
+ sig { returns(T.nilable(T::Array[Sentdm::TemplateDefinition::Button])) }
51
35
  attr_accessor :buttons
52
36
 
53
37
  # The version of the template definition format
@@ -55,37 +39,23 @@ module Sentdm
55
39
  attr_accessor :definition_version
56
40
 
57
41
  # Optional template footer with optional variables
58
- sig do
59
- returns(
60
- T.nilable(Sentdm::SentDmServicesCommonContractsPocOsTemplateFooter)
61
- )
62
- end
42
+ sig { returns(T.nilable(Sentdm::TemplateDefinition::Footer)) }
63
43
  attr_reader :footer
64
44
 
65
45
  sig do
66
46
  params(
67
- footer:
68
- T.nilable(
69
- Sentdm::SentDmServicesCommonContractsPocOsTemplateFooter::OrHash
70
- )
47
+ footer: T.nilable(Sentdm::TemplateDefinition::Footer::OrHash)
71
48
  ).void
72
49
  end
73
50
  attr_writer :footer
74
51
 
75
52
  # Optional template header with optional variables
76
- sig do
77
- returns(
78
- T.nilable(Sentdm::SentDmServicesCommonContractsPocOsTemplateHeader)
79
- )
80
- end
53
+ sig { returns(T.nilable(Sentdm::TemplateDefinition::Header)) }
81
54
  attr_reader :header
82
55
 
83
56
  sig do
84
57
  params(
85
- header:
86
- T.nilable(
87
- Sentdm::SentDmServicesCommonContractsPocOsTemplateHeader::OrHash
88
- )
58
+ header: T.nilable(Sentdm::TemplateDefinition::Header::OrHash)
89
59
  ).void
90
60
  end
91
61
  attr_writer :header
@@ -94,26 +64,14 @@ module Sentdm
94
64
  # buttons
95
65
  sig do
96
66
  params(
97
- body: Sentdm::SentDmServicesCommonContractsPocOsTemplateBody::OrHash,
67
+ body: Sentdm::TemplateDefinition::Body::OrHash,
98
68
  authentication_config:
99
- T.nilable(
100
- Sentdm::SentDmServicesCommonContractsPocOsAuthenticationConfig::OrHash
101
- ),
69
+ T.nilable(Sentdm::TemplateDefinition::AuthenticationConfig::OrHash),
102
70
  buttons:
103
- T.nilable(
104
- T::Array[
105
- Sentdm::SentDmServicesCommonContractsPocOsTemplateButton::OrHash
106
- ]
107
- ),
71
+ T.nilable(T::Array[Sentdm::TemplateDefinition::Button::OrHash]),
108
72
  definition_version: T.nilable(String),
109
- footer:
110
- T.nilable(
111
- Sentdm::SentDmServicesCommonContractsPocOsTemplateFooter::OrHash
112
- ),
113
- header:
114
- T.nilable(
115
- Sentdm::SentDmServicesCommonContractsPocOsTemplateHeader::OrHash
116
- )
73
+ footer: T.nilable(Sentdm::TemplateDefinition::Footer::OrHash),
74
+ header: T.nilable(Sentdm::TemplateDefinition::Header::OrHash)
117
75
  ).returns(T.attached_class)
118
76
  end
119
77
  def self.new(
@@ -136,31 +94,404 @@ module Sentdm
136
94
  sig do
137
95
  override.returns(
138
96
  {
139
- body: Sentdm::SentDmServicesCommonContractsPocOsTemplateBody,
97
+ body: Sentdm::TemplateDefinition::Body,
140
98
  authentication_config:
141
- T.nilable(
142
- Sentdm::SentDmServicesCommonContractsPocOsAuthenticationConfig
143
- ),
144
- buttons:
145
- T.nilable(
146
- T::Array[
147
- Sentdm::SentDmServicesCommonContractsPocOsTemplateButton
148
- ]
149
- ),
99
+ T.nilable(Sentdm::TemplateDefinition::AuthenticationConfig),
100
+ buttons: T.nilable(T::Array[Sentdm::TemplateDefinition::Button]),
150
101
  definition_version: T.nilable(String),
151
- footer:
152
- T.nilable(
153
- Sentdm::SentDmServicesCommonContractsPocOsTemplateFooter
154
- ),
155
- header:
156
- T.nilable(
157
- Sentdm::SentDmServicesCommonContractsPocOsTemplateHeader
158
- )
102
+ footer: T.nilable(Sentdm::TemplateDefinition::Footer),
103
+ header: T.nilable(Sentdm::TemplateDefinition::Header)
159
104
  }
160
105
  )
161
106
  end
162
107
  def to_hash
163
108
  end
109
+
110
+ class Body < Sentdm::Internal::Type::BaseModel
111
+ OrHash =
112
+ T.type_alias do
113
+ T.any(Sentdm::TemplateDefinition::Body, Sentdm::Internal::AnyHash)
114
+ end
115
+
116
+ # Content that will be used for all channels (SMS and WhatsApp) unless
117
+ # channel-specific content is provided
118
+ sig { returns(T.nilable(Sentdm::TemplateBodyContent)) }
119
+ attr_reader :multi_channel
120
+
121
+ sig do
122
+ params(
123
+ multi_channel: T.nilable(Sentdm::TemplateBodyContent::OrHash)
124
+ ).void
125
+ end
126
+ attr_writer :multi_channel
127
+
128
+ # SMS-specific content that overrides multi-channel content for SMS messages
129
+ sig { returns(T.nilable(Sentdm::TemplateBodyContent)) }
130
+ attr_reader :sms
131
+
132
+ sig { params(sms: T.nilable(Sentdm::TemplateBodyContent::OrHash)).void }
133
+ attr_writer :sms
134
+
135
+ # WhatsApp-specific content that overrides multi-channel content for WhatsApp
136
+ # messages
137
+ sig { returns(T.nilable(Sentdm::TemplateBodyContent)) }
138
+ attr_reader :whatsapp
139
+
140
+ sig do
141
+ params(whatsapp: T.nilable(Sentdm::TemplateBodyContent::OrHash)).void
142
+ end
143
+ attr_writer :whatsapp
144
+
145
+ # Required template body with content for different channels (multi-channel,
146
+ # SMS-specific, or WhatsApp-specific)
147
+ sig do
148
+ params(
149
+ multi_channel: T.nilable(Sentdm::TemplateBodyContent::OrHash),
150
+ sms: T.nilable(Sentdm::TemplateBodyContent::OrHash),
151
+ whatsapp: T.nilable(Sentdm::TemplateBodyContent::OrHash)
152
+ ).returns(T.attached_class)
153
+ end
154
+ def self.new(
155
+ # Content that will be used for all channels (SMS and WhatsApp) unless
156
+ # channel-specific content is provided
157
+ multi_channel: nil,
158
+ # SMS-specific content that overrides multi-channel content for SMS messages
159
+ sms: nil,
160
+ # WhatsApp-specific content that overrides multi-channel content for WhatsApp
161
+ # messages
162
+ whatsapp: nil
163
+ )
164
+ end
165
+
166
+ sig do
167
+ override.returns(
168
+ {
169
+ multi_channel: T.nilable(Sentdm::TemplateBodyContent),
170
+ sms: T.nilable(Sentdm::TemplateBodyContent),
171
+ whatsapp: T.nilable(Sentdm::TemplateBodyContent)
172
+ }
173
+ )
174
+ end
175
+ def to_hash
176
+ end
177
+ end
178
+
179
+ class AuthenticationConfig < Sentdm::Internal::Type::BaseModel
180
+ OrHash =
181
+ T.type_alias do
182
+ T.any(
183
+ Sentdm::TemplateDefinition::AuthenticationConfig,
184
+ Sentdm::Internal::AnyHash
185
+ )
186
+ end
187
+
188
+ # Whether to add the security recommendation text: "For your security, do not
189
+ # share this code."
190
+ sig { returns(T.nilable(T::Boolean)) }
191
+ attr_reader :add_security_recommendation
192
+
193
+ sig { params(add_security_recommendation: T::Boolean).void }
194
+ attr_writer :add_security_recommendation
195
+
196
+ # Code expiration time in minutes (1-90). If set, adds footer: "This code expires
197
+ # in X minutes."
198
+ sig { returns(T.nilable(Integer)) }
199
+ attr_accessor :code_expiration_minutes
200
+
201
+ # Configuration specific to AUTHENTICATION category templates (optional)
202
+ sig do
203
+ params(
204
+ add_security_recommendation: T::Boolean,
205
+ code_expiration_minutes: T.nilable(Integer)
206
+ ).returns(T.attached_class)
207
+ end
208
+ def self.new(
209
+ # Whether to add the security recommendation text: "For your security, do not
210
+ # share this code."
211
+ add_security_recommendation: nil,
212
+ # Code expiration time in minutes (1-90). If set, adds footer: "This code expires
213
+ # in X minutes."
214
+ code_expiration_minutes: nil
215
+ )
216
+ end
217
+
218
+ sig do
219
+ override.returns(
220
+ {
221
+ add_security_recommendation: T::Boolean,
222
+ code_expiration_minutes: T.nilable(Integer)
223
+ }
224
+ )
225
+ end
226
+ def to_hash
227
+ end
228
+ end
229
+
230
+ class Button < Sentdm::Internal::Type::BaseModel
231
+ OrHash =
232
+ T.type_alias do
233
+ T.any(Sentdm::TemplateDefinition::Button, Sentdm::Internal::AnyHash)
234
+ end
235
+
236
+ # The unique identifier of the button (1-based index)
237
+ sig { returns(T.nilable(Integer)) }
238
+ attr_reader :id
239
+
240
+ sig { params(id: Integer).void }
241
+ attr_writer :id
242
+
243
+ # Properties specific to the button type
244
+ sig { returns(T.nilable(Sentdm::TemplateDefinition::Button::Props)) }
245
+ attr_reader :props
246
+
247
+ sig do
248
+ params(props: Sentdm::TemplateDefinition::Button::Props::OrHash).void
249
+ end
250
+ attr_writer :props
251
+
252
+ # The type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, VOICE_CALL, COPY_CODE)
253
+ sig { returns(T.nilable(String)) }
254
+ attr_reader :type
255
+
256
+ sig { params(type: String).void }
257
+ attr_writer :type
258
+
259
+ # Interactive button in a message template
260
+ sig do
261
+ params(
262
+ id: Integer,
263
+ props: Sentdm::TemplateDefinition::Button::Props::OrHash,
264
+ type: String
265
+ ).returns(T.attached_class)
266
+ end
267
+ def self.new(
268
+ # The unique identifier of the button (1-based index)
269
+ id: nil,
270
+ # Properties specific to the button type
271
+ props: nil,
272
+ # The type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, VOICE_CALL, COPY_CODE)
273
+ type: nil
274
+ )
275
+ end
276
+
277
+ sig do
278
+ override.returns(
279
+ {
280
+ id: Integer,
281
+ props: Sentdm::TemplateDefinition::Button::Props,
282
+ type: String
283
+ }
284
+ )
285
+ end
286
+ def to_hash
287
+ end
288
+
289
+ class Props < Sentdm::Internal::Type::BaseModel
290
+ OrHash =
291
+ T.type_alias do
292
+ T.any(
293
+ Sentdm::TemplateDefinition::Button::Props,
294
+ Sentdm::Internal::AnyHash
295
+ )
296
+ end
297
+
298
+ sig { returns(T.nilable(Integer)) }
299
+ attr_accessor :active_for
300
+
301
+ sig { returns(T.nilable(String)) }
302
+ attr_accessor :autofill_text
303
+
304
+ sig { returns(T.nilable(String)) }
305
+ attr_accessor :country_code
306
+
307
+ sig { returns(T.nilable(String)) }
308
+ attr_accessor :offer_code
309
+
310
+ sig { returns(T.nilable(String)) }
311
+ attr_accessor :otp_type
312
+
313
+ sig { returns(T.nilable(String)) }
314
+ attr_accessor :package_name
315
+
316
+ sig { returns(T.nilable(String)) }
317
+ attr_accessor :phone_number
318
+
319
+ sig { returns(T.nilable(String)) }
320
+ attr_accessor :quick_reply_type
321
+
322
+ sig { returns(T.nilable(String)) }
323
+ attr_accessor :signature_hash
324
+
325
+ sig { returns(T.nilable(String)) }
326
+ attr_accessor :text
327
+
328
+ sig { returns(T.nilable(String)) }
329
+ attr_accessor :url
330
+
331
+ sig { returns(T.nilable(String)) }
332
+ attr_accessor :url_type
333
+
334
+ # Properties specific to the button type
335
+ sig do
336
+ params(
337
+ active_for: T.nilable(Integer),
338
+ autofill_text: T.nilable(String),
339
+ country_code: T.nilable(String),
340
+ offer_code: T.nilable(String),
341
+ otp_type: T.nilable(String),
342
+ package_name: T.nilable(String),
343
+ phone_number: T.nilable(String),
344
+ quick_reply_type: T.nilable(String),
345
+ signature_hash: T.nilable(String),
346
+ text: T.nilable(String),
347
+ url: T.nilable(String),
348
+ url_type: T.nilable(String)
349
+ ).returns(T.attached_class)
350
+ end
351
+ def self.new(
352
+ active_for: nil,
353
+ autofill_text: nil,
354
+ country_code: nil,
355
+ offer_code: nil,
356
+ otp_type: nil,
357
+ package_name: nil,
358
+ phone_number: nil,
359
+ quick_reply_type: nil,
360
+ signature_hash: nil,
361
+ text: nil,
362
+ url: nil,
363
+ url_type: nil
364
+ )
365
+ end
366
+
367
+ sig do
368
+ override.returns(
369
+ {
370
+ active_for: T.nilable(Integer),
371
+ autofill_text: T.nilable(String),
372
+ country_code: T.nilable(String),
373
+ offer_code: T.nilable(String),
374
+ otp_type: T.nilable(String),
375
+ package_name: T.nilable(String),
376
+ phone_number: T.nilable(String),
377
+ quick_reply_type: T.nilable(String),
378
+ signature_hash: T.nilable(String),
379
+ text: T.nilable(String),
380
+ url: T.nilable(String),
381
+ url_type: T.nilable(String)
382
+ }
383
+ )
384
+ end
385
+ def to_hash
386
+ end
387
+ end
388
+ end
389
+
390
+ class Footer < Sentdm::Internal::Type::BaseModel
391
+ OrHash =
392
+ T.type_alias do
393
+ T.any(Sentdm::TemplateDefinition::Footer, Sentdm::Internal::AnyHash)
394
+ end
395
+
396
+ # The footer template text with optional variable placeholders
397
+ sig { returns(T.nilable(String)) }
398
+ attr_reader :template
399
+
400
+ sig { params(template: String).void }
401
+ attr_writer :template
402
+
403
+ # The type of footer (typically "text")
404
+ sig { returns(T.nilable(String)) }
405
+ attr_accessor :type
406
+
407
+ # List of variables used in the footer template
408
+ sig { returns(T.nilable(T::Array[Sentdm::TemplateVariable])) }
409
+ attr_accessor :variables
410
+
411
+ # Optional template footer with optional variables
412
+ sig do
413
+ params(
414
+ template: String,
415
+ type: T.nilable(String),
416
+ variables: T.nilable(T::Array[Sentdm::TemplateVariable::OrHash])
417
+ ).returns(T.attached_class)
418
+ end
419
+ def self.new(
420
+ # The footer template text with optional variable placeholders
421
+ template: nil,
422
+ # The type of footer (typically "text")
423
+ type: nil,
424
+ # List of variables used in the footer template
425
+ variables: nil
426
+ )
427
+ end
428
+
429
+ sig do
430
+ override.returns(
431
+ {
432
+ template: String,
433
+ type: T.nilable(String),
434
+ variables: T.nilable(T::Array[Sentdm::TemplateVariable])
435
+ }
436
+ )
437
+ end
438
+ def to_hash
439
+ end
440
+ end
441
+
442
+ class Header < Sentdm::Internal::Type::BaseModel
443
+ OrHash =
444
+ T.type_alias do
445
+ T.any(Sentdm::TemplateDefinition::Header, Sentdm::Internal::AnyHash)
446
+ end
447
+
448
+ # The header template text with optional variable placeholders (e.g., "Welcome to
449
+ # {{0:variable}}")
450
+ sig { returns(T.nilable(String)) }
451
+ attr_reader :template
452
+
453
+ sig { params(template: String).void }
454
+ attr_writer :template
455
+
456
+ # The type of header (e.g., "text", "image", "video", "document")
457
+ sig { returns(T.nilable(String)) }
458
+ attr_accessor :type
459
+
460
+ # List of variables used in the header template
461
+ sig { returns(T.nilable(T::Array[Sentdm::TemplateVariable])) }
462
+ attr_accessor :variables
463
+
464
+ # Optional template header with optional variables
465
+ sig do
466
+ params(
467
+ template: String,
468
+ type: T.nilable(String),
469
+ variables: T.nilable(T::Array[Sentdm::TemplateVariable::OrHash])
470
+ ).returns(T.attached_class)
471
+ end
472
+ def self.new(
473
+ # The header template text with optional variable placeholders (e.g., "Welcome to
474
+ # {{0:variable}}")
475
+ template: nil,
476
+ # The type of header (e.g., "text", "image", "video", "document")
477
+ type: nil,
478
+ # List of variables used in the header template
479
+ variables: nil
480
+ )
481
+ end
482
+
483
+ sig do
484
+ override.returns(
485
+ {
486
+ template: String,
487
+ type: T.nilable(String),
488
+ variables: T.nilable(T::Array[Sentdm::TemplateVariable])
489
+ }
490
+ )
491
+ end
492
+ def to_hash
493
+ end
494
+ end
164
495
  end
165
496
  end
166
497
  end
@@ -57,7 +57,7 @@ module Sentdm
57
57
  def to_hash
58
58
  end
59
59
 
60
- class Body < Sentdm::Models::MutationRequest
60
+ class Body < Sentdm::Models::MutationRequestBase
61
61
  OrHash =
62
62
  T.type_alias do
63
63
  T.any(Sentdm::UserRemoveParams::Body, Sentdm::Internal::AnyHash)
@@ -64,7 +64,7 @@ module Sentdm
64
64
  def to_hash
65
65
  end
66
66
 
67
- class Body < Sentdm::Models::MutationRequest
67
+ class Body < Sentdm::Models::MutationRequestBase
68
68
  OrHash =
69
69
  T.type_alias do
70
70
  T.any(
@@ -5,7 +5,7 @@ module Sentdm
5
5
 
6
6
  APIMeta = Sentdm::Models::APIMeta
7
7
 
8
- APIResponseContact = Sentdm::Models::APIResponseContact
8
+ APIResponseOfContact = Sentdm::Models::APIResponseOfContact
9
9
 
10
10
  APIResponseOfProfileDetail = Sentdm::Models::APIResponseOfProfileDetail
11
11
 
@@ -15,13 +15,11 @@ module Sentdm
15
15
 
16
16
  APIResponseWebhook = Sentdm::Models::APIResponseWebhook
17
17
 
18
- BrandData = Sentdm::Models::BrandData
18
+ BaseDto = Sentdm::Models::BaseDto
19
19
 
20
- Brands = Sentdm::Models::Brands
20
+ BillingContactInfo = Sentdm::Models::BillingContactInfo
21
21
 
22
- BrandWithKYC = Sentdm::Models::BrandWithKYC
23
-
24
- Contact = Sentdm::Models::Contact
22
+ BrandsBrandData = Sentdm::Models::BrandsBrandData
25
23
 
26
24
  ContactCreateParams = Sentdm::Models::ContactCreateParams
27
25
 
@@ -29,6 +27,8 @@ module Sentdm
29
27
 
30
28
  ContactListParams = Sentdm::Models::ContactListParams
31
29
 
30
+ ContactResponse = Sentdm::Models::ContactResponse
31
+
32
32
  ContactRetrieveParams = Sentdm::Models::ContactRetrieveParams
33
33
 
34
34
  ContactUpdateParams = Sentdm::Models::ContactUpdateParams
@@ -44,11 +44,15 @@ module Sentdm
44
44
 
45
45
  MessageSendParams = Sentdm::Models::MessageSendParams
46
46
 
47
- MutationRequest = Sentdm::Models::MutationRequest
47
+ MutationRequestBase = Sentdm::Models::MutationRequestBase
48
+
49
+ NumberLookupParams = Sentdm::Models::NumberLookupParams
48
50
 
49
51
  PaginationMeta = Sentdm::Models::PaginationMeta
50
52
 
51
- ProfileCompleteParams = Sentdm::Models::ProfileCompleteParams
53
+ PaymentDetails = Sentdm::Models::PaymentDetails
54
+
55
+ ProfileCompleteSetupParams = Sentdm::Models::ProfileCompleteSetupParams
52
56
 
53
57
  ProfileCreateParams = Sentdm::Models::ProfileCreateParams
54
58
 
@@ -60,28 +64,12 @@ module Sentdm
60
64
 
61
65
  ProfileRetrieveParams = Sentdm::Models::ProfileRetrieveParams
62
66
 
67
+ Profiles = Sentdm::Models::Profiles
68
+
63
69
  ProfileSettings = Sentdm::Models::ProfileSettings
64
70
 
65
71
  ProfileUpdateParams = Sentdm::Models::ProfileUpdateParams
66
72
 
67
- SentDmServicesCommonContractsPocOsAuthenticationConfig =
68
- Sentdm::Models::SentDmServicesCommonContractsPocOsAuthenticationConfig
69
-
70
- SentDmServicesCommonContractsPocOsTemplateBody =
71
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateBody
72
-
73
- SentDmServicesCommonContractsPocOsTemplateButton =
74
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateButton
75
-
76
- SentDmServicesCommonContractsPocOsTemplateButtonProps =
77
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateButtonProps
78
-
79
- SentDmServicesCommonContractsPocOsTemplateFooter =
80
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateFooter
81
-
82
- SentDmServicesCommonContractsPocOsTemplateHeader =
83
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateHeader
84
-
85
73
  TcrBrandRelationship = Sentdm::Models::TcrBrandRelationship
86
74
 
87
75
  TcrVertical = Sentdm::Models::TcrVertical
@@ -13,7 +13,7 @@ module Sentdm
13
13
  idempotency_key: String,
14
14
  x_profile_id: String,
15
15
  request_options: Sentdm::RequestOptions::OrHash
16
- ).returns(Sentdm::APIResponseContact)
16
+ ).returns(Sentdm::APIResponseOfContact)
17
17
  end
18
18
  def create(
19
19
  # Body param: Phone number of the contact to create
@@ -41,7 +41,7 @@ module Sentdm
41
41
  id: String,
42
42
  x_profile_id: String,
43
43
  request_options: Sentdm::RequestOptions::OrHash
44
- ).returns(Sentdm::APIResponseContact)
44
+ ).returns(Sentdm::APIResponseOfContact)
45
45
  end
46
46
  def retrieve(
47
47
  # Contact ID from route parameter
@@ -64,7 +64,7 @@ module Sentdm
64
64
  idempotency_key: String,
65
65
  x_profile_id: String,
66
66
  request_options: Sentdm::RequestOptions::OrHash
67
- ).returns(Sentdm::APIResponseContact)
67
+ ).returns(Sentdm::APIResponseOfContact)
68
68
  end
69
69
  def update(
70
70
  # Path param: Contact ID from route parameter
@@ -0,0 +1,32 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Resources
5
+ # Manage and lookup phone numbers
6
+ class Numbers
7
+ # Retrieves detailed information about a phone number including carrier, line
8
+ # type, porting status, and VoIP detection. Uses the customer's messaging provider
9
+ # for rich data, with fallback to the internal index.
10
+ sig do
11
+ params(
12
+ phone_number: String,
13
+ x_profile_id: String,
14
+ request_options: Sentdm::RequestOptions::OrHash
15
+ ).returns(Sentdm::Models::NumberLookupResponse)
16
+ end
17
+ def lookup(
18
+ phone_number,
19
+ # Profile UUID to scope the request to a child profile. Only organization API keys
20
+ # can use this header. The profile must belong to the calling organization.
21
+ x_profile_id: nil,
22
+ request_options: {}
23
+ )
24
+ end
25
+
26
+ # @api private
27
+ sig { params(client: Sentdm::Client).returns(T.attached_class) }
28
+ def self.new(client:)
29
+ end
30
+ end
31
+ end
32
+ end