sentdm 0.3.1 → 0.4.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 (214) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +9 -9
  4. data/lib/sentdm/client.rb +0 -1
  5. data/lib/sentdm/models/api_meta.rb +1 -9
  6. data/lib/sentdm/models/brand_data.rb +235 -198
  7. data/lib/sentdm/models/brand_with_kyc.rb +249 -214
  8. data/lib/sentdm/models/brands/api_response_tcr_campaign_with_use_cases.rb +0 -1
  9. data/lib/sentdm/models/contact_create_params.rb +13 -6
  10. data/lib/sentdm/models/contact_delete_params.rb +8 -1
  11. data/lib/sentdm/models/contact_list_params.rb +10 -2
  12. data/lib/sentdm/models/contact_retrieve_params.rb +7 -1
  13. data/lib/sentdm/models/contact_update_params.rb +13 -6
  14. data/lib/sentdm/models/me_retrieve_params.rb +7 -1
  15. data/lib/sentdm/models/me_retrieve_response.rb +152 -7
  16. data/lib/sentdm/models/message_retrieve_activities_params.rb +7 -1
  17. data/lib/sentdm/models/message_retrieve_activities_response.rb +19 -5
  18. data/lib/sentdm/models/message_retrieve_status_params.rb +7 -1
  19. data/lib/sentdm/models/message_retrieve_status_response.rb +8 -1
  20. data/lib/sentdm/models/message_send_params.rb +17 -10
  21. data/lib/sentdm/models/mutation_request.rb +6 -6
  22. data/lib/sentdm/models/profile_complete_params.rb +13 -6
  23. data/lib/sentdm/models/profile_create_params.rb +192 -10
  24. data/lib/sentdm/models/profile_delete_params.rb +18 -18
  25. data/lib/sentdm/models/profile_detail.rb +144 -95
  26. data/lib/sentdm/models/profile_list_params.rb +7 -1
  27. data/lib/sentdm/models/profile_retrieve_params.rb +7 -1
  28. data/lib/sentdm/models/profile_update_params.rb +142 -22
  29. data/lib/sentdm/models/template_create_params.rb +17 -10
  30. data/lib/sentdm/models/template_delete_params.rb +13 -6
  31. data/lib/sentdm/models/template_list_params.rb +18 -2
  32. data/lib/sentdm/models/template_retrieve_params.rb +7 -1
  33. data/lib/sentdm/models/template_update_params.rb +17 -10
  34. data/lib/sentdm/models/template_variable.rb +7 -1
  35. data/lib/sentdm/models/user_invite_params.rb +13 -6
  36. data/lib/sentdm/models/user_list_params.rb +7 -1
  37. data/lib/sentdm/models/user_remove_params.rb +17 -17
  38. data/lib/sentdm/models/user_retrieve_params.rb +7 -1
  39. data/lib/sentdm/models/user_update_role_params.rb +15 -16
  40. data/lib/sentdm/models/webhook_create_params.rb +13 -6
  41. data/lib/sentdm/models/webhook_delete_params.rb +7 -1
  42. data/lib/sentdm/models/webhook_list_event_types_params.rb +7 -1
  43. data/lib/sentdm/models/webhook_list_events_params.rb +7 -1
  44. data/lib/sentdm/models/webhook_list_params.rb +7 -1
  45. data/lib/sentdm/models/webhook_retrieve_params.rb +7 -1
  46. data/lib/sentdm/models/webhook_rotate_secret_params.rb +7 -1
  47. data/lib/sentdm/models/webhook_test_params.rb +13 -6
  48. data/lib/sentdm/models/webhook_toggle_status_params.rb +13 -6
  49. data/lib/sentdm/models/webhook_update_params.rb +13 -6
  50. data/lib/sentdm/models.rb +0 -12
  51. data/lib/sentdm/resources/brands/campaigns.rb +0 -129
  52. data/lib/sentdm/resources/brands.rb +0 -112
  53. data/lib/sentdm/resources/contacts.rb +43 -20
  54. data/lib/sentdm/resources/lookup.rb +0 -21
  55. data/lib/sentdm/resources/me.rb +24 -5
  56. data/lib/sentdm/resources/messages.rb +24 -8
  57. data/lib/sentdm/resources/profiles.rb +116 -32
  58. data/lib/sentdm/resources/templates.rb +47 -24
  59. data/lib/sentdm/resources/users.rb +40 -23
  60. data/lib/sentdm/resources/webhooks.rb +92 -34
  61. data/lib/sentdm/version.rb +1 -1
  62. data/lib/sentdm.rb +1 -14
  63. data/rbi/sentdm/client.rbi +0 -1
  64. data/rbi/sentdm/models/api_meta.rbi +4 -18
  65. data/rbi/sentdm/models/brand_data.rbi +326 -203
  66. data/rbi/sentdm/models/brand_with_kyc.rbi +334 -216
  67. data/rbi/sentdm/models/brands/tcr_campaign_with_use_cases.rbi +6 -8
  68. data/rbi/sentdm/models/contact_create_params.rbi +19 -10
  69. data/rbi/sentdm/models/contact_delete_params.rbi +9 -0
  70. data/rbi/sentdm/models/contact_list_params.rbi +11 -0
  71. data/rbi/sentdm/models/contact_retrieve_params.rbi +13 -2
  72. data/rbi/sentdm/models/contact_update_params.rbi +19 -10
  73. data/rbi/sentdm/models/me_retrieve_params.rbi +16 -5
  74. data/rbi/sentdm/models/me_retrieve_response.rbi +316 -16
  75. data/rbi/sentdm/models/message_retrieve_activities_params.rbi +13 -2
  76. data/rbi/sentdm/models/message_retrieve_activities_response.rbi +18 -6
  77. data/rbi/sentdm/models/message_retrieve_status_params.rbi +13 -2
  78. data/rbi/sentdm/models/message_retrieve_status_response.rbi +6 -0
  79. data/rbi/sentdm/models/message_send_params.rbi +22 -13
  80. data/rbi/sentdm/models/mutation_request.rbi +10 -10
  81. data/rbi/sentdm/models/profile_complete_params.rbi +19 -10
  82. data/rbi/sentdm/models/profile_create_params.rbi +323 -15
  83. data/rbi/sentdm/models/profile_delete_params.rbi +36 -24
  84. data/rbi/sentdm/models/profile_detail.rbi +184 -128
  85. data/rbi/sentdm/models/profile_list_params.rbi +16 -5
  86. data/rbi/sentdm/models/profile_retrieve_params.rbi +13 -2
  87. data/rbi/sentdm/models/profile_update_params.rbi +231 -30
  88. data/rbi/sentdm/models/template_create_params.rbi +22 -13
  89. data/rbi/sentdm/models/template_delete_params.rbi +19 -10
  90. data/rbi/sentdm/models/template_list_params.rbi +19 -0
  91. data/rbi/sentdm/models/template_retrieve_params.rbi +13 -2
  92. data/rbi/sentdm/models/template_update_params.rbi +22 -13
  93. data/rbi/sentdm/models/template_variable.rbi +6 -0
  94. data/rbi/sentdm/models/user_invite_params.rbi +19 -10
  95. data/rbi/sentdm/models/user_list_params.rbi +16 -5
  96. data/rbi/sentdm/models/user_remove_params.rbi +35 -23
  97. data/rbi/sentdm/models/user_retrieve_params.rbi +13 -2
  98. data/rbi/sentdm/models/user_update_role_params.rbi +23 -25
  99. data/rbi/sentdm/models/webhook_create_params.rbi +19 -10
  100. data/rbi/sentdm/models/webhook_delete_params.rbi +13 -2
  101. data/rbi/sentdm/models/webhook_list_event_types_params.rbi +16 -5
  102. data/rbi/sentdm/models/webhook_list_events_params.rbi +16 -1
  103. data/rbi/sentdm/models/webhook_list_params.rbi +9 -0
  104. data/rbi/sentdm/models/webhook_retrieve_params.rbi +13 -2
  105. data/rbi/sentdm/models/webhook_rotate_secret_params.rbi +15 -1
  106. data/rbi/sentdm/models/webhook_test_params.rbi +19 -10
  107. data/rbi/sentdm/models/webhook_toggle_status_params.rbi +19 -10
  108. data/rbi/sentdm/models/webhook_update_params.rbi +19 -10
  109. data/rbi/sentdm/models.rbi +0 -12
  110. data/rbi/sentdm/resources/brands/campaigns.rbi +0 -95
  111. data/rbi/sentdm/resources/brands.rbi +0 -80
  112. data/rbi/sentdm/resources/contacts.rbi +37 -12
  113. data/rbi/sentdm/resources/lookup.rbi +0 -12
  114. data/rbi/sentdm/resources/me.rbi +25 -7
  115. data/rbi/sentdm/resources/messages.rbi +17 -4
  116. data/rbi/sentdm/resources/profiles.rbi +178 -38
  117. data/rbi/sentdm/resources/templates.rbi +47 -19
  118. data/rbi/sentdm/resources/users.rbi +47 -25
  119. data/rbi/sentdm/resources/webhooks.rbi +92 -20
  120. data/sig/sentdm/models/api_meta.rbs +2 -16
  121. data/sig/sentdm/models/brand_data.rbs +188 -142
  122. data/sig/sentdm/models/brand_with_kyc.rbs +184 -133
  123. data/sig/sentdm/models/contact_create_params.rbs +16 -5
  124. data/sig/sentdm/models/contact_delete_params.rbs +11 -1
  125. data/sig/sentdm/models/contact_list_params.rbs +8 -1
  126. data/sig/sentdm/models/contact_retrieve_params.rbs +12 -2
  127. data/sig/sentdm/models/contact_update_params.rbs +13 -6
  128. data/sig/sentdm/models/me_retrieve_params.rbs +14 -3
  129. data/sig/sentdm/models/me_retrieve_response.rbs +134 -7
  130. data/sig/sentdm/models/message_retrieve_activities_params.rbs +12 -2
  131. data/sig/sentdm/models/message_retrieve_activities_response.rbs +9 -4
  132. data/sig/sentdm/models/message_retrieve_status_params.rbs +12 -2
  133. data/sig/sentdm/models/message_retrieve_status_response.rbs +5 -0
  134. data/sig/sentdm/models/message_send_params.rbs +15 -8
  135. data/sig/sentdm/models/mutation_request.rbs +5 -5
  136. data/sig/sentdm/models/profile_complete_params.rbs +13 -6
  137. data/sig/sentdm/models/profile_create_params.rbs +111 -7
  138. data/sig/sentdm/models/profile_delete_params.rbs +23 -13
  139. data/sig/sentdm/models/profile_detail.rbs +105 -84
  140. data/sig/sentdm/models/profile_list_params.rbs +14 -3
  141. data/sig/sentdm/models/profile_retrieve_params.rbs +8 -1
  142. data/sig/sentdm/models/profile_update_params.rbs +86 -17
  143. data/sig/sentdm/models/template_create_params.rbs +15 -8
  144. data/sig/sentdm/models/template_delete_params.rbs +16 -5
  145. data/sig/sentdm/models/template_list_params.rbs +13 -1
  146. data/sig/sentdm/models/template_retrieve_params.rbs +12 -2
  147. data/sig/sentdm/models/template_update_params.rbs +15 -8
  148. data/sig/sentdm/models/template_variable.rbs +5 -0
  149. data/sig/sentdm/models/user_invite_params.rbs +13 -6
  150. data/sig/sentdm/models/user_list_params.rbs +14 -3
  151. data/sig/sentdm/models/user_remove_params.rbs +23 -13
  152. data/sig/sentdm/models/user_retrieve_params.rbs +8 -1
  153. data/sig/sentdm/models/user_update_role_params.rbs +17 -17
  154. data/sig/sentdm/models/webhook_create_params.rbs +13 -6
  155. data/sig/sentdm/models/webhook_delete_params.rbs +12 -2
  156. data/sig/sentdm/models/webhook_list_event_types_params.rbs +13 -3
  157. data/sig/sentdm/models/webhook_list_events_params.rbs +13 -1
  158. data/sig/sentdm/models/webhook_list_params.rbs +13 -1
  159. data/sig/sentdm/models/webhook_retrieve_params.rbs +12 -2
  160. data/sig/sentdm/models/webhook_rotate_secret_params.rbs +8 -1
  161. data/sig/sentdm/models/webhook_test_params.rbs +13 -6
  162. data/sig/sentdm/models/webhook_toggle_status_params.rbs +17 -5
  163. data/sig/sentdm/models/webhook_update_params.rbs +13 -6
  164. data/sig/sentdm/models.rbs +0 -12
  165. data/sig/sentdm/resources/brands/campaigns.rbs +0 -29
  166. data/sig/sentdm/resources/brands.rbs +0 -25
  167. data/sig/sentdm/resources/contacts.rbs +7 -2
  168. data/sig/sentdm/resources/lookup.rbs +0 -5
  169. data/sig/sentdm/resources/me.rbs +1 -0
  170. data/sig/sentdm/resources/messages.rbs +4 -1
  171. data/sig/sentdm/resources/profiles.rbs +19 -8
  172. data/sig/sentdm/resources/templates.rbs +9 -3
  173. data/sig/sentdm/resources/users.rbs +10 -7
  174. data/sig/sentdm/resources/webhooks.rbs +18 -5
  175. metadata +1 -40
  176. data/lib/sentdm/models/api_response_brand_with_kyc.rb +0 -43
  177. data/lib/sentdm/models/brand_create_params.rb +0 -41
  178. data/lib/sentdm/models/brand_delete_params.rb +0 -34
  179. data/lib/sentdm/models/brand_list_params.rb +0 -14
  180. data/lib/sentdm/models/brand_list_response.rb +0 -43
  181. data/lib/sentdm/models/brand_update_params.rb +0 -48
  182. data/lib/sentdm/models/brands/campaign_create_params.rb +0 -50
  183. data/lib/sentdm/models/brands/campaign_delete_params.rb +0 -43
  184. data/lib/sentdm/models/brands/campaign_list_params.rb +0 -22
  185. data/lib/sentdm/models/brands/campaign_list_response.rb +0 -47
  186. data/lib/sentdm/models/brands/campaign_update_params.rb +0 -57
  187. data/lib/sentdm/models/lookup_retrieve_phone_info_params.rb +0 -20
  188. data/lib/sentdm/models/lookup_retrieve_phone_info_response.rb +0 -104
  189. data/rbi/sentdm/models/api_response_brand_with_kyc.rbi +0 -74
  190. data/rbi/sentdm/models/brand_create_params.rbi +0 -68
  191. data/rbi/sentdm/models/brand_delete_params.rbi +0 -68
  192. data/rbi/sentdm/models/brand_list_params.rbi +0 -27
  193. data/rbi/sentdm/models/brand_list_response.rbi +0 -71
  194. data/rbi/sentdm/models/brand_update_params.rbi +0 -74
  195. data/rbi/sentdm/models/brands/campaign_create_params.rbi +0 -79
  196. data/rbi/sentdm/models/brands/campaign_delete_params.rbi +0 -84
  197. data/rbi/sentdm/models/brands/campaign_list_params.rbi +0 -37
  198. data/rbi/sentdm/models/brands/campaign_list_response.rbi +0 -82
  199. data/rbi/sentdm/models/brands/campaign_update_params.rbi +0 -85
  200. data/rbi/sentdm/models/lookup_retrieve_phone_info_params.rbi +0 -38
  201. data/rbi/sentdm/models/lookup_retrieve_phone_info_response.rbi +0 -183
  202. data/sig/sentdm/models/api_response_brand_with_kyc.rbs +0 -39
  203. data/sig/sentdm/models/brand_create_params.rbs +0 -36
  204. data/sig/sentdm/models/brand_delete_params.rbs +0 -36
  205. data/sig/sentdm/models/brand_list_params.rbs +0 -14
  206. data/sig/sentdm/models/brand_list_response.rbs +0 -39
  207. data/sig/sentdm/models/brand_update_params.rbs +0 -45
  208. data/sig/sentdm/models/brands/campaign_create_params.rbs +0 -47
  209. data/sig/sentdm/models/brands/campaign_delete_params.rbs +0 -46
  210. data/sig/sentdm/models/brands/campaign_list_params.rbs +0 -25
  211. data/sig/sentdm/models/brands/campaign_list_response.rbs +0 -41
  212. data/sig/sentdm/models/brands/campaign_update_params.rbs +0 -52
  213. data/sig/sentdm/models/lookup_retrieve_phone_info_params.rbs +0 -23
  214. data/sig/sentdm/models/lookup_retrieve_phone_info_response.rbs +0 -102
