sentdm 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -27
- data/lib/sentdm/client.rb +5 -8
- data/lib/sentdm/internal/type/base_model.rb +5 -5
- data/lib/sentdm/models/{api_response_contact.rb → api_response_of_contact.rb} +4 -4
- data/lib/sentdm/models/base_dto.rb +30 -0
- data/lib/sentdm/models/billing_contact_info.rb +47 -0
- data/lib/sentdm/models/{brand_data.rb → brands_brand_data.rb} +17 -17
- data/lib/sentdm/models/contact_delete_params.rb +1 -1
- data/lib/sentdm/models/contact_list_response.rb +3 -3
- data/lib/sentdm/models/{contact.rb → contact_response.rb} +1 -1
- data/lib/sentdm/models/{mutation_request.rb → mutation_request_base.rb} +2 -2
- data/lib/sentdm/models/number_lookup_params.rb +26 -0
- data/lib/sentdm/models/number_lookup_response.rb +104 -0
- data/lib/sentdm/models/payment_details.rb +44 -0
- data/lib/sentdm/models/{profile_complete_params.rb → profile_complete_setup_params.rb} +3 -3
- data/lib/sentdm/models/{profile_complete_response.rb → profile_complete_setup_response.rb} +1 -1
- data/lib/sentdm/models/profile_create_params.rb +9 -91
- data/lib/sentdm/models/profile_delete_params.rb +1 -1
- data/lib/sentdm/models/profile_detail.rb +369 -3
- data/lib/sentdm/models/profile_update_params.rb +9 -91
- data/lib/sentdm/models/{brands/api_response_tcr_campaign_with_use_cases.rb → profiles/api_response_of_tcr_campaign_with_use_cases.rb} +6 -5
- data/lib/sentdm/models/profiles/campaign_create_params.rb +57 -0
- data/lib/sentdm/models/{brands → profiles}/campaign_data.rb +28 -7
- data/lib/sentdm/models/profiles/campaign_delete_params.rb +50 -0
- data/lib/sentdm/models/profiles/campaign_list_params.rb +28 -0
- data/lib/sentdm/models/profiles/campaign_list_response.rb +47 -0
- data/lib/sentdm/models/profiles/campaign_update_params.rb +64 -0
- data/lib/sentdm/models/{brands → profiles}/messaging_use_case_us.rb +1 -1
- data/lib/sentdm/models/{brands → profiles}/tcr_campaign_with_use_cases.rb +15 -15
- data/lib/sentdm/models/template_definition.rb +255 -15
- data/lib/sentdm/models/user_remove_params.rb +1 -1
- data/lib/sentdm/models/webhook_rotate_secret_params.rb +1 -1
- data/lib/sentdm/models.rb +14 -26
- data/lib/sentdm/resources/contacts.rb +6 -6
- data/lib/sentdm/resources/numbers.rb +44 -0
- data/lib/sentdm/resources/profiles/campaigns.rb +160 -0
- data/lib/sentdm/resources/profiles.rb +16 -11
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +22 -22
- data/rbi/sentdm/client.rbi +4 -6
- data/rbi/sentdm/models/{api_response_contact.rbi → api_response_of_contact.rbi} +6 -6
- data/rbi/sentdm/models/base_dto.rbi +49 -0
- data/rbi/sentdm/models/billing_contact_info.rbi +65 -0
- data/rbi/sentdm/models/{brand_data.rbi → brands_brand_data.rbi} +44 -27
- data/rbi/sentdm/models/contact_delete_params.rbi +1 -1
- data/rbi/sentdm/models/contact_list_response.rbi +4 -4
- data/rbi/sentdm/models/{contact.rbi → contact_response.rbi} +4 -2
- data/rbi/sentdm/models/{mutation_request.rbi → mutation_request_base.rbi} +2 -2
- data/rbi/sentdm/models/number_lookup_params.rbi +46 -0
- data/rbi/sentdm/models/number_lookup_response.rbi +166 -0
- data/rbi/sentdm/models/payment_details.rbi +59 -0
- data/rbi/sentdm/models/{profile_complete_params.rbi → profile_complete_setup_params.rbi} +2 -2
- data/rbi/sentdm/models/{profile_complete_response.rbi → profile_complete_setup_response.rbi} +1 -1
- data/rbi/sentdm/models/profile_create_params.rbi +12 -146
- data/rbi/sentdm/models/profile_delete_params.rbi +1 -1
- data/rbi/sentdm/models/profile_detail.rbi +562 -4
- data/rbi/sentdm/models/profile_update_params.rbi +12 -146
- data/rbi/sentdm/models/{brands/api_response_tcr_campaign_with_use_cases.rbi → profiles/api_response_of_tcr_campaign_with_use_cases.rbi} +7 -7
- data/rbi/sentdm/models/profiles/campaign_create_params.rbi +88 -0
- data/rbi/sentdm/models/{brands → profiles}/campaign_data.rbi +51 -16
- data/rbi/sentdm/models/profiles/campaign_delete_params.rbi +95 -0
- data/rbi/sentdm/models/profiles/campaign_list_params.rbi +51 -0
- data/rbi/sentdm/models/profiles/campaign_list_response.rbi +84 -0
- data/rbi/sentdm/models/profiles/campaign_update_params.rbi +94 -0
- data/rbi/sentdm/models/{brands → profiles}/messaging_use_case_us.rbi +20 -16
- data/rbi/sentdm/models/{brands → profiles}/tcr_campaign_with_use_cases.rbi +37 -29
- data/rbi/sentdm/models/template_definition.rbi +405 -74
- data/rbi/sentdm/models/user_remove_params.rbi +1 -1
- data/rbi/sentdm/models/webhook_rotate_secret_params.rbi +1 -1
- data/rbi/sentdm/models.rbi +14 -26
- data/rbi/sentdm/resources/contacts.rbi +3 -3
- data/rbi/sentdm/resources/numbers.rbi +32 -0
- data/rbi/sentdm/resources/profiles/campaigns.rbi +127 -0
- data/rbi/sentdm/resources/profiles.rbi +11 -11
- data/sig/sentdm/client.rbs +2 -4
- data/sig/sentdm/models/{api_response_contact.rbs → api_response_of_contact.rbs} +6 -6
- data/sig/sentdm/models/base_dto.rbs +25 -0
- data/sig/sentdm/models/billing_contact_info.rbs +30 -0
- data/sig/sentdm/models/{brand_data.rbs → brands_brand_data.rbs} +19 -19
- data/sig/sentdm/models/contact_delete_params.rbs +1 -1
- data/sig/sentdm/models/contact_list_response.rbs +7 -5
- data/sig/sentdm/models/{contact.rbs → contact_response.rbs} +2 -2
- data/sig/sentdm/models/{mutation_request.rbs → mutation_request_base.rbs} +2 -2
- data/sig/sentdm/models/number_lookup_params.rbs +30 -0
- data/sig/sentdm/models/number_lookup_response.rbs +100 -0
- data/sig/sentdm/models/payment_details.rbs +30 -0
- data/sig/sentdm/models/{profile_complete_params.rbs → profile_complete_setup_params.rbs} +2 -2
- data/sig/sentdm/models/profile_complete_setup_response.rbs +5 -0
- data/sig/sentdm/models/profile_create_params.rbs +12 -66
- data/sig/sentdm/models/profile_delete_params.rbs +1 -1
- data/sig/sentdm/models/profile_detail.rbs +289 -4
- data/sig/sentdm/models/profile_update_params.rbs +12 -66
- data/sig/sentdm/models/profiles/api_response_of_tcr_campaign_with_use_cases.rbs +41 -0
- data/sig/sentdm/models/profiles/campaign_create_params.rbs +54 -0
- data/sig/sentdm/models/{brands → profiles}/campaign_data.rbs +27 -5
- data/sig/sentdm/models/profiles/campaign_delete_params.rbs +53 -0
- data/sig/sentdm/models/profiles/campaign_list_params.rbs +32 -0
- data/sig/sentdm/models/{brands/api_response_tcr_campaign_with_use_cases.rbs → profiles/campaign_list_response.rbs} +7 -7
- data/sig/sentdm/models/profiles/campaign_update_params.rbs +59 -0
- data/sig/sentdm/models/{brands → profiles}/messaging_use_case_us.rbs +2 -2
- data/sig/sentdm/models/{brands → profiles}/tcr_campaign_with_use_cases.rbs +29 -29
- data/sig/sentdm/models/template_definition.rbs +233 -20
- data/sig/sentdm/models/user_remove_params.rbs +1 -1
- data/sig/sentdm/models/webhook_rotate_secret_params.rbs +1 -1
- data/sig/sentdm/models.rbs +14 -20
- data/sig/sentdm/resources/contacts.rbs +3 -3
- data/sig/sentdm/resources/numbers.rbs +13 -0
- data/sig/sentdm/resources/profiles/campaigns.rbs +42 -0
- data/sig/sentdm/resources/profiles.rbs +9 -7
- metadata +67 -67
- data/lib/sentdm/models/brand_with_kyc.rb +0 -370
- data/lib/sentdm/models/brands/base_dto.rb +0 -32
- data/lib/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rb +0 -30
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rb +0 -34
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rb +0 -40
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rb +0 -38
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rb +0 -81
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rb +0 -34
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rb +0 -39
- data/lib/sentdm/resources/brands/campaigns.rb +0 -16
- data/lib/sentdm/resources/brands.rb +0 -18
- data/lib/sentdm/resources/lookup.rb +0 -14
- data/rbi/sentdm/models/brand_with_kyc.rbi +0 -516
- data/rbi/sentdm/models/brands/base_dto.rbi +0 -53
- data/rbi/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbi +0 -52
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rbi +0 -56
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rbi +0 -76
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rbi +0 -79
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rbi +0 -104
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rbi +0 -60
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rbi +0 -62
- data/rbi/sentdm/resources/brands/campaigns.rbi +0 -14
- data/rbi/sentdm/resources/brands.rbi +0 -15
- data/rbi/sentdm/resources/lookup.rbi +0 -12
- data/sig/sentdm/models/brand_with_kyc.rbs +0 -288
- data/sig/sentdm/models/brands/base_dto.rbs +0 -27
- data/sig/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbs +0 -27
- data/sig/sentdm/models/profile_complete_response.rbs +0 -5
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rbs +0 -24
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rbs +0 -30
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rbs +0 -38
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rbs +0 -75
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rbs +0 -32
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rbs +0 -32
- data/sig/sentdm/resources/brands/campaigns.rbs +0 -9
- data/sig/sentdm/resources/brands.rbs +0 -9
- data/sig/sentdm/resources/lookup.rbs +0 -7
|
@@ -7,25 +7,25 @@ module Sentdm
|
|
|
7
7
|
# Required template body with content for different channels (multi-channel,
|
|
8
8
|
# SMS-specific, or WhatsApp-specific)
|
|
9
9
|
#
|
|
10
|
-
# @return [Sentdm::Models::
|
|
11
|
-
required :body, -> { Sentdm::
|
|
10
|
+
# @return [Sentdm::Models::TemplateDefinition::Body]
|
|
11
|
+
required :body, -> { Sentdm::TemplateDefinition::Body }
|
|
12
12
|
|
|
13
13
|
# @!attribute authentication_config
|
|
14
14
|
# Configuration specific to AUTHENTICATION category templates (optional)
|
|
15
15
|
#
|
|
16
|
-
# @return [Sentdm::Models::
|
|
16
|
+
# @return [Sentdm::Models::TemplateDefinition::AuthenticationConfig, nil]
|
|
17
17
|
optional :authentication_config,
|
|
18
|
-
-> { Sentdm::
|
|
18
|
+
-> { Sentdm::TemplateDefinition::AuthenticationConfig },
|
|
19
19
|
api_name: :authenticationConfig,
|
|
20
20
|
nil?: true
|
|
21
21
|
|
|
22
22
|
# @!attribute buttons
|
|
23
23
|
# Optional list of interactive buttons (e.g., quick replies, URLs, phone numbers)
|
|
24
24
|
#
|
|
25
|
-
# @return [Array<Sentdm::Models::
|
|
25
|
+
# @return [Array<Sentdm::Models::TemplateDefinition::Button>, nil]
|
|
26
26
|
optional :buttons,
|
|
27
27
|
-> {
|
|
28
|
-
Sentdm::Internal::Type::ArrayOf[Sentdm::
|
|
28
|
+
Sentdm::Internal::Type::ArrayOf[Sentdm::TemplateDefinition::Button]
|
|
29
29
|
},
|
|
30
30
|
nil?: true
|
|
31
31
|
|
|
@@ -38,14 +38,14 @@ module Sentdm
|
|
|
38
38
|
# @!attribute footer
|
|
39
39
|
# Optional template footer with optional variables
|
|
40
40
|
#
|
|
41
|
-
# @return [Sentdm::Models::
|
|
42
|
-
optional :footer, -> { Sentdm::
|
|
41
|
+
# @return [Sentdm::Models::TemplateDefinition::Footer, nil]
|
|
42
|
+
optional :footer, -> { Sentdm::TemplateDefinition::Footer }, nil?: true
|
|
43
43
|
|
|
44
44
|
# @!attribute header
|
|
45
45
|
# Optional template header with optional variables
|
|
46
46
|
#
|
|
47
|
-
# @return [Sentdm::Models::
|
|
48
|
-
optional :header, -> { Sentdm::
|
|
47
|
+
# @return [Sentdm::Models::TemplateDefinition::Header, nil]
|
|
48
|
+
optional :header, -> { Sentdm::TemplateDefinition::Header }, nil?: true
|
|
49
49
|
|
|
50
50
|
# @!method initialize(body:, authentication_config: nil, buttons: nil, definition_version: nil, footer: nil, header: nil)
|
|
51
51
|
# Some parameter documentations has been truncated, see
|
|
@@ -54,17 +54,257 @@ module Sentdm
|
|
|
54
54
|
# Complete definition of a message template including header, body, footer, and
|
|
55
55
|
# buttons
|
|
56
56
|
#
|
|
57
|
-
# @param body [Sentdm::Models::
|
|
57
|
+
# @param body [Sentdm::Models::TemplateDefinition::Body] Required template body with content for different channels (multi-channel, SMS-s
|
|
58
58
|
#
|
|
59
|
-
# @param authentication_config [Sentdm::Models::
|
|
59
|
+
# @param authentication_config [Sentdm::Models::TemplateDefinition::AuthenticationConfig, nil] Configuration specific to AUTHENTICATION category templates (optional)
|
|
60
60
|
#
|
|
61
|
-
# @param buttons [Array<Sentdm::Models::
|
|
61
|
+
# @param buttons [Array<Sentdm::Models::TemplateDefinition::Button>, nil] Optional list of interactive buttons (e.g., quick replies, URLs, phone numbers)
|
|
62
62
|
#
|
|
63
63
|
# @param definition_version [String, nil] The version of the template definition format
|
|
64
64
|
#
|
|
65
|
-
# @param footer [Sentdm::Models::
|
|
65
|
+
# @param footer [Sentdm::Models::TemplateDefinition::Footer, nil] Optional template footer with optional variables
|
|
66
66
|
#
|
|
67
|
-
# @param header [Sentdm::Models::
|
|
67
|
+
# @param header [Sentdm::Models::TemplateDefinition::Header, nil] Optional template header with optional variables
|
|
68
|
+
|
|
69
|
+
# @see Sentdm::Models::TemplateDefinition#body
|
|
70
|
+
class Body < Sentdm::Internal::Type::BaseModel
|
|
71
|
+
# @!attribute multi_channel
|
|
72
|
+
# Content that will be used for all channels (SMS and WhatsApp) unless
|
|
73
|
+
# channel-specific content is provided
|
|
74
|
+
#
|
|
75
|
+
# @return [Sentdm::Models::TemplateBodyContent, nil]
|
|
76
|
+
optional :multi_channel, -> { Sentdm::TemplateBodyContent }, api_name: :multiChannel, nil?: true
|
|
77
|
+
|
|
78
|
+
# @!attribute sms
|
|
79
|
+
# SMS-specific content that overrides multi-channel content for SMS messages
|
|
80
|
+
#
|
|
81
|
+
# @return [Sentdm::Models::TemplateBodyContent, nil]
|
|
82
|
+
optional :sms, -> { Sentdm::TemplateBodyContent }, nil?: true
|
|
83
|
+
|
|
84
|
+
# @!attribute whatsapp
|
|
85
|
+
# WhatsApp-specific content that overrides multi-channel content for WhatsApp
|
|
86
|
+
# messages
|
|
87
|
+
#
|
|
88
|
+
# @return [Sentdm::Models::TemplateBodyContent, nil]
|
|
89
|
+
optional :whatsapp, -> { Sentdm::TemplateBodyContent }, nil?: true
|
|
90
|
+
|
|
91
|
+
# @!method initialize(multi_channel: nil, sms: nil, whatsapp: nil)
|
|
92
|
+
# Some parameter documentations has been truncated, see
|
|
93
|
+
# {Sentdm::Models::TemplateDefinition::Body} for more details.
|
|
94
|
+
#
|
|
95
|
+
# Required template body with content for different channels (multi-channel,
|
|
96
|
+
# SMS-specific, or WhatsApp-specific)
|
|
97
|
+
#
|
|
98
|
+
# @param multi_channel [Sentdm::Models::TemplateBodyContent, nil] Content that will be used for all channels (SMS and WhatsApp) unless channel-spe
|
|
99
|
+
#
|
|
100
|
+
# @param sms [Sentdm::Models::TemplateBodyContent, nil] SMS-specific content that overrides multi-channel content for SMS messages
|
|
101
|
+
#
|
|
102
|
+
# @param whatsapp [Sentdm::Models::TemplateBodyContent, nil] WhatsApp-specific content that overrides multi-channel content for WhatsApp mess
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# @see Sentdm::Models::TemplateDefinition#authentication_config
|
|
106
|
+
class AuthenticationConfig < Sentdm::Internal::Type::BaseModel
|
|
107
|
+
# @!attribute add_security_recommendation
|
|
108
|
+
# Whether to add the security recommendation text: "For your security, do not
|
|
109
|
+
# share this code."
|
|
110
|
+
#
|
|
111
|
+
# @return [Boolean, nil]
|
|
112
|
+
optional :add_security_recommendation,
|
|
113
|
+
Sentdm::Internal::Type::Boolean,
|
|
114
|
+
api_name: :addSecurityRecommendation
|
|
115
|
+
|
|
116
|
+
# @!attribute code_expiration_minutes
|
|
117
|
+
# Code expiration time in minutes (1-90). If set, adds footer: "This code expires
|
|
118
|
+
# in X minutes."
|
|
119
|
+
#
|
|
120
|
+
# @return [Integer, nil]
|
|
121
|
+
optional :code_expiration_minutes, Integer, api_name: :codeExpirationMinutes, nil?: true
|
|
122
|
+
|
|
123
|
+
# @!method initialize(add_security_recommendation: nil, code_expiration_minutes: nil)
|
|
124
|
+
# Some parameter documentations has been truncated, see
|
|
125
|
+
# {Sentdm::Models::TemplateDefinition::AuthenticationConfig} for more details.
|
|
126
|
+
#
|
|
127
|
+
# Configuration specific to AUTHENTICATION category templates (optional)
|
|
128
|
+
#
|
|
129
|
+
# @param add_security_recommendation [Boolean] Whether to add the security recommendation text: "For your security, do not shar
|
|
130
|
+
#
|
|
131
|
+
# @param code_expiration_minutes [Integer, nil] Code expiration time in minutes (1-90). If set, adds footer: "This code expires
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
class Button < Sentdm::Internal::Type::BaseModel
|
|
135
|
+
# @!attribute id
|
|
136
|
+
# The unique identifier of the button (1-based index)
|
|
137
|
+
#
|
|
138
|
+
# @return [Integer, nil]
|
|
139
|
+
optional :id, Integer
|
|
140
|
+
|
|
141
|
+
# @!attribute props
|
|
142
|
+
# Properties specific to the button type
|
|
143
|
+
#
|
|
144
|
+
# @return [Sentdm::Models::TemplateDefinition::Button::Props, nil]
|
|
145
|
+
optional :props, -> { Sentdm::TemplateDefinition::Button::Props }
|
|
146
|
+
|
|
147
|
+
# @!attribute type
|
|
148
|
+
# The type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, VOICE_CALL, COPY_CODE)
|
|
149
|
+
#
|
|
150
|
+
# @return [String, nil]
|
|
151
|
+
optional :type, String
|
|
152
|
+
|
|
153
|
+
# @!method initialize(id: nil, props: nil, type: nil)
|
|
154
|
+
# Some parameter documentations has been truncated, see
|
|
155
|
+
# {Sentdm::Models::TemplateDefinition::Button} for more details.
|
|
156
|
+
#
|
|
157
|
+
# Interactive button in a message template
|
|
158
|
+
#
|
|
159
|
+
# @param id [Integer] The unique identifier of the button (1-based index)
|
|
160
|
+
#
|
|
161
|
+
# @param props [Sentdm::Models::TemplateDefinition::Button::Props] Properties specific to the button type
|
|
162
|
+
#
|
|
163
|
+
# @param type [String] The type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, VOICE_CALL, COPY_CODE)
|
|
164
|
+
|
|
165
|
+
# @see Sentdm::Models::TemplateDefinition::Button#props
|
|
166
|
+
class Props < Sentdm::Internal::Type::BaseModel
|
|
167
|
+
# @!attribute active_for
|
|
168
|
+
#
|
|
169
|
+
# @return [Integer, nil]
|
|
170
|
+
optional :active_for, Integer, api_name: :activeFor, nil?: true
|
|
171
|
+
|
|
172
|
+
# @!attribute autofill_text
|
|
173
|
+
#
|
|
174
|
+
# @return [String, nil]
|
|
175
|
+
optional :autofill_text, String, api_name: :autofillText, nil?: true
|
|
176
|
+
|
|
177
|
+
# @!attribute country_code
|
|
178
|
+
#
|
|
179
|
+
# @return [String, nil]
|
|
180
|
+
optional :country_code, String, api_name: :countryCode, nil?: true
|
|
181
|
+
|
|
182
|
+
# @!attribute offer_code
|
|
183
|
+
#
|
|
184
|
+
# @return [String, nil]
|
|
185
|
+
optional :offer_code, String, api_name: :offerCode, nil?: true
|
|
186
|
+
|
|
187
|
+
# @!attribute otp_type
|
|
188
|
+
#
|
|
189
|
+
# @return [String, nil]
|
|
190
|
+
optional :otp_type, String, api_name: :otpType, nil?: true
|
|
191
|
+
|
|
192
|
+
# @!attribute package_name
|
|
193
|
+
#
|
|
194
|
+
# @return [String, nil]
|
|
195
|
+
optional :package_name, String, api_name: :packageName, nil?: true
|
|
196
|
+
|
|
197
|
+
# @!attribute phone_number
|
|
198
|
+
#
|
|
199
|
+
# @return [String, nil]
|
|
200
|
+
optional :phone_number, String, api_name: :phoneNumber, nil?: true
|
|
201
|
+
|
|
202
|
+
# @!attribute quick_reply_type
|
|
203
|
+
#
|
|
204
|
+
# @return [String, nil]
|
|
205
|
+
optional :quick_reply_type, String, api_name: :quickReplyType, nil?: true
|
|
206
|
+
|
|
207
|
+
# @!attribute signature_hash
|
|
208
|
+
#
|
|
209
|
+
# @return [String, nil]
|
|
210
|
+
optional :signature_hash, String, api_name: :signatureHash, nil?: true
|
|
211
|
+
|
|
212
|
+
# @!attribute text
|
|
213
|
+
#
|
|
214
|
+
# @return [String, nil]
|
|
215
|
+
optional :text, String, nil?: true
|
|
216
|
+
|
|
217
|
+
# @!attribute url
|
|
218
|
+
#
|
|
219
|
+
# @return [String, nil]
|
|
220
|
+
optional :url, String, nil?: true
|
|
221
|
+
|
|
222
|
+
# @!attribute url_type
|
|
223
|
+
#
|
|
224
|
+
# @return [String, nil]
|
|
225
|
+
optional :url_type, String, api_name: :urlType, nil?: true
|
|
226
|
+
|
|
227
|
+
# @!method initialize(active_for: nil, autofill_text: nil, country_code: nil, offer_code: nil, otp_type: nil, package_name: nil, phone_number: nil, quick_reply_type: nil, signature_hash: nil, text: nil, url: nil, url_type: nil)
|
|
228
|
+
# Properties specific to the button type
|
|
229
|
+
#
|
|
230
|
+
# @param active_for [Integer, nil]
|
|
231
|
+
# @param autofill_text [String, nil]
|
|
232
|
+
# @param country_code [String, nil]
|
|
233
|
+
# @param offer_code [String, nil]
|
|
234
|
+
# @param otp_type [String, nil]
|
|
235
|
+
# @param package_name [String, nil]
|
|
236
|
+
# @param phone_number [String, nil]
|
|
237
|
+
# @param quick_reply_type [String, nil]
|
|
238
|
+
# @param signature_hash [String, nil]
|
|
239
|
+
# @param text [String, nil]
|
|
240
|
+
# @param url [String, nil]
|
|
241
|
+
# @param url_type [String, nil]
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# @see Sentdm::Models::TemplateDefinition#footer
|
|
246
|
+
class Footer < Sentdm::Internal::Type::BaseModel
|
|
247
|
+
# @!attribute template
|
|
248
|
+
# The footer template text with optional variable placeholders
|
|
249
|
+
#
|
|
250
|
+
# @return [String, nil]
|
|
251
|
+
optional :template, String
|
|
252
|
+
|
|
253
|
+
# @!attribute type
|
|
254
|
+
# The type of footer (typically "text")
|
|
255
|
+
#
|
|
256
|
+
# @return [String, nil]
|
|
257
|
+
optional :type, String, nil?: true
|
|
258
|
+
|
|
259
|
+
# @!attribute variables
|
|
260
|
+
# List of variables used in the footer template
|
|
261
|
+
#
|
|
262
|
+
# @return [Array<Sentdm::Models::TemplateVariable>, nil]
|
|
263
|
+
optional :variables, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::TemplateVariable] }, nil?: true
|
|
264
|
+
|
|
265
|
+
# @!method initialize(template: nil, type: nil, variables: nil)
|
|
266
|
+
# Optional template footer with optional variables
|
|
267
|
+
#
|
|
268
|
+
# @param template [String] The footer template text with optional variable placeholders
|
|
269
|
+
#
|
|
270
|
+
# @param type [String, nil] The type of footer (typically "text")
|
|
271
|
+
#
|
|
272
|
+
# @param variables [Array<Sentdm::Models::TemplateVariable>, nil] List of variables used in the footer template
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# @see Sentdm::Models::TemplateDefinition#header
|
|
276
|
+
class Header < Sentdm::Internal::Type::BaseModel
|
|
277
|
+
# @!attribute template
|
|
278
|
+
# The header template text with optional variable placeholders (e.g., "Welcome to
|
|
279
|
+
# {{0:variable}}")
|
|
280
|
+
#
|
|
281
|
+
# @return [String, nil]
|
|
282
|
+
optional :template, String
|
|
283
|
+
|
|
284
|
+
# @!attribute type
|
|
285
|
+
# The type of header (e.g., "text", "image", "video", "document")
|
|
286
|
+
#
|
|
287
|
+
# @return [String, nil]
|
|
288
|
+
optional :type, String, nil?: true
|
|
289
|
+
|
|
290
|
+
# @!attribute variables
|
|
291
|
+
# List of variables used in the header template
|
|
292
|
+
#
|
|
293
|
+
# @return [Array<Sentdm::Models::TemplateVariable>, nil]
|
|
294
|
+
optional :variables, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::TemplateVariable] }, nil?: true
|
|
295
|
+
|
|
296
|
+
# @!method initialize(template: nil, type: nil, variables: nil)
|
|
297
|
+
# Some parameter documentations has been truncated, see
|
|
298
|
+
# {Sentdm::Models::TemplateDefinition::Header} for more details.
|
|
299
|
+
#
|
|
300
|
+
# Optional template header with optional variables
|
|
301
|
+
#
|
|
302
|
+
# @param template [String] The header template text with optional variable placeholders (e.g., "Welcome to
|
|
303
|
+
#
|
|
304
|
+
# @param type [String, nil] The type of header (e.g., "text", "image", "video", "document")
|
|
305
|
+
#
|
|
306
|
+
# @param variables [Array<Sentdm::Models::TemplateVariable>, nil] List of variables used in the header template
|
|
307
|
+
end
|
|
68
308
|
end
|
|
69
309
|
end
|
|
70
310
|
end
|
|
@@ -32,7 +32,7 @@ module Sentdm
|
|
|
32
32
|
#
|
|
33
33
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
|
|
34
34
|
|
|
35
|
-
class Body < Sentdm::Models::
|
|
35
|
+
class Body < Sentdm::Models::MutationRequestBase
|
|
36
36
|
# @!method initialize
|
|
37
37
|
# Request to remove a user from an organization
|
|
38
38
|
end
|
|
@@ -34,7 +34,7 @@ module Sentdm
|
|
|
34
34
|
# @param x_profile_id [String]
|
|
35
35
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
|
|
36
36
|
|
|
37
|
-
class Body < Sentdm::Models::
|
|
37
|
+
class Body < Sentdm::Models::MutationRequestBase
|
|
38
38
|
# @!method initialize
|
|
39
39
|
end
|
|
40
40
|
end
|
data/lib/sentdm/models.rb
CHANGED
|
@@ -43,7 +43,7 @@ module Sentdm
|
|
|
43
43
|
|
|
44
44
|
APIMeta = Sentdm::Models::APIMeta
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
APIResponseOfContact = Sentdm::Models::APIResponseOfContact
|
|
47
47
|
|
|
48
48
|
APIResponseOfProfileDetail = Sentdm::Models::APIResponseOfProfileDetail
|
|
49
49
|
|
|
@@ -53,13 +53,11 @@ module Sentdm
|
|
|
53
53
|
|
|
54
54
|
APIResponseWebhook = Sentdm::Models::APIResponseWebhook
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
BaseDto = Sentdm::Models::BaseDto
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
BillingContactInfo = Sentdm::Models::BillingContactInfo
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
Contact = Sentdm::Models::Contact
|
|
60
|
+
BrandsBrandData = Sentdm::Models::BrandsBrandData
|
|
63
61
|
|
|
64
62
|
ContactCreateParams = Sentdm::Models::ContactCreateParams
|
|
65
63
|
|
|
@@ -67,6 +65,8 @@ module Sentdm
|
|
|
67
65
|
|
|
68
66
|
ContactListParams = Sentdm::Models::ContactListParams
|
|
69
67
|
|
|
68
|
+
ContactResponse = Sentdm::Models::ContactResponse
|
|
69
|
+
|
|
70
70
|
ContactRetrieveParams = Sentdm::Models::ContactRetrieveParams
|
|
71
71
|
|
|
72
72
|
ContactUpdateParams = Sentdm::Models::ContactUpdateParams
|
|
@@ -81,11 +81,15 @@ module Sentdm
|
|
|
81
81
|
|
|
82
82
|
MessageSendParams = Sentdm::Models::MessageSendParams
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
MutationRequestBase = Sentdm::Models::MutationRequestBase
|
|
85
|
+
|
|
86
|
+
NumberLookupParams = Sentdm::Models::NumberLookupParams
|
|
85
87
|
|
|
86
88
|
PaginationMeta = Sentdm::Models::PaginationMeta
|
|
87
89
|
|
|
88
|
-
|
|
90
|
+
PaymentDetails = Sentdm::Models::PaymentDetails
|
|
91
|
+
|
|
92
|
+
ProfileCompleteSetupParams = Sentdm::Models::ProfileCompleteSetupParams
|
|
89
93
|
|
|
90
94
|
ProfileCreateParams = Sentdm::Models::ProfileCreateParams
|
|
91
95
|
|
|
@@ -97,28 +101,12 @@ module Sentdm
|
|
|
97
101
|
|
|
98
102
|
ProfileRetrieveParams = Sentdm::Models::ProfileRetrieveParams
|
|
99
103
|
|
|
104
|
+
Profiles = Sentdm::Models::Profiles
|
|
105
|
+
|
|
100
106
|
ProfileSettings = Sentdm::Models::ProfileSettings
|
|
101
107
|
|
|
102
108
|
ProfileUpdateParams = Sentdm::Models::ProfileUpdateParams
|
|
103
109
|
|
|
104
|
-
SentDmServicesCommonContractsPocOsAuthenticationConfig =
|
|
105
|
-
Sentdm::Models::SentDmServicesCommonContractsPocOsAuthenticationConfig
|
|
106
|
-
|
|
107
|
-
SentDmServicesCommonContractsPocOsTemplateBody =
|
|
108
|
-
Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateBody
|
|
109
|
-
|
|
110
|
-
SentDmServicesCommonContractsPocOsTemplateButton =
|
|
111
|
-
Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateButton
|
|
112
|
-
|
|
113
|
-
SentDmServicesCommonContractsPocOsTemplateButtonProps =
|
|
114
|
-
Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateButtonProps
|
|
115
|
-
|
|
116
|
-
SentDmServicesCommonContractsPocOsTemplateFooter =
|
|
117
|
-
Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateFooter
|
|
118
|
-
|
|
119
|
-
SentDmServicesCommonContractsPocOsTemplateHeader =
|
|
120
|
-
Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateHeader
|
|
121
|
-
|
|
122
110
|
TcrBrandRelationship = Sentdm::Models::TcrBrandRelationship
|
|
123
111
|
|
|
124
112
|
TcrVertical = Sentdm::Models::TcrVertical
|
|
@@ -22,7 +22,7 @@ module Sentdm
|
|
|
22
22
|
#
|
|
23
23
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
24
24
|
#
|
|
25
|
-
# @return [Sentdm::Models::
|
|
25
|
+
# @return [Sentdm::Models::APIResponseOfContact]
|
|
26
26
|
#
|
|
27
27
|
# @see Sentdm::Models::ContactCreateParams
|
|
28
28
|
def create(params = {})
|
|
@@ -33,7 +33,7 @@ module Sentdm
|
|
|
33
33
|
path: "v3/contacts",
|
|
34
34
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
35
35
|
body: parsed.except(*header_params.keys),
|
|
36
|
-
model: Sentdm::
|
|
36
|
+
model: Sentdm::APIResponseOfContact,
|
|
37
37
|
options: options
|
|
38
38
|
)
|
|
39
39
|
end
|
|
@@ -53,7 +53,7 @@ module Sentdm
|
|
|
53
53
|
#
|
|
54
54
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
55
55
|
#
|
|
56
|
-
# @return [Sentdm::Models::
|
|
56
|
+
# @return [Sentdm::Models::APIResponseOfContact]
|
|
57
57
|
#
|
|
58
58
|
# @see Sentdm::Models::ContactRetrieveParams
|
|
59
59
|
def retrieve(id, params = {})
|
|
@@ -62,7 +62,7 @@ module Sentdm
|
|
|
62
62
|
method: :get,
|
|
63
63
|
path: ["v3/contacts/%1$s", id],
|
|
64
64
|
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
65
|
-
model: Sentdm::
|
|
65
|
+
model: Sentdm::APIResponseOfContact,
|
|
66
66
|
options: options
|
|
67
67
|
)
|
|
68
68
|
end
|
|
@@ -89,7 +89,7 @@ module Sentdm
|
|
|
89
89
|
#
|
|
90
90
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
91
91
|
#
|
|
92
|
-
# @return [Sentdm::Models::
|
|
92
|
+
# @return [Sentdm::Models::APIResponseOfContact]
|
|
93
93
|
#
|
|
94
94
|
# @see Sentdm::Models::ContactUpdateParams
|
|
95
95
|
def update(id, params = {})
|
|
@@ -100,7 +100,7 @@ module Sentdm
|
|
|
100
100
|
path: ["v3/contacts/%1$s", id],
|
|
101
101
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
102
102
|
body: parsed.except(*header_params.keys),
|
|
103
|
-
model: Sentdm::
|
|
103
|
+
model: Sentdm::APIResponseOfContact,
|
|
104
104
|
options: options
|
|
105
105
|
)
|
|
106
106
|
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
# Manage and lookup phone numbers
|
|
6
|
+
class Numbers
|
|
7
|
+
# Some parameter documentations has been truncated, see
|
|
8
|
+
# {Sentdm::Models::NumberLookupParams} for more details.
|
|
9
|
+
#
|
|
10
|
+
# Retrieves detailed information about a phone number including carrier, line
|
|
11
|
+
# type, porting status, and VoIP detection. Uses the customer's messaging provider
|
|
12
|
+
# for rich data, with fallback to the internal index.
|
|
13
|
+
#
|
|
14
|
+
# @overload lookup(phone_number, x_profile_id: nil, request_options: {})
|
|
15
|
+
#
|
|
16
|
+
# @param phone_number [String]
|
|
17
|
+
#
|
|
18
|
+
# @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
|
|
19
|
+
#
|
|
20
|
+
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
21
|
+
#
|
|
22
|
+
# @return [Sentdm::Models::NumberLookupResponse]
|
|
23
|
+
#
|
|
24
|
+
# @see Sentdm::Models::NumberLookupParams
|
|
25
|
+
def lookup(phone_number, params = {})
|
|
26
|
+
parsed, options = Sentdm::NumberLookupParams.dump_request(params)
|
|
27
|
+
@client.request(
|
|
28
|
+
method: :get,
|
|
29
|
+
path: ["v3/numbers/lookup/%1$s", phone_number],
|
|
30
|
+
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
31
|
+
model: Sentdm::Models::NumberLookupResponse,
|
|
32
|
+
options: options
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# @api private
|
|
37
|
+
#
|
|
38
|
+
# @param client [Sentdm::Client]
|
|
39
|
+
def initialize(client:)
|
|
40
|
+
@client = client
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
class Profiles
|
|
6
|
+
# Manage organization profiles
|
|
7
|
+
class Campaigns
|
|
8
|
+
# Some parameter documentations has been truncated, see
|
|
9
|
+
# {Sentdm::Models::Profiles::CampaignCreateParams} for more details.
|
|
10
|
+
#
|
|
11
|
+
# Creates a new campaign scoped under the brand of the specified profile. Each
|
|
12
|
+
# campaign must include at least one use case with sample messages.
|
|
13
|
+
#
|
|
14
|
+
# @overload create(profile_id, campaign:, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
15
|
+
#
|
|
16
|
+
# @param profile_id [String] Path param: Profile ID from route
|
|
17
|
+
#
|
|
18
|
+
# @param campaign [Sentdm::Models::Profiles::CampaignData] Body param: Campaign data
|
|
19
|
+
#
|
|
20
|
+
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
21
|
+
#
|
|
22
|
+
# @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
23
|
+
#
|
|
24
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
25
|
+
#
|
|
26
|
+
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
27
|
+
#
|
|
28
|
+
# @return [Sentdm::Models::Profiles::APIResponseOfTcrCampaignWithUseCases]
|
|
29
|
+
#
|
|
30
|
+
# @see Sentdm::Models::Profiles::CampaignCreateParams
|
|
31
|
+
def create(profile_id, params)
|
|
32
|
+
parsed, options = Sentdm::Profiles::CampaignCreateParams.dump_request(params)
|
|
33
|
+
header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
|
|
34
|
+
@client.request(
|
|
35
|
+
method: :post,
|
|
36
|
+
path: ["v3/profiles/%1$s/campaigns", profile_id],
|
|
37
|
+
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
38
|
+
body: parsed.except(*header_params.keys),
|
|
39
|
+
model: Sentdm::Profiles::APIResponseOfTcrCampaignWithUseCases,
|
|
40
|
+
options: options
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Some parameter documentations has been truncated, see
|
|
45
|
+
# {Sentdm::Models::Profiles::CampaignUpdateParams} for more details.
|
|
46
|
+
#
|
|
47
|
+
# Updates an existing campaign under the brand of the specified profile. Cannot
|
|
48
|
+
# update campaigns that have already been submitted to TCR.
|
|
49
|
+
#
|
|
50
|
+
# @overload update(campaign_id, profile_id:, campaign:, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
51
|
+
#
|
|
52
|
+
# @param campaign_id [String] Path param: Campaign ID from route
|
|
53
|
+
#
|
|
54
|
+
# @param profile_id [String] Path param: Profile ID from route
|
|
55
|
+
#
|
|
56
|
+
# @param campaign [Sentdm::Models::Profiles::CampaignData] Body param: Campaign data
|
|
57
|
+
#
|
|
58
|
+
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
59
|
+
#
|
|
60
|
+
# @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
61
|
+
#
|
|
62
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
63
|
+
#
|
|
64
|
+
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
65
|
+
#
|
|
66
|
+
# @return [Sentdm::Models::Profiles::APIResponseOfTcrCampaignWithUseCases]
|
|
67
|
+
#
|
|
68
|
+
# @see Sentdm::Models::Profiles::CampaignUpdateParams
|
|
69
|
+
def update(campaign_id, params)
|
|
70
|
+
parsed, options = Sentdm::Profiles::CampaignUpdateParams.dump_request(params)
|
|
71
|
+
profile_id =
|
|
72
|
+
parsed.delete(:profile_id) do
|
|
73
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
74
|
+
end
|
|
75
|
+
header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
|
|
76
|
+
@client.request(
|
|
77
|
+
method: :put,
|
|
78
|
+
path: ["v3/profiles/%1$s/campaigns/%2$s", profile_id, campaign_id],
|
|
79
|
+
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
80
|
+
body: parsed.except(*header_params.keys),
|
|
81
|
+
model: Sentdm::Profiles::APIResponseOfTcrCampaignWithUseCases,
|
|
82
|
+
options: options
|
|
83
|
+
)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Some parameter documentations has been truncated, see
|
|
87
|
+
# {Sentdm::Models::Profiles::CampaignListParams} for more details.
|
|
88
|
+
#
|
|
89
|
+
# Retrieves all campaigns linked to the profile's brand, including use cases and
|
|
90
|
+
# sample messages. Returns inherited campaigns if inherit_tcr_campaign=true.
|
|
91
|
+
#
|
|
92
|
+
# @overload list(profile_id, x_profile_id: nil, request_options: {})
|
|
93
|
+
#
|
|
94
|
+
# @param profile_id [String] Profile ID from route
|
|
95
|
+
#
|
|
96
|
+
# @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
|
|
97
|
+
#
|
|
98
|
+
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
99
|
+
#
|
|
100
|
+
# @return [Sentdm::Models::Profiles::CampaignListResponse]
|
|
101
|
+
#
|
|
102
|
+
# @see Sentdm::Models::Profiles::CampaignListParams
|
|
103
|
+
def list(profile_id, params = {})
|
|
104
|
+
parsed, options = Sentdm::Profiles::CampaignListParams.dump_request(params)
|
|
105
|
+
@client.request(
|
|
106
|
+
method: :get,
|
|
107
|
+
path: ["v3/profiles/%1$s/campaigns", profile_id],
|
|
108
|
+
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
109
|
+
model: Sentdm::Models::Profiles::CampaignListResponse,
|
|
110
|
+
options: options
|
|
111
|
+
)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Some parameter documentations has been truncated, see
|
|
115
|
+
# {Sentdm::Models::Profiles::CampaignDeleteParams} for more details.
|
|
116
|
+
#
|
|
117
|
+
# Deletes a campaign by ID from the brand of the specified profile. The profile
|
|
118
|
+
# must belong to the authenticated organization.
|
|
119
|
+
#
|
|
120
|
+
# @overload delete(campaign_id, profile_id:, body:, x_profile_id: nil, request_options: {})
|
|
121
|
+
#
|
|
122
|
+
# @param campaign_id [String] Path param: Campaign ID from route parameter
|
|
123
|
+
#
|
|
124
|
+
# @param profile_id [String] Path param: Profile ID from route parameter
|
|
125
|
+
#
|
|
126
|
+
# @param body [Sentdm::Models::Profiles::CampaignDeleteParams::Body] Body param: Request to delete a campaign from a brand
|
|
127
|
+
#
|
|
128
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
129
|
+
#
|
|
130
|
+
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
131
|
+
#
|
|
132
|
+
# @return [nil]
|
|
133
|
+
#
|
|
134
|
+
# @see Sentdm::Models::Profiles::CampaignDeleteParams
|
|
135
|
+
def delete(campaign_id, params)
|
|
136
|
+
parsed, options = Sentdm::Profiles::CampaignDeleteParams.dump_request(params)
|
|
137
|
+
profile_id =
|
|
138
|
+
parsed.delete(:profile_id) do
|
|
139
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
140
|
+
end
|
|
141
|
+
@client.request(
|
|
142
|
+
method: :delete,
|
|
143
|
+
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],
|
|
146
|
+
model: NilClass,
|
|
147
|
+
options: options
|
|
148
|
+
)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# @api private
|
|
152
|
+
#
|
|
153
|
+
# @param client [Sentdm::Client]
|
|
154
|
+
def initialize(client:)
|
|
155
|
+
@client = client
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|