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
@@ -18,13 +18,13 @@ module Sentdm
18
18
  sig { returns(String) }
19
19
  attr_accessor :web_hook_url
20
20
 
21
- # Test mode flag - when true, the operation is simulated without side effects
22
- # Useful for testing integrations without actual execution
21
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
22
+ # for testing integrations without actual execution
23
23
  sig { returns(T.nilable(T::Boolean)) }
24
- attr_reader :test_mode
24
+ attr_reader :sandbox
25
25
 
26
- sig { params(test_mode: T::Boolean).void }
27
- attr_writer :test_mode
26
+ sig { params(sandbox: T::Boolean).void }
27
+ attr_writer :sandbox
28
28
 
29
29
  sig { returns(T.nilable(String)) }
30
30
  attr_reader :idempotency_key
@@ -32,12 +32,19 @@ module Sentdm
32
32
  sig { params(idempotency_key: String).void }
33
33
  attr_writer :idempotency_key
34
34
 
35
+ sig { returns(T.nilable(String)) }
36
+ attr_reader :x_profile_id
37
+
38
+ sig { params(x_profile_id: String).void }
39
+ attr_writer :x_profile_id
40
+
35
41
  sig do
36
42
  params(
37
43
  profile_id: String,
38
44
  web_hook_url: String,
39
- test_mode: T::Boolean,
45
+ sandbox: T::Boolean,
40
46
  idempotency_key: String,
47
+ x_profile_id: String,
41
48
  request_options: Sentdm::RequestOptions::OrHash
42
49
  ).returns(T.attached_class)
43
50
  end
@@ -45,10 +52,11 @@ module Sentdm
45
52
  profile_id:,
46
53
  # Webhook URL to call when profile completion finishes (success or failure)
47
54
  web_hook_url:,
48
- # Test mode flag - when true, the operation is simulated without side effects
49
- # Useful for testing integrations without actual execution
50
- test_mode: nil,
55
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
56
+ # for testing integrations without actual execution
57
+ sandbox: nil,
51
58
  idempotency_key: nil,
59
+ x_profile_id: nil,
52
60
  request_options: {}
53
61
  )
54
62
  end
@@ -58,8 +66,9 @@ module Sentdm
58
66
  {
59
67
  profile_id: String,
60
68
  web_hook_url: String,
61
- test_mode: T::Boolean,
69
+ sandbox: T::Boolean,
62
70
  idempotency_key: String,
71
+ x_profile_id: String,
63
72
  request_options: Sentdm::RequestOptions
64
73
  }
65
74
  )
@@ -25,11 +25,40 @@ module Sentdm
25
25
  sig { params(allow_template_sharing: T::Boolean).void }
26
26
  attr_writer :allow_template_sharing
27
27
 
28
+ # Billing contact for this profile. Required when billing_model is "profile" or
29
+ # "profile_and_organization". Identifies who receives invoices and who is
30
+ # responsible for payment.
31
+ sig { returns(T.nilable(Sentdm::ProfileCreateParams::BillingContact)) }
32
+ attr_reader :billing_contact
33
+
34
+ sig do
35
+ params(
36
+ billing_contact:
37
+ T.nilable(Sentdm::ProfileCreateParams::BillingContact::OrHash)
38
+ ).void
39
+ end
40
+ attr_writer :billing_contact
41
+
28
42
  # Billing model: profile, organization, or profile_and_organization (default:
29
- # profile)
43
+ # profile).
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
54
+ # the brand associated with this profile. Cannot be set when inherit_tcr_brand is
55
+ # true.
56
+ sig { returns(T.nilable(Sentdm::BrandData)) }
57
+ attr_reader :brand
58
+
59
+ sig { params(brand: T.nilable(Sentdm::BrandData::OrHash)).void }
60
+ attr_writer :brand
61
+
33
62
  # Profile description (optional)
34
63
  sig { returns(T.nilable(String)) }
35
64
  attr_accessor :description
@@ -61,17 +90,53 @@ module Sentdm
61
90
  sig { params(name: String).void }
62
91
  attr_writer :name
63
92
 