@@ -12,7 +12,7 @@ module Sentdm
12
12
  end
13
13
 
14
14
  sig { returns(String) }
15
- attr_accessor :path_profile_id
15
+ attr_accessor :profile_id
16
16
 
17
17
  # Whether contacts are shared across profiles (optional)
18
18
  sig { returns(T.nilable(T::Boolean)) }
@@ -26,10 +26,40 @@ module Sentdm
26
26
  sig { returns(T.nilable(T::Boolean)) }
27
27
  attr_accessor :allow_template_sharing
28
28
 
29
- # Billing model: profile, organization, or profile_and_organization (optional)
29
+ # Billing contact for this profile. Required when billing_model is "profile" or
30
+ # "profile_and_organization" and no billing contact has been configured yet.
31
+ # Identifies who receives invoices and who is responsible for payment.
32
+ sig { returns(T.nilable(Sentdm::ProfileUpdateParams::BillingContact)) }
33
+ attr_reader :billing_contact
34
+
35
+ sig do
36
+ params(
37
+ billing_contact:
38
+ T.nilable(Sentdm::ProfileUpdateParams::BillingContact::OrHash)
39
+ ).void
40
+ end
41
+ attr_writer :billing_contact
42
+
43
+ # Billing model: profile, organization, or profile_and_organization (optional).
44
+ #
45
+ # - "organization": the organization's billing details are used; no profile-level
46
+ # billing info needed.
47
+ # - "profile": the profile is billed independently; billing_contact is required.
48
+ # - "profile_and_organization": the profile is billed first with the organization
49
+ # as fallback; billing_contact is required.
30
50
  sig { returns(T.nilable(String)) }
