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