64
- # Profile short name/abbreviation (optional)
93
+ # Payment card details for this profile (optional). Accepted when billing_model is
94
+ # "profile" or "profile_and_organization". Not persisted on our servers —
95
+ # forwarded to the payment processor.
96
+ sig { returns(T.nilable(Sentdm::ProfileCreateParams::PaymentDetails)) }
97
+ attr_reader :payment_details
98
+
99
+ sig do
100
+ params(
101
+ payment_details:
102
+ T.nilable(Sentdm::ProfileCreateParams::PaymentDetails::OrHash)
103
+ ).void
104
+ end
105
+ attr_writer :payment_details
106
+
107
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
108
+ # for testing integrations without actual execution
109
+ sig { returns(T.nilable(T::Boolean)) }
110
+ attr_reader :sandbox
111
+
112
+ sig { params(sandbox: T::Boolean).void }
113
+ attr_writer :sandbox
114
+
115
+ # Profile short name/abbreviation (optional). Must be 3–11 characters, contain
116
+ # only letters, numbers, and spaces, and include at least one letter. Example:
117
+ # "SALES", "Mkt 2", "Support1".
65
118
  sig { returns(T.nilable(String)) }
66
119
  attr_accessor :short_name
67
120
 
68
- # Test mode flag - when true, the operation is simulated without side effects
69
- # Useful for testing integrations without actual execution
70
- sig { returns(T.nilable(T::Boolean)) }
71
- attr_reader :test_mode
121
+ # Direct WhatsApp Business Account credentials for this profile. When provided,
122
+ # the profile uses its own WhatsApp Business Account instead of inheriting from
123
+ # the organization. When omitted, the profile inherits the organization's WhatsApp
124
+ # Business Account (requires the organization to have completed WhatsApp Embedded
125
+ # Signup).
126
+ sig do
127
+ returns(T.nilable(Sentdm::ProfileCreateParams::WhatsappBusinessAccount))
128
+ end
129
+ attr_reader :whatsapp_business_account
72
130
 
73
- sig { params(test_mode: T::Boolean).void }
74
- attr_writer :test_mode
131
+ sig do
132
+ params(
133
+ whatsapp_business_account:
134
+ T.nilable(
135
+ Sentdm::ProfileCreateParams::WhatsappBusinessAccount::OrHash
136
+ )
137
+ ).void
138
+ end
139
+ attr_writer :whatsapp_business_account
75
140
 
76
141
  sig { returns(T.nilable(String)) }
77
142
  attr_reader :idempotency_key
@@ -79,11 +144,20 @@ module Sentdm
79
144
  sig { params(idempotency_key: String).void }
80
145
  attr_writer :idempotency_key
81
146
 
147
+ sig { returns(T.nilable(String)) }
148
+ attr_reader :x_profile_id
149
+
150
+ sig { params(x_profile_id: String).void }
151
+ attr_writer :x_profile_id
152
+
82
153
  sig do
83
154
  params(
84
155
  allow_contact_sharing: T::Boolean,
85
156
  allow_template_sharing: T::Boolean,
157
+ billing_contact:
158
+ T.nilable(Sentdm::ProfileCreateParams::BillingContact::OrHash),
86
159
  billing_model: T.nilable(String),
160
+ brand: T.nilable(Sentdm::BrandData::OrHash),
87
161
  description: T.nilable(String),
88
162
  icon: T.nilable(String),
89
163
  inherit_contacts: T.nilable(T::Boolean),
@@ -91,9 +165,16 @@ module Sentdm
91
165
  inherit_tcr_campaign: T.nilable(T::Boolean),
92
166
  inherit_templates: T.nilable(T::Boolean),
93
167
  name: String,
168
+ payment_details:
169
+ T.nilable(Sentdm::ProfileCreateParams::PaymentDetails::OrHash),
170
+ sandbox: T::Boolean,
94
171
  short_name: T.nilable(String),
95
- test_mode: T::Boolean,
172
+ whatsapp_business_account:
173
+ T.nilable(
174
+ Sentdm::ProfileCreateParams::WhatsappBusinessAccount::OrHash
175
+ ),
96
176
  idempotency_key: String,
177
+ x_profile_id: String,
97
178
  request_options: Sentdm::RequestOptions::OrHash
98
179
  ).returns(T.attached_class)
99
180
  end
@@ -102,9 +183,23 @@ module Sentdm
102
183
  allow_contact_sharing: nil,
103
184
  # Whether templates are shared across profiles (default: false)
104
185
  allow_template_sharing: nil,
186
+ # Billing contact for this profile. Required when billing_model is "profile" or
187
+ # "profile_and_organization". Identifies who receives invoices and who is
188
+ # responsible for payment.
189
+ billing_contact: nil,
105
190
  # Billing model: profile, organization, or profile_and_organization (default:
106
- # profile)
191
+ # profile).
192
+ #
193
+ # - "organization": the organization's billing details are used; no profile-level
194
+ # billing info needed.
195
+ # - "profile": the profile is billed independently; billing_contact is required.
196
+ # - "profile_and_organization": the profile is billed first with the organization
197
+ # as fallback; billing_contact is required.
107
198
  billing_model: nil,
199
+ # Brand and KYC information for this profile (optional). When provided, creates
200
+ # the brand associated with this profile. Cannot be set when inherit_tcr_brand is
201
+ # true.
202
+ brand: nil,
108
203
  # Profile description (optional)
109
204
  description: nil,
110
205
  # Profile icon URL (optional)
@@ -119,12 +214,25 @@ module Sentdm
119
214
  inherit_templates: nil,
120
215
  # Profile name (required)
121
216
  name: nil,
122
- # Profile short name/abbreviation (optional)
217
+ # Payment card details for this profile (optional). Accepted when billing_model is
218
+ # "profile" or "profile_and_organization". Not persisted on our servers —
219
+ # forwarded to the payment processor.
220
+ payment_details: nil,
221
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
222
+ # for testing integrations without actual execution
223
+ sandbox: nil,
224
+ # Profile short name/abbreviation (optional). Must be 3–11 characters, contain
225
+ # only letters, numbers, and spaces, and include at least one letter. Example:
226
+ # "SALES", "Mkt 2", "Support1".
123
227
  short_name: nil,
124
- # Test mode flag - when true, the operation is simulated without side effects
125
- # Useful for testing integrations without actual execution
126
- test_mode: nil,
228
+ # Direct WhatsApp Business Account credentials for this profile. When provided,
229
+ # the profile uses its own WhatsApp Business Account instead of inheriting from
230
+ # the organization. When omitted, the profile inherits the organization's WhatsApp
231
+ # Business Account (requires the organization to have completed WhatsApp Embedded
232
+ # Signup).
233
+ whatsapp_business_account: nil,
127
234
  idempotency_key: nil,
235
+ x_profile_id: nil,
128
236
  request_options: {}
129
237
  )
130
238
  end
@@ -134,7 +242,10 @@ module Sentdm
134
242
  {
135
243
  allow_contact_sharing: T::Boolean,
136
244
  allow_template_sharing: T::Boolean,
245
+ billing_contact:
246
+ T.nilable(Sentdm::ProfileCreateParams::BillingContact),
137
247
  billing_model: T.nilable(String),
248
+ brand: T.nilable(Sentdm::BrandData),
138
249
  description: T.nilable(String),
139
250
  icon: T.nilable(String),
140
251
  inherit_contacts: T.nilable(T::Boolean),
@@ -142,15 +253,212 @@ module Sentdm
142
253
  inherit_tcr_campaign: T.nilable(T::Boolean),
143
254
  inherit_templates: T.nilable(T::Boolean),
144
255
  name: String,
256
+ payment_details:
257
+ T.nilable(Sentdm::ProfileCreateParams::PaymentDetails),
258
+ sandbox: T::Boolean,
145
259
  short_name: T.nilable(String),
146
- test_mode: T::Boolean,
260
+ whatsapp_business_account:
261
+ T.nilable(Sentdm::ProfileCreateParams::WhatsappBusinessAccount),
147
262
  idempotency_key: String,
263
+ x_profile_id: String,
148
264
  request_options: Sentdm::RequestOptions
149
265
  }
150
266
  )
151
267
  end
152
268
  def to_hash
153
269
  end