31
51
  attr_accessor :billing_model
32
52
 
53
+ # Brand and KYC information for this profile (optional). When provided, creates or
54
+ # updates the brand associated with this profile. Cannot be set when
55
+ # inherit_tcr_brand is true. Once a brand has been submitted to TCR it cannot be
56
+ # modified.
57
+ sig { returns(T.nilable(Sentdm::BrandData)) }
58
+ attr_reader :brand
59
+
60
+ sig { params(brand: T.nilable(Sentdm::BrandData::OrHash)).void }
61
+ attr_writer :brand
62
+
33
63
  # Profile description (optional)
34
64
  sig { returns(T.nilable(String)) }
35
65
  attr_accessor :description
@@ -58,12 +88,27 @@ module Sentdm
58
88
  sig { returns(T.nilable(String)) }
59
89
  attr_accessor :name
60
90
 
61
- # Profile ID from route parameter
62
- sig { returns(T.nilable(String)) }
63
- attr_reader :body_profile_id
91
+ # Payment card details for this profile (optional). Accepted when billing_model is
92
+ # "profile" or "profile_and_organization". Not persisted on our servers —
93
+ # forwarded to the payment processor.
94
+ sig { returns(T.nilable(Sentdm::ProfileUpdateParams::PaymentDetails)) }
95
+ attr_reader :payment_details
64
96
 
