sentdm 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +9 -9
- data/lib/sentdm/client.rb +0 -1
- 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 +8 -1
- data/lib/sentdm/models/contact_list_params.rb +10 -2
- data/lib/sentdm/models/contact_retrieve_params.rb +7 -1
- data/lib/sentdm/models/contact_update_params.rb +13 -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 +7 -1
- data/lib/sentdm/models/message_retrieve_activities_response.rb +19 -5
- data/lib/sentdm/models/message_retrieve_status_params.rb +7 -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 +13 -6
- data/lib/sentdm/models/profile_create_params.rb +192 -10
- data/lib/sentdm/models/profile_delete_params.rb +18 -18
- 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 +7 -1
- data/lib/sentdm/models/profile_update_params.rb +142 -22
- data/lib/sentdm/models/template_create_params.rb +17 -10
- data/lib/sentdm/models/template_delete_params.rb +13 -6
- data/lib/sentdm/models/template_list_params.rb +18 -2
- data/lib/sentdm/models/template_retrieve_params.rb +7 -1
- data/lib/sentdm/models/template_update_params.rb +17 -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 +17 -17
- data/lib/sentdm/models/user_retrieve_params.rb +7 -1
- data/lib/sentdm/models/user_update_role_params.rb +15 -16
- data/lib/sentdm/models/webhook_create_params.rb +13 -6
- data/lib/sentdm/models/webhook_delete_params.rb +7 -1
- data/lib/sentdm/models/webhook_list_event_types_params.rb +7 -1
- data/lib/sentdm/models/webhook_list_events_params.rb +7 -1
- data/lib/sentdm/models/webhook_list_params.rb +7 -1
- data/lib/sentdm/models/webhook_retrieve_params.rb +7 -1
- data/lib/sentdm/models/webhook_rotate_secret_params.rb +7 -1
- data/lib/sentdm/models/webhook_test_params.rb +13 -6
- data/lib/sentdm/models/webhook_toggle_status_params.rb +13 -6
- data/lib/sentdm/models/webhook_update_params.rb +13 -6
- data/lib/sentdm/models.rb +0 -12
- data/lib/sentdm/resources/brands/campaigns.rb +0 -129
- data/lib/sentdm/resources/brands.rb +0 -112
- data/lib/sentdm/resources/contacts.rb +43 -20
- data/lib/sentdm/resources/lookup.rb +0 -21
- data/lib/sentdm/resources/me.rb +24 -5
- data/lib/sentdm/resources/messages.rb +24 -8
- data/lib/sentdm/resources/profiles.rb +116 -32
- data/lib/sentdm/resources/templates.rb +47 -24
- data/lib/sentdm/resources/users.rb +40 -23
- data/lib/sentdm/resources/webhooks.rb +92 -34
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +1 -14
- data/rbi/sentdm/client.rbi +0 -1
- 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 +9 -0
- data/rbi/sentdm/models/contact_list_params.rbi +11 -0
- data/rbi/sentdm/models/contact_retrieve_params.rbi +13 -2
- data/rbi/sentdm/models/contact_update_params.rbi +19 -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 +13 -2
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +18 -6
- data/rbi/sentdm/models/message_retrieve_status_params.rbi +13 -2
- 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 +19 -10
- data/rbi/sentdm/models/profile_create_params.rbi +323 -15
- data/rbi/sentdm/models/profile_delete_params.rbi +36 -24
- 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 +13 -2
- data/rbi/sentdm/models/profile_update_params.rbi +231 -30
- data/rbi/sentdm/models/template_create_params.rbi +22 -13
- data/rbi/sentdm/models/template_delete_params.rbi +19 -10
- data/rbi/sentdm/models/template_list_params.rbi +19 -0
- data/rbi/sentdm/models/template_retrieve_params.rbi +13 -2
- data/rbi/sentdm/models/template_update_params.rbi +22 -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 +35 -23
- data/rbi/sentdm/models/user_retrieve_params.rbi +13 -2
- data/rbi/sentdm/models/user_update_role_params.rbi +23 -25
- data/rbi/sentdm/models/webhook_create_params.rbi +19 -10
- data/rbi/sentdm/models/webhook_delete_params.rbi +13 -2
- data/rbi/sentdm/models/webhook_list_event_types_params.rbi +16 -5
- data/rbi/sentdm/models/webhook_list_events_params.rbi +16 -1
- data/rbi/sentdm/models/webhook_list_params.rbi +9 -0
- data/rbi/sentdm/models/webhook_retrieve_params.rbi +13 -2
- data/rbi/sentdm/models/webhook_rotate_secret_params.rbi +15 -1
- data/rbi/sentdm/models/webhook_test_params.rbi +19 -10
- data/rbi/sentdm/models/webhook_toggle_status_params.rbi +19 -10
- data/rbi/sentdm/models/webhook_update_params.rbi +19 -10
- data/rbi/sentdm/models.rbi +0 -12
- data/rbi/sentdm/resources/brands/campaigns.rbi +0 -95
- data/rbi/sentdm/resources/brands.rbi +0 -80
- data/rbi/sentdm/resources/contacts.rbi +37 -12
- data/rbi/sentdm/resources/lookup.rbi +0 -12
- data/rbi/sentdm/resources/me.rbi +25 -7
- data/rbi/sentdm/resources/messages.rbi +17 -4
- data/rbi/sentdm/resources/profiles.rbi +178 -38
- data/rbi/sentdm/resources/templates.rbi +47 -19
- data/rbi/sentdm/resources/users.rbi +47 -25
- data/rbi/sentdm/resources/webhooks.rbi +92 -20
- 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 +11 -1
- data/sig/sentdm/models/contact_list_params.rbs +8 -1
- data/sig/sentdm/models/contact_retrieve_params.rbs +12 -2
- data/sig/sentdm/models/contact_update_params.rbs +13 -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 +12 -2
- data/sig/sentdm/models/message_retrieve_activities_response.rbs +9 -4
- data/sig/sentdm/models/message_retrieve_status_params.rbs +12 -2
- 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 +13 -6
- data/sig/sentdm/models/profile_create_params.rbs +111 -7
- data/sig/sentdm/models/profile_delete_params.rbs +23 -13
- 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 +8 -1
- data/sig/sentdm/models/profile_update_params.rbs +86 -17
- data/sig/sentdm/models/template_create_params.rbs +15 -8
- data/sig/sentdm/models/template_delete_params.rbs +16 -5
- data/sig/sentdm/models/template_list_params.rbs +13 -1
- data/sig/sentdm/models/template_retrieve_params.rbs +12 -2
- data/sig/sentdm/models/template_update_params.rbs +15 -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 -13
- data/sig/sentdm/models/user_retrieve_params.rbs +8 -1
- data/sig/sentdm/models/user_update_role_params.rbs +17 -17
- data/sig/sentdm/models/webhook_create_params.rbs +13 -6
- data/sig/sentdm/models/webhook_delete_params.rbs +12 -2
- data/sig/sentdm/models/webhook_list_event_types_params.rbs +13 -3
- data/sig/sentdm/models/webhook_list_events_params.rbs +13 -1
- data/sig/sentdm/models/webhook_list_params.rbs +13 -1
- data/sig/sentdm/models/webhook_retrieve_params.rbs +12 -2
- data/sig/sentdm/models/webhook_rotate_secret_params.rbs +8 -1
- data/sig/sentdm/models/webhook_test_params.rbs +13 -6
- data/sig/sentdm/models/webhook_toggle_status_params.rbs +17 -5
- data/sig/sentdm/models/webhook_update_params.rbs +13 -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 +1 -40
- 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 -34
- 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 -48
- data/lib/sentdm/models/brands/campaign_create_params.rb +0 -50
- data/lib/sentdm/models/brands/campaign_delete_params.rb +0 -43
- data/lib/sentdm/models/brands/campaign_list_params.rb +0 -22
- data/lib/sentdm/models/brands/campaign_list_response.rb +0 -47
- data/lib/sentdm/models/brands/campaign_update_params.rb +0 -57
- data/lib/sentdm/models/lookup_retrieve_phone_info_params.rb +0 -20
- 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 -68
- 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 -74
- data/rbi/sentdm/models/brands/campaign_create_params.rbi +0 -79
- data/rbi/sentdm/models/brands/campaign_delete_params.rbi +0 -84
- data/rbi/sentdm/models/brands/campaign_list_params.rbi +0 -37
- data/rbi/sentdm/models/brands/campaign_list_response.rbi +0 -82
- data/rbi/sentdm/models/brands/campaign_update_params.rbi +0 -85
- data/rbi/sentdm/models/lookup_retrieve_phone_info_params.rbi +0 -38
- 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 -36
- 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 -45
- data/sig/sentdm/models/brands/campaign_create_params.rbs +0 -47
- data/sig/sentdm/models/brands/campaign_delete_params.rbs +0 -46
- data/sig/sentdm/models/brands/campaign_list_params.rbs +0 -25
- data/sig/sentdm/models/brands/campaign_list_response.rbs +0 -41
- data/sig/sentdm/models/brands/campaign_update_params.rbs +0 -52
- data/sig/sentdm/models/lookup_retrieve_phone_info_params.rbs +0 -23
- data/sig/sentdm/models/lookup_retrieve_phone_info_response.rbs +0 -102
|
@@ -9,12 +9,16 @@ module Sentdm
|
|
|
9
9
|
sig do
|
|
10
10
|
params(
|
|
11
11
|
id: String,
|
|
12
|
+
x_profile_id: String,
|
|
12
13
|
request_options: Sentdm::RequestOptions::OrHash
|
|
13
14
|
).returns(Sentdm::Models::MessageRetrieveActivitiesResponse)
|
|
14
15
|
end
|
|
15
16
|
def retrieve_activities(
|
|
16
17
|
# Message ID from route parameter
|
|
17
18
|
id,
|
|
19
|
+
# Profile UUID to scope the request to a child profile. Only organization API keys
|
|
20
|
+
# can use this header. The profile must belong to the calling organization.
|
|
21
|
+
x_profile_id: nil,
|
|
18
22
|
request_options: {}
|
|
19
23
|
)
|
|
20
24
|
end
|
|
@@ -24,12 +28,16 @@ module Sentdm
|
|
|
24
28
|
sig do
|
|
25
29
|
params(
|
|
26
30
|
id: String,
|
|
31
|
+
x_profile_id: String,
|
|
27
32
|
request_options: Sentdm::RequestOptions::OrHash
|
|
28
33
|
).returns(Sentdm::Models::MessageRetrieveStatusResponse)
|
|
29
34
|
end
|
|
30
35
|
def retrieve_status(
|
|
31
36
|
# Message ID
|
|
32
37
|
id,
|
|
38
|
+
# Profile UUID to scope the request to a child profile. Only organization API keys
|
|
39
|
+
# can use this header. The profile must belong to the calling organization.
|
|
40
|
+
x_profile_id: nil,
|
|
33
41
|
request_options: {}
|
|
34
42
|
)
|
|
35
43
|
end
|
|
@@ -42,10 +50,11 @@ module Sentdm
|
|
|
42
50
|
sig do
|
|
43
51
|
params(
|
|
44
52
|
channel: T.nilable(T::Array[String]),
|
|
53
|
+
sandbox: T::Boolean,
|
|
45
54
|
template: Sentdm::MessageSendParams::Template::OrHash,
|
|
46
|
-
test_mode: T::Boolean,
|
|
47
55
|
to: T::Array[String],
|
|
48
56
|
idempotency_key: String,
|
|
57
|
+
x_profile_id: String,
|
|
49
58
|
request_options: Sentdm::RequestOptions::OrHash
|
|
50
59
|
).returns(Sentdm::Models::MessageSendResponse)
|
|
51
60
|
end
|
|
@@ -54,11 +63,11 @@ module Sentdm
|
|
|
54
63
|
# produces a separate message per recipient. "sent" = auto-detect, "rcs" =
|
|
55
64
|
# reserved (skipped). Defaults to ["sent"] (auto-detect) if omitted.
|
|
56
65
|
channel: nil,
|
|
66
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
67
|
+
# effects Useful for testing integrations without actual execution
|
|
68
|
+
sandbox: nil,
|
|
57
69
|
# Body param: Template reference (by id or name, with optional parameters)
|
|
58
70
|
template: nil,
|
|
59
|
-
# Body param: Test mode flag - when true, the operation is simulated without side
|
|
60
|
-
# effects Useful for testing integrations without actual execution
|
|
61
|
-
test_mode: nil,
|
|
62
71
|
# Body param: List of recipient phone numbers in E.164 format (multi-recipient
|
|
63
72
|
# fan-out)
|
|
64
73
|
to: nil,
|
|
@@ -66,6 +75,10 @@ module Sentdm
|
|
|
66
75
|
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
67
76
|
# hours per key per customer.
|
|
68
77
|
idempotency_key: nil,
|
|
78
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
79
|
+
# organization API keys can use this header. The profile must belong to the
|
|
80
|
+
# calling organization.
|
|
81
|
+
x_profile_id: nil,
|
|
69
82
|
request_options: {}
|
|
70
83
|
)
|
|
71
84
|
end
|
|
@@ -7,11 +7,47 @@ module Sentdm
|
|
|
7
7
|
# Creates a new sender profile within an organization. Profiles represent
|
|
8
8
|
# different brands, departments, or use cases, each with their own messaging
|
|
9
9
|
# configuration and settings. Requires admin role in the organization.
|
|
10
|
+
#
|
|
11
|
+
# ## WhatsApp Business Account
|
|
12
|
+
#
|
|
13
|
+
# Every profile must be linked to a WhatsApp Business Account. There are two ways
|
|
14
|
+
# to do this:
|
|
15
|
+
#
|
|
16
|
+
# **1. Inherit from organization (default)** — Omit the
|
|
17
|
+
# `whatsapp_business_account` field. The profile will share the organization's
|
|
18
|
+
# WhatsApp Business Account, which must have been set up via WhatsApp Embedded
|
|
19
|
+
# Signup. This is the recommended path for most use cases.
|
|
20
|
+
#
|
|
21
|
+
# **2. Direct credentials** — Provide a `whatsapp_business_account` object with
|
|
22
|
+
# `waba_id`, `phone_number_id`, and `access_token`. Use this when the profile
|
|
23
|
+
# needs its own independent WhatsApp Business Account. Obtain these from Meta
|
|
24
|
+
# Business Manager by creating a System User with `whatsapp_business_messaging`
|
|
25
|
+
# and `whatsapp_business_management` permissions.
|
|
26
|
+
#
|
|
27
|
+
# If the `whatsapp_business_account` field is omitted and the organization has no
|
|
28
|
+
# WhatsApp Business Account configured, the request will be rejected with
|
|
29
|
+
# HTTP 422.
|
|
30
|
+
#
|
|
31
|
+
# ## Brand
|
|
32
|
+
#
|
|
33
|
+
# Include the optional `brand` field to create the brand for this profile at the
|
|
34
|
+
# same time. Cannot be used when `inherit_tcr_brand` is `true`.
|
|
35
|
+
#
|
|
36
|
+
# ## Payment Details
|
|
37
|
+
#
|
|
38
|
+
# When `billing_model` is `"profile"` or `"profile_and_organization"` you may
|
|
39
|
+
# include a `payment_details` object containing the card number, expiry (MM/YY),
|
|
40
|
+
# CVC, and billing ZIP code. Payment details are **never stored** on our servers
|
|
41
|
+
# and are forwarded directly to the payment processor. Providing `payment_details`
|
|
42
|
+
# when `billing_model` is `"organization"` is not allowed.
|
|
10
43
|
sig do
|
|
11
44
|
params(
|
|
12
45
|
allow_contact_sharing: T::Boolean,
|
|
13
46
|
allow_template_sharing: T::Boolean,
|
|
47
|
+
billing_contact:
|
|
48
|
+
T.nilable(Sentdm::ProfileCreateParams::BillingContact::OrHash),
|
|
14
49
|
billing_model: T.nilable(String),
|
|
50
|
+
brand: T.nilable(Sentdm::BrandData::OrHash),
|
|
15
51
|
description: T.nilable(String),
|
|
16
52
|
icon: T.nilable(String),
|
|
17
53
|
inherit_contacts: T.nilable(T::Boolean),
|
|
@@ -19,9 +55,16 @@ module Sentdm
|
|
|
19
55
|
inherit_tcr_campaign: T.nilable(T::Boolean),
|
|
20
56
|
inherit_templates: T.nilable(T::Boolean),
|
|
21
57
|
name: String,
|
|
58
|
+
payment_details:
|
|
59
|
+
T.nilable(Sentdm::ProfileCreateParams::PaymentDetails::OrHash),
|
|
60
|
+
sandbox: T::Boolean,
|
|
22
61
|
short_name: T.nilable(String),
|
|
23
|
-
|
|
62
|
+
whatsapp_business_account:
|
|
63
|
+
T.nilable(
|
|
64
|
+
Sentdm::ProfileCreateParams::WhatsappBusinessAccount::OrHash
|
|
65
|
+
),
|
|
24
66
|
idempotency_key: String,
|
|
67
|
+
x_profile_id: String,
|
|
25
68
|
request_options: Sentdm::RequestOptions::OrHash
|
|
26
69
|
).returns(Sentdm::APIResponseOfProfileDetail)
|
|
27
70
|
end
|
|
@@ -30,9 +73,23 @@ module Sentdm
|
|
|
30
73
|
allow_contact_sharing: nil,
|
|
31
74
|
# Body param: Whether templates are shared across profiles (default: false)
|
|
32
75
|
allow_template_sharing: nil,
|
|
76
|
+
# Body param: Billing contact for this profile. Required when billing_model is
|
|
77
|
+
# "profile" or "profile_and_organization". Identifies who receives invoices and
|
|
78
|
+
# who is responsible for payment.
|
|
79
|
+
billing_contact: nil,
|
|
33
80
|
# Body param: Billing model: profile, organization, or profile_and_organization
|
|
34
|
-
# (default: profile)
|
|
81
|
+
# (default: profile).
|
|
82
|
+
#
|
|
83
|
+
# - "organization": the organization's billing details are used; no profile-level
|
|
84
|
+
# billing info needed.
|
|
85
|
+
# - "profile": the profile is billed independently; billing_contact is required.
|
|
86
|
+
# - "profile_and_organization": the profile is billed first with the organization
|
|
87
|
+
# as fallback; billing_contact is required.
|
|
35
88
|
billing_model: nil,
|
|
89
|
+
# Body param: Brand and KYC information for this profile (optional). When
|
|
90
|
+
# provided, creates the brand associated with this profile. Cannot be set when
|
|
91
|
+
# inherit_tcr_brand is true.
|
|
92
|
+
brand: nil,
|
|
36
93
|
# Body param: Profile description (optional)
|
|
37
94
|
description: nil,
|
|
38
95
|
# Body param: Profile icon URL (optional)
|
|
@@ -51,39 +108,82 @@ module Sentdm
|
|
|
51
108
|
inherit_templates: nil,
|
|
52
109
|
# Body param: Profile name (required)
|
|
53
110
|
name: nil,
|
|
54
|
-
# Body param:
|
|
55
|
-
|
|
56
|
-
#
|
|
111
|
+
# Body param: Payment card details for this profile (optional). Accepted when
|
|
112
|
+
# billing_model is "profile" or "profile_and_organization". Not persisted on our
|
|
113
|
+
# servers — forwarded to the payment processor.
|
|
114
|
+
payment_details: nil,
|
|
115
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
57
116
|
# effects Useful for testing integrations without actual execution
|
|
58
|
-
|
|
117
|
+
sandbox: nil,
|
|
118
|
+
# Body param: Profile short name/abbreviation (optional). Must be 3–11 characters,
|
|
119
|
+
# contain only letters, numbers, and spaces, and include at least one letter.
|
|
120
|
+
# Example: "SALES", "Mkt 2", "Support1".
|
|
121
|
+
short_name: nil,
|
|
122
|
+
# Body param: Direct WhatsApp Business Account credentials for this profile. When
|
|
123
|
+
# provided, the profile uses its own WhatsApp Business Account instead of
|
|
124
|
+
# inheriting from the organization. When omitted, the profile inherits the
|
|
125
|
+
# organization's WhatsApp Business Account (requires the organization to have
|
|
126
|
+
# completed WhatsApp Embedded Signup).
|
|
127
|
+
whatsapp_business_account: nil,
|
|
59
128
|
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
60
129
|
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
61
130
|
# hours per key per customer.
|
|
62
131
|
idempotency_key: nil,
|
|
132
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
133
|
+
# organization API keys can use this header. The profile must belong to the
|
|
134
|
+
# calling organization.
|
|
135
|
+
x_profile_id: nil,
|
|
63
136
|
request_options: {}
|
|
64
137
|
)
|
|
65
138
|
end
|
|
66
139
|
|
|
67
140
|
# Retrieves detailed information about a specific sender profile within an
|
|
68
|
-
# organization
|
|
141
|
+
# organization, including brand and KYC information if a brand has been
|
|
142
|
+
# configured.
|
|
69
143
|
sig do
|
|
70
144
|
params(
|
|
71
145
|
profile_id: String,
|
|
146
|
+
x_profile_id: String,
|
|
72
147
|
request_options: Sentdm::RequestOptions::OrHash
|
|
73
148
|
).returns(Sentdm::APIResponseOfProfileDetail)
|
|
74
149
|
end
|
|
75
|
-
def retrieve(
|
|
150
|
+
def retrieve(
|
|
151
|
+
profile_id,
|
|
152
|
+
# Profile UUID to scope the request to a child profile. Only organization API keys
|
|
153
|
+
# can use this header. The profile must belong to the calling organization.
|
|
154
|
+
x_profile_id: nil,
|
|
155
|
+
request_options: {}
|
|
156
|
+
)
|
|
76
157
|
end
|
|
77
158
|
|
|
78
159
|
# Updates a profile's configuration and settings. Requires admin role in the
|
|
79
160
|
# organization. Only provided fields will be updated (partial update).
|
|
161
|
+
#
|
|
162
|
+
# ## Brand Management
|
|
163
|
+
#
|
|
164
|
+
# Include the optional `brand` field to create or update the brand associated with
|
|
165
|
+
# this profile. The brand holds KYC and TCR compliance data (legal business info,
|
|
166
|
+
# contact details, messaging vertical). Once a brand has been submitted to TCR it
|
|
167
|
+
# cannot be modified. Setting `inherit_tcr_brand: true` and providing `brand` in
|
|
168
|
+
# the same request is not allowed.
|
|
169
|
+
#
|
|
170
|
+
# ## Payment Details
|
|
171
|
+
#
|
|
172
|
+
# When `billing_model` is `"profile"` or `"profile_and_organization"` you may
|
|
173
|
+
# include a `payment_details` object containing the card number, expiry (MM/YY),
|
|
174
|
+
# CVC, and billing ZIP code. Payment details are **never stored** on our servers
|
|
175
|
+
# and are forwarded directly to the payment processor. Providing `payment_details`
|
|
176
|
+
# when `billing_model` is `"organization"` is not allowed.
|
|
80
177
|
sig do
|
|
81
178
|
params(
|
|
82
|
-
|
|
179
|
+
profile_id: String,
|
|
83
180
|
allow_contact_sharing: T.nilable(T::Boolean),
|
|
84
181
|
allow_number_change_during_onboarding: T.nilable(T::Boolean),
|
|
85
182
|
allow_template_sharing: T.nilable(T::Boolean),
|
|
183
|
+
billing_contact:
|
|
184
|
+
T.nilable(Sentdm::ProfileUpdateParams::BillingContact::OrHash),
|
|
86
185
|
billing_model: T.nilable(String),
|
|
186
|
+
brand: T.nilable(Sentdm::BrandData::OrHash),
|
|
87
187
|
description: T.nilable(String),
|
|
88
188
|
icon: T.nilable(String),
|
|
89
189
|
inherit_contacts: T.nilable(T::Boolean),
|
|
@@ -91,29 +191,47 @@ module Sentdm
|
|
|
91
191
|
inherit_tcr_campaign: T.nilable(T::Boolean),
|
|
92
192
|
inherit_templates: T.nilable(T::Boolean),
|
|
93
193
|
name: T.nilable(String),
|
|
94
|
-
|
|
194
|
+
payment_details:
|
|
195
|
+
T.nilable(Sentdm::ProfileUpdateParams::PaymentDetails::OrHash),
|
|
196
|
+
sandbox: T::Boolean,
|
|
95
197
|
sending_phone_number: T.nilable(String),
|
|
96
198
|
sending_phone_number_profile_id: T.nilable(String),
|
|
97
199
|
sending_whatsapp_number_profile_id: T.nilable(String),
|
|
98
200
|
short_name: T.nilable(String),
|
|
99
|
-
test_mode: T::Boolean,
|
|
100
201
|
whatsapp_phone_number: T.nilable(String),
|
|
101
202
|
idempotency_key: String,
|
|
203
|
+
x_profile_id: String,
|
|
102
204
|
request_options: Sentdm::RequestOptions::OrHash
|
|
103
205
|
).returns(Sentdm::APIResponseOfProfileDetail)
|
|
104
206
|
end
|
|
105
207
|
def update(
|
|
106
208
|
# Path param
|
|
107
|
-
|
|
209
|
+
profile_id,
|
|
108
210
|
# Body param: Whether contacts are shared across profiles (optional)
|
|
109
211
|
allow_contact_sharing: nil,
|
|
110
212
|
# Body param: Whether number changes are allowed during onboarding (optional)
|
|
111
213
|
allow_number_change_during_onboarding: nil,
|
|
112
214
|
# Body param: Whether templates are shared across profiles (optional)
|
|
113
215
|
allow_template_sharing: nil,
|
|
216
|
+
# Body param: Billing contact for this profile. Required when billing_model is
|
|
217
|
+
# "profile" or "profile_and_organization" and no billing contact has been
|
|
218
|
+
# configured yet. Identifies who receives invoices and who is responsible for
|
|
219
|
+
# payment.
|
|
220
|
+
billing_contact: nil,
|
|
114
221
|
# Body param: Billing model: profile, organization, or profile_and_organization
|
|
115
|
-
# (optional)
|
|
222
|
+
# (optional).
|
|
223
|
+
#
|
|
224
|
+
# - "organization": the organization's billing details are used; no profile-level
|
|
225
|
+
# billing info needed.
|
|
226
|
+
# - "profile": the profile is billed independently; billing_contact is required.
|
|
227
|
+
# - "profile_and_organization": the profile is billed first with the organization
|
|
228
|
+
# as fallback; billing_contact is required.
|
|
116
229
|
billing_model: nil,
|
|
230
|
+
# Body param: Brand and KYC information for this profile (optional). When
|
|
231
|
+
# provided, creates or updates the brand associated with this profile. Cannot be
|
|
232
|
+
# set when inherit_tcr_brand is true. Once a brand has been submitted to TCR it
|
|
233
|
+
# cannot be modified.
|
|
234
|
+
brand: nil,
|
|
117
235
|
# Body param: Profile description (optional)
|
|
118
236
|
description: nil,
|
|
119
237
|
# Body param: Profile icon URL (optional)
|
|
@@ -129,8 +247,13 @@ module Sentdm
|
|
|
129
247
|
inherit_templates: nil,
|
|
130
248
|
# Body param: Profile name (optional)
|
|
131
249
|
name: nil,
|
|
132
|
-
# Body param:
|
|
133
|
-
|
|
250
|
+
# Body param: Payment card details for this profile (optional). Accepted when
|
|
251
|
+
# billing_model is "profile" or "profile_and_organization". Not persisted on our
|
|
252
|
+
# servers — forwarded to the payment processor.
|
|
253
|
+
payment_details: nil,
|
|
254
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
255
|
+
# effects Useful for testing integrations without actual execution
|
|
256
|
+
sandbox: nil,
|
|
134
257
|
# Body param: Direct phone number for SMS sending (optional)
|
|
135
258
|
sending_phone_number: nil,
|
|
136
259
|
# Body param: Reference to another profile to use for SMS/Telnyx configuration
|
|
@@ -139,49 +262,61 @@ module Sentdm
|
|
|
139
262
|
# Body param: Reference to another profile to use for WhatsApp configuration
|
|
140
263
|
# (optional)
|
|
141
264
|
sending_whatsapp_number_profile_id: nil,
|
|
142
|
-
# Body param: Profile short name/abbreviation (optional)
|
|
265
|
+
# Body param: Profile short name/abbreviation (optional). Must be 3–11 characters,
|
|
266
|
+
# contain only letters, numbers, and spaces, and include at least one letter.
|
|
267
|
+
# Example: "SALES", "Mkt 2", "Support1".
|
|
143
268
|
short_name: nil,
|
|
144
|
-
# Body param: Test mode flag - when true, the operation is simulated without side
|
|
145
|
-
# effects Useful for testing integrations without actual execution
|
|
146
|
-
test_mode: nil,
|
|
147
269
|
# Body param: Direct phone number for WhatsApp sending (optional)
|
|
148
270
|
whatsapp_phone_number: nil,
|
|
149
271
|
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
150
272
|
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
151
273
|
# hours per key per customer.
|
|
152
274
|
idempotency_key: nil,
|
|
275
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
276
|
+
# organization API keys can use this header. The profile must belong to the
|
|
277
|
+
# calling organization.
|
|
278
|
+
x_profile_id: nil,
|
|
153
279
|
request_options: {}
|
|
154
280
|
)
|
|
155
281
|
end
|
|
156
282
|
|
|
157
|
-
# Retrieves all sender profiles within an organization
|
|
158
|
-
#
|
|
159
|
-
# their own messaging
|
|
283
|
+
# Retrieves all sender profiles within an organization, including brand
|
|
284
|
+
# information for each profile. Profiles represent different brands, departments,
|
|
285
|
+
# or use cases within an organization, each with their own messaging
|
|
286
|
+
# configuration.
|
|
160
287
|
sig do
|
|
161
|
-
params(
|
|
162
|
-
|
|
163
|
-
|
|
288
|
+
params(
|
|
289
|
+
x_profile_id: String,
|
|
290
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
291
|
+
).returns(Sentdm::Models::ProfileListResponse)
|
|
164
292
|
end
|
|
165
|
-
def list(
|
|
293
|
+
def list(
|
|
294
|
+
# Profile UUID to scope the request to a child profile. Only organization API keys
|
|
295
|
+
# can use this header. The profile must belong to the calling organization.
|
|
296
|
+
x_profile_id: nil,
|
|
297
|
+
request_options: {}
|
|
298
|
+
)
|
|
166
299
|
end
|
|
167
300
|
|
|
168
301
|
# Soft deletes a sender profile. The profile will be marked as deleted but data is
|
|
169
302
|
# retained. Requires admin role in the organization.
|
|
170
303
|
sig do
|
|
171
304
|
params(
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
305
|
+
profile_id: String,
|
|
306
|
+
body: Sentdm::ProfileDeleteParams::Body::OrHash,
|
|
307
|
+
x_profile_id: String,
|
|
175
308
|
request_options: Sentdm::RequestOptions::OrHash
|
|
176
309
|
).void
|
|
177
310
|
end
|
|
178
311
|
def delete(
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
#
|
|
184
|
-
|
|
312
|
+
# Path param
|
|
313
|
+
profile_id,
|
|
314
|
+
# Body param: Request to delete a profile
|
|
315
|
+
body:,
|
|
316
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
317
|
+
# organization API keys can use this header. The profile must belong to the
|
|
318
|
+
# calling organization.
|
|
319
|
+
x_profile_id: nil,
|
|
185
320
|
request_options: {}
|
|
186
321
|
)
|
|
187
322
|
end
|
|
@@ -208,8 +343,9 @@ module Sentdm
|
|
|
208
343
|
params(
|
|
209
344
|
profile_id: String,
|
|
210
345
|
web_hook_url: String,
|
|
211
|
-
|
|
346
|
+
sandbox: T::Boolean,
|
|
212
347
|
idempotency_key: String,
|
|
348
|
+
x_profile_id: String,
|
|
213
349
|
request_options: Sentdm::RequestOptions::OrHash
|
|
214
350
|
).returns(T.anything)
|
|
215
351
|
end
|
|
@@ -219,13 +355,17 @@ module Sentdm
|
|
|
219
355
|
# Body param: Webhook URL to call when profile completion finishes (success or
|
|
220
356
|
# failure)
|
|
221
357
|
web_hook_url:,
|
|
222
|
-
# Body param:
|
|
358
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
223
359
|
# effects Useful for testing integrations without actual execution
|
|
224
|
-
|
|
360
|
+
sandbox: nil,
|
|
225
361
|
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
226
362
|
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
227
363
|
# hours per key per customer.
|
|
228
364
|
idempotency_key: nil,
|
|
365
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
366
|
+
# organization API keys can use this header. The profile must belong to the
|
|
367
|
+
# calling organization.
|
|
368
|
+
x_profile_id: nil,
|
|
229
369
|
request_options: {}
|
|
230
370
|
)
|
|
231
371
|
end
|
|
@@ -13,9 +13,10 @@ module Sentdm
|
|
|
13
13
|
creation_source: T.nilable(String),
|
|
14
14
|
definition: Sentdm::TemplateDefinition::OrHash,
|
|
15
15
|
language: T.nilable(String),
|
|
16
|
+
sandbox: T::Boolean,
|
|
16
17
|
submit_for_review: T::Boolean,
|
|
17
|
-
test_mode: T::Boolean,
|
|
18
18
|
idempotency_key: String,
|
|
19
|
+
x_profile_id: String,
|
|
19
20
|
request_options: Sentdm::RequestOptions::OrHash
|
|
20
21
|
).returns(Sentdm::APIResponseTemplate)
|
|
21
22
|
end
|
|
@@ -30,16 +31,20 @@ module Sentdm
|
|
|
30
31
|
# Body param: Template language code (e.g., en_US) (optional, auto-detected if not
|
|
31
32
|
# provided)
|
|
32
33
|
language: nil,
|
|
34
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
35
|
+
# effects Useful for testing integrations without actual execution
|
|
36
|
+
sandbox: nil,
|
|
33
37
|
# Body param: Whether to submit the template for review after creation (default:
|
|
34
38
|
# false)
|
|
35
39
|
submit_for_review: nil,
|
|
36
|
-
# Body param: Test mode flag - when true, the operation is simulated without side
|
|
37
|
-
# effects Useful for testing integrations without actual execution
|
|
38
|
-
test_mode: nil,
|
|
39
40
|
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
40
41
|
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
41
42
|
# hours per key per customer.
|
|
42
43
|
idempotency_key: nil,
|
|
44
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
45
|
+
# organization API keys can use this header. The profile must belong to the
|
|
46
|
+
# calling organization.
|
|
47
|
+
x_profile_id: nil,
|
|
43
48
|
request_options: {}
|
|
44
49
|
)
|
|
45
50
|
end
|
|
@@ -49,12 +54,16 @@ module Sentdm
|
|
|
49
54
|
sig do
|
|
50
55
|
params(
|
|
51
56
|
id: String,
|
|
57
|
+
x_profile_id: String,
|
|
52
58
|
request_options: Sentdm::RequestOptions::OrHash
|
|
53
59
|
).returns(Sentdm::APIResponseTemplate)
|
|
54
60
|
end
|
|
55
61
|
def retrieve(
|
|
56
62
|
# Template ID from route parameter
|
|
57
63
|
id,
|
|
64
|
+
# Profile UUID to scope the request to a child profile. Only organization API keys
|
|
65
|
+
# can use this header. The profile must belong to the calling organization.
|
|
66
|
+
x_profile_id: nil,
|
|
58
67
|
request_options: {}
|
|
59
68
|
)
|
|
60
69
|
end
|
|
@@ -68,9 +77,10 @@ module Sentdm
|
|
|
68
77
|
definition: T.nilable(Sentdm::TemplateDefinition::OrHash),
|
|
69
78
|
language: T.nilable(String),
|
|
70
79
|
name: T.nilable(String),
|
|
80
|
+
sandbox: T::Boolean,
|
|
71
81
|
submit_for_review: T::Boolean,
|
|
72
|
-
test_mode: T::Boolean,
|
|
73
82
|
idempotency_key: String,
|
|
83
|
+
x_profile_id: String,
|
|
74
84
|
request_options: Sentdm::RequestOptions::OrHash
|
|
75
85
|
).returns(Sentdm::APIResponseTemplate)
|
|
76
86
|
end
|
|
@@ -85,16 +95,20 @@ module Sentdm
|
|
|
85
95
|
language: nil,
|
|
86
96
|
# Body param: Template display name
|
|
87
97
|
name: nil,
|
|
98
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
99
|
+
# effects Useful for testing integrations without actual execution
|
|
100
|
+
sandbox: nil,
|
|
88
101
|
# Body param: Whether to submit the template for review after updating (default:
|
|
89
102
|
# false)
|
|
90
103
|
submit_for_review: nil,
|
|
91
|
-
# Body param: Test mode flag - when true, the operation is simulated without side
|
|
92
|
-
# effects Useful for testing integrations without actual execution
|
|
93
|
-
test_mode: nil,
|
|
94
104
|
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
95
105
|
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
96
106
|
# hours per key per customer.
|
|
97
107
|
idempotency_key: nil,
|
|
108
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
109
|
+
# organization API keys can use this header. The profile must belong to the
|
|
110
|
+
# calling organization.
|
|
111
|
+
x_profile_id: nil,
|
|
98
112
|
request_options: {}
|
|
99
113
|
)
|
|
100
114
|
end
|
|
@@ -106,21 +120,30 @@ module Sentdm
|
|
|
106
120
|
page: Integer,
|
|
107
121
|
page_size: Integer,
|
|
108
122
|
category: T.nilable(String),
|
|
123
|
+
is_welcome_playground: T.nilable(T::Boolean),
|
|
109
124
|
search: T.nilable(String),
|
|
110
125
|
status: T.nilable(String),
|
|
126
|
+
x_profile_id: String,
|
|
111
127
|
request_options: Sentdm::RequestOptions::OrHash
|
|
112
128
|
).returns(Sentdm::Models::TemplateListResponse)
|
|
113
129
|
end
|
|
114
130
|
def list(
|
|
115
|
-
# Page number (1-indexed)
|
|
131
|
+
# Query param: Page number (1-indexed)
|
|
116
132
|
page:,
|
|
133
|
+
# Query param: Number of items per page
|
|
117
134
|
page_size:,
|
|
118
|
-
# Optional category filter: MARKETING, UTILITY, AUTHENTICATION
|
|
135
|
+
# Query param: Optional category filter: MARKETING, UTILITY, AUTHENTICATION
|
|
119
136
|
category: nil,
|
|
120
|
-
# Optional
|
|
137
|
+
# Query param: Optional filter by welcome playground flag
|
|
138
|
+
is_welcome_playground: nil,
|
|
139
|
+
# Query param: Optional search term for filtering templates
|
|
121
140
|
search: nil,
|
|
122
|
-
# Optional status filter: APPROVED, PENDING, REJECTED
|
|
141
|
+
# Query param: Optional status filter: APPROVED, PENDING, REJECTED
|
|
123
142
|
status: nil,
|
|
143
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
144
|
+
# organization API keys can use this header. The profile must belong to the
|
|
145
|
+
# calling organization.
|
|
146
|
+
x_profile_id: nil,
|
|
124
147
|
request_options: {}
|
|
125
148
|
)
|
|
126
149
|
end
|
|
@@ -131,19 +154,24 @@ module Sentdm
|
|
|
131
154
|
params(
|
|
132
155
|
id: String,
|
|
133
156
|
delete_from_meta: T.nilable(T::Boolean),
|
|
134
|
-
|
|
157
|
+
sandbox: T::Boolean,
|
|
158
|
+
x_profile_id: String,
|
|
135
159
|
request_options: Sentdm::RequestOptions::OrHash
|
|
136
160
|
).void
|
|
137
161
|
end
|
|
138
162
|
def delete(
|
|
139
|
-
# Template ID from route parameter
|
|
163
|
+
# Path param: Template ID from route parameter
|
|
140
164
|
id,
|
|
141
|
-
# Whether to also delete the template from WhatsApp/Meta (optional,
|
|
142
|
-
# false)
|
|
165
|
+
# Body param: Whether to also delete the template from WhatsApp/Meta (optional,
|
|
166
|
+
# defaults to false)
|
|
143
167
|
delete_from_meta: nil,
|
|
144
|
-
#
|
|
145
|
-
# Useful for testing integrations without actual execution
|
|
146
|
-
|
|
168
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
169
|
+
# effects Useful for testing integrations without actual execution
|
|
170
|
+
sandbox: nil,
|
|
171
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
172
|
+
# organization API keys can use this header. The profile must belong to the
|
|
173
|
+
# calling organization.
|
|
174
|
+
x_profile_id: nil,
|
|
147
175
|
request_options: {}
|
|
148
176
|
)
|
|
149
177
|
end
|