sentdm 0.16.0 → 0.18.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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/sentdm/models/contact_delete_params.rb +2 -17
  5. data/lib/sentdm/models/profile_complete_response.rb +68 -2
  6. data/lib/sentdm/models/profile_delete_params.rb +2 -17
  7. data/lib/sentdm/models/profiles/campaign_delete_params.rb +2 -18
  8. data/lib/sentdm/models/user_remove_params.rb +2 -17
  9. data/lib/sentdm/models/webhook_event_type.rb +45 -0
  10. data/lib/sentdm/models/webhook_list_event_types_response.rb +3 -44
  11. data/lib/sentdm/models/webhook_rotate_secret_params.rb +2 -12
  12. data/lib/sentdm/models.rb +2 -0
  13. data/lib/sentdm/resources/contacts.rb +6 -5
  14. data/lib/sentdm/resources/profiles/campaigns.rb +5 -4
  15. data/lib/sentdm/resources/profiles.rb +8 -7
  16. data/lib/sentdm/resources/users.rb +6 -5
  17. data/lib/sentdm/resources/webhooks.rb +6 -8
  18. data/lib/sentdm/version.rb +1 -1
  19. data/lib/sentdm.rb +1 -0
  20. data/rbi/sentdm/models/contact_delete_params.rbi +2 -33
  21. data/rbi/sentdm/models/profile_complete_response.rbi +121 -2
  22. data/rbi/sentdm/models/profile_delete_params.rbi +2 -33
  23. data/rbi/sentdm/models/profiles/campaign_delete_params.rbi +1 -35
  24. data/rbi/sentdm/models/user_remove_params.rbi +2 -33
  25. data/rbi/sentdm/models/webhook_event_type.rbi +74 -0
  26. data/rbi/sentdm/models/webhook_list_event_types_response.rbi +4 -99
  27. data/rbi/sentdm/models/webhook_rotate_secret_params.rbi +1 -28
  28. data/rbi/sentdm/models.rbi +2 -0
  29. data/rbi/sentdm/resources/contacts.rbi +4 -3
  30. data/rbi/sentdm/resources/profiles/campaigns.rbi +4 -3
  31. data/rbi/sentdm/resources/profiles.rbi +5 -4
  32. data/rbi/sentdm/resources/users.rbi +4 -3
  33. data/rbi/sentdm/resources/webhooks.rbi +4 -3
  34. data/sig/sentdm/models/contact_delete_params.rbs +6 -20
  35. data/sig/sentdm/models/profile_complete_response.rbs +51 -1
  36. data/sig/sentdm/models/profile_delete_params.rbs +6 -20
  37. data/sig/sentdm/models/profiles/campaign_delete_params.rbs +9 -22
  38. data/sig/sentdm/models/user_remove_params.rbs +6 -20
  39. data/sig/sentdm/models/webhook_event_type.rbs +51 -0
  40. data/sig/sentdm/models/webhook_list_event_types_response.rbs +6 -59
  41. data/sig/sentdm/models/webhook_rotate_secret_params.rbs +8 -23
  42. data/sig/sentdm/models.rbs +2 -0
  43. data/sig/sentdm/resources/contacts.rbs +1 -1
  44. data/sig/sentdm/resources/profiles/campaigns.rbs +1 -1
  45. data/sig/sentdm/resources/profiles.rbs +2 -2
  46. data/sig/sentdm/resources/users.rbs +1 -1
  47. data/sig/sentdm/resources/webhooks.rbs +1 -1
  48. metadata +5 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1315436aff1f39929233bd9a81500f6245eb7f452bbcd8b62d8d46c418b885f
4
- data.tar.gz: 415a0f4c48857c528b0f256159f384037d7c6d8caed28a7bcdbb81c84fa1caca
3
+ metadata.gz: 197216990e5fbfd233a96fe398d63ae6e8bf0666fe5dae76e66da1f9396db36f
4
+ data.tar.gz: 8787403ba8b32810d77c97652e3d6c6386dc8e2941eb02e2fcb0854e9601f302
5
5
  SHA512:
6
- metadata.gz: 4f6f7d49fcc021ac06c8bc10b63e1694474fbacda775fe7be8d5f45c1cd84302a24cfaafb7cfb2d0c266b8ff609e5830f3dbd6080672b1f75cfbb696710027f1
7
- data.tar.gz: 75da18d19a1ed6254414764bd0829c1a2541d870e55ad8559017c2fe9e38f01432c2293f1f18f61c21a9ed91737b49873e1e57c8baa9d3af73f5c2342b6ea4aa
6
+ metadata.gz: 950c0205f1cc3ae2e6da794c1e13df4e9c51ddf7f0dd12f0e33c73d2eec23dc25e24aca483c7cad15548948aabd49065ac1a597b26f994c9c52202df39ea2a39
7
+ data.tar.gz: 6eed0efde25a0400b67af7b15c38ea05064ebeb3df63d3dab82065495b3b72774fa60c71df2975e30e0260ba8bef83d25fe8bba9ade46e4f17c3102137c400b6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.18.0 (2026-04-29)
4
+
5
+ Full Changelog: [v0.17.0...v0.18.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.17.0...v0.18.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([144871d](https://github.com/sentdm/sent-dm-ruby/commit/144871d5fdd3214a7467a468519b392d759a6ada))
10
+
11
+ ## 0.17.0 (2026-04-29)
12
+
13
+ Full Changelog: [v0.16.0...v0.17.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.16.0...v0.17.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** manual updates ([e91662c](https://github.com/sentdm/sent-dm-ruby/commit/e91662c693727bff3e0179be1b513532aeb168d3))
18
+
3
19
  ## 0.16.0 (2026-04-28)
4
20
 
5
21
  Full Changelog: [v0.15.1...v0.16.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.15.1...v0.16.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "sentdm", "~> 0.16.0"
29
+ gem "sentdm", "~> 0.18.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -3,7 +3,7 @@
3
3
  module Sentdm
4
4
  module Models
5
5
  # @see Sentdm::Resources::Contacts#delete
6
- class ContactDeleteParams < Sentdm::Internal::Type::BaseModel
6
+ class ContactDeleteParams < Sentdm::Models::MutationRequest
7
7
  extend Sentdm::Internal::Type::RequestParameters::Converter
8
8
  include Sentdm::Internal::Type::RequestParameters
9
9
 
@@ -12,30 +12,15 @@ module Sentdm
12
12
  # @return [String]
13
13
  required :id, String
14
14
 
15
- # @!attribute body
16
- # Request to delete/dissociate a contact
17
- #
18
- # @return [Sentdm::Models::ContactDeleteParams::Body]
19
- required :body, -> { Sentdm::ContactDeleteParams::Body }
20
-
21
15
  # @!attribute x_profile_id
22
16
  #
23
17
  # @return [String, nil]
24
18
  optional :x_profile_id, String
25
19
 
26
- # @!method initialize(id:, body:, x_profile_id: nil, request_options: {})
20
+ # @!method initialize(id:, x_profile_id: nil, request_options: {})
27
21
  # @param id [String]
28
- #
29
- # @param body [Sentdm::Models::ContactDeleteParams::Body] Request to delete/dissociate a contact
30
- #
31
22
  # @param x_profile_id [String]
32
- #
33
23
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
34
-
35
- class Body < Sentdm::Models::MutationRequest
36
- # @!method initialize
37
- # Request to delete/dissociate a contact
38
- end
39
24
  end
40
25
  end
41
26
  end
@@ -2,7 +2,73 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- # @type [Sentdm::Internal::Type::Converter]
6
- ProfileCompleteResponse = Sentdm::Internal::Type::Unknown
5
+ # @see Sentdm::Resources::Profiles#complete
6
+ class ProfileCompleteResponse < Sentdm::Internal::Type::BaseModel
7
+ # @!attribute data
8
+ # Response when a profile is already in the completed state and no further action
9
+ # is taken.
10
+ #
11
+ # @return [Sentdm::Models::ProfileCompleteResponse::Data, nil]
12
+ optional :data, -> { Sentdm::Models::ProfileCompleteResponse::Data }, nil?: true
13
+
14
+ # @!attribute error
15
+ # Error information
16
+ #
17
+ # @return [Sentdm::Models::ErrorDetail, nil]
18
+ optional :error, -> { Sentdm::ErrorDetail }, nil?: true
19
+
20
+ # @!attribute meta
21
+ # Request and response metadata
22
+ #
23
+ # @return [Sentdm::Models::APIMeta, nil]
24
+ optional :meta, -> { Sentdm::APIMeta }
25
+
26
+ # @!attribute success
27
+ # Indicates whether the request was successful
28
+ #
29
+ # @return [Boolean, nil]
30
+ optional :success, Sentdm::Internal::Type::Boolean
31
+
32
+ # @!method initialize(data: nil, error: nil, meta: nil, success: nil)
33
+ # Some parameter documentations has been truncated, see
34
+ # {Sentdm::Models::ProfileCompleteResponse} for more details.
35
+ #
36
+ # Standard API response envelope for all v3 endpoints
37
+ #
38
+ # @param data [Sentdm::Models::ProfileCompleteResponse::Data, nil] Response when a profile is already in the completed state and no further action
39
+ #
40
+ # @param error [Sentdm::Models::ErrorDetail, nil] Error information
41
+ #
42
+ # @param meta [Sentdm::Models::APIMeta] Request and response metadata
43
+ #
44
+ # @param success [Boolean] Indicates whether the request was successful
45
+
46
+ # @see Sentdm::Models::ProfileCompleteResponse#data
47
+ class Data < Sentdm::Internal::Type::BaseModel
48
+ # @!attribute message
49
+ # Human-readable message describing the result.
50
+ #
51
+ # @return [String, nil]
52
+ optional :message, String
53
+
54
+ # @!attribute status
55
+ # Current process status of the profile (e.g., "completed", "submitted",
56
+ # "in_progress").
57
+ #
58
+ # @return [String, nil]
59
+ optional :status, String
60
+
61
+ # @!method initialize(message: nil, status: nil)
62
+ # Some parameter documentations has been truncated, see
63
+ # {Sentdm::Models::ProfileCompleteResponse::Data} for more details.
64
+ #
65
+ # Response when a profile is already in the completed state and no further action
66
+ # is taken.
67
+ #
68
+ # @param message [String] Human-readable message describing the result.
69
+ #
70
+ # @param status [String] Current process status of the profile (e.g., "completed", "submitted", "in_progr
71
+ end
72
+ end
7
73
  end
8
74
  end
@@ -3,7 +3,7 @@
3
3
  module Sentdm
4
4
  module Models
5
5
  # @see Sentdm::Resources::Profiles#delete
6
- class ProfileDeleteParams < Sentdm::Internal::Type::BaseModel
6
+ class ProfileDeleteParams < Sentdm::Models::MutationRequest
7
7
  extend Sentdm::Internal::Type::RequestParameters::Converter
8
8
  include Sentdm::Internal::Type::RequestParameters
9
9
 
@@ -12,30 +12,15 @@ module Sentdm
12
12
  # @return [String]
13
13
  required :profile_id, String
14
14
 
15
- # @!attribute body
16
- # Request to delete a profile
17
- #
18
- # @return [Sentdm::Models::ProfileDeleteParams::Body]
19
- required :body, -> { Sentdm::ProfileDeleteParams::Body }
20
-
21
15
  # @!attribute x_profile_id
22
16
  #
23
17
  # @return [String, nil]
24
18
  optional :x_profile_id, String
25
19
 
26
- # @!method initialize(profile_id:, body:, x_profile_id: nil, request_options: {})
20
+ # @!method initialize(profile_id:, x_profile_id: nil, request_options: {})
27
21
  # @param profile_id [String]
28
- #
29
- # @param body [Sentdm::Models::ProfileDeleteParams::Body] Request to delete a profile
30
- #
31
22
  # @param x_profile_id [String]
32
- #
33
23
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
34
-
35
- class Body < Sentdm::Models::MutationRequest
36
- # @!method initialize
37
- # Request to delete a profile
38
- end
39
24
  end
40
25
  end
41
26
  end
@@ -4,7 +4,7 @@ module Sentdm
4
4
  module Models
5
5
  module Profiles
6
6
  # @see Sentdm::Resources::Profiles::Campaigns#delete
7
- class CampaignDeleteParams < Sentdm::Internal::Type::BaseModel
7
+ class CampaignDeleteParams < Sentdm::Models::MutationRequest
8
8
  extend Sentdm::Internal::Type::RequestParameters::Converter
9
9
  include Sentdm::Internal::Type::RequestParameters
10
10
 
@@ -18,32 +18,16 @@ module Sentdm
18
18
  # @return [String]
19
19
  required :campaign_id, String
20
20
 
21
- # @!attribute body
22
- # Request to delete a campaign from a brand
23
- #
24
- # @return [Sentdm::Models::Profiles::CampaignDeleteParams::Body]
25
- required :body, -> { Sentdm::Profiles::CampaignDeleteParams::Body }
26
-
27
21
  # @!attribute x_profile_id
28
22
  #
29
23
  # @return [String, nil]
30
24
  optional :x_profile_id, String
31
25
 
32
- # @!method initialize(profile_id:, campaign_id:, body:, x_profile_id: nil, request_options: {})
26
+ # @!method initialize(profile_id:, campaign_id:, x_profile_id: nil, request_options: {})
33
27
  # @param profile_id [String]
34
- #
35
28
  # @param campaign_id [String]
36
- #
37
- # @param body [Sentdm::Models::Profiles::CampaignDeleteParams::Body] Request to delete a campaign from a brand
38
- #
39
29
  # @param x_profile_id [String]
40
- #
41
30
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
42
-
43
- class Body < Sentdm::Models::MutationRequest
44
- # @!method initialize
45
- # Request to delete a campaign from a brand
46
- end
47
31
  end
48
32
  end
49
33
  end
@@ -3,7 +3,7 @@
3
3
  module Sentdm
4
4
  module Models
5
5
  # @see Sentdm::Resources::Users#remove
6
- class UserRemoveParams < Sentdm::Internal::Type::BaseModel
6
+ class UserRemoveParams < Sentdm::Models::MutationRequest
7
7
  extend Sentdm::Internal::Type::RequestParameters::Converter
8
8
  include Sentdm::Internal::Type::RequestParameters
9
9
 
@@ -12,30 +12,15 @@ module Sentdm
12
12
  # @return [String]
13
13
  required :user_id, String
14
14
 
15
- # @!attribute body
16
- # Request to remove a user from an organization
17
- #
18
- # @return [Sentdm::Models::UserRemoveParams::Body]
19
- required :body, -> { Sentdm::UserRemoveParams::Body }
20
-
21
15
  # @!attribute x_profile_id
22
16
  #
23
17
  # @return [String, nil]
24
18
  optional :x_profile_id, String
25
19
 
26
- # @!method initialize(user_id:, body:, x_profile_id: nil, request_options: {})
20
+ # @!method initialize(user_id:, x_profile_id: nil, request_options: {})
27
21
  # @param user_id [String]
28
- #
29
- # @param body [Sentdm::Models::UserRemoveParams::Body] Request to remove a user from an organization
30
- #
31
22
  # @param x_profile_id [String]
32
- #
33
23
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
34
-
35
- class Body < Sentdm::Models::MutationRequest
36
- # @!method initialize
37
- # Request to remove a user from an organization
38
- end
39
24
  end
40
25
  end
41
26
  end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ class WebhookEventType < Sentdm::Internal::Type::BaseModel
6
+ # @!attribute description
7
+ #
8
+ # @return [String, nil]
9
+ optional :description, String, nil?: true
10
+
11
+ # @!attribute display_name
12
+ #
13
+ # @return [String, nil]
14
+ optional :display_name, String
15
+
16
+ # @!attribute event_type
17
+ #
18
+ # @return [String, nil]
19
+ optional :event_type, String, nil?: true
20
+
21
+ # @!attribute is_active
22
+ #
23
+ # @return [Boolean, nil]
24
+ optional :is_active, Sentdm::Internal::Type::Boolean
25
+
26
+ # @!attribute name
27
+ #
28
+ # @return [String, nil]
29
+ optional :name, String
30
+
31
+ # @!attribute sub_types
32
+ #
33
+ # @return [Array<Sentdm::Models::WebhookEventType>, nil]
34
+ optional :sub_types, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::WebhookEventType] }, nil?: true
35
+
36
+ # @!method initialize(description: nil, display_name: nil, event_type: nil, is_active: nil, name: nil, sub_types: nil)
37
+ # @param description [String, nil]
38
+ # @param display_name [String]
39
+ # @param event_type [String, nil]
40
+ # @param is_active [Boolean]
41
+ # @param name [String]
42
+ # @param sub_types [Array<Sentdm::Models::WebhookEventType>, nil]
43
+ end
44
+ end
45
+ end
@@ -43,54 +43,13 @@ module Sentdm
43
43
  class Data < Sentdm::Internal::Type::BaseModel
44
44
  # @!attribute event_types
45
45
  #
46
- # @return [Array<Sentdm::Models::WebhookListEventTypesResponse::Data::EventType>, nil]
47
- optional :event_types,
48
- -> { Sentdm::Internal::Type::ArrayOf[Sentdm::Models::WebhookListEventTypesResponse::Data::EventType] }
46
+ # @return [Array<Sentdm::Models::WebhookEventType>, nil]
47
+ optional :event_types, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::WebhookEventType] }
49
48
 
50
49
  # @!method initialize(event_types: nil)
51
50
  # The response data (null if error)
52
51
  #
53
- # @param event_types [Array<Sentdm::Models::WebhookListEventTypesResponse::Data::EventType>]
54
-
55
- class EventType < Sentdm::Internal::Type::BaseModel
56
- # @!attribute description
57
- #
58
- # @return [String, nil]
59
- optional :description, String, nil?: true
60
-
61
- # @!attribute display_name
62
- #
63
- # @return [String, nil]
64
- optional :display_name, String
65
-
66
- # @!attribute event_type
67
- #
68
- # @return [String, nil]
69
- optional :event_type, String, nil?: true
70
-
71
- # @!attribute is_active
72
- #
73
- # @return [Boolean, nil]
74
- optional :is_active, Sentdm::Internal::Type::Boolean
75
-
76
- # @!attribute name
77
- #
78
- # @return [String, nil]
79
- optional :name, String
80
-
81
- # @!attribute sub_types
82
- #
83
- # @return [Array<Object>, nil]
84
- optional :sub_types, Sentdm::Internal::Type::ArrayOf[Sentdm::Internal::Type::Unknown], nil?: true
85
-
86
- # @!method initialize(description: nil, display_name: nil, event_type: nil, is_active: nil, name: nil, sub_types: nil)
87
- # @param description [String, nil]
88
- # @param display_name [String]
89
- # @param event_type [String, nil]
90
- # @param is_active [Boolean]
91
- # @param name [String]
92
- # @param sub_types [Array<Object>, nil]
93
- end
52
+ # @param event_types [Array<Sentdm::Models::WebhookEventType>]
94
53
  end
95
54
  end
96
55
  end
@@ -3,7 +3,7 @@
3
3
  module Sentdm
4
4
  module Models
5
5
  # @see Sentdm::Resources::Webhooks#rotate_secret
6
- class WebhookRotateSecretParams < Sentdm::Internal::Type::BaseModel
6
+ class WebhookRotateSecretParams < Sentdm::Models::MutationRequest
7
7
  extend Sentdm::Internal::Type::RequestParameters::Converter
8
8
  include Sentdm::Internal::Type::RequestParameters
9
9
 
@@ -12,11 +12,6 @@ module Sentdm
12
12
  # @return [String]
13
13
  required :id, String
14
14
 
15
- # @!attribute body
16
- #
17
- # @return [Sentdm::Models::WebhookRotateSecretParams::Body]
18
- required :body, -> { Sentdm::WebhookRotateSecretParams::Body }
19
-
20
15
  # @!attribute idempotency_key
21
16
  #
22
17
  # @return [String, nil]
@@ -27,16 +22,11 @@ module Sentdm
27
22
  # @return [String, nil]
28
23
  optional :x_profile_id, String
29
24
 
30
- # @!method initialize(id:, body:, idempotency_key: nil, x_profile_id: nil, request_options: {})
25
+ # @!method initialize(id:, idempotency_key: nil, x_profile_id: nil, request_options: {})
31
26
  # @param id [String]
32
- # @param body [Sentdm::Models::WebhookRotateSecretParams::Body]
33
27
  # @param idempotency_key [String]
34
28
  # @param x_profile_id [String]
35
29
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
36
-
37
- class Body < Sentdm::Models::MutationRequest
38
- # @!method initialize
39
- end
40
30
  end
41
31
  end
42
32
  end
data/lib/sentdm/models.rb CHANGED
@@ -170,6 +170,8 @@ module Sentdm
170
170
 
171
171
  WebhookDeleteParams = Sentdm::Models::WebhookDeleteParams
172
172
 
173
+ WebhookEventType = Sentdm::Models::WebhookEventType
174
+
173
175
  WebhookListEventsParams = Sentdm::Models::WebhookListEventsParams
174
176
 
175
177
  WebhookListEventTypesParams = Sentdm::Models::WebhookListEventTypesParams
@@ -152,11 +152,11 @@ module Sentdm
152
152
  # Dissociates a contact from the authenticated customer. Inherited contacts cannot
153
153
  # be deleted.
154
154
  #
155
- # @overload delete(id, body:, x_profile_id: nil, request_options: {})
155
+ # @overload delete(id, sandbox: nil, x_profile_id: nil, request_options: {})
156
156
  #
157
157
  # @param id [String] Path param: Contact ID from route parameter
158
158
  #
159
- # @param body [Sentdm::Models::ContactDeleteParams::Body] Body param: Request to delete/dissociate a contact
159
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
160
160
  #
161
161
  # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
162
162
  #
@@ -165,13 +165,14 @@ module Sentdm
165
165
  # @return [nil]
166
166
  #
167
167
  # @see Sentdm::Models::ContactDeleteParams
168
- def delete(id, params)
168
+ def delete(id, params = {})
169
169
  parsed, options = Sentdm::ContactDeleteParams.dump_request(params)
170
+ header_params = {x_profile_id: "x-profile-id"}
170
171
  @client.request(
171
172
  method: :delete,
172
173
  path: ["v3/contacts/%1$s", id],
173
- headers: parsed.except(:body).transform_keys(x_profile_id: "x-profile-id"),
174
- body: parsed[:body],
174
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
175
+ body: parsed.except(*header_params.keys),
175
176
  model: NilClass,
176
177
  options: options
177
178
  )
@@ -117,13 +117,13 @@ module Sentdm
117
117
  # Deletes a campaign by ID from the brand of the specified profile. The profile
118
118
  # must belong to the authenticated organization.
119
119
  #
120
- # @overload delete(campaign_id, profile_id:, body:, x_profile_id: nil, request_options: {})
120
+ # @overload delete(campaign_id, profile_id:, sandbox: nil, x_profile_id: nil, request_options: {})
121
121
  #
122
122
  # @param campaign_id [String] Path param: Campaign ID from route parameter
123
123
  #
124
124
  # @param profile_id [String] Path param: Profile ID from route parameter
125
125
  #
126
- # @param body [Sentdm::Models::Profiles::CampaignDeleteParams::Body] Body param: Request to delete a campaign from a brand
126
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
127
127
  #
128
128
  # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
129
129
  #
@@ -138,11 +138,12 @@ module Sentdm
138
138
  parsed.delete(:profile_id) do
139
139
  raise ArgumentError.new("missing required path argument #{_1}")
140
140
  end
141
+ header_params = {x_profile_id: "x-profile-id"}
141
142
  @client.request(
142
143
  method: :delete,
143
144
  path: ["v3/profiles/%1$s/campaigns/%2$s", profile_id, campaign_id],
144
- headers: parsed.except(:body).transform_keys(x_profile_id: "x-profile-id"),
145
- body: parsed[:body],
145
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
146
+ body: parsed.except(*header_params.keys),
146
147
  model: NilClass,
147
148
  options: options
148
149
  )
@@ -255,11 +255,11 @@ module Sentdm
255
255
  # Soft deletes a sender profile. The profile will be marked as deleted but data is
256
256
  # retained. Requires admin role in the organization.
257
257
  #
258
- # @overload delete(profile_id, body:, x_profile_id: nil, request_options: {})
258
+ # @overload delete(profile_id, sandbox: nil, x_profile_id: nil, request_options: {})
259
259
  #
260
260
  # @param profile_id [String] Path param
261
261
  #
262
- # @param body [Sentdm::Models::ProfileDeleteParams::Body] Body param: Request to delete a profile
262
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
263
263
  #
264
264
  # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
265
265
  #
@@ -268,13 +268,14 @@ module Sentdm
268
268
  # @return [nil]
269
269
  #
270
270
  # @see Sentdm::Models::ProfileDeleteParams
271
- def delete(profile_id, params)
271
+ def delete(profile_id, params = {})
272
272
  parsed, options = Sentdm::ProfileDeleteParams.dump_request(params)
273
+ header_params = {x_profile_id: "x-profile-id"}
273
274
  @client.request(
274
275
  method: :delete,
275
276
  path: ["v3/profiles/%1$s", profile_id],
276
- headers: parsed.except(:body).transform_keys(x_profile_id: "x-profile-id"),
277
- body: parsed[:body],
277
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
278
+ body: parsed.except(*header_params.keys),
278
279
  model: NilClass,
279
280
  options: options
280
281
  )
@@ -316,7 +317,7 @@ module Sentdm
316
317
  #
317
318
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
318
319
  #
319
- # @return [Object]
320
+ # @return [Sentdm::Models::ProfileCompleteResponse]
320
321
  #
321
322
  # @see Sentdm::Models::ProfileCompleteParams
322
323
  def complete(profile_id, params)
@@ -327,7 +328,7 @@ module Sentdm
327
328
  path: ["v3/profiles/%1$s/complete", profile_id],
328
329
  headers: parsed.slice(*header_params.keys).transform_keys(header_params),
329
330
  body: parsed.except(*header_params.keys),
330
- model: Sentdm::Internal::Type::Unknown,
331
+ model: Sentdm::Models::ProfileCompleteResponse,
331
332
  options: options
332
333
  )
333
334
  end
@@ -104,11 +104,11 @@ module Sentdm
104
104
  # Removes a user's access to an organization or profile. Requires admin role. You
105
105
  # cannot remove yourself or remove the last admin.
106
106
  #
107
- # @overload remove(user_id, body:, x_profile_id: nil, request_options: {})
107
+ # @overload remove(user_id, sandbox: nil, x_profile_id: nil, request_options: {})
108
108
  #
109
109
  # @param user_id [String] Path param
110
110
  #
111
- # @param body [Sentdm::Models::UserRemoveParams::Body] Body param: Request to remove a user from an organization
111
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
112
112
  #
113
113
  # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
114
114
  #
@@ -117,13 +117,14 @@ module Sentdm
117
117
  # @return [nil]
118
118
  #
119
119
  # @see Sentdm::Models::UserRemoveParams
120
- def remove(user_id, params)
120
+ def remove(user_id, params = {})
121
121
  parsed, options = Sentdm::UserRemoveParams.dump_request(params)
122
+ header_params = {x_profile_id: "x-profile-id"}
122
123
  @client.request(
123
124
  method: :delete,
124
125
  path: ["v3/users/%1$s", user_id],
125
- headers: parsed.except(:body).transform_keys(x_profile_id: "x-profile-id"),
126
- body: parsed[:body],
126
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
127
+ body: parsed.except(*header_params.keys),
127
128
  model: NilClass,
128
129
  options: options
129
130
  )
@@ -249,11 +249,11 @@ module Sentdm
249
249
  # Generates a new signing secret for the specified webhook. The old secret is
250
250
  # immediately invalidated.
251
251
  #
252
- # @overload rotate_secret(id, body:, idempotency_key: nil, x_profile_id: nil, request_options: {})
252
+ # @overload rotate_secret(id, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
253
253
  #
254
254
  # @param id [String] Path param
255
255
  #
256
- # @param body [Sentdm::Models::WebhookRotateSecretParams::Body] Body param
256
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
257
257
  #
258
258
  # @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
259
259
  #
@@ -264,16 +264,14 @@ module Sentdm
264
264
  # @return [Sentdm::Models::WebhookRotateSecretResponse]
265
265
  #
266
266
  # @see Sentdm::Models::WebhookRotateSecretParams
267
- def rotate_secret(id, params)
267
+ def rotate_secret(id, params = {})
268
268
  parsed, options = Sentdm::WebhookRotateSecretParams.dump_request(params)
269
+ header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
269
270
  @client.request(
270
271
  method: :post,
271
272
  path: ["v3/webhooks/%1$s/rotate-secret", id],
272
- headers: parsed.except(:body).transform_keys(
273
- idempotency_key: "idempotency-key",
274
- x_profile_id: "x-profile-id"
275
- ),
276
- body: parsed[:body],
273
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
274
+ body: parsed.except(*header_params.keys),
277
275
  model: Sentdm::Models::WebhookRotateSecretResponse,
278
276
  options: options
279
277
  )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sentdm
4
- VERSION = "0.16.0"
4
+ VERSION = "0.18.0"
5
5
  end
data/lib/sentdm.rb CHANGED
@@ -133,6 +133,7 @@ require_relative "sentdm/models/user_retrieve_params"
133
133
  require_relative "sentdm/models/user_update_role_params"
134
134
  require_relative "sentdm/models/webhook_create_params"
135
135
  require_relative "sentdm/models/webhook_delete_params"
136
+ require_relative "sentdm/models/webhook_event_type"
136
137
  require_relative "sentdm/models/webhook_list_events_params"
137
138
  require_relative "sentdm/models/webhook_list_events_response"
138
139
  require_relative "sentdm/models/webhook_list_event_types_params"