65
- sig { params(body_profile_id: String).void }
66
- attr_writer :body_profile_id
97
+ sig do
98
+ params(
99
+ payment_details:
100
+ T.nilable(Sentdm::ProfileUpdateParams::PaymentDetails::OrHash)
101
+ ).void
102
+ end
103
+ attr_writer :payment_details
104
+
105
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
106
+ # for testing integrations without actual execution
107
+ sig { returns(T.nilable(T::Boolean)) }
108
+ attr_reader :sandbox
109
+
110
+ sig { params(sandbox: T::Boolean).void }
111
+ attr_writer :sandbox
67
112
 
68
113
  # Direct phone number for SMS sending (optional)
69
114
  sig { returns(T.nilable(String)) }
@@ -77,18 +122,12 @@ module Sentdm
77
122
  sig { returns(T.nilable(String)) }
78
123
  attr_accessor :sending_whatsapp_number_profile_id
79
124
 
80
- # Profile short name/abbreviation (optional)
125
+ # Profile short name/abbreviation (optional). Must be 3–11 characters, contain
126
+ # only letters, numbers, and spaces, and include at least one letter. Example:
127
+ # "SALES", "Mkt 2", "Support1".
81
128
  sig { returns(T.nilable(String)) }
82
129
  attr_accessor :short_name
83
130
 
84
- # Test mode flag - when true, the operation is simulated without side effects
85
- # Useful for testing integrations without actual execution
86
- sig { returns(T.nilable(T::Boolean)) }
87
- attr_reader :test_mode
88
-
89
- sig { params(test_mode: T::Boolean).void }
90
- attr_writer :test_mode
91
-
92
131
  # Direct phone number for WhatsApp sending (optional)
93
132
  sig { returns(T.nilable(String)) }
94
133
  attr_accessor :whatsapp_phone_number
@@ -99,13 +138,22 @@ module Sentdm
99
138
  sig { params(idempotency_key: String).void }
100
139
  attr_writer :idempotency_key
101
140
 
141
+ sig { returns(T.nilable(String)) }
142
+ attr_reader :x_profile_id
143
+
144
+ sig { params(x_profile_id: String).void }
145
+ attr_writer :x_profile_id
146
+
102
147
  sig do
