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
@@ -10,14 +10,16 @@ module Sentdm
10
10
  # Creates a new contact by phone number and associates it with the authenticated
11
11
  # customer.
12
12
  #
13
- # @overload create(phone_number: nil, test_mode: nil, idempotency_key: nil, request_options: {})
13
+ # @overload create(phone_number: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
14
14
  #
15
15
  # @param phone_number [String] Body param: Phone number of the contact to create
16
16
  #
17
- # @param test_mode [Boolean] Body param: Test mode flag - when true, the operation is simulated without side
17
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
18
18
  #
19
19
  # @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
20
20
  #
21
+ # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
22
+ #
21
23
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
22
24
  #
23
25
  # @return [Sentdm::Models::APIResponseContact]
@@ -25,7 +27,7 @@ module Sentdm
25
27
  # @see Sentdm::Models::ContactCreateParams
26
28
  def create(params = {})
27
29
  parsed, options = Sentdm::ContactCreateParams.dump_request(params)
28
- header_params = {idempotency_key: "idempotency-key"}
30
+ header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
29
31
  @client.request(
30
32
  method: :post,
31
33
  path: "v3/contacts",
@@ -36,25 +38,32 @@ module Sentdm
36
38
  )
37
39
  end
38
40
 
41
+ # Some parameter documentations has been truncated, see
42
+ # {Sentdm::Models::ContactRetrieveParams} for more details.
43
+ #
39
44
  # Retrieves a specific contact by their unique identifier. Returns detailed
40
45
  # contact information including phone formats, available channels, and opt-out
41
46
  # status.
42
47
  #
43
- # @overload retrieve(id, request_options: {})
48
+ # @overload retrieve(id, x_profile_id: nil, request_options: {})
44
49
  #
45
50
  # @param id [String] Contact ID from route parameter
46
51
  #
52
+ # @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
53
+ #
47
54
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
48
55
  #
49
56
  # @return [Sentdm::Models::APIResponseContact]
50
57
  #
51
58
  # @see Sentdm::Models::ContactRetrieveParams
52
59
  def retrieve(id, params = {})
60
+ parsed, options = Sentdm::ContactRetrieveParams.dump_request(params)
53
61
  @client.request(
54
62
  method: :get,
55
63
  path: ["v3/contacts/%1$s", id],
64
+ headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
56
65
  model: Sentdm::APIResponseContact,
57
- options: params[:request_options]
66
+ options: options
58
67
  )
59
68
  end
60
69
 
@@ -64,7 +73,7 @@ module Sentdm
64
73
  # Updates a contact's default channel and/or opt-out status. Inherited contacts
65
74
  # cannot be updated.
66
75
  #
67
- # @overload update(id, default_channel: nil, opt_out: nil, test_mode: nil, idempotency_key: nil, request_options: {})
76
+ # @overload update(id, default_channel: nil, opt_out: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
68
77
  #
69
78
  # @param id [String] Path param: Contact ID from route parameter
70
79
  #
@@ -72,10 +81,12 @@ module Sentdm
72
81
  #
73
82
  # @param opt_out [Boolean, nil] Body param: Whether the contact has opted out of messaging
74
83
  #
75
- # @param test_mode [Boolean] Body param: Test mode flag - when true, the operation is simulated without side
84
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
76
85
  #
77
86
  # @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
78
87
  #
88
+ # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
89
+ #
79
90
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
80
91
  #
81
92
  # @return [Sentdm::Models::APIResponseContact]
@@ -83,7 +94,7 @@ module Sentdm
83
94
  # @see Sentdm::Models::ContactUpdateParams
84
95
  def update(id, params = {})
85
96
  parsed, options = Sentdm::ContactUpdateParams.dump_request(params)
86
- header_params = {idempotency_key: "idempotency-key"}
97
+ header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
87
98
  @client.request(
88
99
  method: :patch,
89
100
  path: ["v3/contacts/%1$s", id],
@@ -94,20 +105,25 @@ module Sentdm
94
105
  )