270
+
271
+ class BillingContact < Sentdm::Internal::Type::BaseModel
272
+ OrHash =
273
+ T.type_alias do
274
+ T.any(
275
+ Sentdm::ProfileCreateParams::BillingContact,
276
+ Sentdm::Internal::AnyHash
277
+ )
278
+ end
279
+
280
+ # Email address where invoices will be sent (required)
281
+ sig { returns(String) }
282
+ attr_accessor :email
283
+
284
+ # Full name of the billing contact or company (required)
285
+ sig { returns(String) }
286
+ attr_accessor :name
287
+
288
+ # Billing address (optional). Free-form text including street, city, state, postal
289
+ # code, and country.
290
+ sig { returns(T.nilable(String)) }
291
+ attr_accessor :address
292
+
293
+ # Phone number for the billing contact (optional)
294
+ sig { returns(T.nilable(String)) }
295
+ attr_accessor :phone
296
+
297
+ # Billing contact for this profile. Required when billing_model is "profile" or
298
+ # "profile_and_organization". Identifies who receives invoices and who is
299
+ # responsible for payment.
300
+ sig do
301
+ params(
302
+ email: String,
303
+ name: String,
304
+ address: T.nilable(String),
305
+ phone: T.nilable(String)
306
+ ).returns(T.attached_class)
307
+ end
308
+ def self.new(
309
+ # Email address where invoices will be sent (required)
310
+ email:,
311
+ # Full name of the billing contact or company (required)
312
+ name:,
313
+ # Billing address (optional). Free-form text including street, city, state, postal
314
+ # code, and country.
315
+ address: nil,
316
+ # Phone number for the billing contact (optional)
317
+ phone: nil
318
+ )
319
+ end
320
+
321
+ sig do
322
+ override.returns(
323
+ {
324
+ email: String,
325
+ name: String,
326
+ address: T.nilable(String),
327
+ phone: T.nilable(String)
328
+ }
329
+ )
330
+ end
331
+ def to_hash
332
+ end
333
+ end
334
+
335
+ class PaymentDetails < Sentdm::Internal::Type::BaseModel
336
+ OrHash =
337
+ T.type_alias do
338
+ T.any(
339
+ Sentdm::ProfileCreateParams::PaymentDetails,
340
+ Sentdm::Internal::AnyHash
341
+ )
342
+ end
343
+
344
+ # Card number (digits only, 13–19 characters)
345
+ sig { returns(String) }
346
+ attr_accessor :card_number
347
+
348
+ # Card security code (3–4 digits)
349
+ sig { returns(String) }
350
+ attr_accessor :cvc
351
+
352
+ # Card expiry date in MM/YY format (e.g. "09/27")
353
+ sig { returns(String) }
354
+ attr_accessor :expiry
355
+
356
+ # Billing ZIP / postal code associated with the card
357
+ sig { returns(String) }
358
+ attr_accessor :zip_code
359
+
360
+ # Payment card details for this profile (optional). Accepted when billing_model is
361
+ # "profile" or "profile_and_organization". Not persisted on our servers —
362
+ # forwarded to the payment processor.
363
+ sig do
364
+ params(
365
+ card_number: String,
366
+ cvc: String,
367
+ expiry: String,
368
+ zip_code: String
369
+ ).returns(T.attached_class)
370
+ end
371
+ def self.new(
372
+ # Card number (digits only, 13–19 characters)
373
+ card_number:,
374
+ # Card security code (3–4 digits)
375
+ cvc:,
376
+ # Card expiry date in MM/YY format (e.g. "09/27")
377
+ expiry:,
378
+ # Billing ZIP / postal code associated with the card
379
+ zip_code:
380
+ )
381
+ end
382
+
383
+ sig do
384
+ override.returns(
385
+ {
386
+ card_number: String,
387
+ cvc: String,
388
+ expiry: String,
389
+ zip_code: String
390
+ }
391
+ )
392
+ end
393
+ def to_hash
394
+ end
395
+ end
396
+
397
+ class WhatsappBusinessAccount < Sentdm::Internal::Type::BaseModel
398
+ OrHash =
399
+ T.type_alias do
400
+ T.any(
401
+ Sentdm::ProfileCreateParams::WhatsappBusinessAccount,
402
+ Sentdm::Internal::AnyHash
403
+ )
404
+ end
405
+
406
+ # System User access token with whatsapp_business_messaging and
407
+ # whatsapp_business_management permissions. This value is stored securely and
408
+ # never returned in API responses.
409
+ sig { returns(String) }
410
+ attr_accessor :access_token
411
+
412
+ # WhatsApp Business Account ID from Meta Business Manager
413
+ sig { returns(String) }
414
+ attr_accessor :waba_id
415
+
416
+ # Phone Number ID of an existing number already registered under this WABA in Meta
417
+ # Business Manager. Optional — when omitted, a number will be provisioned from our
418
+ # pool and registered in the WABA during the onboarding flow. When provided, the
419
+ # number must already exist in the WABA.
420
+ sig { returns(T.nilable(String)) }
421
+ attr_accessor :phone_number_id
422
+
423
+ # Direct WhatsApp Business Account credentials for this profile. When provided,
424
+ # the profile uses its own WhatsApp Business Account instead of inheriting from
425
+ # the organization. When omitted, the profile inherits the organization's WhatsApp
426
+ # Business Account (requires the organization to have completed WhatsApp Embedded
427
+ # Signup).
428
+ sig do
429
+ params(
430
+ access_token: String,
431
+ waba_id: String,
432
+ phone_number_id: T.nilable(String)
433
+ ).returns(T.attached_class)
434
+ end
435
+ def self.new(
436
+ # System User access token with whatsapp_business_messaging and
437
+ # whatsapp_business_management permissions. This value is stored securely and
438
+ # never returned in API responses.
439
+ access_token:,
440
+ # WhatsApp Business Account ID from Meta Business Manager
441
+ waba_id:,
442
+ # Phone Number ID of an existing number already registered under this WABA in Meta
443
+ # Business Manager. Optional — when omitted, a number will be provisioned from our
444
+ # pool and registered in the WABA during the onboarding flow. When provided, the
445
+ # number must already exist in the WABA.
446
+ phone_number_id: nil
447
+ )
448
+ end
449
+
450
+ sig do
451
+ override.returns(
452
+ {
453
+ access_token: String,
454
+ waba_id: String,
455
+ phone_number_id: T.nilable(String)
456
+ }
457
+ )
458
+ end
459
+ def to_hash
460
+ end
461
+ end
154
462
  end