103
148
  params(
104
- path_profile_id: String,
149
+ profile_id: String,
105
150
  allow_contact_sharing: T.nilable(T::Boolean),
106
151
  allow_number_change_during_onboarding: T.nilable(T::Boolean),
107
152
  allow_template_sharing: T.nilable(T::Boolean),
153
+ billing_contact:
154
+ T.nilable(Sentdm::ProfileUpdateParams::BillingContact::OrHash),
108
155
  billing_model: T.nilable(String),
156
+ brand: T.nilable(Sentdm::BrandData::OrHash),
109
157
  description: T.nilable(String),
110
158
  icon: T.nilable(String),
111
159
  inherit_contacts: T.nilable(T::Boolean),
@@ -113,27 +161,44 @@ module Sentdm
113
161
  inherit_tcr_campaign: T.nilable(T::Boolean),
114
162
  inherit_templates: T.nilable(T::Boolean),
115
163
  name: T.nilable(String),
116
- body_profile_id: String,
164
+ payment_details:
165
+ T.nilable(Sentdm::ProfileUpdateParams::PaymentDetails::OrHash),
166
+ sandbox: T::Boolean,
117
167
  sending_phone_number: T.nilable(String),
118
168
  sending_phone_number_profile_id: T.nilable(String),
119
169
  sending_whatsapp_number_profile_id: T.nilable(String),
120
170
  short_name: T.nilable(String),
121
- test_mode: T::Boolean,
122
171
  whatsapp_phone_number: T.nilable(String),
123
172
  idempotency_key: String,
173
+ x_profile_id: String,
124
174
  request_options: Sentdm::RequestOptions::OrHash
125
175
  ).returns(T.attached_class)
126
176
  end
127
177
  def self.new(
128
- path_profile_id:,
178
+ profile_id:,
129
179
  # Whether contacts are shared across profiles (optional)
130
180
  allow_contact_sharing: nil,
131
181
  # Whether number changes are allowed during onboarding (optional)
132
182
  allow_number_change_during_onboarding: nil,
133
183
  # Whether templates are shared across profiles (optional)
134
184
  allow_template_sharing: nil,
135
- # Billing model: profile, organization, or profile_and_organization (optional)
185
+ # Billing contact for this profile. Required when billing_model is "profile" or
186
+ # "profile_and_organization" and no billing contact has been configured yet.
187
+ # Identifies who receives invoices and who is responsible for payment.
188
+ billing_contact: nil,
189
+ # Billing model: profile, organization, or profile_and_organization (optional).
190
+ #
191
+ # - "organization": the organization's billing details are used; no profile-level
192
+ # billing info needed.
193
+ # - "profile": the profile is billed independently; billing_contact is required.
194
+ # - "profile_and_organization": the profile is billed first with the organization
195
+ # as fallback; billing_contact is required.
136
196
  billing_model: nil,
197
+ # Brand and KYC information for this profile (optional). When provided, creates or
198
+ # updates the brand associated with this profile. Cannot be set when
199
+ # inherit_tcr_brand is true. Once a brand has been submitted to TCR it cannot be
200
+ # modified.
201
+ brand: nil,
137
202
  # Profile description (optional)
138
203
  description: nil,
139
204
  # Profile icon URL (optional)
@@ -148,22 +213,27 @@ module Sentdm
148
213
  inherit_templates: nil,
149
214
  # Profile name (optional)
150
215
  name: nil,
151
- # Profile ID from route parameter
152
- body_profile_id: nil,
216
+ # Payment card details for this profile (optional). Accepted when billing_model is
217
+ # "profile" or "profile_and_organization". Not persisted on our servers —
218
+ # forwarded to the payment processor.
219
+ payment_details: nil,
220
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
221
+ # for testing integrations without actual execution
222
+ sandbox: nil,
153
223
  # Direct phone number for SMS sending (optional)
154
224
  sending_phone_number: nil,
155
225
  # Reference to another profile to use for SMS/Telnyx configuration (optional)
156
226
  sending_phone_number_profile_id: nil,
157
227
  # Reference to another profile to use for WhatsApp configuration (optional)
158
228
  sending_whatsapp_number_profile_id: nil,
159
- # Profile short name/abbreviation (optional)
229
+ # Profile short name/abbreviation (optional). Must be 3–11 characters, contain
230
+ # only letters, numbers, and spaces, and include at least one letter. Example:
231
+ # "SALES", "Mkt 2", "Support1".
160
232
  short_name: nil,
161
- # Test mode flag - when true, the operation is simulated without side effects
162
- # Useful for testing integrations without actual execution
163
- test_mode: nil,
164
233
  # Direct phone number for WhatsApp sending (optional)
165
234
  whatsapp_phone_number: nil,
166
235
  idempotency_key: nil,
236
+ x_profile_id: nil,
167
237
  request_options: {}
168
238
  )
169
239
  end
@@ -171,11 +241,14 @@ module Sentdm
171
241
  sig do
172
242
  override.returns(
173
243
  {
174
- path_profile_id: String,
244
+ profile_id: String,
175
245
  allow_contact_sharing: T.nilable(T::Boolean),
176
246
  allow_number_change_during_onboarding: T.nilable(T::Boolean),
177
247
  allow_template_sharing: T.nilable(T::Boolean),
248
+ billing_contact:
249
+ T.nilable(Sentdm::ProfileUpdateParams::BillingContact),
178
250
  billing_model: T.nilable(String),
251
+ brand: T.nilable(Sentdm::BrandData),
179
252
  description: T.nilable(String),
180
253
  icon: T.nilable(String),
181
254
  inherit_contacts: T.nilable(T::Boolean),
@@ -183,20 +256,148 @@ module Sentdm
183
256
  inherit_tcr_campaign: T.nilable(T::Boolean),
184
257
  inherit_templates: T.nilable(T::Boolean),
185
258
  name: T.nilable(String),
186
- body_profile_id: String,
259
+ payment_details:
260
+ T.nilable(Sentdm::ProfileUpdateParams::PaymentDetails),
261
+ sandbox: T::Boolean,
187
262
  sending_phone_number: T.nilable(String),
188
263
  sending_phone_number_profile_id: T.nilable(String),
189
264
  sending_whatsapp_number_profile_id: T.nilable(String),
190
265
  short_name: T.nilable(String),
191
- test_mode: T::Boolean,
192
266
  whatsapp_phone_number: T.nilable(String),
193
267
  idempotency_key: String,
268
+ x_profile_id: String,
194
269
  request_options: Sentdm::RequestOptions
195
270
  }
196
271
  )