95
106
  end
96
107
 
108
+ # Some parameter documentations has been truncated, see
109
+ # {Sentdm::Models::ContactListParams} for more details.
110
+ #
97
111
  # Retrieves a paginated list of contacts for the authenticated customer. Supports
98
112
  # filtering by search term, channel, or phone number.
99
113
  #
100
- # @overload list(page:, page_size:, channel: nil, phone: nil, search: nil, request_options: {})
114
+ # @overload list(page:, page_size:, channel: nil, phone: nil, search: nil, x_profile_id: nil, request_options: {})
115
+ #
116
+ # @param page [Integer] Query param: Page number (1-indexed)
101
117
  #
102
- # @param page [Integer] Page number (1-indexed)
118
+ # @param page_size [Integer] Query param: Number of items per page
103
119
  #
104
- # @param page_size [Integer]
120
+ # @param channel [String, nil] Query param: Optional channel filter (sms, whatsapp)
105
121
  #
106
- # @param channel [String, nil] Optional channel filter (sms, whatsapp)
122
+ # @param phone [String, nil] Query param: Optional phone number filter (alternative to list view)
107
123
  #
108
- # @param phone [String, nil] Optional phone number filter (alternative to list view)
124
+ # @param search [String, nil] Query param: Optional search term for filtering contacts
109
125
  #
110
- # @param search [String, nil] Optional search term for filtering contacts
126
+ # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
111
127
  #
112
128
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
113
129
  #
@@ -115,25 +131,32 @@ module Sentdm
115
131
  #
116
132
  # @see Sentdm::Models::ContactListParams
117
133
  def list(params)
134
+ query_params = [:page, :page_size, :channel, :phone, :search]
118
135
  parsed, options = Sentdm::ContactListParams.dump_request(params)
119
- query = Sentdm::Internal::Util.encode_query_params(parsed)
136
+ query = Sentdm::Internal::Util.encode_query_params(parsed.slice(*query_params))
120
137
  @client.request(
121
138
  method: :get,
122
139
  path: "v3/contacts",
123
- query: query.transform_keys(page_size: "pageSize"),
140
+ query: query,
141
+ headers: parsed.except(*query_params).transform_keys(x_profile_id: "x-profile-id"),
124
142
  model: Sentdm::Models::ContactListResponse,
125
143
  options: options
126
144
  )
127
145
  end
128
146
 
147
+ # Some parameter documentations has been truncated, see
148
+ # {Sentdm::Models::ContactDeleteParams} for more details.
149
+ #
129
150
  # Dissociates a contact from the authenticated customer. Inherited contacts cannot
130
151
  # be deleted.
131
152
  #
132
- # @overload delete(id, body:, request_options: {})
153
+ # @overload delete(id, body:, x_profile_id: nil, request_options: {})
133
154
  #
134
- # @param id [String] Contact ID from route parameter
155
+ # @param id [String] Path param: Contact ID from route parameter
156
+ #
157
+ # @param body [Sentdm::Models::ContactDeleteParams::Body] Body param: Request to delete/dissociate a contact
135
158
  #
136
- # @param body [Sentdm::Models::ContactDeleteParams::Body] Request to delete/dissociate a contact
159
+ # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
137
160
  #
138
161
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
139
162
  #