155
463
  end
156
464
  end
@@ -12,38 +12,34 @@ 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
- # Profile ID from route parameter
18
- sig { returns(T.nilable(String)) }
19
- attr_reader :body_profile_id
17
+ # Request to delete a profile
18
+ sig { returns(Sentdm::ProfileDeleteParams::Body) }
19
+ attr_reader :body
20
20
 
21
- sig { params(body_profile_id: String).void }
22
- attr_writer :body_profile_id
21
+ sig { params(body: Sentdm::ProfileDeleteParams::Body::OrHash).void }
22
+ attr_writer :body
23
23
 
24
- # Test mode flag - when true, the operation is simulated without side effects
25
- # Useful for testing integrations without actual execution
26
- sig { returns(T.nilable(T::Boolean)) }
27
- attr_reader :test_mode
24
+ sig { returns(T.nilable(String)) }
25
+ attr_reader :x_profile_id
28
26
 
29
- sig { params(test_mode: T::Boolean).void }
30
- attr_writer :test_mode
27
+ sig { params(x_profile_id: String).void }
28
+ attr_writer :x_profile_id
31
29
 
32
30
  sig do
33
31
  params(
34
- path_profile_id: String,
35
- body_profile_id: String,
36
- test_mode: T::Boolean,
32
+ profile_id: String,
33
+ body: Sentdm::ProfileDeleteParams::Body::OrHash,
34
+ x_profile_id: String,
37
35
  request_options: Sentdm::RequestOptions::OrHash
38
36
  ).returns(T.attached_class)
39
37
  end
40
38
  def self.new(
41
- path_profile_id:,
42
- # Profile ID from route parameter
43
- body_profile_id: nil,
44
- # Test mode flag - when true, the operation is simulated without side effects
45
- # Useful for testing integrations without actual execution
46
- test_mode: nil,
39
+ profile_id:,
40
+ # Request to delete a profile
41
+ body:,
42
+ x_profile_id: nil,
47
43
  request_options: {}
48
44
  )
49
45
  end
@@ -51,15 +47,31 @@ module Sentdm
51
47
  sig do
52
48
  override.returns(
53
49
  {
54
- path_profile_id: String,
55
- body_profile_id: String,
56
- test_mode: T::Boolean,
50
+ profile_id: String,
51
+ body: Sentdm::ProfileDeleteParams::Body,
52
+ x_profile_id: String,
57
53
  request_options: Sentdm::RequestOptions
58
54
  }
59
55
  )
60
56
  end
61
57
  def to_hash
62
58
  end
59
+
60
+ class Body < Sentdm::Models::MutationRequest
61
+ OrHash =
62
+ T.type_alias do
63
+ T.any(Sentdm::ProfileDeleteParams::Body, Sentdm::Internal::AnyHash)
64
+ end
65
+
66
+ # Request to delete a profile
67
+ sig { returns(T.attached_class) }
68
+ def self.new
69
+ end
70
+
71
+ sig { override.returns({}) }
72
+ def to_hash
73
+ end
74
+ end
63
75
  end
64
76
  end
65
77
  end