197
272
  end
198
273
  def to_hash
199
274
  end
275
+
276
+ class BillingContact < Sentdm::Internal::Type::BaseModel
277
+ OrHash =
278
+ T.type_alias do
279
+ T.any(
280
+ Sentdm::ProfileUpdateParams::BillingContact,
281
+ Sentdm::Internal::AnyHash
282
+ )
283
+ end
284
+
285
+ # Email address where invoices will be sent (required)
286
+ sig { returns(String) }
287
+ attr_accessor :email
288
+
289
+ # Full name of the billing contact or company (required)
290
+ sig { returns(String) }
291
+ attr_accessor :name
292
+
293
+ # Billing address (optional). Free-form text including street, city, state, postal
294
+ # code, and country.
295
+ sig { returns(T.nilable(String)) }
296
+ attr_accessor :address
297
+
298
+ # Phone number for the billing contact (optional)
299
+ sig { returns(T.nilable(String)) }
300
+ attr_accessor :phone
301
+
302
+ # Billing contact for this profile. Required when billing_model is "profile" or
303
+ # "profile_and_organization" and no billing contact has been configured yet.
304
+ # Identifies who receives invoices and who is responsible for payment.
305
+ sig do
306
+ params(
307
+ email: String,
308
+ name: String,
309
+ address: T.nilable(String),
310
+ phone: T.nilable(String)
311
+ ).returns(T.attached_class)
312
+ end
313
+ def self.new(
314
+ # Email address where invoices will be sent (required)
315
+ email:,
316
+ # Full name of the billing contact or company (required)
317
+ name:,
318
+ # Billing address (optional). Free-form text including street, city, state, postal
319
+ # code, and country.
320
+ address: nil,
321
+ # Phone number for the billing contact (optional)
322
+ phone: nil
323
+ )
324
+ end
325
+
326
+ sig do
327
+ override.returns(
328
+ {
329
+ email: String,
330
+ name: String,
331
+ address: T.nilable(String),
332
+ phone: T.nilable(String)
333
+ }
334
+ )
335
+ end
336
+ def to_hash
337
+ end
338
+ end
339
+
340
+ class PaymentDetails < Sentdm::Internal::Type::BaseModel
341
+ OrHash =
342
+ T.type_alias do
343
+ T.any(
344
+ Sentdm::ProfileUpdateParams::PaymentDetails,
345
+ Sentdm::Internal::AnyHash
346
+ )
347
+ end
348
+
349
+ # Card number (digits only, 13–19 characters)
350
+ sig { returns(String) }
351
+ attr_accessor :card_number
352
+
353
+ # Card security code (3–4 digits)
354
+ sig { returns(String) }
355
+ attr_accessor :cvc
356
+
357
+ # Card expiry date in MM/YY format (e.g. "09/27")
358
+ sig { returns(String) }
359
+ attr_accessor :expiry
360
+
361
+ # Billing ZIP / postal code associated with the card
362
+ sig { returns(String) }
363
+ attr_accessor :zip_code
364
+
365
+ # Payment card details for this profile (optional). Accepted when billing_model is
366
+ # "profile" or "profile_and_organization". Not persisted on our servers —
367
+ # forwarded to the payment processor.
368
+ sig do
369
+ params(
370
+ card_number: String,
371
+ cvc: String,
372
+ expiry: String,
373
+ zip_code: String
374
+ ).returns(T.attached_class)
375
+ end
376
+ def self.new(
377
+ # Card number (digits only, 13–19 characters)
378
+ card_number:,
379
+ # Card security code (3–4 digits)
380
+ cvc:,
381
+ # Card expiry date in MM/YY format (e.g. "09/27")
382
+ expiry:,
383
+ # Billing ZIP / postal code associated with the card
384
+ zip_code:
385
+ )
386
+ end
387
+
388
+ sig do
389
+ override.returns(
390
+ {
391
+ card_number: String,
392
+ cvc: String,
393
+ expiry: String,
394
+ zip_code: String
395
+ }
396
+ )
397
+ end
398
+ def to_hash
399
+ end
400
+ end
200
401
  end
201
402
  end
202
403
  end
@@ -31,6 +31,14 @@ module Sentdm
31
31
  sig { returns(T.nilable(String)) }
32
32
  attr_accessor :language
33
33
 
34
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
35
+ # for testing integrations without actual execution
36
+ sig { returns(T.nilable(T::Boolean)) }
37
+ attr_reader :sandbox
38
+
39
+ sig { params(sandbox: T::Boolean).void }
40
+ attr_writer :sandbox
41
+
34
42
  # Whether to submit the template for review after creation (default: false)
35
43
  sig { returns(T.nilable(T::Boolean)) }
36
44
  attr_reader :submit_for_review
@@ -38,29 +46,28 @@ module Sentdm
38
46
  sig { params(submit_for_review: T::Boolean).void }
39
47
  attr_writer :submit_for_review
40
48
 
41
- # Test mode flag - when true, the operation is simulated without side effects
42
- # Useful for testing integrations without actual execution
43
- sig { returns(T.nilable(T::Boolean)) }
44
- attr_reader :test_mode
45
-
46
- sig { params(test_mode: T::Boolean).void }
47
- attr_writer :test_mode
48
-
49
49
  sig { returns(T.nilable(String)) }
50
50
  attr_reader :idempotency_key