@@ -145,7 +168,7 @@ module Sentdm
145
168
  @client.request(
146
169
  method: :delete,
147
170
  path: ["v3/contacts/%1$s", id],
148
- headers: {"content-type" => "*/*"},
171
+ headers: parsed.except(:body).transform_keys(x_profile_id: "x-profile-id"),
149
172
  body: parsed[:body],
150
173
  model: NilClass,
151
174
  options: options
@@ -3,27 +3,6 @@
3
3
  module Sentdm
4
4
  module Resources
5
5
  class Lookup
6
- # Validates a phone number and retrieves formatting, country, and timezone
7
- # information from the internal index. Provider-agnostic and works for all
8
- # customers.
9
- #
10
- # @overload retrieve_phone_info(phone_number, request_options: {})
11
- #
12
- # @param phone_number [String]
13
- # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
14
- #
15
- # @return [Sentdm::Models::LookupRetrievePhoneInfoResponse]
16
- #
17
- # @see Sentdm::Models::LookupRetrievePhoneInfoParams
18
- def retrieve_phone_info(phone_number, params = {})
19
- @client.request(
20
- method: :get,
21
- path: ["v3/lookup/number/%1$s", phone_number],
22
- model: Sentdm::Models::LookupRetrievePhoneInfoResponse,
23
- options: params[:request_options]
24
- )
25
- end
26
-
27
6
  # @api private
28
7
  #
29
8
  # @param client [Sentdm::Client]
@@ -4,11 +4,28 @@ module Sentdm
4
4
  module Resources
5
5
  # Retrieve account details
6
6
  class Me
7
- # Returns the account associated with the API key. For organization API keys,
8
- # returns the organization with its profiles. For profile API keys, returns the
9
- # profile with its settings.
7
+ # Some parameter documentations has been truncated, see
8
+ # {Sentdm::Models::MeRetrieveParams} for more details.
10
9
  #
11
- # @overload retrieve(request_options: {})
10
+ # Returns the account associated with the provided API key. The response includes
11
+ # account identity, contact information, messaging channel configuration, and —
12
+ # depending on the account type — either a list of child profiles or the profile's
13
+ # own settings.
14
+ #
15
+ # **Account types:**
16
+ #
17
+ # - `organization` — Has child profiles. The `profiles` array is populated.
18
+ # - `user` — Standalone account with no profiles.
19
+ # - `profile` — Child of an organization. Includes `organization_id`,
20
+ # `short_name`, `status`, and `settings`.
21
+ #
22
+ # **Channels:** The `channels` object always includes `sms`, `whatsapp`, and
23
+ # `rcs`. Each channel has a `configured` boolean. Configured channels expose
24
+ # additional details such as `phone_number`.
25
+ #
26
+ # @overload retrieve(x_profile_id: nil, request_options: {})
27
+ #
28
+ # @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
12
29
  #
13
30
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
14
31
  #
@@ -16,11 +33,13 @@ module Sentdm
16
33
  #
17
34
  # @see Sentdm::Models::MeRetrieveParams
18
35
  def retrieve(params = {})
36
+ parsed, options = Sentdm::MeRetrieveParams.dump_request(params)
19
37
  @client.request(
20
38
  method: :get,
21
39
  path: "v3/me",
40
+ headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
22
41
  model: Sentdm::Models::MeRetrieveResponse,
23
- options: params[:request_options]
42
+ options: options
24
43
  )
25
44
  end
26
45
 
@@ -4,45 +4,59 @@ module Sentdm
4
4
  module Resources
5
5
  # Send and track SMS and WhatsApp messages
6
6
  class Messages
7
+ # Some parameter documentations has been truncated, see
8
+ # {Sentdm::Models::MessageRetrieveActivitiesParams} for more details.
9
+ #
7
10
  # Retrieves the activity log for a specific message. Activities track the message
8
11
  # lifecycle including acceptance, processing, sending, delivery, and any errors.
9
12
  #
10
- # @overload retrieve_activities(id, request_options: {})
13
+ # @overload retrieve_activities(id, x_profile_id: nil, request_options: {})
11
14
  #
12
15
  # @param id [String] Message ID from route parameter
13
16
  #
17
+ # @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
18
+ #
14
19
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
15
20
  #
16
21
  # @return [Sentdm::Models::MessageRetrieveActivitiesResponse]
17
22
  #
18
23
  # @see Sentdm::Models::MessageRetrieveActivitiesParams
19
24
  def retrieve_activities(id, params = {})
25
+ parsed, options = Sentdm::MessageRetrieveActivitiesParams.dump_request(params)
20
26
  @client.request(
21
27
  method: :get,
22
28
  path: ["v3/messages/%1$s/activities", id],
29
+ headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
23
30
  model: Sentdm::Models::MessageRetrieveActivitiesResponse,
24
- options: params[:request_options]
31
+ options: options
25
32
  )
26
33
  end
27
34
 
35
+ # Some parameter documentations has been truncated, see
36
+ # {Sentdm::Models::MessageRetrieveStatusParams} for more details.
37
+ #
28
38
  # Retrieves the current status and details of a message by ID. Includes delivery
29
39
  # status, timestamps, and error information if applicable.
30
40
  #
31
- # @overload retrieve_status(id, request_options: {})
41
+ # @overload retrieve_status(id, x_profile_id: nil, request_options: {})
32
42
  #
33
43
  # @param id [String] Message ID
34
44
  #
45
+ # @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
46
+ #
35
47
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
36
48
  #
37
49
  # @return [Sentdm::Models::MessageRetrieveStatusResponse]
38
50
  #
39
51
  # @see Sentdm::Models::MessageRetrieveStatusParams
40
52
  def retrieve_status(id, params = {})
53
+ parsed, options = Sentdm::MessageRetrieveStatusParams.dump_request(params)
41
54
  @client.request(
42
55
  method: :get,
43
56
  path: ["v3/messages/%1$s", id],
57
+ headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
44
58
  model: Sentdm::Models::MessageRetrieveStatusResponse,
45
- options: params[:request_options]
59
+ options: options
46
60
  )
47
61
  end
48
62
 
@@ -55,18 +69,20 @@ module Sentdm
55
69
  # Returns immediately with per-recipient message IDs for async tracking via
56
70
  # webhooks or the GET /messages/{id} endpoint.
57
71
  #
58
- # @overload send_(channel: nil, template: nil, test_mode: nil, to: nil, idempotency_key: nil, request_options: {})
72
+ # @overload send_(channel: nil, sandbox: nil, template: nil, to: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
59
73
  #
60
74
  # @param channel [Array<String>, nil] Body param: Channels to broadcast on, e.g. ["whatsapp", "sms"].
61
75
  #
62
- # @param template [Sentdm::Models::MessageSendParams::Template] Body param: Template reference (by id or name, with optional parameters)
76
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
63
77
  #
64
- # @param test_mode [Boolean] Body param: Test mode flag - when true, the operation is simulated without side
78
+ # @param template [Sentdm::Models::MessageSendParams::Template] Body param: Template reference (by id or name, with optional parameters)
65
79
  #
66
80
  # @param to [Array<String>] Body param: List of recipient phone numbers in E.164 format (multi-recipient fan
67
81
  #
68
82
  # @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
69
83
  #
84
+ # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
85
+ #
70
86
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
71
87
  #
72
88
  # @return [Sentdm::Models::MessageSendResponse]
@@ -74,7 +90,7 @@ module Sentdm
74
90
  # @see Sentdm::Models::MessageSendParams
75
91
  def send_(params = {})
76
92
  parsed, options = Sentdm::MessageSendParams.dump_request(params)
77
- header_params = {idempotency_key: "idempotency-key"}
93
+ header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
78
94
  @client.request(
79
95
  method: :post,
80
96
  path: "v3/messages",
@@ -11,14 +11,51 @@ module Sentdm
11
11
  # different brands, departments, or use cases, each with their own messaging
12
12
  # configuration and settings. Requires admin role in the organization.
13
13
  #
14
- # @overload create(allow_contact_sharing: nil, allow_template_sharing: nil, billing_model: nil, description: nil, icon: nil, inherit_contacts: nil, inherit_tcr_brand: nil, inherit_tcr_campaign: nil, inherit_templates: nil, name: nil, short_name: nil, test_mode: nil, idempotency_key: nil, request_options: {})
14
+ # ## WhatsApp Business Account
15
+ #
16
+ # Every profile must be linked to a WhatsApp Business Account. There are two ways
17
+ # to do this:
18
+ #
19
+ # **1. Inherit from organization (default)** — Omit the
20
+ # `whatsapp_business_account` field. The profile will share the organization's
21
+ # WhatsApp Business Account, which must have been set up via WhatsApp Embedded
22
+ # Signup. This is the recommended path for most use cases.
23
+ #
24
+ # **2. Direct credentials** — Provide a `whatsapp_business_account` object with
25
+ # `waba_id`, `phone_number_id`, and `access_token`. Use this when the profile
26
+ # needs its own independent WhatsApp Business Account. Obtain these from Meta
27
+ # Business Manager by creating a System User with `whatsapp_business_messaging`
28
+ # and `whatsapp_business_management` permissions.
29
+ #
30
+ # If the `whatsapp_business_account` field is omitted and the organization has no
31
+ # WhatsApp Business Account configured, the request will be rejected with
32
+ # HTTP 422.
33
+ #
34
+ # ## Brand
35
+ #
36
+ # Include the optional `brand` field to create the brand for this profile at the
37
+ # same time. Cannot be used when `inherit_tcr_brand` is `true`.
38
+ #
39
+ # ## Payment Details
40
+ #
41
+ # When `billing_model` is `"profile"` or `"profile_and_organization"` you may
42
+ # include a `payment_details` object containing the card number, expiry (MM/YY),
43
+ # CVC, and billing ZIP code. Payment details are **never stored** on our servers
44
+ # and are forwarded directly to the payment processor. Providing `payment_details`
45
+ # when `billing_model` is `"organization"` is not allowed.
46
+ #
47
+ # @overload create(allow_contact_sharing: nil, allow_template_sharing: nil, billing_contact: nil, billing_model: nil, brand: nil, description: nil, icon: nil, inherit_contacts: nil, inherit_tcr_brand: nil, inherit_tcr_campaign: nil, inherit_templates: nil, name: nil, payment_details: nil, sandbox: nil, short_name: nil, whatsapp_business_account: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
15
48
  #
16
49
  # @param allow_contact_sharing [Boolean] Body param: Whether contacts are shared across profiles (default: false)
17
50
  #
18
51
  # @param allow_template_sharing [Boolean] Body param: Whether templates are shared across profiles (default: false)
19
52
  #
53
+ # @param billing_contact [Sentdm::Models::ProfileCreateParams::BillingContact, nil] Body param: Billing contact for this profile. Required when billing_model is "pr
54
+ #
20
55
  # @param billing_model [String, nil] Body param: Billing model: profile, organization, or profile_and_organization (d
21
56
  #
57
+ # @param brand [Sentdm::Models::BrandData, nil] Body param: Brand and KYC information for this profile (optional).
58
+ #
22
59
  # @param description [String, nil] Body param: Profile description (optional)
23
60
  #
24
61
  # @param icon [String, nil] Body param: Profile icon URL (optional)
@@ -33,12 +70,18 @@ module Sentdm
33
70
  #
34
71
  # @param name [String] Body param: Profile name (required)
35
72
  #
36
- # @param short_name [String, nil] Body param: Profile short name/abbreviation (optional)
73
+ # @param payment_details [Sentdm::Models::ProfileCreateParams::PaymentDetails, nil] Body param: Payment card details for this profile (optional).
74
+ #
75
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
37
76
  #
38
- # @param test_mode [Boolean] Body param: Test mode flag - when true, the operation is simulated without side
77
+ # @param short_name [String, nil] Body param: Profile short name/abbreviation (optional). Must be 3–11 characters,
78
+ #
79
+ # @param whatsapp_business_account [Sentdm::Models::ProfileCreateParams::WhatsappBusinessAccount, nil] Body param: Direct WhatsApp Business Account credentials for this profile.
39
80
  #
40
81
  # @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
41
82
  #
83
+ # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
84
+ #
42
85
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
43
86
  #
44
87
  # @return [Sentdm::Models::APIResponseOfProfileDetail]
@@ -46,7 +89,7 @@ module Sentdm
46
89
  # @see Sentdm::Models::ProfileCreateParams
47
90
  def create(params = {})
48
91
  parsed, options = Sentdm::ProfileCreateParams.dump_request(params)
49
- header_params = {idempotency_key: "idempotency-key"}
92
+ header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
50
93
  @client.request(
51
94
  method: :post,
52
95
  path: "v3/profiles",
@@ -57,23 +100,32 @@ module Sentdm
57
100
  )
58
101
  end
59
102
 
103
+ # Some parameter documentations has been truncated, see
104
+ # {Sentdm::Models::ProfileRetrieveParams} for more details.
105
+ #
60
106
  # Retrieves detailed information about a specific sender profile within an
61
- # organization.
107
+ # organization, including brand and KYC information if a brand has been
108
+ # configured.
62
109
  #
63
- # @overload retrieve(profile_id, request_options: {})
110
+ # @overload retrieve(profile_id, x_profile_id: nil, request_options: {})
64
111
  #
65
112
  # @param profile_id [String]
113
+ #
114
+ # @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
115
+ #
66
116
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
67
117
  #
68
118
  # @return [Sentdm::Models::APIResponseOfProfileDetail]
69
119
  #
70
120
  # @see Sentdm::Models::ProfileRetrieveParams
71
121
  def retrieve(profile_id, params = {})
122
+ parsed, options = Sentdm::ProfileRetrieveParams.dump_request(params)
72
123
  @client.request(
73
124
  method: :get,
74
125
  path: ["v3/profiles/%1$s", profile_id],
126
+ headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
75
127
  model: Sentdm::APIResponseOfProfileDetail,
76
- options: params[:request_options]
128
+ options: options
77
129
  )
78
130
  end
79
131
 
@@ -83,9 +135,25 @@ module Sentdm
83
135
  # Updates a profile's configuration and settings. Requires admin role in the
84
136
  # organization. Only provided fields will be updated (partial update).
85
137
  #
86
- # @overload update(path_profile_id, allow_contact_sharing: nil, allow_number_change_during_onboarding: nil, allow_template_sharing: nil, billing_model: nil, description: nil, icon: nil, inherit_contacts: nil, inherit_tcr_brand: nil, inherit_tcr_campaign: nil, inherit_templates: nil, name: nil, body_profile_id: nil, sending_phone_number: nil, sending_phone_number_profile_id: nil, sending_whatsapp_number_profile_id: nil, short_name: nil, test_mode: nil, whatsapp_phone_number: nil, idempotency_key: nil, request_options: {})
138
+ # ## Brand Management
139
+ #
140
+ # Include the optional `brand` field to create or update the brand associated with
141
+ # this profile. The brand holds KYC and TCR compliance data (legal business info,
142
+ # contact details, messaging vertical). Once a brand has been submitted to TCR it
143
+ # cannot be modified. Setting `inherit_tcr_brand: true` and providing `brand` in
144
+ # the same request is not allowed.
145
+ #
146
+ # ## Payment Details
147
+ #
148
+ # When `billing_model` is `"profile"` or `"profile_and_organization"` you may
149
+ # include a `payment_details` object containing the card number, expiry (MM/YY),
150
+ # CVC, and billing ZIP code. Payment details are **never stored** on our servers
151
+ # and are forwarded directly to the payment processor. Providing `payment_details`
152
+ # when `billing_model` is `"organization"` is not allowed.
153
+ #
154
+ # @overload update(profile_id, allow_contact_sharing: nil, allow_number_change_during_onboarding: nil, allow_template_sharing: nil, billing_contact: nil, billing_model: nil, brand: nil, description: nil, icon: nil, inherit_contacts: nil, inherit_tcr_brand: nil, inherit_tcr_campaign: nil, inherit_templates: nil, name: nil, payment_details: nil, sandbox: nil, sending_phone_number: nil, sending_phone_number_profile_id: nil, sending_whatsapp_number_profile_id: nil, short_name: nil, whatsapp_phone_number: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
87
155
  #
88
- # @param path_profile_id [String] Path param
156
+ # @param profile_id [String] Path param
89
157
  #
90
158
  # @param allow_contact_sharing [Boolean, nil] Body param: Whether contacts are shared across profiles (optional)
91
159
  #
@@ -93,8 +161,12 @@ module Sentdm
93
161
  #
94
162
  # @param allow_template_sharing [Boolean, nil] Body param: Whether templates are shared across profiles (optional)
95
163
  #
164
+ # @param billing_contact [Sentdm::Models::ProfileUpdateParams::BillingContact, nil] Body param: Billing contact for this profile. Required when billing_model is "pr
165
+ #
96
166
  # @param billing_model [String, nil] Body param: Billing model: profile, organization, or profile_and_organization (o
97
167
  #
168
+ # @param brand [Sentdm::Models::BrandData, nil] Body param: Brand and KYC information for this profile (optional).
169
+ #
98
170
  # @param description [String, nil] Body param: Profile description (optional)
99
171
  #
100
172
  # @param icon [String, nil] Body param: Profile icon URL (optional)
@@ -109,7 +181,9 @@ module Sentdm
109
181
  #
110
182
  # @param name [String, nil] Body param: Profile name (optional)
111
183
  #
112
- # @param body_profile_id [String] Body param: Profile ID from route parameter
184
+ # @param payment_details [Sentdm::Models::ProfileUpdateParams::PaymentDetails, nil] Body param: Payment card details for this profile (optional).
185
+ #
186
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
113
187
  #
114
188
  # @param sending_phone_number [String, nil] Body param: Direct phone number for SMS sending (optional)
115
189
  #
@@ -117,25 +191,25 @@ module Sentdm
117
191
  #
118
192
  # @param sending_whatsapp_number_profile_id [String, nil] Body param: Reference to another profile to use for WhatsApp configuration (opti
119
193
  #
120
- # @param short_name [String, nil] Body param: Profile short name/abbreviation (optional)
121
- #
122
- # @param test_mode [Boolean] Body param: Test mode flag - when true, the operation is simulated without side
194
+ # @param short_name [String, nil] Body param: Profile short name/abbreviation (optional). Must be 3–11 characters,
123
195
  #
124
196
  # @param whatsapp_phone_number [String, nil] Body param: Direct phone number for WhatsApp sending (optional)
125
197
  #
126
198
  # @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
127
199
  #
200
+ # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
201
+ #
128
202
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
129
203
  #
130
204
  # @return [Sentdm::Models::APIResponseOfProfileDetail]
131
205
  #
132
206
  # @see Sentdm::Models::ProfileUpdateParams
133
- def update(path_profile_id, params = {})
207
+ def update(profile_id, params = {})
134
208
  parsed, options = Sentdm::ProfileUpdateParams.dump_request(params)
135
- header_params = {idempotency_key: "idempotency-key"}
209
+ header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
136
210
  @client.request(
137
211
  method: :patch,
138
- path: ["v3/profiles/%1$s", path_profile_id],
212
+ path: ["v3/profiles/%1$s", profile_id],
139
213
  headers: parsed.slice(*header_params.keys).transform_keys(header_params),
140
214
  body: parsed.except(*header_params.keys),
141
215
  model: Sentdm::APIResponseOfProfileDetail,
@@ -143,11 +217,17 @@ module Sentdm
143
217
  )
144
218
  end
145
219
 
146
- # Retrieves all sender profiles within an organization. Profiles represent
147
- # different brands, departments, or use cases within an organization, each with
148
- # their own messaging configuration.
220
+ # Some parameter documentations has been truncated, see
221
+ # {Sentdm::Models::ProfileListParams} for more details.
222
+ #
223
+ # Retrieves all sender profiles within an organization, including brand
224
+ # information for each profile. Profiles represent different brands, departments,
225
+ # or use cases within an organization, each with their own messaging
226
+ # configuration.
149
227
  #
150
- # @overload list(request_options: {})
228
+ # @overload list(x_profile_id: nil, request_options: {})
229
+ #
230
+ # @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
151
231
  #
152
232
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
153
233
  #
@@ -155,11 +235,13 @@ module Sentdm
155
235
  #
156
236
  # @see Sentdm::Models::ProfileListParams
157
237
  def list(params = {})
238
+ parsed, options = Sentdm::ProfileListParams.dump_request(params)
158
239
  @client.request(
159
240
  method: :get,
160
241
  path: "v3/profiles",
242
+ headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
161
243
  model: Sentdm::Models::ProfileListResponse,
162
- options: params[:request_options]
244
+ options: options
163
245
  )
164
246
  end
165
247
 
@@ -169,26 +251,26 @@ module Sentdm
169
251
  # Soft deletes a sender profile. The profile will be marked as deleted but data is
170
252
  # retained. Requires admin role in the organization.
171
253
  #
172
- # @overload delete(path_profile_id, body_profile_id: nil, test_mode: nil, request_options: {})
254
+ # @overload delete(profile_id, body:, x_profile_id: nil, request_options: {})
173
255
  #
174
- # @param path_profile_id [String]
256
+ # @param profile_id [String] Path param
175
257
  #
176
- # @param body_profile_id [String] Profile ID from route parameter
258
+ # @param body [Sentdm::Models::ProfileDeleteParams::Body] Body param: Request to delete a profile
177
259
  #
178
- # @param test_mode [Boolean] Test mode flag - when true, the operation is simulated without side effects
260
+ # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
179
261
  #
180
262
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
181
263
  #
182
264
  # @return [nil]
183
265
  #
184
266
  # @see Sentdm::Models::ProfileDeleteParams
185
- def delete(path_profile_id, params = {})
267
+ def delete(profile_id, params)
186
268
  parsed, options = Sentdm::ProfileDeleteParams.dump_request(params)
187
269
  @client.request(
188
270
  method: :delete,
189
- path: ["v3/profiles/%1$s", path_profile_id],
190
- headers: {"content-type" => "*/*"},
191
- body: parsed,
271
+ path: ["v3/profiles/%1$s", profile_id],
272
+ headers: parsed.except(:body).transform_keys(x_profile_id: "x-profile-id"),
273
+ body: parsed[:body],
192
274
  model: NilClass,
193
275
  options: options
194
276
  )
@@ -216,16 +298,18 @@ module Sentdm
216
298
  # - If non-TCR with destination country (IsMain=true) → SUBMITTED
217
299
  # - Otherwise → COMPLETED
218
300
  #
219
- # @overload complete(profile_id, web_hook_url:, test_mode: nil, idempotency_key: nil, request_options: {})
301
+ # @overload complete(profile_id, web_hook_url:, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
220
302
  #
221
303
  # @param profile_id [String] Path param: Profile ID from route
222
304
  #
223
305
  # @param web_hook_url [String] Body param: Webhook URL to call when profile completion finishes (success or fai
224
306
  #
225
- # @param test_mode [Boolean] Body param: Test mode flag - when true, the operation is simulated without side
307
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
226
308
  #
227
309
  # @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
228
310
  #
311
+ # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
312
+ #
229
313
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
230
314
  #
231
315
  # @return [Object]
@@ -233,7 +317,7 @@ module Sentdm
233
317
  # @see Sentdm::Models::ProfileCompleteParams
234
318
  def complete(profile_id, params)
235
319
  parsed, options = Sentdm::ProfileCompleteParams.dump_request(params)
236
- header_params = {idempotency_key: "idempotency-key"}
320
+ header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
237
321
  @client.request(
238
322
  method: :post,
239
323
  path: ["v3/profiles/%1$s/complete", profile_id],