51
51
 
52
52
  sig { params(idempotency_key: String).void }
53
53
  attr_writer :idempotency_key
54
54
 
55
+ sig { returns(T.nilable(String)) }
56
+ attr_reader :x_profile_id
57
+
58
+ sig { params(x_profile_id: String).void }
59
+ attr_writer :x_profile_id
60
+
55
61
  sig do
56
62
  params(
57
63
  category: T.nilable(String),
58
64
  creation_source: T.nilable(String),
59
65
  definition: Sentdm::TemplateDefinition::OrHash,
60
66
  language: T.nilable(String),
67
+ sandbox: T::Boolean,
61
68
  submit_for_review: T::Boolean,
62
- test_mode: T::Boolean,
63
69
  idempotency_key: String,
70
+ x_profile_id: String,
64
71
  request_options: Sentdm::RequestOptions::OrHash
65
72
  ).returns(T.attached_class)
66
73
  end
@@ -74,12 +81,13 @@ module Sentdm
74
81
  definition: nil,
75
82
  # Template language code (e.g., en_US) (optional, auto-detected if not provided)
76
83
  language: nil,
84
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
85
+ # for testing integrations without actual execution
86
+ sandbox: nil,
77
87
  # Whether to submit the template for review after creation (default: false)
78
88
  submit_for_review: nil,
79
- # Test mode flag - when true, the operation is simulated without side effects
80
- # Useful for testing integrations without actual execution
81
- test_mode: nil,
82
89
  idempotency_key: nil,
90
+ x_profile_id: nil,
83
91
  request_options: {}
84
92
  )
85
93
  end
@@ -91,9 +99,10 @@ module Sentdm
91
99
  creation_source: T.nilable(String),
92
100
  definition: Sentdm::TemplateDefinition,
93
101
  language: T.nilable(String),
102
+ sandbox: T::Boolean,
94
103
  submit_for_review: T::Boolean,
95
- test_mode: T::Boolean,
96
104
  idempotency_key: String,
105
+ x_profile_id: String,
97
106
  request_options: Sentdm::RequestOptions
98
107
  }
99
108
  )
@@ -19,19 +19,26 @@ module Sentdm
19
19
  sig { returns(T.nilable(T::Boolean)) }
20
20
  attr_accessor :delete_from_meta
21
21
 
22
- # Test mode flag - when true, the operation is simulated without side effects
23
- # Useful for testing integrations without actual execution
22
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
23
+ # for testing integrations without actual execution
24
24
  sig { returns(T.nilable(T::Boolean)) }
25
- attr_reader :test_mode
25
+ attr_reader :sandbox
26
26
 
27
- sig { params(test_mode: T::Boolean).void }
28
- attr_writer :test_mode
27
+ sig { params(sandbox: T::Boolean).void }
28
+ attr_writer :sandbox
29
+
30
+ sig { returns(T.nilable(String)) }
31
+ attr_reader :x_profile_id
32
+
33
+ sig { params(x_profile_id: String).void }
34
+ attr_writer :x_profile_id
29
35
 
30
36
  sig do
31
37
  params(
32
38
  id: String,
33
39
  delete_from_meta: T.nilable(T::Boolean),
34
- test_mode: T::Boolean,
40
+ sandbox: T::Boolean,
41
+ x_profile_id: String,
35
42
  request_options: Sentdm::RequestOptions::OrHash
36
43
  ).returns(T.attached_class)
37
44
  end
@@ -40,9 +47,10 @@ module Sentdm
40
47
  # Whether to also delete the template from WhatsApp/Meta (optional, defaults to
41
48
  # false)
42
49
  delete_from_meta: nil,
43
- # Test mode flag - when true, the operation is simulated without side effects
44
- # Useful for testing integrations without actual execution
45
- test_mode: nil,
50
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
51
+ # for testing integrations without actual execution
52
+ sandbox: nil,
53
+ x_profile_id: nil,
46
54
  request_options: {}
47
55
  )
48
56
  end
@@ -52,7 +60,8 @@ module Sentdm
52
60
  {
53
61
  id: String,
54
62
  delete_from_meta: T.nilable(T::Boolean),
55
- test_mode: T::Boolean,
63
+ sandbox: T::Boolean,
64
+ x_profile_id: String,
56
65
  request_options: Sentdm::RequestOptions
57
66
  }
58
67
  )
@@ -15,6 +15,7 @@ module Sentdm
15
15
  sig { returns(Integer) }
16
16
  attr_accessor :page
17
17
 
18
+ # Number of items per page
18
19
  sig { returns(Integer) }
19
20
  attr_accessor :page_size
20
21
 
@@ -22,6 +23,10 @@ module Sentdm
22
23
  sig { returns(T.nilable(String)) }
23
24
  attr_accessor :category
24
25
 
26
+ # Optional filter by welcome playground flag
27
+ sig { returns(T.nilable(T::Boolean)) }
28
+ attr_accessor :is_welcome_playground
29
+
25
30
  # Optional search term for filtering templates
26
31
  sig { returns(T.nilable(String)) }
27
32
  attr_accessor :search
@@ -30,26 +35,38 @@ module Sentdm
30
35
  sig { returns(T.nilable(String)) }
31
36
  attr_accessor :status
32
37
 
38
+ sig { returns(T.nilable(String)) }
39
+ attr_reader :x_profile_id
40
+
41
+ sig { params(x_profile_id: String).void }
42
+ attr_writer :x_profile_id
43
+
33
44
  sig do
34
45
  params(
35
46
  page: Integer,
36
47
  page_size: Integer,
37
48
  category: T.nilable(String),
49
+ is_welcome_playground: T.nilable(T::Boolean),
38
50
  search: T.nilable(String),
39
51
  status: T.nilable(String),
52
+ x_profile_id: String,
40
53
  request_options: Sentdm::RequestOptions::OrHash
41
54
  ).returns(T.attached_class)
42
55
  end
43
56
  def self.new(
44
57
  # Page number (1-indexed)
45
58
  page:,
59
+ # Number of items per page
46
60
  page_size:,
47
61
  # Optional category filter: MARKETING, UTILITY, AUTHENTICATION
48
62
  category: nil,
63
+ # Optional filter by welcome playground flag
64
+ is_welcome_playground: nil,
49
65
  # Optional search term for filtering templates
50
66
  search: nil,
51
67
  # Optional status filter: APPROVED, PENDING, REJECTED
52
68
  status: nil,
69
+ x_profile_id: nil,
53
70
  request_options: {}
54
71
  )
55
72
  end
@@ -60,8 +77,10 @@ module Sentdm
60
77
  page: Integer,
61
78
  page_size: Integer,
62
79
  category: T.nilable(String),
80
+ is_welcome_playground: T.nilable(T::Boolean),
63
81
  search: T.nilable(String),
64
82
  status: T.nilable(String),
83
+ x_profile_id: String,
65
84
  request_options: Sentdm::RequestOptions
66
85
  }
67
86
  )
@@ -14,18 +14,29 @@ module Sentdm
14
14
  sig { returns(String) }
15
15
  attr_accessor :id
16
16
 
17
+ sig { returns(T.nilable(String)) }
18
+ attr_reader :x_profile_id
19
+
20
+ sig { params(x_profile_id: String).void }
21
+ attr_writer :x_profile_id
22
+
17
23
  sig do
18
24
  params(
19
25
  id: String,
26
+ x_profile_id: String,
20
27
  request_options: Sentdm::RequestOptions::OrHash
21
28
  ).returns(T.attached_class)
22
29
  end
23
- def self.new(id:, request_options: {})
30
+ def self.new(id:, x_profile_id: nil, request_options: {})
24
31
  end
25
32
 
26
33
  sig do
27
34
  override.returns(
28
- { id: String, request_options: Sentdm::RequestOptions }
35
+ {
36
+ id: String,
37
+ x_profile_id: String,
38
+ request_options: Sentdm::RequestOptions
39
+ }
29
40
  )
30
41
  end
31
42
  def to_hash
@@ -35,6 +35,14 @@ module Sentdm
35
35
  sig { returns(T.nilable(String)) }
36
36
  attr_accessor :name
37
37
 
38
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
39
+ # for testing integrations without actual execution
40
+ sig { returns(T.nilable(T::Boolean)) }
41
+ attr_reader :sandbox
42
+
43
+ sig { params(sandbox: T::Boolean).void }
44
+ attr_writer :sandbox
45
+
38
46
  # Whether to submit the template for review after updating (default: false)
39
47
  sig { returns(T.nilable(T::Boolean)) }
40
48
  attr_reader :submit_for_review
@@ -42,20 +50,18 @@ module Sentdm
42
50
  sig { params(submit_for_review: T::Boolean).void }
43
51
  attr_writer :submit_for_review
44
52
 
45
- # Test mode flag - when true, the operation is simulated without side effects
46
- # Useful for testing integrations without actual execution
47
- sig { returns(T.nilable(T::Boolean)) }
48
- attr_reader :test_mode
49
-
50
- sig { params(test_mode: T::Boolean).void }
51
- attr_writer :test_mode
52
-
53
53
  sig { returns(T.nilable(String)) }
54
54
  attr_reader :idempotency_key
55
55
 
56
56
  sig { params(idempotency_key: String).void }
57
57
  attr_writer :idempotency_key
58
58
 
59
+ sig { returns(T.nilable(String)) }
60
+ attr_reader :x_profile_id
61
+
62
+ sig { params(x_profile_id: String).void }
63
+ attr_writer :x_profile_id
64
+
59
65
  sig do
60
66
  params(
61
67
  id: String,
@@ -63,9 +69,10 @@ module Sentdm
63
69
  definition: T.nilable(Sentdm::TemplateDefinition::OrHash),
64
70
  language: T.nilable(String),
65
71
  name: T.nilable(String),
72
+ sandbox: T::Boolean,
66
73
  submit_for_review: T::Boolean,
67
- test_mode: T::Boolean,
68
74
  idempotency_key: String,
75
+ x_profile_id: String,
69
76
  request_options: Sentdm::RequestOptions::OrHash
70
77
  ).returns(T.attached_class)
71
78
  end
@@ -79,12 +86,13 @@ module Sentdm
79
86
  language: nil,
80
87
  # Template display name
81
88
  name: nil,
89
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
90
+ # for testing integrations without actual execution
91
+ sandbox: nil,
82
92
  # Whether to submit the template for review after updating (default: false)
83
93
  submit_for_review: nil,
84
- # Test mode flag - when true, the operation is simulated without side effects
85
- # Useful for testing integrations without actual execution
86
- test_mode: nil,
87
94
  idempotency_key: nil,
95
+ x_profile_id: nil,
88
96
  request_options: {}
89
97
  )
90
98
  end
@@ -97,9 +105,10 @@ module Sentdm
97
105
  definition: T.nilable(Sentdm::TemplateDefinition),
98
106
  language: T.nilable(String),
99
107
  name: T.nilable(String),
108
+ sandbox: T::Boolean,
100
109
  submit_for_review: T::Boolean,
101
- test_mode: T::Boolean,
102
110
  idempotency_key: String,
111
+ x_profile_id: String,
103
112
  request_options: Sentdm::RequestOptions
104
113
  }
105
114
  )